MyRoboPathOpen Robotics Lab
All cheatsheets
ActuatorsQUICK REFERENCE

DC Motor

Direction, speed and the difference between running and stall current.

Continuous motionMyRoboPath / Robotics field notes
Download PDF

01Drive circuit

Never direct
GPIO drives a driver input, not the motor. Use a MOSFET for one direction or H-bridge for both.
Direction
An H-bridge reverses motor terminal polarity.
Speed
PWM switches the driver; duty cycle changes average applied voltage.

02Electrical sizing

Stall current
Select driver, supply, wires and fuse for stall/startup current, not just no-load current.
Flyback
Inductive current needs a safe recirculation path. Check driver protection; add a diode for a simple low-side switch.
Noise
Use short motor leads, suitable suppression and decoupling near the driver.

03First test

Unloaded
Raise wheels, start at low duty, confirm direction and check temperature.
Reverse
Ramp down before reversing; avoid sudden high-current direction changes.
Ground
Connect logic and driver grounds; keep high-current return paths out of signal wiring.

Datasheets & further reading

ST L298 datasheet