Motor Controller for a Robot Arm

Main components and all support passives are now in the schematic. I’m wiring
ERC found one real schematic-library conflict: the selected VQFN buck part marks its NC pad as no-connect even though the datasheet says to tie that pad to SW. I’m switching to the HSOIC LMR33630 variant with no NC pad so the schematic can verify cleanly.
Thinking for 11 hrs 16 mins...
Thought for a moment — Deciding on schematic connections
Read LMR33630BDDAR lmr33630.pdf.
Thought for 47 sec
Thinking...
Considering U3 Replacement
I think I could replace the current component with HSOIC, omitting U3. It seems I need library support for U3, and I may be able to remove the existing U3 and add the same designator instead. I'll edit the schematic next and inspect the pins. However, U3 might still play a role, so I'll need to consider disconnecting it. Once I add the new U3, I must connect its pins to the existing nets while keeping passive components intact.
U2
U5
U3
U1 VDD - U1 VDD
F1 P2 - D1 1
J3 3 - D3 K1
U6 2Y - U1 PA7
J3 4 - D3 K2
U2 D1 - U1 PA10
U1 VDD - U1 VDD
U3 BST - C7 P1
U2 OUT2 - J2 PIN2
U1 VDD - U1 VDD
U1 VDD - U1 VDD
U3 VIN - U3 EN
U4 ~ - R14 P1
SW1 ~ - J4 05
U1 PB3 - J4 06
U3 VIN - U3 EN
J3 5 - D3 K3
U2 OUT1 - U2 OUT1
U2 IN1 - U1 PA8
U2 ~D2~ - U1 PA11
U2 IN1 - U1 PA8
U1 VDD - U1 VDD
U3 PG - R3 P2
R13 P2 - J2 PIN1
U2 ~D2~ - U1 PA11
U1 PB8-BOOT0 - R4 P1
U2 INV - R9 P1
U2 INV - R9 P1
LED3 K - U1 PB1
U3 VIN - U3 EN
R20 P2 - C30 P1
U1 VDD - U1 VDD
U1 VDD - U1 VDD
R13 P2 - J2 PIN1
U1 VDD - U1 VDD
U2 EN - U1 PB5
U1 PA14 - J4 04
U4 ~ - R14 P1
U1 VDD - U1 VDD
U2 SLEW - R8 P1
U1 PA3 - J5 4
J3 3 - D3 K1
U1 PG10-NRST - R5 P2
U3 VIN - U3 EN
U3 FB - R1 P2
R19 P2 - C29 P1
U2 CCP - C24 P1
U2 OUT1 - R13 P1
U1 VDD - U1 VDD
U3 BST - C7 P1
U3 FB - R1 P2
R19 P2 - C29 P1
U6 1Y - U1 PA6
U3 FB - R1 P2
R23 P2 - LED3 A
U2 OUT1 - R13 P1
U1 VDD - U1 VDD
R14 P2 - C27 P1
U2 OUT2 - J2 PIN2
U6 3Y - U1 PB7
U1 VDD - U1 VDD
U1 PG10-NRST - R5 P2
U1 VDD - U1 VDD
U2 EN - U1 PB5
U1 VDD - U1 VDD
LED3 K - U1 PB1
U3 VIN - U3 EN
U1 VDD - U1 VDD
U2 ~D2~ - U1 PA11
U1 PA13 - J4 02
R13 P2 - J2 PIN1
J1 PIN1 - F1 P1
U3 NC - L1 P1
U2 FB - R6 P1
F1 P2 - D1 1
U3 VIN - U3 EN
U3 VCC - C8 P1
J3 4 - D3 K2
U1 PB8-BOOT0 - R4 P1
F1 P2 - D1 1
U1 PA3 - J5 4
U5 GATE - Q1 G
U3 VCC - C8 P1
U2 ~SF~ - U1 PB6
R14 P2 - C27 P1
F1 P2 - D1 1
J3 5 - D3 K3
U1 VDD - U1 VDD
R22 P2 - LED2 A
U3 VIN - U3 EN
U6 1Y - U1 PA6
J1 PIN1 - F1 P1
U1 VDD - U1 VDD
LED2 K - U1 PB0
U2 FB - R6 P1
U1 VDD - U1 VDD
R19 P2 - C29 P1
U1 VDD - U1 VDD
U1 PG10-NRST - R5 P2
U1 PA13 - J4 02
U5 EN - Q1 S
LED2 K - U1 PB0
U3 NC - L1 P1
U1 VDD - U1 VDD
U1 PA2 - J5 3
U3 VIN - U3 EN
U2 OUT1 - R13 P1
R20 P2 - C30 P1
U2 ~SF~ - U1 PB6
R20 P2 - C30 P1
U2 D1 - U1 PA10
U3 VIN - U3 EN
U3 VIN - U3 EN
U2 FB - R6 P1
U1 VDD - U1 VDD
U1 PG10-NRST - R5 P2
U1 VDD - U1 VDD
U1 PB3 - J4 06
U2 ~SF~ - U1 PB6
F1 P2 - D1 1
J3 5 - D3 K3
U1 VDD - U1 VDD
U3 PG - R3 P2
U2 OUT1 - U2 OUT1
U1 VDD - U1 VDD
R14 P2 - C27 P1
U2 OUT2 - J2 PIN2
J3 4 - D3 K2
U1 VDD - U1 VDD
U2 IN2 - U1 PA9
U1 VDD - U1 VDD
U1 VDD - U1 VDD
U1 VDD - U1 VDD
U6 2Y - U1 PA7
R13 P2 - J2 PIN1
J3 3 - D3 K1
J3 3 - D3 K1
U1 VDD - U1 VDD
U1 PA2 - J5 3
U3 VIN - U3 EN
U5 VCAP - C3 P1
U1 VDD - U1 VDD
R21 P2 - LED1 A
U5 EN - Q1 S
U5 GATE - Q1 G
U1 VDD - U1 VDD
U2 EN - U1 PB5
U2 IN2 - U1 PA9
U2 SLEW - R8 P1
J3 5 - D3 K3
U1 VDD - U1 VDD
U1 VDD - U1 VDD
U2 FB - R6 P1
U1 VDD - U1 VDD
SW1 ~ - J4 05
R22 P2 - LED2 A
U2 CCP - C24 P1
U6 3Y - U1 PB7
U1 VDD - U1 VDD
U5 VCAP - C3 P1
R18 P2 - C28 P1
U1 PA14 - J4 04
U3 PG - R3 P2
R18 P2 - C28 P1
J3 4 - D3 K2
U1 VDD - U1 VDD
R21 P2 - LED1 A
U1 VDD - U1 VDD
U1 VDD - U1 VDD
U2 D1 - U1 PA10
U3 NC - L1 P1
U1 VDD - U1 VDD
R18 P2 - C28 P1
R23 P2 - LED3 A
C26
Capacitance
100nF
C18
Capacitance
1uF
C5
Capacitance
10uF
C6
Capacitance
220nF
C10
Capacitance
22uF
C12
Capacitance
22uF
C13
Capacitance
100nF
C27
Capacitance
4.7nF
C30
Capacitance
1nF
C1
Capacitance
220nF
C23
Capacitance
100nF
C9
Capacitance
22uF
C2
Capacitance
47uF
C11
Capacitance
22uF
C14
Capacitance
100nF
C24
Capacitance
33nF
C20
Capacitance
1uF
C17
Capacitance
10nF
C22
Capacitance
100uF
C29
Capacitance
1nF
C4
Capacitance
47uF
C21
Capacitance
100nF
C16
Capacitance
4.7uF
C28
Capacitance
1nF
C19
Capacitance
100nF
C31
Capacitance
100nF
C3
Capacitance
100nF
C8
Capacitance
1uF
C7
Capacitance
100nF
C32
Capacitance
10uF
C15
Capacitance
100nF
C25
Capacitance
1uF
F1
U1 VSS - U1 VSS
GND
J3 6 - U6 GND
U1 VSS - U1 VSS
GND
GND
U3 AGND - C5 P2
GND
U1 VSS - U1 VSS
GND
U2 AGND - U2 PGND
GND
U3 AGND - C5 P2
J3 6 - U6 GND
J3 6 - U6 GND
U2 PGND - C22 P2
U1 VSS - U1 VSS
U3 AGND - C5 P2
U2 PGND - C22 P2
J3 6 - U6 GND
U1 VSS - U1 VSS
SW1 ~ - LED1 K
J3 6 - U6 GND
U2 PGND - C22 P2
U2 PGND - C22 P2
U1 VSS - U1 VSS
U3 AGND - C5 P2
U4 REF2 - C26 P2
U1 VSS - U1 VSS
U1 VSS - U1 VSS
U1 VSS - U1 VSS
U2 PGND - C22 P2
U2 PGND - C22 P2
U1 VSS - U1 VSS
J3 6 - U6 GND
U4 REF2 - C26 P2
U1 VSS - U1 VSS
U2 AGND - U2 PGND
U3 AGND - C5 P2
GND
U2 PGND - C22 P2
U2 PGND - C22 P2
U3 AGND - C5 P2
U1 VSS - U1 VSS
SW1 ~ - LED1 K
U4 REF2 - C26 P2
U3 AGND - C5 P2
U3 AGND - C5 P2
U1 VSS - U1 VSS
U1 VSS - U1 VSS
U1 VSS - U1 VSS
U3 AGND - C5 P2
J3 6 - U6 GND
U1 VSS - U1 VSS
U1 VSS - U1 VSS
U3 AGND - C5 P2
U2 PGND - C22 P2
U2 PGND - C22 P2
J3
U1
U6
R21
Resistance
1kΩ
R10
Resistance
100kΩ
LED2
R8
Resistance
100kΩ
R1
Resistance
100kΩ
R16
Resistance
4.7kΩ
R3
Resistance
100kΩ
R9
Resistance
100kΩ
R5
Resistance
10kΩ
R6
Resistance
270Ω
R12
Resistance
100kΩ
R17
Resistance
4.7kΩ
R22
Resistance
1kΩ
R15
Resistance
4.7kΩ
R2
Resistance
43.2kΩ
LED1
R18
Resistance
100Ω
R4
Resistance
10kΩ
LED3
R19
Resistance
100Ω
R14
Resistance
100Ω
R13
Resistance
10mΩ
R7
Resistance
10kΩ
R20
Resistance
100Ω
R23
Resistance
1kΩ
R11
Resistance
100kΩ
J2
Q1
SW1
D3
J5
D1
J1
D2
J4
U4
L1
Inductance
6.8uH

Refine this doc
Ask about this doc
Project Specification
Project Overview
Status: Draft schematic capture in progress.
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


12 V DC Input Input Fuse/PTC Input TVS LM74700 + N-MOS Reverse Protection Protected Motor Supply MC33926 H-Bridge Inline 10 mOhm Shunt Motor Connector INA240 Current Sense MCU ADC LMR33630 3.3 V Buck 3.3 V Logic STM32G431 Encoder Connector GPIO ESD RC + Pull-ups SN74LVC3G17 Schmitt Buffer Status LEDs SWD Header UART/Control Header
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.
  • J3: Encoder input: 3.3 V, GND, ENC_A, ENC_B, ENC_Z, AUX/SHIELD.
  • J4: SWD programming/debug: 3.3 V reference, SWDIO, SWCLK, NRST, GND, optional SWO.
  • 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


RailLoadTypicalPeak / Design
VMOTOR protectedBrushed DC motorapplication-dependent2 A continuous, driver handles higher transient/current-limit region
VMOTOR protected3.3 V buck reflected input~40 mA at 12 V~100 mA at 12 V for logic peak margin
3.3 VSTM32G43130-100 mA150 mA budget
3.3 VINA240 + logic buffer + LEDs + pull-ups10-30 mA80 mA budget
3.3 V totalLogic rail~150 mA250 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.
  • Project Overview

  • Intended Use

  • What the Device Should Do

  • Main Features

  • System Architecture

  • Hardware Subsystems

  • Interfaces and Connections

  • Power and Runtime Expectations

  • Power Tree and Power Budget

  • Manufacturing and Assembly Expectations

  • Firmware-Relevant Hardware Requirements

  • Physical Design Expectations

  • Important Design Decisions

  • Assumptions

  • Change Notes

Assets

No assets added.

Closed-Loop DC Motor Controller

Closed-Loop DC Motor Controller thumbnail
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

$14.17–$23.38

Digi-Key

$19.96

HQonline

$3.75

LCSC

$17.86–$17.92

Mouser

$29.53

TME

$9.02

Verical

$10.63–$25.75

Controls