This Balance Bot Uses a Mirror to See the Big Picture

MirrorBallBot uses computer vision and a clever mirror trick to balance — and even chase your finger with — a rolling ball.

nickbild
19 minutes ago Robotics
MirrorBallBot is a DIY balance bot (📷: Andrea Favero)

We’ve seen more than our fair share of balance bots here at Hackster News over the years, but somehow, they never seem to get old. There’s just something inherently captivating about watching a collection of motors and sensors fight gravity in real time — and win.

Every now and then, someone builds a balance bot with an unusual twist that makes it especially interesting. Andrea Favero has just done that with a robot he calls MirrorBallBot that uses computer vision and a mirror to keep a ball balanced on a tilting platform.

A custom PCB keeps things neat (📷: Andrea Favero)

Favero wanted a large balancing platform, but didn’t want an oversized machine. This made things difficult — even with a Raspberry Pi Camera Module 3 Wide, achieving a sufficiently large field of vision required him to place the camera quite far from the target. Inspired by the way a mirror effectively doubles viewing distance, he mounted one into the robot’s optical path. This gave a virtual increase in camera distance that expands the field of view by roughly 60% while keeping the robot compact.

In addition to the standard balancing mode, Favero added another feature he calls “finger-follower” mode. Using a 7-inch touchscreen display, the system tracks a user’s finger position and continuously steers the ball to remain underneath it. Watching the ball chase a moving fingertip in real time creates an interactive experience that provides endless entertainment.

On the hardware front, a Raspberry Pi 4 Model B serves as the central controller, handling computer vision, inverse kinematics calculations, PID control, and the touchscreen graphical interface. Motion control duties are distributed among three RP2040-Zero boards, each responsible for driving a stepper motor through a TMC2209 driver.

Mounting the hardware inside the case (📷: Andrea Favero)

Communication between the Raspberry Pi and the RP2040 boards takes place over a custom I2C protocol developed specifically for the project. Commands are transmitted as tiny packets containing speed and motion data, and the RP2040s use their programmable I/O hardware to generate highly precise step pulses. A dedicated synchronization signal ensures that all three motors begin moving simultaneously, preventing unwanted platform motion during rapid corrections.

Users can adjust PID parameters in real time through on-screen sliders, experiment with predefined motion paths, create custom trajectories by drawing directly on the touchscreen, and perform automatic ball-color calibration that analyzes the scene to optimize computer-vision tracking.

Favero has provided extensive documentation for anyone who would like to build their own MirrorBallBot.


nickbild

R&D, creativity, and building the next big thing you never knew you wanted are my specialties.

Latest Articles