Skip to the content
PCBKitNew board
2 layers87.4 × 52.7 mmSelf Balancing Robot, the printed circuit board in 3D

Self Balancing Robot

paradox3407/Training-Wheels

Self Balancing Robot using PID

Size
87.4 × 52.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
22
Nets
46
Pads
114
Tracks, vias
157, 5
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
9 Jun 2026
Updated
4 Nov 2026

Overview

Self Balancing Robot is an open-source printed circuit board by paradox3407, from the paradox3407/Training-Wheels repository on GitHub. It is a 2-layer board of 87.4 × 52.7 mm with 22 parts on 46 nets, routed with 157 tracks and 5 vias.

It is built around the TSR 1-2450. Its parts include 7 capacitors, 2 resistors, 2 ICs, 2 diodes and 1 connector. It belongs with the robots and motor control boards and the ESP32 boards of this library.

Main components

1

README

README.md
Screenshot 2026-06-16 010036

Training Wheels

ESP32 based two wheeled self balancing robot with a custom PCB, chassis, firmware! Want to learn how to implement a control loop or just want to build a cool robot? Training Wheels is for you!

Features

  • PID Control Algorithm
  • IMU Calibration Program
  • Convenient Troubleshooting:
    • Headers for swapping ICs: ESP32, MPU6050, A4988 Stepper Motor Driver Breakout
    • LED indicators for VDD and GPIO
  • Nema 17 Stepper Motors
  • Power Switch

Overview

This project was made for Hackclub's Fallout Program. I built this because I wanted to make a project that encompasses mechanical, electrical, and software engineering, all while exploring PID control through implementing the prototyping process and good design practices. Through the ~70 hours spent on this project I learned the value of documentation, time management, how to select components, read datasheets, how to CAD using assemblies and designing in context, schematic, part layout and wiring good practices, version control, PID control theory and tuning, and so much more! (Might have gotten a caffeine addiction too...)

Gallery

Click to expand

Chassis / Assembly

Designed in Onshape

Source Files found here

Screenshot 2026-06-16 010238 Screenshot 2026-06-16 010210

PCB

Designed in KiCad

Screenshot 2026-06-16 174314

Schematic
Schematic
Layout
PCB Layout

Firmware (Setup + Tuning)

Written in C++ using VSCode + PlatformIO

How to Build & Flash

  1. Clone this repository.
  2. Open the Firmware/Self-Balancing-Robot folder in VS Code with PlatformIO installed.
  3. Connect your ESP32 via USB.
  4. Click the PlatformIO Upload button

The IMU must be calibrated before running the main code. Run the calibration program while the robot is upright and in a stable position.

How to Tune

Then run the main code. To get the robot to balance, modify these values:

cpp
const float desiredOutput = 0; // desired angle 
const float Kp = 0; 
const float Ki = 0;
const float Kd = 0; 

Tune these values in the following order: desiredOutput is used for setting the offset for the balance point of the robot.

Kp is the proportional gain, and it will be doing most of the "work": increase by powers of two until the robot oscillates, then decrease by 20%.

Kd is the derivative gain, and it addresses oscillations. Increase by small increments, starting roughly at 0.05, until the robot stops oscillating.

Ki is the integral gain, which address drift. By this point the robot should be balancing but if it glides forward or backwards, increase this value, also starting small. Note that Ki might not always need to be modified.

The key to tuning is patience! Only modify one value at a time, and increment in small values.

Zine

Designed in Figma

Training Wheels Zine-Final-1

Acknowledgements

Designed by Sara C / paradox3407

Special thanks to my robotics mentors for reviewing my designs and giving me much needed feedback! + Jennifer for creating inspiration/reference sketches for the chassis + Ellie for teaching me the basics of calculus at flex when I was trying to learn the math behind PID + Hackclub and Fallout!

Parts

22
QtyValueFootprintReferences
30.1 uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC3, C4, C5
3100 uFTW Footprints:CP_Radial_D6.3mm_P2.50mmC1, C2, C6
2LEDTW Footprints:SMD LED 1206D1, D2
2Pololu_Breakout_A4988Module:Pololu_Breakout-16_15.2x20.3mmA1, A2
2Stepper_Motor_bipolarConnector_JST:JST_XH_S4B-XH-A_1x04_P2.50mm_HorizontalM1, M2
1270Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR2
1470 uFCapacitor_THT:CP_Radial_D10.0mm_P5.00mmC7
1620Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1
1DEVKIT_V1_ESP32-WROOM-32TW Footprints:MODULE_DEVKIT_V1_ESP32-WROOM-32U1
1GY-521TW Footprints:MODULE_GY-521MPU1
1TSR_1-2450Converter_DCDC:Converter_DCDC_TRACO_TSR-1_THTU2
1XT60 MaleConnector_AMASS:AMASS_XT60-M_1x02_P7.20mm_VerticalJ1

The 19 most common of 22 parts.

Questions

How big is the Self Balancing Robot PCB?

It measures 87.4 × 52.7 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Self Balancing Robot use?

22 parts, built around the TSR 1-2450. 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 Self Balancing Robot KiCad files?

From the paradox3407/Training-Wheels repository on GitHub, at the commit this page was made from: the board is CAD Files/PCB Design/Self Balancing Robot/Self Balancing Robot.kicad_pcb and its schematic CAD Files/PCB Design/Self Balancing Robot/Self Balancing Robot.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Self Balancing Robot design in my own project?

Its repository states no licence, so its author keeps all rights: ask paradox3407 before reusing the design.

Similar boards

  • 4 layers72.4 × 95.3 mmDingoPDM, the printed circuit board in 3D

    DingoPDM

    corygrant/dingoPDM

    Hardware - dingoPDM is an open source, affordable automotive PDM (Power Distribution Module). Pre-assembled and tested units are available or the design can be used to build a DIY version.

    156 parts128MIT
  • 2 layers51.6 × 26.8 mmMHI AC CTRL, the printed circuit board in 3D

    MHI AC CTRL

    hberntsen/mhi-ac-ctrl-esp32

    Control MHI Airconditioning locally using your own ESP32 series chip!

    8 parts74MIT
  • 2 layers65 × 74 mmRP2040 MPG and DRO, the printed circuit board in 3D

    RP2040 MPG and DRO

    terjeio/GRBL_MPG_DRO_BoosterPack

    Tiva C BoosterPack for GRBL MPG/DRO

    54 parts46
  • 2 layers127 × 54.3 mmTerraesp, the printed circuit board in 3D

    Terraesp

    fehlfarbe/terraesp

    ESP32 terrarium controller

    83 parts25MIT
  • 2 layers94.8 × 67.2 mmArgo v9-stable rev4, the printed circuit board in 3D

    Argo v9-stable rev4

    SensorsINI/argo

    Code for Autonomous sail boat

    139 parts16
  • 2 layers110 × 75 mmShark bait remote, the printed circuit board in 3D

    Shark bait remote

    idlehandsdev/shark_bait

    The files and firmware for the Shark Bait wireless pumping system.

    65 parts13
  • 2 layers70 × 40 mmRx V1.2, the printed circuit board in 3D

    Rx V1.2

    TRD-B/EasyRC

    Open source RC platform

    52 parts9MIT