Skip to the content
2 layers94 × 61 mm2DoFSBP, the printed circuit board in 3D

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.md

2DoFSBP

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
  • 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

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
QtyValueFootprintReferences
4100 nFCapacitor_THT:C_Disc_D3.0mm_W2.0mm_P2.50mmC7, C8, C11, C12
2330 nFCapacitor_THT:C_Rect_L7.0mm_W2.5mm_P5.00mmC5, C6
247 nFCapacitor_THT:C_Disc_D3.0mm_W2.0mm_P2.50mmC9, C10
2470 uFCapacitor_THT:CP_Radial_D10.0mm_P5.00mmC2, C3
1220 uFCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC1
147 uFCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC4
1CONN_ESP32_LConnector_PinSocket_2.54mm:PinSocket_1x19_P2.54mm_VerticalJ4
1CONN_ESP32_RConnector_PinSocket_2.54mm:PinSocket_1x19_P2.54mm_VerticalJ5
1CONN_MPU6050Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ6
1CONN_NIDEC_0Connector_JST:JST_EH_B8B-EH-A_1x08_P2.50mm_VerticalJ2
1CONN_NIDEC_1Connector_JST:JST_EH_B8B-EH-A_1x08_P2.50mm_VerticalJ3
1Conn_Coaxial_PowerConnector_BarrelJack:BarrelJack_HorizontalJ7
1LM7805_TO220Package_TO_SOT_THT:TO-220-3_VerticalU3

More from eduardo-ufmg/2DoFSBP

1
  • 2 layers90 × 70 mmPerfboard, the printed circuit board in 3D

    Perfboard

    eduardo-ufmg/2DoFSBP

    A two degrees of freedom self balancing pendulum.

    22 partsMIT

Similar boards

  • 2 layers43.9 × 27.7 mmTcd1304-4v, the printed circuit board in 3D

    Tcd1304-4v

    OpnTec/open-spectrometer-hardware

    Open source VIS spectrometer

    19 parts1.5k
  • 2 layers50 × 60 mmDebate Device, the printed circuit board in 3D

    Debate Device

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    19 parts915
  • 2 layers102.9 × 96.7 mmISA adapter, the printed circuit board in 3D

    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 mmPs2usb, the printed circuit board in 3D

    Ps2usb

    rasteri/HIDman

    Adapting USB devices to work on old computers

    19 parts432
  • 2 layers70.1 × 43.2 mmIaq device, the printed circuit board in 3D

    Iaq device

    nkitanov/iaq_board

    IAQ Board is a DIY (Do-It-Yourself) device for measuring internal air quality

    19 parts396
  • 2 layers80 × 80 mmGB BRK CPU G1, the printed circuit board in 3D

    GB BRK CPU G1

    Gekkio/gb-hardware

    Game Boy -related custom hardware by gekkio

    19 parts379CC-BY-4.0
  • 2 layers25.4 × 25.4 mmIna169, the printed circuit board in 3D

    Ina169

    Ardumower/ardumower

    Develop an open source robotic lawn mower (HW+SW reference platform)

    19 parts282
  • 2 layers58.4 × 28.6 mmNew rele, the printed circuit board in 3D

    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).