Skip to content

Photo and 3D model

Ball-Balancing Robot, photo from its repository
Photo@I-M-Robotics-Lab (opens in a new tab)GPL-3.0-onlysource file (opens in a new tab)

3D preview converted from github.com/I-M-Robotics-Lab/Ball-Balancing-Robot at d06e5fd, under GPL-3.0-only. View the original files from GitHub (715 KB) (opens in a new tab)

Open source · free filesRobot ID

Ball-Balancing Robot

Other

An educational Raspberry Pi ball-balancing robot that uses camera vision and PID control to keep a ball centered on a platform tilted by servos.

Before you build

Tools
3D printer
Level
Intermediate
Licence
GPL-3.0-only (opens in a new tab), hardware and softwareCommercial use: Allowed

Not stated in the creator's files: total cost, shop links, time.

Read from the repository at commit d06e5fd. Something out of date? Tell us

Project information

Buildability
81/100Well documented, cost unknown
Parts
A spreadsheet
Works with
Adafruit Blinka, Adafruit CircuitPython ServoKit

This repository contains executable files that Robotheca doesn't check. Only run them if you trust the creator.

Which files (2 scripts)

Suggested by Robotheca, created by @I-M-Robotics-Lab (opens in a new tab), from github.com/I-M-Robotics-Lab/Ball-Balancing-Robot (opens in a new tab), pinned to commit d06e5fd (opens in a new tab). You buy the parts yourself; Robotheca doesn't sell robots. Last checked on GitHub on 1 December 2026; its last change there was on 29 September 2026.

Build it

The creator's 10 steps, each linked to its instructions
  1. Obtain components
  2. Print and assemble robot structure
  3. Flash Raspberry Pi OS
  4. Install electrical components
  5. Install software
  6. Initial calibration via HMI
  7. Zero pose capture
  8. Offset calibration
  9. Verification
  10. Run runtime control loop

The guide appears here as you scroll.

Guide by @I-M-Robotics-Lab (README.md), under GPL-3.0-only.

What to buy

The parts list is a spreadsheet in the repository. Robotheca can't read this file, so its quantities and prices are not checked here.

Open BOM & Wiring Instructions.xlsx (opens in a new tab)

Why it scores 81

It measures the published files, not the robot · How we score

81/100

Well documented, cost unknown

How complete the published files are for rebuilding this robot, measured by Robotheca at commit d06e5fd. It isn't a rating of the robot. Counted out of 80 points and scaled to 100: the parts that don't apply to this robot are left out.

  1. 2Parts listA parts list in the repository as a spreadsheet (BOM & Wiring Instructions.xlsx): Robotheca can't read its quantities, prices or shop links.Most points to gain: Add the parts list as a CSV or a Markdown table too, so its prices and shop links can be checked.10/20
  2. 3SoftwareCode in this repository, instructions to install or run it.Say which software framework it uses (ROS 2, LeRobot, Arduino…).10/15
Full points: 3D and CAD files, Documentation, Licenses; not counted: Robot description, Simulation
  1. 13D and CAD files2 printable parts (STL, 3MF), 8 CAD source files.20/20
  2. 4DocumentationREADME of 4,262 characters with 2 pictures; 10 build steps.15/15
  3. 5LicensesHardware: GPL-3.0-only; software: GPL-3.0-only.10/10
  4. –Robot descriptionNo URDF. Not counted: the score is made of the parts that apply.Optional: add a URDF, and the robot can be seen in 3D and tried in the browser.Not counted
  5. –SimulationNo simulation files. Not counted: the score is made of the parts that apply.Optional: add a simulation model (MuJoCo, Gazebo, Webots or Isaac).Not counted

Wiring and electronics

Notes written by Robotheca from the project's documents, not by its creator

Main parts: Robotheca's summary

  • Raspberry Pi as the main controller.
  • Camera module connected to the Pi's CSI connector.
  • PCA9685 I2C servo driver board.
  • Servos that tilt the platform through linkages.
  • Separate power supply for the servos.

Connections: Robotheca's summary

  • Camera connects to the Pi's CSI connector.
  • PCA9685 connects to the Pi over I2C (SDA/SCL), typically at address 0x40.
  • Servo power is isolated from the Pi 5V rail (recommended).
  • Servo supply and Pi share a common ground.

What it can do: Robotheca's summary

Written by Robotheca from the project's documents, not by its creator
  • Balances a ball on a tilting platform using real-time camera vision feedback.
  • Runs a PID control loop at roughly 60 Hz frame capture, 50 Hz vision processing, and servo actuation.
  • Provides a curses-based HMI over SSH with jog controls and calibration tools.
  • Runs headless: video preview is disabled automatically while the control loop keeps working.
  • Uses JSON-driven configuration, with calibration values saved to config/calibration.json.

Software

Framework
Not stated
Languages
Python, Shell, JavaScript
License
GPL-3.0-only

Robotheca doesn't review code. Read it before running it.

How to run it: Robotheca's summary

Written by Robotheca from the project's documents, not by its creator.

  1. 1Flash Raspberry Pi OS (Bookworm recommended) with Raspberry Pi Imager, enable SSH, and configure WiFi and user if needed.
  2. 2Enable I2C with raspi-config, reboot, and confirm the PCA9685 with i2cdetect -y 1.
  3. 3Run bash scripts/install.sh to install Python dependencies, system libraries, OpenCV, and the libcamera stack.
  4. 4Launch the HMI with the hmi command to capture zero pose and set X/Y offsets, saving calibration values.
  5. 5Start the control loop with bash scripts/run_runtime.sh; press q to exit, which disarms servos and closes the camera.

Free files

Every file of the project, at commit d06e5fd.

Community

Questions and improvements go to the creator's repository.

Add a badge to your README

For the creator: two badges that link back here. The second always shows this page's current label and score.

Listed on RobothecaRobotheca buildability

Markdown (one click selects it)

[![Listed on Robotheca](https://robotheca.org/robots/ball-balancing-robot/badge.svg)](https://robotheca.org/robots/ball-balancing-robot)
[![Robotheca buildability](https://robotheca.org/robots/ball-balancing-robot/score.svg)](https://robotheca.org/robots/ball-balancing-robot)

Licence and credits

Robot ID

Robotheca

Ball-Balancing Robot

An educational Raspberry Pi ball-balancing robot that uses camera vision and PID control to keep a ball centered on a platform tilted by servos.

Type
Other
Level
Intermediate

Licence: GPL-3.0-only, hardware and softwareCommercial use: Allowed

Buildability: 81/100, Well documented, cost unknown

Licences read from the files at commit d06e5fd

robotheca.org/robots/ball-balancing-robot

Licenses
GPL-3.0-only (opens in a new tab), hardware and software
Commercial use
Allowed

Other other robots

All 98 other robots
  • Ready to build

    Open source · free files

    Koriobots

    Other · Intermediate

    Score
    Buildability 98 out of 100
    Cost
    $972.06≈ €891
  • Ready to build

    Open source · free files

    AmazingHand

    Other · Intermediate

    Score
    Buildability 88 out of 100
    Cost
    under €200
  • Ready to build

    Open source · free files

    DigiArm Prosthetic Hand

    Other · Advanced

    Score
    Buildability 85 out of 100
    Cost
    $250≈ €229
  • 3D render

    Open source · free files

    FloatingFace

    Other · Advanced

    Score
    Buildability 100 out of 100
    Cost
    $328.47≈ €301

≈ € values are approximate, converted at the ECB euro reference rate of 1 Dec 2026. The creator's original price always comes first.