Component · Driver
L298N Motor Driver
The L298N is the dual H-bridge that lets a microcontroller drive two DC motors forward and back. How an H-bridge works, how to wire it, and its real limits.
What it is
The L298N is a dual H-bridge motor driver—the muscle between a microcontroller’s delicate logic pins and a motor that wants far more current than those pins can supply. A microcontroller pin can source only a few tens of milliamps; even a small geared DC motor pulls hundreds. The L298N takes low-power direction and speed signals from the board and switches a separate, higher-current motor supply to match. It drives two motors independently, which is exactly what a two-wheeled robot needs.
It is dated—an efficient MOSFET driver like a TB6612FNG or DRV8833 runs cooler and wastes less voltage—but the L298N is everywhere, cheap, rugged, and the module most robotics kits ship with, so it is worth understanding well.
How an H-bridge works
An H-bridge is four switches arranged around the motor in an “H”. Close the top-left and bottom-right switches and current flows one way—the motor spins forward. Close the opposite pair and current reverses—the motor spins backward. That is the whole trick: an H-bridge lets you reverse a motor without rewiring it.
You control each motor with three signals:
- Two direction pins (IN1/IN2) pick forward, reverse, or brake.
- One enable pin (ENA), fed a PWM signal, sets speed by switching the bridge on and off quickly. Full-on PWM is full speed; 50% duty is roughly half.
Feed the enable pin the output of a control loop and you can hold a target speed or steer a robot smoothly instead of lurching between stop and full-tilt.
When to use it
Reach for an L298N—or any H-bridge—any time a microcontroller must drive a brushed DC motor, which is nearly every wheeled robot. Its 2 A per channel comfortably handles the small yellow gear motors used in line followers and rovers.
Choose a MOSFET-based driver instead when efficiency and battery life matter, when your motors are small (the L298N’s voltage drop wastes a lot on a 6 V motor), or when you want the driver to run cool without a heatsink.
Wiring and gotchas
- Two supplies, one ground. The motor battery feeds the motor supply pin; 5 V logic feeds the logic side. Their grounds must be tied together or the control signals have no reference—a classic silent failure.
- It steals ~2 V. The older BJT output stage drops roughly 2 V before the motor sees anything. Give a 6 V motor about 8 V of supply to run at full speed.
- It gets hot. At sustained current the chip needs its heatsink. If motors weaken during a run, check the temperature.
- Mind the on-board 5 V regulator jumper. Many modules can power the logic side from the motor supply—handy, but only up to ~12 V in. Above that, remove the jumper and supply 5 V separately or you will cook the regulator.
Explore the graph
Used in these builds
Projects, learning paths, and simulators that include the L298N Motor Driver.
Compare
Alternatives
Questions
L298N Motor Driver FAQ
What is the L298N motor driver?
The L298N is a dual H-bridge motor driver module. It sits between a microcontroller and your motors, taking low-power direction and speed signals and switching a separate, higher-current supply to drive two DC motors (or one stepper) independently.
What is the L298N used for?
It lets a microcontroller like an Arduino drive motors it could never power directly. A microcontroller pin supplies only tens of milliamps, while even a small geared motor needs hundreds, so the L298N provides the muscle—forward, reverse, and speed control—for wheeled robots.
How do you connect an L298N to an Arduino?
Wire the motor battery to the L298N's motor supply, tie the L298N ground to the Arduino ground (this shared ground is essential), connect each motor to the OUT terminals, and run the IN1/IN2 direction pins plus the ENA/ENB enable pins to Arduino digital and PWM pins.
How do you control motor speed with the L298N?
Feed a PWM signal to the enable pin (ENA or ENB) instead of holding it HIGH. The PWM duty cycle switches the H-bridge on and off quickly, and the motor responds to the average—so 50% duty is roughly half speed. The direction pins set forward or reverse.
Why does my motor run slow on the L298N?
The L298N's older transistor output stage drops roughly 2 V before the motor sees it. A 6 V motor on a 6 V supply will feel weak; give it about 8 V of supply, or switch to an efficient MOSFET driver such as the TB6612FNG for small motors.
Further reading