Ye Jiang
← Projects

Reaction-wheel self-balancing bicycle

Spring 2026 · ME 2011, University of Minnesota · solo project

A bike that balances itself while standing still. Instead of steering, it spins a reaction wheel: when the frame starts to tip, the controller speeds the wheel up and the reaction torque pushes the frame back.

SolidWorks · FDM printing · laser cutting · Arduino UNO · MPU-6050 IMU · Nidec 24H brushless motor · C++

Balancing on two wheels while standing still.
Role
Designed, built and programmed it on my own
Result
Holds unassisted balance on two wheels while stationary
Cost
$39.54 in parts (full list below)
Hardest bug
A motor driver whose pin-out didn't match its own documentation

How it works

A bike standing still is an inverted pendulum: once it starts to fall, gravity makes it fall faster. The MPU-6050 measures tilt angle and rate, and a PID loop on the Arduino turns that into a speed command for the brushless motor. Speeding the wheel up pushes the frame the other way. A wheel only makes torque while it's accelerating, so the controller has to react early rather than hard.

Design

SolidWorks model of the bicycle
SolidWorks assembly.
Reaction wheel, motor and electronics
Reaction wheel, motor and the Arduino/IMU stack.

I kept everything cheap and makeable with what I had: 3D-printed frame parts running on 608z bearings, a laser-cut acrylic disc for the reaction wheel, an Arduino UNO, an MPU-6050 and a Nidec 24H brushless motor.

Parts list

PartQtySourceCost
Bought
MPU-6050 accelerometer/gyro1Amazon$3.33
Rear wheel (rubber)1Ax-Man$0.95
LiPo battery (3S 11.1 V)1Amazon$16.00
Nidec 24H brushless motor1Amazon$7.99
Front wheel1Ax-Man$3.95
608z bearings3Amazon$1.56
MG996R servo1ECE Depot$4.00
LM2596 voltage regulator1Amazon$1.60
Made in the lab (acrylic and PLA at $0.25/lb)
Acrylic reaction wheel, laser-cut (30 g)1Anderson Labs$0.02
3D-printed second floor (56.7 g)1Anderson Labs$0.03
3D-printed rear stack (48.7 g)1Anderson Labs$0.03
3D-printed front stack (19.1 g)1Anderson Labs$0.01
3D-printed rear wheel core (73.2 g)1Anderson Labs$0.04
3D-printed lower board (30 g)1Anderson Labs$0.02
3D-printed stepper roller1Anderson Labs$0.01
From the ME 2011 kit
Arduino UNO R31Course kit$0.00
28BYJ-48 5 V stepper + driver board1Course kit$0.00
Jumper wires30Course kit$0.00
Push button (start switch)1Course kit$0.00
Fasteners and consumables
M6 bolts and nuts12Anderson Labs$0.00
Sandpaper, hot glue, electrical tape-Anderson Labs$0.00
Total$39.54

Problems I ran into

At first the brushless motor wouldn't respond to its driver at all. Instead of changing the balance code again, I wrote a separate test program that drove each control line on its own, and found that the supplier had swapped the PWM, direction and start signals compared with their own documentation. After rewiring to the real pin-out, the motor worked.

Once it balanced, I reinforced the frame and added an MG996R servo to steer the front wheel, a 28BYJ-48 stepper on the rear wheel (written non-blocking so it never holds up the balance loop), a servo kickstand that retracts on its own for hands-free starts, and voltage regulation.