Drive a DC Motor with an L298N Module

Engineering illustration: Drive a DC Motor with an L298N Module

The L298N is used with DC motors more commonly than with stepper motors, thanks to its higher current capacity compared to the L293D chip, making it a popular choice in mobile robotics projects.

Components needed

An Arduino board, an L298N module, one or two DC motors, and an external power supply (5-35V depending on the motor).

Wiring it up

The module is powered through screw terminals at 5-35V, and includes an onboard 78M05 voltage regulator supplying 5V at 0.5A to power Arduino's logic when the 5V jumper is enabled.

Safety note: if the motor supply voltage exceeds 12V, the 5V jumper must be removed to avoid damaging the onboard regulator; in that case, power the Arduino's logic from a separate source.

The enable pins (9 and 3, both PWM-capable) connect to ENA and ENB for speed control, while the direction pins (8, 7, 5, and 4) connect to IN1 through IN4. Each of the module's two channels can handle up to 2A, with motor outputs on screw terminals: OUT1/OUT2 for channel A and OUT3/OUT4 for channel B.

An important voltage consideration

The module has an internal voltage drop of about 2V, so a 12V supply only delivers about 10V to the motor in practice; it's recommended to add roughly a 2V margin above the motor's rated voltage when choosing a power supply for best performance.

You can find L298N modules and DC motors at Juthour Tech.

Leave your comment

*
*
Only registered users can leave comments.