This ESP32-Powered Self-Balancing Cube Jumps With a Spring and Uses a Reaction Wheel to Land on Its Edge

Published  September 21, 2026   0
User Avatar Vedhathiri
Author
ESP32-Powered Self-Balancing Cube Jumps And Lands

A maker from The Tinkering Techie has done a compact self-balancing cube that can launch itself into the air, reorient during the jump, and land upright on one of its edges. Unlike conventional self-balancing robots that continuously drive wheels against the ground, this cube uses an internal reaction wheel to control its orientation. When the motor accelerates or decelerates the spinning wheel, the resulting counter-torque rotates the cube in the opposite direction. The cube's electronics are built around an ESP32, an IMU, and a custom PCB, while the reaction-wheel motor is controlled using the open-source SimpleFOC motor-control library. The reaction wheel is designed with more mass toward its outer edge to increase its moment of inertia, allowing it to generate useful corrective torque without requiring an excessively large wheel.

The balancing system combines data from the IMU's accelerometer and gyroscope to determine the cube's orientation and continuously adjust the reaction-wheel motor. Getting this system to work reliably required more than simply implementing a conventional balancing algorithm. During a jump, the accelerometer experiences the cube's additional linear acceleration and can no longer provide a reliable measurement of gravity-based orientation. The creator therefore changed the control strategy during flight, relying on the gyroscope while the cube was airborne and immediately after impact. An initial 30-millisecond gyro-only period after landing was found to be too short because the impact still produced large accelerations that disturbed the accelerometer readings. Extending this period to about 1 second allowed the cube to wait for the impact-induced acceleration to settle before bringing the accelerometer back into the balancing loop. The project also required careful tuning of the motor through SimpleFOC so that the reaction wheel could accelerate and decelerate smoothly enough for stable control.

The jumping mechanism is a separate mechanical system built around a spring-loaded piston and sector gear. The gear compresses the springs as it rotates, and once its teeth run out, the piston is released and rapidly pushes against the ground to launch the cube. Mechanical alignment became a significant part of the build, with flexible guides and a bending piston reducing the available launch height and, consequently, the time available for the cube to reorient before landing. The mechanism was redesigned using more rigid stainless-steel guide rods, while another launch concept explored a snail-shaped cam profile to produce the required rapid release.The project demonstrates how an ESP32, IMU, SimpleFOC-controlled reaction wheel, and carefully engineered mechanical launch system can be combined into a compact robotic platform where sensing and control have to account for completely different conditions before, during, and immediately after a jump.

Add New Comment

Login to Comment Sign in with Google Log in with Facebook Sign in with GitHub