How does a five-inch black cube jump off a table, land on a single edge, and stay balanced there?
That is the effect The Tinkering Techie built, and the point is that your brain refuses to accept it. Toss a D6 on a table and you already know it will tumble and settle flat on a face. This cube goes up, stops rotating mid-flight, comes down on one edge, and holds. It lands on the same edge every time, which is the first clue that something inside is steering it.
So what is actually happening?
Inside the shell sits a self-balancing robot. A reaction wheel spins up to produce torque on the body without pushing against anything outside it, the same principle that lets satellites reorient in vacuum. Spin the flywheel one direction and the cube rotates the other. While airborne, the wheel corrects the cube’s attitude so it arrives edge-down instead of face-down. The moment it touches the table, the controller switches jobs and starts making constant micro-corrections to hold the balance point. The only other moving part is a spring-loaded piston that a second motor winds back between launches.
What is on the board
The Tinkering Techie laid out a custom PCB around an ESP32, a dual-core chip running at 240 MHz. That headroom matters, because the balance loop and the motor commutation both want CPU time on the same part. An IMU supplies 6 axes of motion data (3 accelerometer, 3 gyro), and a BLDC motor drives the flywheel under SimpleFOC firmware. A lithium pack powers everything. Field-oriented control running at a few kHz is what turns raw tilt readings into a wheel that pushes back against a fall faster than you can see it happen.
Try a smaller version first
Balancing a cube on one edge is a single-axis problem, so you only need one wheel to replicate it. Skip the launcher, build the balancer: an ESP32, an MPU6050 on I2C, and a gimbal BLDC with a bolted-on brass flywheel. On a standard ESP32 dev board, SDA lands on GPIO21 and SCL on GPIO22, and most MPU6050 breakouts already carry their own 4.7k pull-ups, so adding a second pair is the usual gotcha that kills the bus. Get the IMU streaming clean angles before you ever energize the motor. Read the SimpleFOC setup guide at docs.simplefoc.com, then watch the cube in action on Hackster.
Frequently Asked Questions
How does the cube stay balanced on one edge?
A reaction wheel inside the cube spins to generate torque on the body. An IMU measures tilt, and the ESP32 adjusts the flywheel speed hundreds of times a second to keep the centre of mass over the edge it landed on.
What parts would I need to build something similar?
What will I learn if I build this?
Closed-loop control, for a start: reading an IMU over I2C, filtering noisy sensor data, and tuning a PID loop until it stops oscillating. You also pick up field-oriented motor control with SimpleFOC, I2C debugging, and the power-budget maths behind running a BLDC off a lithium pack. It covers most of what a thesis or competition robotics project asks for.
