

Motor Driver Board
Thrust Vector Control
- Size
- 87 × 103.5 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 85
- Nets
- 80
- Pads
- 299
- Tracks, vias
- 842, 154
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 10 Jul 2026
- Updated
- 24 Aug 2026
Overview
Motor Driver Board is an open-source printed circuit board by sahir-afk, from the sahir-afk/Custom-Actuator repository on GitHub. It is a 4-layer board of 87 × 103.5 mm with 85 parts on 80 nets, routed with 842 tracks and 154 vias.
It is built around the SN65HVD230D, STSPIN32G4 and BAT48ZFILM, with the STPS1H100A among its other parts. Its parts include 26 resistors, 24 capacitors, 8 diodes, 6 transistors and 6 connectors. It belongs with the robots and motor control boards of this library.
Main components
4SN65HVD230D
SOIC-8-40℃~+85℃ 1 17mA 1Mbps 370uA 3V~3.6V CAN Transceiver Low-power mode、Wake-up function、ESD protection、Thermal shutdown protection、Bus fault protection、Hot-swap protection SOIC-8 CAN Transceivers ROHSTexas InstrumentsCAN TransceiversSTSPIN32G4
VFQFPN-64(9x9)-40℃~+125℃ 1A 3 5.5V~15V I2C、SPI、UART、CAN No Three Phase VFQFPN-64(9x9) Brushless DC (BLDC) Motor Driver ROHSSTMicroelectronicsIntelligent Power Modules (IPM)BAT48ZFILM
SOD-123-40℃~+150℃ 25uA@40V 350mA 40V 900mV@500mA Independent SOD-123 Schottky Diodes ROHSSTMicroelectronicsSchottky DiodesSTPS1H100A
SMA(DO-214AC)-40℃~+175℃ 1 Independent 100V 1A 4uA@100V 50A 770mV@1A SMA(DO-214AC) Schottky Diodes ROHSSTMicroelectronicsSchottky Diodes
README
README.mdFOC (Field Oriented Control) Actuator
Closed-loop brushless motor control. Custom PCB, firmware, and ground software. AI was used for code review and troubleshooting.

System overview
The project is comprised of three nodes: the motor and encoder, the STM32 and motor driver PCB, and my laptop.
The motor and encoder. A BLDC with an AS5048A encoder magnet glued to the shaft. Three phase leads go to the power stage, and the encoder is wired for SPI.
The STM32 and motor driver PCB. A custom 4-layer board built around the STSPIN32G4, which puts an STM32G4 MCU and a 3-phase gate driver on the same chip. This node handles the whole control problem. It samples the phase currents through shunt amps, reads rotor angle from the encoder over SPI, runs the FOC loop in a hardware-timed ISR under FreeRTOS, drives the MOSFET power stage, and reports back over CAN. An FDIR state machine catches faults. Right now bring-up runs on the B-G431B-ESC1 dev board while the custom board is at fab.
My laptop. A Python/PySide6 HITL bench that stands in for a flight computer, connected through a USB-CAN adapter. It sends commands, plots live angle, velocity, and Iq telemetry, lets me tune PID gains on the fly, and injects faults while the loop runs. Everything talks CAN 2.0 at 1 Mbps.
The board
The schematic and layout are all KiCad. On the board there is the STSPIN32G4, a 3-phase MOSFET power stage, shunt current sensing on each phase, bulk caps, an SPI header for the encoder, and SWD and CAN.
| 3D render | Layout |
|---|---|
![]() | ![]() |
Schematics
The power stage is three identical half-bridges. Each gate drives through a 33 ohm resistor with a BAT48 Schottky in parallel for a fast turn-off path, bootstrap caps are 1 uF, and each bridge gets a 220 nF cap to VM right at the FETs. Phase current comes off two paralleled 200 mohm 1% shunts per phase, kelvin-routed through net ties so the sense lines see the shunt voltage and nothing else.

The controller sheet is the STSPIN32G4 and its support circuitry: the internal buck making VCC through an 18 uH inductor and an STPS1H100A, a 24 MHz crystal, 3x 220 uF of bulk on VM, and a 75k/3.01k divider with a 33 nF filter feeding bus voltage into PA0 for telemetry.

Control loop
The shunt amps feed the phase currents into the MCU's ADC. From there, Clarke and Park transforms move them into the rotor frame, and PI loops regulate Id and Iq. Rotor angle comes from the AS5048A, and I calibrate it by driving the motor to a known angle and measuring the offset.
Bring-up

Motor with the encoder wired for SPI, controller board, USB-CAN adapter into the laptop.
Demo run

Position step to 90 deg, velocity mode at 800 dps, then the heartbeat gets paused on purpose. The FDIR state machine flags the lost heartbeat, faults, and cuts the drive. The velocity decay after t = 7 is the motor coasting down with the outputs off.
About me
I'm a junior at UIUC studying electrical engineering. I like power electronics, embedded systems, and working on cool stuff. Outside of class I lift weights, play tennis, and like learning about new places and cultures.
sahir.pagey@gmail.com · linkedin.com/in/sahir-pagey · github.com/sahir-afk
Parts
85| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | 200m 1% .5W | Resistor_SMD:R_1206_3216Metric | R1, R2, R3, R4, R5, R6 |
| 6 | 33 | Resistor_SMD:R_0805_2012Metric | R13, R14, R15, R16, R17, R18 |
| 6 | BAT48ZFILM | Diode_SMD:D_SOD-123 | D8, D9, D11, D12, D13, D14 |
| 6 | Q_NMOS_GDSD | Motor Driver Board:MCAC60N10Y_DFN5060_GDSD | Q7, Q8, Q9, Q10, Q11, Q12 |
| 5 | 0 | Resistor_SMD:R_0805_2012Metric | R7, R8, R9, R10, R21 |
| 4 | 100 nF | Capacitor_SMD:C_0402_1005Metric | C8, C10, C12, C13 |
| 3 | 1uF 25V | Capacitor_SMD:C_0603_1608Metric | C16, C18, C21 |
| 3 | 220nF 100V | Capacitor_SMD:C_1206_3216Metric | C17, C20, C22 |
| 3 | 220uF 100V | Motor Driver Board:CAP-SMD_BD16.0-L17.0-W17.0-FD | C2, C3, C4 |
| 3 | Jumper_2_Open | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | JP1, JP2, JP3 |
| 3 | NetTie_2 | NetTie:NetTie-3_SMD_Pad0.5mm | NT1, NT2, NT3 |
| 2 | 1 uF | Capacitor_SMD:C_0603_1608Metric | C9, C11 |
| 2 | 100nF | Capacitor_SMD:C_0402_1005Metric | C5, C6 |
| 2 | 10k | Resistor_SMD:R_0805_2012Metric | R23, R26 |
| 2 | 10pF | Capacitor_SMD:C_0603_1608Metric | C23, C24 |
| 2 | 22 | Resistor_SMD:R_0805_2012Metric | R24, R25 |
| 1 | 10 uF | Capacitor_SMD:C_0805_2012Metric | C7 |
| 1 | 10k 1% | Resistor_SMD:R_0805_2012Metric | R12 |
| 1 | 10uF 25V | Capacitor_SMD:C_0805_2012Metric | C19 |
| 1 | 120 | Resistor_SMD:R_0805_2012Metric | R22 |
| 1 | 18uH | Motor Driver Board:IND-SMD_L5.0-W5.0_FNR50XXS | L2 |
| 1 | 220 nF 100V | Capacitor_SMD:C_1206_3216Metric | C14 |
| 1 | 22k 1% | Resistor_SMD:R_0805_2012Metric | R11 |
| 1 | 24.000MHz | Crystal:Crystal_SMD_SeikoEpson_FA128-4Pin_2.0x1.6mm | Y1 |
| 1 | 3.01k 1% | Resistor_SMD:R_0603_1608Metric | R20 |
| 1 | 33 nF | Capacitor_SMD:C_0603_1608Metric | C1 |
| 1 | 75k 1% | Resistor_SMD:R_0603_1608Metric | R19 |
| 1 | BAT30k | Diode_SMD:D_SOD-523 | D1 |
| 1 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J2 |
| 1 | Conn_01x03 | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J4 |
| 1 | Conn_01x04 | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J3 |
| 1 | Conn_01x08 | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Horizontal | J5 |
| 1 | Conn_02x05_Odd_Even | Connector_PinHeader_2.54mm:PinHeader_2x05_P2.54mm_Vertical | J1 |
| 1 | NM | Capacitor_SMD:C_0603_1608Metric | C15 |
| 1 | SN65HVD230 | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U2 |
| 1 | STPS1H100A | Diode_SMD:D_SMA | D10 |
| 1 | STSPIN32G4 | Motor Driver Board:VFQFPN-64_L9.0-W9.0-P0.50-TL-EP4.0 | U1 |
| 1 | Screw_Terminal_01x03 | TerminalBlock_MetzConnect:TerminalBlock_MetzConnect_Type073_RT02603HBLU_1x03_P5.08mm_Horizontal | J6 |
| 1 | TestPoint | TestPoint:TestPoint_Pad_D1.5mm | TP1 |
The 81 most common of 85 parts.
Similar boards
- 4 layers125 × 80 mm

- 4 layers46 × 53 mm

Motor controller
AeroX2/aerox2.github.io
One repository and npm installation builds the workshop at jamesridey.dev and the professional site at cv.jamesridey.dev.
137 parts - 2 layers78.3 × 129 mm

- 4 layers55 × 70 mm

BLDC Control Board
AlainPiallat/projet-1A-controleur-moteur
Projet de 1A : Création d'une carte de contrôle de moteur brushless
62 parts2Apache-2.0 - 6 layers56 × 56 mm

- 4 layers120 × 100 mm

- 2 layers60 × 60 mm

Armpoe
zeroping/PoE-STM32F107
A Power-over-Ethernet board with an STM32F107 for processing and ethernet and a header for all I/O
119 parts4 - 4 layers70 × 50 mm

Questions
How big is the Motor Driver Board PCB?
It measures 87 × 103.5 mm and has 4 copper layers, 1.6 mm thick.
What parts does the Motor Driver Board use?
85 parts, built around the SN65HVD230D, STSPIN32G4, BAT48ZFILM and STPS1H100A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Motor Driver Board KiCad files?
From the sahir-afk/Custom-Actuator repository on GitHub, at the commit this page was made from: the board is Motor Driver Board/Motor Driver Board.kicad_pcb and its schematic Motor Driver Board/Motor Driver Board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Motor Driver Board design in my own project?
Its repository states no licence, so its author keeps all rights: ask sahir-afk before reusing the design.

