L298N Motor Driver
A dual H-bridge board that drives two DC motors forward and backward.
How it works
The L298N is a dual H-bridge: it can run two DC motors independently, each in either direction, at a speed you set with PWM. It exists because an Arduino pin can't power a motor and can't reverse one — an H-bridge does both.
Each motor has an enable pin (ENA/ENB) for PWM speed and two direction pins (IN1/IN2 for motor A, IN3/IN4 for motor B). Power the motors from a separate 6–12V supply on the +12V terminal; the board has an onboard 5V regulator.
Pins
- ENA / ENB
- PWM speed for motor A / B (remove the jumper to use PWM).
- IN1–IN4
- Direction: IN1/IN2 = motor A, IN3/IN4 = motor B.
- OUT1–OUT4
- Motor terminals (A on OUT1/2, B on OUT3/4).
- +12V / GND / +5V
- Motor supply, ground (shared), regulated 5V out.
Ratings
- Motors
- 2, up to ~2 A each
- Motor supply
- ~6–35 V
Tips
- Remove the ENA/ENB jumpers to control speed with PWM.
- Power motors from a separate supply and share ground with the Arduino.