L298N Motor Driver: How the Dual H-Bridge Works and 6 Robot Project Ideas

The L298N dual H-bridge motor driver (up to 46 V, 2 A per channel, 3 A peak) sits between your microcontroller's logic signals and real motor current. This guide explains direction and PWM speed control on ENA/ENB, wiring with common ground, the ~2 V saturation drop, heatsink needs, the mistakes behind most dead robot demos, and 6 project ideas including 3 verified projectech.in builds.

Written by Projectech11 min readPublished
For B.E./B.Tech Electronics, E&TC, Mechanical and IoT final-year students building DC-motor robots and automation rigs Topics: L298N, Arduino Uno, DC gear motors, PWM, H-bridge
Blueprint-style illustration of an L298N dual motor driver module with heatsink and terminal blocks on a dark navy grid.
In this guide

The chassis is built, the code compiles, the wheels spin — but only when the motors are connected straight to the battery. The moment the Arduino tries to drive them, everything sags, stutters, or just sits there humming.

That is the moment every robotics student meets the motor driver. An Arduino pin can source about 20–40 mA; a small DC gear motor wants hundreds of milliamps and throws voltage spikes back when it stops. The L298N sits between them: it takes polite 5 V logic signals from your microcontroller and switches the real motor current — forward, reverse, and speed-controlled — from a separate, beefier supply. Nearly every student robot car you have ever seen at a college expo has one of these red boards bolted to its chassis.

This guide explains what the L298N is, how its dual H-bridge actually drives motors, how to wire it without the classic no-common-ground failure, the heat and voltage-drop realities students discover too late, and six robot project ideas — three linked to verified projectech.in listings, three as from-scratch builds.

What is the L298N?

The L298N motor driver is a module built around ST's L298 dual H-bridge chip. An H-bridge is four switches arranged so current can flow through a motor in either direction — which is what "forward" and "reverse" mean electrically. "Dual" means two independent H-bridges on one board, so it drives two DC motors bidirectionally (one robot car's left and right wheels) or a single stepper motor. Your microcontroller only supplies 5 V logic signals; the heavy motor current comes from a separate supply connected to the board.

What it is NOT: it is not a speed controller by itself (speed comes from PWM on its enable pins), not efficient by modern standards (it drops about 2 V as heat — more on that below), and not a servo driver (servos take their control signal directly; they do not need an H-bridge).

  • Dual H-bridge — drives 2 DC motors bidirectionally, or 1 stepper motor.
  • Up to 46 V motor supply, 2 A per channel continuous (3 A peak) — comfortably handles the 6–12 V gear motors in student robots.
  • ~2 V saturation voltage drop — 12 V in gives roughly 10 V at the motor; budget for it.
  • 5 V logic inputs — IN1–IN4 take direction signals straight from Arduino/ESP32 pins.
  • ENA/ENB enable pins take PWM — pulse-width modulation on these pins is how you control speed.
  • Onboard 5 V regulator (jumper-selectable) — can power the logic side from the motor supply.

How the L298N works

Seven steps take you from "red board" to a driving robot:

  1. Understand the H-bridge. Each channel has four transistor switches. Closing the top-left + bottom-right pair pushes current one way through the motor (forward); top-right + bottom-left pushes it the other way (reverse). Opening all four coasts the motor to a stop.
  2. Set direction with IN1/IN2 (motor A) and IN3/IN4 (motor B). Logic HIGH/LOW pairs select the switch combination: IN1 HIGH + IN2 LOW spins one way, reversed for the other, both LOW (or both HIGH) stops. This is pure digital logic — no PWM yet.
  3. Control speed with ENA/ENB. These enable pins gate each channel. Feed them PWM (analogWrite on the Arduino): 0 = stopped, 255 = full speed. The board ships with jumpers on ENA/ENB that force full speed — remove the jumpers when you want PWM control.
  4. Feed the motors separately. Connect your motor battery (e.g. 12 V, or 2× 18650 cells ≈ 7.4 V) to the board's 12 V input terminal. The motors draw from this supply, never from the Arduino.
  5. Handle the logic power. With the 5 V-enable jumper ON (and motor supply roughly 7–12 V), the onboard regulator derives 5 V for the chip's logic — convenient. With the jumper OFF, you must feed 5 V into the board's 5 V terminal yourself (used when the motor supply is outside the regulator's happy range).
  6. Tie the grounds together. The Arduino's GND and the L298N's GND must be connected. Without a common ground reference, the 5 V logic signals are meaningless to the driver — the classic "motors jitter randomly" bug.
  7. Expect heat and voltage loss. The L298's bipolar transistors drop about 2 V total across the bridge, dissipated as heat. At 1–2 A per channel the board's heatsink gets genuinely hot — that is normal physics, not a fault, but it needs airflow and realistic current expectations.

Key specifications

Parameter Value
Bridge configuration Dual H-bridge (2× DC motors bidirectional, or 1× stepper)
Motor supply voltage Up to 46 V
Continuous current 2 A per channel
Peak current 3 A per channel (short duration)
Logic input voltage 5 V (TTL-compatible)
Saturation voltage drop ~2 V total — e.g. 12 V supply → ~10 V at the motor
Speed control PWM on ENA / ENB pins
Logic power Onboard 5 V regulator, jumper-selectable
Thermal Heatsink required under load; thermal shutdown protects the chip

Wiring it up: L298N + Arduino Uno

L298N terminal Arduino Uno / supply Notes
12 V (motor supply) Motor battery + (e.g. 7.4–12 V) Never the Arduino's 5 V pin — motors need their own supply
GND Battery − and Arduino GND Common ground is mandatory
5 V (jumper ON: output — can power small logic; jumper OFF: input 5 V here) With jumper on and 7–12 V motor supply, regulator powers the logic side
IN1, IN2 D8, D9 (motor A direction) Digital outputs
IN3, IN4 D10, D11 (motor B direction) Digital outputs
ENA D5 (PWM) — remove jumper analogWrite sets motor A speed
ENB D6 (PWM) — remove jumper analogWrite sets motor B speed
OUT1, OUT2 Motor A terminals Either polarity — swap to flip "forward"
OUT3, OUT4 Motor B terminals Either polarity

Bold warning — the two wiring mistakes that account for most dead robot demos: (1) no common ground between the Arduino and the driver — without it, direction pins float and motors behave randomly; (2) powering the motors from the Arduino's 5 V pin — the motors will brown-out the whole board the instant they draw starting current. Motors get their own battery, always.

Common mistakes that kill L298N projects

  1. No common ground. The Arduino and L298N run from different supplies; if their GNDs are not tied together, logic HIGH/LOW has no shared reference and the motors twitch, stall, or ignore commands. One wire fixes it — and it is the first thing to check when "the code is right but the motors are crazy."
  2. Leaving the ENA/ENB jumpers on and expecting speed control. With the jumpers in place, the enables are hardwired HIGH — full speed only, and your analogWrite calls do nothing. Remove the jumpers and wire ENA/ENB to PWM pins.
  3. Forgetting the ~2 V drop. A 12 V battery delivers roughly 10 V to the motor; a 7.4 V pack delivers roughly 5.4 V. Students who size the battery for "12 V motors" and then wonder why the robot is sluggish are meeting the saturation voltage. Either accept the loss or choose a more efficient MOSFET-based driver (like the TB6612FNG) if every volt matters.
  4. No heatsink respect. At 1.5–2 A per channel the L298 runs hot — the bolted-on heatsink is doing real work. Enclosing the board in a sealed box with no airflow invites thermal shutdown mid-demo. Give it air, and keep continuous current comfortably under 2 A per channel.
  5. Driving the motors from the Arduino's 5 V pin. A DC motor's stall current (several amps at startup) collapses the Arduino's regulator, resetting the microcontroller in a loop. Motor power and logic power stay separate — this rule has no exceptions.
  6. Reversing the motor supply polarity. The 12 V terminal is not reverse-protected on most boards. Double-check battery polarity before connecting; a reversed pack can kill the regulator and the chip instantly.

Project ideas using the L298N

ESP32-CAM surveillance robot

A mobile robot with an ESP32-CAM streaming live video; the L298N drives the wheels while commands arrive over Wi-Fi. This is the L298N in its ideal role: the ESP32 handles the camera and networking (things it is good at), and the driver handles the brute-force motor current (the thing microcontrollers cannot do). Reference build: ESP32-CAM Surveillance Robot with Live Video.

Gesture-controlled robot car with accelerometer

An accelerometer on a hand glove detects tilt gestures; the gesture data travels over an RF link to the car, where the Arduino translates it into direction commands for the L298N — tilt forward to drive forward. The driver is doing exactly what it was designed for: converting logic-level direction + PWM speed into real wheel torque. See Gesture-Controlled Robot Car using Accelerometer.

RFID-guided warehouse robot

The robot follows a path marked by RFID tags on the floor; each tag read tells the Arduino the next maneuver, executed through the L298N's direction and speed control. Line-following is common in final-year reports; RFID guidance is the rarer, more interesting variant — and the driver's dual channels map perfectly onto differential-drive steering. Reference: RFID-Guided Warehouse Robot using Arduino.

Line-follower robot (no verified listing — build idea)

IR reflectance sensors detect a black line on a white floor; a simple proportional control loop adjusts the PWM on ENA/ENB to steer. No verified projectech.in listing covers this exact build — it is the standard first robotics project for a reason: the entire control theory of the course fits on one chassis, and the L298N wiring you learn here transfers to every robot after it.

Obstacle-avoiding robot (no verified listing — build idea)

An ultrasonic sensor on a servo scans ahead; when something is too close, the Arduino stops, scans left and right, and turns toward the clearer path — all through the L298N's direction pins. Unlinked build idea: the interesting report content is the decision logic (thresholds, scan angles, escape behaviours when boxed in), not the wiring.

Bluetooth RC car with speed control (no verified listing — build idea)

Combine the HC-05 command link with the L298N: characters from the phone set direction, while a slider value maps to PWM duty on ENA/ENB for proportional speed. Unlinked idea: it merges two component guides' worth of learning into one demo, and variable speed (not just on/off) is what separates it from every basic RC car in the review queue.

Frequently asked questions

L298N vs L293D — which should I choose?
The L298N handles higher voltage (up to 46 V vs ~36 V) and higher current (2 A continuous per channel vs ~600 mA) than the L293D, so it suits larger gear motors and heavier chassis. The L293D is fine for tiny motors and comes in a friendlier DIP package for breadboards. For a typical student robot car with 12 V gear motors, the L298N is the right call.

Why is my motor slower than the battery voltage suggests?
The L298's bipolar output stage drops about 2 V across the bridge — a 12 V supply yields roughly 10 V at the motor terminals. This is inherent to the chip's design, not a fault. If your robot needs the full battery voltage at the wheels, consider a MOSFET-based driver like the TB6612FNG, which drops millivolts instead of volts.

Can the L298N drive a stepper motor?
Yes — one bipolar stepper motor across the two channels (one coil per H-bridge), driven with a stepping sequence on IN1–IN4. It works, but the 2 V drop and heat make it inefficient; for serious stepper work, a dedicated current-chopping driver (A4988/DRV8825) is the better tool.

The heatsink gets very hot — is that normal?
Up to a point, yes: dropping ~2 V at 1–2 A means several watts of heat per channel, which is exactly what the heatsink is for. Ensure airflow around the board and keep continuous current under 2 A per channel. If it is too hot to touch for more than a second or two under your actual load, reduce the load or add a fan — sustained thermal shutdown cycling will ruin a demo.

Can I control motor speed without PWM?
Not with the L298N alone — speed control is PWM on the ENA/ENB pins (after removing the full-speed jumpers). Without PWM you get three states per motor: forward, reverse, stop. Any "speed levels" in code are just different PWM duty cycles.

Where to go next

The three verified robot builds above show the L298N doing its core job — differential drive from logic-level commands — in three very different control architectures (Wi-Fi video bot, gesture RF link, RFID guidance). Pick the control style closest to your idea, study how direction and PWM map to motion in its code, and if you want the build done to order or customised with your own chassis and sensors, the order page on projectech.in takes custom requirements.

More project guides

More in IoT & Embedded