Ball tracking robot
linusnc183·ball-tracking-robot·hardware/PCB/KiCad/Ball_Tracking_Robot_Controller.kicad_pcb
About the Ball tracking robot PCB
Ball tracking robot is an open source STM32 PCB design by linusnc183, published on GitHub. It is a 2-layer board measuring 56.5 × 42 mm, with 53 components from 29 distinct parts.
Its main chip is the STM32G431CBTX, from the STM32 family. Other key parts include the AP2112K-3.3 and TB6612FNG. By type, the board carries 20 capacitors, 14 resistors, 9 connectors, 4 diodes, 3 ICs and 2 switches.
It belongs with the robotics & motion designs in this gallery.
From the project
A two-wheeled robot that visually tracks and follows a red ball. A Raspberry Pi handles vision (Picamera2 + OpenCV) and sends drive commands over UART to a custom STM32-based motor controller PCB, which closes the loop with encoder feedback and PID.
A two-wheeled robot that visually tracks and follows a red ball. A Raspberry Pi handles vision (Picamera2 + OpenCV) and sends drive commands over UART to a custom STM32-based motor controller PCB, which closes the loop with encoder feedback and PID.
I designed the controller PCB from scratch in KiCad and wrote the embedded firmware in C (STM32CubeIDE, HAL).
Skills demonstrated: PCB design (KiCad) · embedded C / STM32 HAL · real-time control loops (PID) · analog/digital circuit design (power regulation, signal protection) · computer vision (OpenCV) · serial communication protocol design

Main components on the Ball tracking robot
Ball tracking robot bill of materials (BOM)
53 components, 29 distinct parts — part numbers from the project's BOM.
| Qty | Part | Footprint | Refs |
|---|---|---|---|
| 1 | AP2112K-3.3 | SOT-23-5 | U1 |
| 1 | STM32G431CBTX STM32G431CBTx | QFN-48-1EP_6x6mm_P0.4mm_EP4.6x4.6mm | U2 |
| 1 | TB6612FNG | HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.4x4.68mm | U3 |
| 1 | USB_C_RECEPTACLE_USB2.0_16P USB_C_Receptacle_USB2.0_16P | USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal | J1 |
| 1 | J_LEFT_ENCODER | PinHeader_1x04_P2.54mm_Vertical | J2 |
| 1 | LEFT_MOTOR | JST_VH_B2P-VH_1x02_P3.96mm_Vertical | J3 |
| 1 | RIGHT_MOTOR | JST_VH_B2P-VH_1x02_P3.96mm_Vertical | J4 |
| 1 | RASPBERRY_PI | PinHeader_1x04_P2.54mm_Vertical | J5 |
| 1 | HC_SR04 | PinHeader_1x04_P2.54mm_Vertical | J6 |
| 1 | RASPBERRY_PI_IN | PinHeader_1x02_P2.54mm_Vertical | J7 |
| 1 | SWD HEADER | PinHeader_1x06_P2.54mm_Vertical | J8 |
| 1 | J_RIGHT_ENCODER | PinHeader_1x04_P2.54mm_Vertical | J9 |
| 1 | 2A | Fuse_1206_3216Metric | F1 |
| 2 | SW_Push | SW_SPST_TL3305A | SW1, SW2 |
| 1 | LED | LED_0805_2012Metric | D1 |
| 2 | D_TVS | D_SMA | D2, D3 |
| 1 | SMF5V0A | D_SMF | D4 |
| 2 | 100μF | C_1206_3216Metric | C1, C16 |
| 9 | 100NF 100nF | C_0805_2012Metric | C2, C5, C6, C7, C8, C11, C13, C14 +1 |
| 2 | 10μF | C_0805_2012Metric | C3, C4 |
Show 9 more
| Qty | Part | Footprint | Refs |
|---|---|---|---|
| 1 | 4.7μF | C_0805_2012Metric | C9 |
| 1 | 470μF | C_Elec_6.3x5.8 | C10 |
| 1 | 100μF | C_1210_3225Metric | C12 |
| 4 | 10NF 10nF | C_0805_2012Metric | C17, C18, C19, C20 |
| 2 | 5.1K 5.1k | R_0805_2012Metric | R1, R10 |
| 1 | 1k | R_0805_2012Metric | R2 |
| 8 | 10K 10k | R_0805_2012Metric | R3, R4, R5, R8, R11, R12, R13, R14 |
| 2 | 220R | R_0805_2012Metric | R6, R7 |
| 1 | 20K 20k | R_0805_2012Metric | R9 |
Ball tracking robot design files
The KiCad project lives in the linusnc183/ball-tracking-robot repository on GitHub; these links point at the commit this page was built from.
Ball tracking robot: common questions
What microcontroller does the Ball tracking robot use?
The Ball tracking robot is built around the STM32G431CBTX, from the STM32 family.
How big is the Ball tracking robot PCB?
The Ball tracking robot measures 56.5 × 42 mm, has 2 copper layers and is 1.6 mm thick.
How many components are on the Ball tracking robot?
53 components, from 29 distinct parts, with part numbers taken from the project's own BOM. The full bill of materials is listed on this page.
Where can I download the Ball tracking robot design files?
From the linusnc183/ball-tracking-robot repository on GitHub, which has the KiCad layout, the schematic and the BOM; the links under Design files point to each one.
Can I use the Ball tracking robot design in my own project?
The repository has no license, so all rights stay with linusnc183. Use it as a reference, and ask the author before reusing the design.
Can I test firmware for the Ball tracking robot 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
Type g
google
169 × 30 mm24 parts2LApache-2.02.9kSTM32
Main panel
google
234 × 84 mm26 parts4LApache-2.02.9kSTM32
Base
google
52.3 × 52.3 mm36 parts2LApache-2.02.9kSTM32
Type a
google
150 × 30 mm14 parts2LApache-2.02.9kSTM32
Type c
google
188 × 30 mm17 parts2LApache-2.02.9k