Building a Better Brushed DC Motor Driver

The normal budget solution for controlling a brushed DC motor is an L298N motor driver, but Milos Ras̆ić set out to create something better.

cameroncoward
1 minute ago Robotics

If you want to make a good old fashioned brushed DC motor spin, all you need to do is connect its terminals to the positive and negative side of a DC power source — a battery or DC power supply. But things get a lot more complicated if you want to change the rotation direction or speed, or get more sophisticated control over effective torque, current limiting, or acceleration curves. The typical budget solution is an L298N motor driver, but Milos Ras̆ić set out to build something better.

L298N motor drivers are popular because they’re very affordable and very easy to use. But they aren’t efficient, because they rely on BJTs (bipolar junction transistors) that require continuous base current when switching output for PWM (pulse-width modulation) for speed control. MOSFETs (Metal-Oxide-Semiconductor Field-Effect Transistors) make more sense for an application like this, because they switch faster and use voltage control for better efficiency.

Right off the bat, Ras̆ić knew he wanted to use MOSFETs for his driver board, so he selected a Texas Instruments DRV8412DDWR driver IC. But he also had other requirements, including the ability to drive two motors at a minimum of 5A continuous current each, wide input voltage range, 3.3V control power, and current sensing. He wanted all of that in a compact board, with an integrated development board.

The resulting board design that fills those requirements is impressive. A custom four-layer PCB hosts the DRV8412DDWR, a Raspberry Pi Pico 2, voltage handling, LED indicators, connectors (power, motors, and even magnetic encoder input), and all of the supplementary components necessary for those circuits.

Ras̆ić even developed firmware for the Pico 2 and a Python-based GUI that users can run on their computers. Together, those let users configure the driver and its control characteristics — open-loop vs. closed-loop, encoder input, speed control vs. position control, and so on. The GUI also provides motor data with nice optional graphics, which is great for evaluating motors and debugging.

This is all open source and you can build your own. If you want to keep costs as minimal as possible, an L298N motor driver board is still a good choice. But if you want better performance and efficiency, Ras̆ić’s board deserves your consideration.


cameroncoward

Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism

Latest Articles