A robust closed-loop brushed DC motor controller for small robotics, driving one bidirectional motor up to 2 A continuous with encoder feedback, MCU control, current monitoring, debug access, status indication, and practical input/output protection.
Intended Use
Small mobile robot / actuator controller prototype or production-intent module.
External DC motor supply, nominal 12 V, with support for common robotics supply variation.
Closed-loop speed and position control implemented in MCU firmware.
What the Device Should Do
Drive one brushed DC motor forward/reverse with PWM.
Read quadrature encoder A/B and optional index channel.
Measure motor current for telemetry and firmware overcurrent protection.
Report motor-driver and power-good faults to the MCU.
Provide SWD programming/debug, UART/control header, and status LEDs.
Main Features
Integrated H-bridge: NXP MC33926PNB, 5 V to 28 V motor supply class, 5 A peak-capable, PWM-compatible, current limit, short-circuit and thermal latch-off protection.
MCU: STM32G431CBT6, 170 MHz Cortex-M4F control-oriented MCU with encoder-capable timers, PWM timers, ADC, USART, FDCAN-capable pins, and SWD.
Current measurement: INA240A1D PWM-rejection current-sense amplifier across an inline 10 mΩ motor shunt, biased at midscale for bidirectional current.
Encoder conditioning: SN74LVC3G17 triple Schmitt buffer, 3.3 V powered with 5.5 V tolerant inputs; per-channel pull-up/filter/series protection and ESD array.
Power: 12 V nominal input with fuse/PTC, TVS, ideal-diode reverse-polarity MOSFET stage, and 3.3 V synchronous buck.
System Architecture
Diagram
Hardware Subsystems
Power input/protection: 2-pin 5 mm terminal block, 3 A+ protection path, SMBJ33CA input TVS, LM74700 ideal-diode controller and 60 V low-RDS(on) N-MOSFET.
Logic rail: LMR33630-Q1 buck configured for 3.3 V using datasheet 400 kHz component values.
Motor drive: MC33926 with datasheet charge-pump capacitor, bulk VPWR capacitance, status/fault pull-up, slew-rate control, disable control, and motor-output TVS.
Current sensing: INA240A1, 10 mΩ shunt, 3.3 V midscale reference, ADC output filter, Kelvin-routed shunt requirement for layout.
Encoder input: 6-pin encoder connector carrying 3.3 V, GND, A, B, index, and optional shield/aux; Schmitt buffering protects MCU timing from cable noise.
MCU/debug/control: STM32G431 SWD, reset, BOOT0 pull-down, UART/control header, status LEDs.
Interfaces and Connections
J1: DC power input, nominal 12 V, expected operating design range 6 V to 24 V within motor-driver/regulator limits.
J2: Motor output, bidirectional H-bridge output, 2 A continuous target.
J5: Control UART/GPIO: 3.3 V, GND, UART_TX, UART_RX.
Power and Runtime Expectations
External powered; no battery charger or runtime target on this board.
Motor current dominates input current. Logic rail load is expected under 250 mA peak.
Buck regulator selected instead of LDO to avoid thermal dissipation from 12 V input.
Power Tree and Power Budget
Table
Rail
Load
Typical
Peak / Design
VMOTOR protected
Brushed DC motor
application-dependent
2 A continuous, driver handles higher transient/current-limit region
VMOTOR protected
3.3 V buck reflected input
~40 mA at 12 V
~100 mA at 12 V for logic peak margin
3.3 V
STM32G431
30-100 mA
150 mA budget
3.3 V
INA240 + logic buffer + LEDs + pull-ups
10-30 mA
80 mA budget
3.3 V total
Logic rail
~150 mA
250 mA design budget
Input protection path target: at least 2 A continuous motor current plus logic overhead; fuse/PTC selected near 3 A hold/nominal class and input/motor terminal blocks rated 15 A.
Manufacturing and Assembly Expectations
SMD production-ready design with through-hole terminal/header connectors where mechanically useful.
Layout must use heavy copper pours/traces for VMOTOR, H-bridge, shunt, and motor output.
Thermal pad / exposed pad soldering and copper area are required for the MC33926 and power parts.
Kelvin routing required for INA240 shunt inputs.
Firmware-Relevant Hardware Requirements
Configure PWM outputs to MC33926 IN1/IN2 or disable-PWM strategy.
Use encoder-capable timer channels for quadrature A/B.
ADC samples INA240 current output and optional MC33926 FB output.
Monitor motor-driver SF fault and buck PG.
Fault handling must disable bridge on overcurrent, SF assertion, undervoltage/power-good loss, or firmware watchdog failure.
Physical Design Expectations
Keep motor/power loop compact.
Keep encoder/control connectors away from H-bridge switching nodes and motor terminals.
Place input TVS/fuse/reverse protection near the power connector.
Place current shunt inline with motor output and route INA240 Kelvin traces symmetrically.
Important Design Decisions
12 V nominal supply selected as a common robotics voltage; selected ICs support wider operating ranges.
Integrated H-bridge chosen over discrete H-bridge for safer fault handling and faster schematic completion.
INA240 added for accurate bidirectional PWM current sensing; MC33926 FB kept as an auxiliary coarse current/fault-observability signal.
Schmitt-buffered encoder input chosen for cable/noise robustness and 5 V tolerant conditioning.
Assumptions
Encoder outputs are open-drain/open-collector or push-pull logic compatible with 3.3 V pull-ups / 5.5 V tolerant buffer inputs.
Motor continuous current is 2 A; stall current can exceed this but is handled as a transient by driver current limiting and firmware shutdown.
The control host can use 3.3 V UART-level signals.
Change Notes
Initial specification created from the user’s request and datasheet-backed component selection.
Robotics-ready closed-loop brushed DC motor controller with bidirectional 2 A H-bridge drive, quadrature encoder feedback, current sensing, protection, MCU control, debug access, and status indicators.
Properties
Properties describe core aspects of the project.
Pricing & Availability
Distributor
Qty 1
Arrow
$13.69–$22.87
Digi-Key
$18.16
HQonline
$3.75
LCSC
$17.95–$18.00
Mouser
$28.86
TME
$8.93
Verical
$11.17–$25.75
Controls
Welcome 👋
Flux helps you build PCBs faster with an AI teammate!
Create your account to collaborate, stay updated, fork your own version, and get instant answers from our AI agent.