Motor
L298N Dual H-Bridge Motor Driver Module
Dual H-bridge motor driver — the standard for controlling two DC motors or one stepper.
The most widely used motor driver in the hobbyist world — a dual H-bridge board that can independently drive two brushed DC motors (or one bipolar stepper) with direction and PWM speed control, and includes an onboard 5V regulator for powering logic from the motor supply.
Specifications
| Driver IC | L298N dual H-bridge |
| Motor supply voltage | 5V - 35V DC, fed to the board's 12V/VMS terminal |
| Logic voltage | 5V — from the onboard regulator when the 5V-EN jumper is in place, or from an external 5V source if you've removed it (required if VMS > 12V, to avoid overheating the onboard regulator) |
| Max current | 2A per channel continuous, ~3A peak with a heatsink fitted |
| Channels | Drives 2 independent DC motors, or 1 bipolar stepper motor |
Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | ENA | PWM speed control for motor A — jumper removed lets you drive this from a PWM pin; jumper in place runs motor A at full speed whenever enabled |
| 2 | IN1 | Direction control, motor A |
| 3 | IN2 | Direction control, motor A |
| 4 | IN3 | Direction control, motor B |
| 5 | IN4 | Direction control, motor B |
| 6 | ENB | PWM speed control for motor B |
| 7 | OUT1 / OUT2 | Motor A output terminals |
| 8 | OUT3 / OUT4 | Motor B output terminals |
| 9 | 12V / VMS | Motor supply voltage, 5V-35V DC |
| 10 | GND | Common ground — must be shared between the motor supply, the board, and the MCU |
| 11 | 5V | Regulated 5V output (only if the 5V-EN jumper is fitted and VMS ≤ 12V) — can power the MCU logic side |
Setting IN1/IN2 (or IN3/IN4) to the same logic level brakes that motor; opposite levels drive it forward or reverse. Remove the 5V-EN jumper and supply logic power separately whenever VMS exceeds 12V.