Back to projects

EMBEDDED CONTROL · PCB · MOTOR DRIVE

STM32G431 Based 3-Channel Brushed DC Motor Driver

A single-motor control prototype was tested for a RoboCup mobile robot, followed by an STM32G431 PCB design for three motors.

MCUSTM32G431
Driver3 × DRV8874
Input24 V
PCB2 layers
Tested single-motor prototype beside a digital view of the three-channel PCB
Test prototype on the left; unmanufactured final PCB design on the right
01

Why this board?

The off-the-shelf controller on the RoboCup Middle Size League robot handled two motors at a time. This project began with a practical question: could one board cover all three wheels while leaving the control firmware open to change?

02

First, one motor

Control firmware was tested with an STM32 NUCLEO-F411RE, a TB6612FNG driver, and one encoder-equipped DC motor. A Raspberry Pi sent UART commands and logged telemetry. The velocity loop ran at 1 kHz and the position loop at 100 Hz; the response to a 60 rpm step reached its target in roughly 150 ms in prototype tests.

03

The three-channel design

The next stage was a two-layer KiCad PCB around an STM32G431CBT6 and three DRV8874 drivers. The design brings together a 24 V input, three encoder interfaces, IPROPI current feedback, USB/UART connections, and input protection.

04

Where it stands

The single-motor prototype ran on the bench. The three-channel schematic and layout were completed, and ERC/DRC checks passed. The board had not been manufactured when the report was finished, so simultaneous three-motor operation, current sensing, temperature, and EMI behavior still need bench validation.

05

Congress Presentation

The work was presented at SAVTEK 2026, the 12th Defense Technologies Congress.

Plots of commanded and measured position and speed on the single-motor prototype
Position command and measured response on the single-motor prototype