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 15 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
R21
Resistance
1kΩ
R10
Resistance
100kΩ
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Ω
R18
Resistance
100Ω
R4
Resistance
10kΩ
R19
Resistance
100Ω
R14
Resistance
100Ω
R13
Resistance
10mΩ
R7
Resistance
10kΩ
R20
Resistance
100Ω
R23
Resistance
1kΩ
R11
Resistance
100kΩ
U6
LED2
J2
Q1
SW1
D3
J5
D1
J1
D2
LED1
J4
LED3
U4
L1
Inductance
6.8uH

Refine this doc
Ask about this doc
Design Notes
Datasheet-Backed Component Choices
H-Bridge: NXP MC33926PNB
  • Motor supply: VPWR class 5 V to 28 V; selected for 12 V nominal robotics motor supply.
  • Supports bidirectional brushed DC motor control with IN1/IN2, D1/D2 disable, EN, INV, and SLEW inputs.
  • Datasheet notes PWM up to 20 kHz; slow slew mode limits PWM below 11 kHz.
  • Integrated protection: current limiting, short-circuit latch-off, overtemperature latch-off, undervoltage behavior, status flag.
  • Required external support used in schematic plan:
    • VPWR low-ESR bulk capacitance, 100 uF class, plus local 100 nF bypass.
    • Charge-pump reservoir capacitor from CCP to VPWR, allowed 30 nF to 100 nF; 33 nF selected.
    • SF active-low open-drain fault pull-up to 3.3 V.
    • FB current mirror output support: 270 ohm to GND plus optional 1 uF filter if disable-PWM strategy is used.
MCU: STM32G431CBT6
  • 3.3 V operation within datasheet VDD range 1.71 V to 3.6 V.
  • Control-oriented Cortex-M4F with encoder-capable timers, PWM timers, ADC, USART/UART, FDCAN-capable pins, and SWD/JTAG.
  • Power decoupling per datasheet:
    • Each VDD/VSS pair gets 100 nF.
    • VDD rail gets 4.7 uF bulk.
    • VDDA/VSSA gets 10 nF + 1 uF filtering/decoupling.
    • VREF+ gets 100 nF + 1 uF when used for ADC reference.
  • BOOT0 on PB8 should be controlled; use pull-down for normal boot.
  • NRST has embedded weak pull-up; add reset button and small reset capacitor for robust manual reset.
Current Sense: INA240A1D + 10 mOhm Shunt
  • INA240 selected because datasheet explicitly targets PWM motor current sensing and supports -4 V to 80 V common-mode independent of supply.
  • Gain: 20 V/V.
  • Shunt: 10 mOhm inline with motor lead.
  • Output bias: REF1 to 3.3 V and REF2 to GND gives 1.65 V zero-current midpoint.
  • Current span:
    • 2 A => 20 mV shunt => 0.4 V output swing, so output is about 1.25 V to 2.05 V.
    • 5 A transient => 50 mV shunt => 1.0 V output swing, so output remains about 0.65 V to 2.65 V.
  • INA240 supply decoupling: 100 nF close to VS/GND.
  • Layout requirement: Kelvin route shunt sense traces.
Encoder Conditioning: SN74LVC3G17DCUR
  • Triple non-inverting Schmitt buffer.
  • VCC range 1.65 V to 5.5 V; powered from 3.3 V.
  • Inputs accept up to 5.5 V at any valid VCC, useful for robotics encoders.
  • 100 nF bypass cap required at VCC.
  • All unused inputs must be tied to VCC or GND; all three channels are used for A, B, and Z.
3.3 V Buck: LMR33630-Q1
  • Selected instead of LDO for thermal efficiency from 12 V input.
  • Datasheet 400 kHz 3.3 V component set used:
    • L = 6.8 uH.
    • RFBT = 100 kΩ, RFBB = 43.2 kΩ.
    • CIN = 10 uF + 220 nF minimum; split/local ceramic capacitance recommended.
    • COUT = 4 x 22 uF rated capacitance.
    • CBOOT = 100 nF from BOOT to SW.
    • CVCC = 1 uF from VCC to GND.
    • EN tied to protected VM when always-on.
Reverse/Input Protection: LM74700-Q1 + DMT6008LFG + SMBJ33CA
  • LM74700 ideal diode controller with external N-channel MOSFET for reverse polarity and reverse-current blocking.
  • Datasheet recommends 60 V MOSFET, VGS max >= 15 V, and RDS(on) near 6.7 mΩ to 16.7 mΩ for a 3 A nominal design; DMT6008LFG 60 V, low-RDS(on) PowerDI MOSFET matches this class.
  • VCAP: minimum 0.1 uF; selected 100 nF.
  • Input capacitance: minimum 22 nF at ANODE; output capacitance minimum 100 nF, 47 uF typical holdup selected.
  • SMBJ33CA bidirectional TVS selected for 12 V input transient protection.
Open Layout Checks
  • Confirm MC33926 thermal pad copper area supports 2 A continuous in the selected enclosure/ambient.
  • Size motor supply traces/pours for at least 2 A continuous and transient current.
  • Place input TVS and ideal diode stage directly at the input connector.
  • Place shunt in motor-current path and keep INA240 Kelvin traces short, symmetric, and away from switching nodes.
  • Datasheet-Backed Component Choices

  • H-Bridge: NXP MC33926PNB

  • MCU: STM32G431CBT6

  • Current Sense: INA240A1D + 10 mOhm Shunt

  • Encoder Conditioning: SN74LVC3G17DCUR

  • 3.3 V Buck: LMR33630-Q1

  • Reverse/Input Protection: LM74700-Q1 + DMT6008LFG + SMBJ33CA

  • Open Layout Checks

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