Foc
katherinesiyuchen-sys·foc·FOC/FOC.kicad_pcb
About the Foc PCB
Foc is an open source STM32 PCB design by katherinesiyuchen-sys, published on GitHub under the MIT license. It is a 2-layer board measuring 77.9 × 34.2 mm, with 73 components from 35 distinct parts.
Its main chip is the STM32G431CBTx, from the STM32 family. Other key parts include the SN65HVD230, TPS54202DDC, AP2112K-3.3 and DRV8313PWP. By type, the board carries 30 capacitors, 18 resistors, 7 connectors, 5 ICs, 4 diodes and 2 switches.
It belongs with the robotics & motion and test & measurement designs in this gallery.
From the project
Single-board smart servo controller for gimbal-class BLDC motors
A smart servo 79 × 35 mm PCB (and firmware) that mounts behind a gimbal-class brushless motor and turns it into a bus-connected robot joint.
Build a robot joint from the transistor up: a single PCB that mounts behind a gimbal motor and turns it into a bus-connected smart actuator, reads a magnetic encoder on its shaft, and speaks CAN, so the whole assembly becomes one bus-connected "smart servo." The same architectural unit that humanoid robots (Optimus, moteus-based quadrupeds) are built out of ~28 times over.

Main components on the Foc
Foc bill of materials (BOM)
73 components, 35 distinct parts.
| Qty | Part | Footprint | Refs |
|---|---|---|---|
| 1 | STM32G431CBTx | LQFP-48_7x7mm_P0.5mm | U1 |
| 1 | SN65HVD230 | SOIC-8_3.9x4.9mm_P1.27mm | U2 |
| 1 | TPS54202DDC | SOT-23-6 | U3 |
| 1 | AP2112K-3.3 | SOT-23-5 | U4 |
| 1 | DRV8313PWP | SOP65P640X120-29N | U5 |
| 1 | Crystal_GND24 | Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |
| 1 | encoder_conn | JST_SH_SM06B-SRSS-TB_1x06-1MP_P1.00mm_Horizontal | J1 |
| 1 | Conn_ARM_JTAG_SWD_10 | PinHeader_2x05_P1.27mm_Vertical_SMD | J2 |
| 1 | UART_debug | PinSocket_1x03_P2.54mm_Vertical | J3 |
| 1 | XT30PW-M | AMASS_XT30PW-M | J4 |
| 2 | Conn_01x04_Socket | JST_GH_SM04B-GHS-TB_1x04-1MP_P1.25mm_Horizontal | J5, J6 |
| 1 | Conn_01x03_Socket | TerminalBlock_MetzConnect_Type101_RT01603HBWC_1x03_P5.08mm_Horizontal | J7 |
| 1 | Jumper_2_Bridged | SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mm | JP1 |
| 3 | 0.033 | R_2512_6332Metric | R_SH1, R_SH2, R_SH3 |
| 2 | SW_Push | SW_SPST_B3S-1000 | SW1, SW2 |
| 3 | LED | LED_0603_1608Metric | D1, D2, D3 |
| 1 | SMBJ26A | D_SMB | D4 |
| 1 | FerriteBead | L_0603_1608Metric | FB1 |
| 1 | 10uH | L_Taiyo-Yuden_NR-40xx | L1 |
| 13 | 100nF | C_0603_1608Metric | C1, C4, C6, C8, C10, C11, C12, C14 +5 |
Show 15 more
| Qty | Part | Footprint | Refs |
|---|---|---|---|
| 2 | 12pF | C_0603_1608Metric | C2, C3 |
| 3 | 4.7uF | C_0603_1608Metric | C5, C7, C9 |
| 4 | 1uF | C_0603_1608Metric | C13, C21, C22, C25 |
| 2 | 100uF | CP_Elec_6.3x7.7 | C15, C17 |
| 1 | 10uF | C_0603_1608Metric | C16 |
| 1 | 22uF | C_0805_2012Metric | C20 |
| 1 | 10nF | C_0603_1608Metric | C24 |
| 3 | 1nF | C_0603_1608Metric | C29, C30, C31 |
| 7 | 1k | R_0603_1608Metric | R1, R2, R3, R12, R13, R14, R15 |
| 3 | 10k | R_0603_1608Metric | R4, R5, R11 |
| 1 | 120 | R_0603_1608Metric | R6 |
| 2 | 100k | R_0603_1608Metric | R7, R9 |
| 1 | 15.4k | R_0603_1608Metric | R8 |
| 1 | 13.7k | R_0603_1608Metric | R10 |
| 3 | 39k | R_0603_1608Metric | R16, R17, R18 |
Foc design files
The KiCad project lives in the katherinesiyuchen-sys/foc repository on GitHub; these links point at the commit this page was built from.
- LayoutFOC/FOC.kicad_pcb
- SchematicFOC/FOC.kicad_sch
Foc: common questions
What microcontroller does the Foc use?
The Foc is built around the STM32G431CBTx, from the STM32 family.
How big is the Foc PCB?
The Foc measures 77.9 × 34.2 mm, has 2 copper layers and is 1.6 mm thick.
How many components are on the Foc?
73 components, from 35 distinct parts. The full bill of materials is listed on this page.
Where can I download the Foc design files?
From the katherinesiyuchen-sys/foc repository on GitHub, which has the KiCad layout and the schematic; the links under Design files point to each one.
Can I use the Foc design in my own project?
Yes, under the terms of its MIT license, which katherinesiyuchen-sys chose for the repository.
Can I test firmware for the Foc without the hardware?
Yes. HardLabs builds a simulation of the board from its netlist and BOM, so you can run and debug STM32 firmware against it before you order a PCB.
Similar boards
STM32
LumenPnP Motherboard
opulo-inc
149 × 95 mm296 parts4LCC-BY-SA-4.03.7kSTM32
AxxSolder
AxxAxx
39 × 82.5 mm122 parts2LGPL-3.01.7kSTM32
LibreVNA
jankae
122 × 98 mm592 parts6LGPL-3.01.6kSTM32
AIOC
skuep
21 × 31.5 mm47 parts2LMIT1.4kSTM32
Ferris
pierrechevalier83
208.8 × 86.8 mm102 parts2LSHL-2.11.3kSTM32
176 pin board
rusefi
61.8 × 73.2 mm76 parts2LGPL-3.01.2k