Plumb
A two-wheeled balancing robot you can tune before you build one. Plumb simulates the robot with its real motors, sensors and control loop, so you can see why one design stands up and another falls over, and try the fix in seconds instead of on the bench.
What it does
- Real dynamicsEquations of motion derived from first principles rather than a game physics engine, with wheels that can slip and a body that lands on the floor when it falls.
- Real motorsBrushed DC gearmotors built from datasheet numbers, including Pololu micro metal gearmotors: top speed, battery voltage, gear play and wheel encoders all matter.
- Real sensingAn MPU-6050 or LSM6DS33 motion sensor modelled from its datasheet, with noise, offset and drift, and four ways of estimating the tilt, from gyro only to a Kalman filter.
- Real controlA cascaded PID controller like the one cheap hardware runs, with adjustable gains, loop rate, sensor noise and delay, and repeatable runs.
- Presets that teachSixteen configurations, from a robot built from published Pololu parts to a flat battery, sloppy gears, ice and a control loop that is too slow, each shown with a push so the failures visibly fail.
- From CADMass and inertia can come from a FreeCAD parametric model instead of simple formulas.
How it is built
The dynamics, motors, sensors and presets are separate modules with automated tests that run on every change: energy is conserved when it should be, the slipping model reproduces the no-slip one when grip is good, and every preset does what its description says. Everything runs in your browser.
Author
Plumb was designed and built by Daniel Alberto Sepulveda Estay, PhD, founder of Estay Dynamics. He works on simulation, system dynamics and optimisation for engineering and operations decisions. He holds a PhD from the Technical University of Denmark and an MSc from the Massachusetts Institute of Technology, and is a council member of the System Dynamics Society.
To cite: Sepulveda Estay, D. A. (2026). Plumb: a two-wheeled balancing robot simulator (version 1.3.1) [Software]. https://kathuman.github.io/claude-projects/balancebot-sim/