

2DoFSBP
A two degrees of freedom self balancing pendulum.
- Size
- 94 × 61 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 19
- Nets
- 41
- Pads
- 92
- Tracks, vias
- 167, 0
- Pours
- 3
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 26 Aug 2025
- Updated
- 22 Nov 2025
Overview
2DoFSBP is an open-source printed circuit board by eduardo-ufmg, from the eduardo-ufmg/2DoFSBP repository on GitHub, published under the MIT licence. It is a 2-layer board of 94 × 61 mm with 19 parts on 41 nets, routed with 167 tracks and 0 vias.
Its parts include 12 capacitors, 6 connectors and 1 IC. It belongs with the ESP32 boards of this library.
README
README.md2DoFSBP
A two degrees of freedom self balancing pendulum. 3D Drawing: https://cad.onshape.com/documents/dcaab3bd08b5da9e1fdd55d0/
TODO
Printing
- Print a half-wheel pair
- Conclude motor identification before proceeding
- Print and test a motor connector
- Print and test the base
- Print and test a connector for the wheel guard
- Print and test a wheel guard
- Print and test the second set
Motor Identification
- Test motor
- Gather the following information
- Is the PWM signal active low or active high?
- Which level in the motor's DIR pin makes it rotate counterclockwise (from the motor's perspective, rather than facing its front)?
- When the motor is rotating counterclockwise, does the encoder output from this api increment or decrement? (use attachFullQuad and consider 400 pulses per revolution)
- Create a class for the motor
- Input signal must be a float in [-1, 1]
- -1 → max speed clockwise, 1 → max speed counterclockwise
- Create a class for the encoder
- Counterclockwise movement increments its position, clockwise decrements it
- Test both classes
- Write the code for the identification procedure
- Microcontroller
- Not supposed to compute speed online. Simply collect and transmit the encoder position readings.
- Use a series of steps large enough for it to approach steady state, but not enough for it to reach it. (See PRBS identification)
- Collect the input signal to the motor's object and the output signal from the encoder's object at 10 ms
- Send data to the host at each sampling
- Avoid blocking operations
- Host
- Listen for the experiment data
- Store the experiment data when it is finished
- Preprocess it
- Remove invalid lines
- Compute speed and acceleration from the position
- Fit a standard DC motor transfer function
- Store it and any available statistic about it
- Extend it so U(s) is the input signal to the motor's object and Y(s) is the wheel torque
- Microcontroller
- Write the code for the model validation procedure
- Microcontroller
- Use the same code that was used for the identification
- Host
- Same acquisition and preprocessing as in the identification procedure
- Simulate the model for the collected input
- Compare its output to the captured output from the system
- Microcontroller
Pendulum Modeling
- Capture a simplified geometric model
- Model the MIMO system with inputs T1 and T2 and outputs Theta and Phi, where:
- T1 is the torque of the motor that controls Theta
- T2 is the torque of the motor that controls Phi
- Theta is the pitch angle
- Phi is the roll angle
- Coupling is to be considered
Parts
19| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 100 nF | Capacitor_THT:C_Disc_D3.0mm_W2.0mm_P2.50mm | C7, C8, C11, C12 |
| 2 | 330 nF | Capacitor_THT:C_Rect_L7.0mm_W2.5mm_P5.00mm | C5, C6 |
| 2 | 47 nF | Capacitor_THT:C_Disc_D3.0mm_W2.0mm_P2.50mm | C9, C10 |
| 2 | 470 uF | Capacitor_THT:CP_Radial_D10.0mm_P5.00mm | C2, C3 |
| 1 | 220 uF | Capacitor_THT:CP_Radial_D8.0mm_P3.50mm | C1 |
| 1 | 47 uF | Capacitor_THT:CP_Radial_D6.3mm_P2.50mm | C4 |
| 1 | CONN_ESP32_L | Connector_PinSocket_2.54mm:PinSocket_1x19_P2.54mm_Vertical | J4 |
| 1 | CONN_ESP32_R | Connector_PinSocket_2.54mm:PinSocket_1x19_P2.54mm_Vertical | J5 |
| 1 | CONN_MPU6050 | Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_Vertical | J6 |
| 1 | CONN_NIDEC_0 | Connector_JST:JST_EH_B8B-EH-A_1x08_P2.50mm_Vertical | J2 |
| 1 | CONN_NIDEC_1 | Connector_JST:JST_EH_B8B-EH-A_1x08_P2.50mm_Vertical | J3 |
| 1 | Conn_Coaxial_Power | Connector_BarrelJack:BarrelJack_Horizontal | J7 |
| 1 | LM7805_TO220 | Package_TO_SOT_THT:TO-220-3_Vertical | U3 |
More from eduardo-ufmg/2DoFSBP
1- 2 layers90 × 70 mm

Similar boards
- 2 layers43.9 × 27.7 mm

- 2 layers50 × 60 mm

Debate Device
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
19 parts915 - 2 layers102.9 × 96.7 mm

ISA adapter
polpo/picogus
Emulation of ISA sound cards and CD-ROM on Raspberry Pi Pico (GUS, SB/Adlib, MPU-401, Tandy, CMS, Panasonic CD-ROM) with USB mouse/joystick support
19 parts805 - 2 layers60 × 39 mm

- 2 layers70.1 × 43.2 mm

Iaq device
nkitanov/iaq_board
IAQ Board is a DIY (Do-It-Yourself) device for measuring internal air quality
19 parts396 - 2 layers80 × 80 mm

- 2 layers25.4 × 25.4 mm

Ina169
Ardumower/ardumower
Develop an open source robotic lawn mower (HW+SW reference platform)
19 parts282 - 2 layers58.4 × 28.6 mm

New rele
zmaker/arduino_cookbook
gli sketch del nuovo progetto Arduino Cookbook e dei video di YouTube
19 parts269
Questions
How big is the 2DoFSBP PCB?
It measures 94 × 61 mm and has 2 copper layers, 1.6 mm thick.
What parts does the 2DoFSBP use?
19 parts. 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 2DoFSBP KiCad files?
From the eduardo-ufmg/2DoFSBP repository on GitHub, at the commit this page was made from: the board is Electronics/PCB/PCB.kicad_pcb and its schematic Electronics/PCB/PCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the 2DoFSBP design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).