The most critical node in any Arduino wiring diagram involving external high-current loads is the common ground (GND) shared between the microcontroller and the motor driver. Without this equipotential bond, the 5V logic signals from the Arduino Uno R3 will float relative to the L298N H-bridge logic gates, resulting in erratic motor jitter, unresponsive direction control, or permanently damaged I/O pins. This guide provides a complete node-by-node trace of a standard 12V DC motor control circuit, translating schematic symbols into physical breadboard and screw-terminal connections.
Decoding the Arduino Wiring Diagram Symbols and Layout
Before tracing the wires, you must map the schematic symbols to the physical terminals on your workbench. Standard diagramming tools like Fritzing or KiCad use specific conventions for motor control circuits:
- VCC / VS (Voltage Source): Represented by a solid dot or an upward arrow. On the physical L298N module, this is the
12Vscrew terminal (which accepts 5V to 35V DC, despite the silkscreen label). - GND (Ground): Represented by a vertical line with three decreasing horizontal lines beneath it. On the L298N, this is the middle screw terminal flanked by the 12V and 5V terminals.
- PWM (Pulse Width Modulation): Denoted by a tilde (
~) next to the Arduino pin number (e.g.,9~). This indicates a hardware-timer-backed pin capable of outputting a variable duty cycle square wave, essential for motor speed control viaanalogWrite()(Arduino PWM Reference). - H-Bridge Block: Drawn as a square or diamond with four internal switches (MOSFETs or BJTs). Physically, this is the large 15-pin Multiwatt package bolted to the aluminum heatsink on the L298N board.
- Flyback Diodes: Drawn as triangles with a bar, pointing opposite to conventional current flow. On most modern L298N breakout boards, these 1N4007 diodes are already soldered in parallel with the output terminals to suppress back-EMF voltage spikes.
Locate the small plastic jumper cap on the L298N module near the 5V output pin. If your motor supply voltage is 12V or less, leave this cap ON to enable the onboard 7805 linear voltage regulator, which will power the Arduino. If your motor supply exceeds 12V, you MUST remove this cap to prevent the 7805 from overheating and failing, and instead feed the Arduino from a separate 5V source.
Node-by-Node Trace: Power, Ground, and Signal Paths
A robust wiring diagram separates high-current motor paths from low-current logic paths. Here is the exact textual trace from source to load for all three distinct circuits in this setup.
Trace 1: High-Current Motor Drive (Source to Load)
- Source: 12V Battery Pack Positive (+) terminal.
- Node A: L298N
12Vscrew terminal (inputs power to the internal H-bridge MOSFETs). - Node B: L298N
OUT1screw terminal (switched output, controlled by IN1/IN2 logic states). - Load: DC Motor Positive (+) brush terminal.
- Load Return: DC Motor Negative (-) brush terminal.
- Node C: L298N
OUT2screw terminal. - Node D: L298N
GNDscrew terminal (completes the high-current circuit back to the battery).
Trace 2: Logic Power and Equipotential Ground Path
This path ensures the Arduino and the L298N share the exact same 0V reference plane.
- Source: L298N
12Vterminal (taps into the main battery supply). - Node E: Onboard 7805 Voltage Regulator input.
- Node F: L298N
5Vmale header pin (outputs regulated 5V). - Destination: Arduino Uno R3
5Vpin (powers the ATmega328P microcontroller). - Ground Bond: L298N
GNDscrew terminal must connect directly to the Arduino Uno R3GNDpin. Without this specific wire, the logic signals have no return path.
Trace 3: Control Signal Path
- Speed Control: Arduino Pin
9~(PWM) wires to L298NENAmale header (jumper cap removed). - Direction Logic A: Arduino Pin
8wires to L298NIN1male header. - Direction Logic B: Arduino Pin
7wires to L298NIN2male header.
Terminal and Pin Mapping Table
Use this spec-sheet table to verify your physical wiring against the schematic. Wire colors listed follow standard DC electronics conventions (Red for VCC, Black for GND, Yellow/Orange for signals), though your specific kit may vary.
| Physical Component | Terminal / Pin Label | Wire Color | Connected To | Function / Notes |
|---|---|---|---|---|
| 12V Battery Pack | Positive (+) | Red | L298N 12V Terminal | Main high-current source |
| 12V Battery Pack | Negative (-) | Black | L298N GND Terminal | Main high-current return |
| L298N Module | GND Terminal | Black | Arduino Uno GND Pin | Critical logic common ground |
| L298N Module | 5V Header Pin | Red | Arduino Uno 5V Pin | Logic power (if 7805 is active) |
| L298N Module | ENA Header Pin | Yellow | Arduino Uno Pin 9~ | PWM speed control for Motor A |
| L298N Module | IN1 Header Pin | Orange | Arduino Uno Pin 8 | Digital logic for forward/reverse |
| L298N Module | IN2 Header Pin | Orange | Arduino Uno Pin 7 | Digital logic for forward/reverse |
| L298N Module | OUT1 Terminal | Blue | DC Motor Terminal 1 | Switched motor power |
| L298N Module | OUT2 Terminal | Blue | DC Motor Terminal 2 | Switched motor return |
Verifying Connections with a Multimeter
Before uploading code or applying main battery power, verify your physical wiring diagram translation using a digital multimeter (DMM). This prevents short circuits that can instantly destroy the ATmega328P.
- Verify the Common Ground (Continuity Test): Set your DMM to continuity mode (the diode or sound-wave icon). With all power disconnected, place the red probe on the Arduino Uno GND pin and the black probe on the metal tab of the L298N heatsink (which is internally tied to the GND screw terminal). The meter should beep and read less than 1.0 Ω. If it reads OL (Open Loop), your common ground wire is missing or broken.
- Check for Logic Shorts (Resistance Test): Set the DMM to resistance (Ω). Measure between the Arduino 5V pin and the GND pin. You should read a high resistance (typically 3 kΩ to 10 kΩ due to onboard decoupling capacitors and the microcontroller's internal impedance). If it reads near 0 Ω, you have a solder bridge or a miswired power rail that will cause a dead short.
- Verify Logic Power (DC Voltage Test): Connect only the 12V battery to the L298N. Set the DMM to DC Voltage (20V range). Place the black probe on Arduino GND and the red probe on the Arduino 5V pin. The display must read between 4.8V and 5.2V. If it reads 12V, the 7805 regulator has failed and is passing raw battery voltage to the logic rail—disconnect immediately to save the Arduino.
- Verify PWM Signal (DC Voltage Test): Upload a test sketch that runs
analogWrite(9, 127);(a 50% duty cycle). Back-probe the Arduino Pin 9 header with the DMM red probe (black probe on GND). Because a standard DMM averages the high-frequency square wave, a 50% duty cycle on a 5V logic pin will display approximately 2.5V DC. If it reads 0V or 5V solid, the pin is not outputting PWM.
When troubleshooting motor stall currents, never place your DMM in current-measurement mode (Amps) across the 12V and GND terminals. The meter's internal shunt has near-zero resistance, which will create a dead short, blow the DMM's internal fuse, and potentially weld the probe tips. Always measure current by breaking the circuit and placing the meter in series with the load.
Frequently Asked Questions
Why is my Arduino resetting when the motor starts in this wiring diagram?
This is a classic brownout caused by voltage sag. DC motors draw 3 to 5 times their rated running current during startup (stall current). If your 12V battery pack cannot supply this surge, the voltage drops, causing the L298N's 7805 regulator output to dip below the Arduino's brownout detection threshold (typically 2.7V), triggering an automatic reset. Fix this by adding a large electrolytic decoupling capacitor (e.g., 1000µF, 25V) directly across the L298N 12V and GND screw terminals to supply the transient surge, or upgrade to a battery chemistry with a lower internal resistance, like LiFePO4.
Can I use the Arduino 5V pin to power the L298N logic instead of the onboard regulator?
Yes, but you must alter the physical wiring. First, remove the 5V jumper cap on the L298N module to disable the internal 7805 regulator. Next, wire the Arduino's 5V pin directly to the L298N's 5V male header pin. This is highly recommended if you are powering the Arduino via USB from a laptop, as it prevents the L298N's regulator from back-feeding 5V into the USB port and damaging your computer's motherboard. The common GND connection remains mandatory.
What does the tilde (~) symbol mean on the Arduino wiring diagram pins?
The tilde indicates that the pin is connected to one of the ATmega328P's internal hardware timers (Timer0, Timer1, or Timer2). These pins can generate a hardware-level Pulse Width Modulation (PWM) square wave at roughly 490 Hz or 980 Hz without requiring the CPU to manually toggle the pin state in the code loop. For motor speed control via the L298N ENA pin, you must use a tilde-marked pin (3, 5, 6, 9, 10, or 11 on the Uno R3) and control it using the analogWrite() function.
How do I reverse the motor direction using this diagram?
Direction is controlled by the logic states of IN1 and IN2, which dictate which internal MOSFETs in the H-bridge are conducting (All About Circuits H-Bridge Guide). To spin the motor forward, set IN1 HIGH and IN2 LOW. To reverse it, set IN1 LOW and IN2 HIGH. Setting both LOW stops the motor (coasting), while setting both HIGH applies dynamic braking, shorting the motor terminals together through the driver to stop it rapidly. The ENA pin merely enables or disables the entire H-bridge block regardless of the IN1/IN2 states.






