YOU CAN 3D PRINT A CUBE THAT BALANCES ITSELF ON A SINGLE CORNER
A 3D-printed cube that stands motionless on a single corner using three internal reaction wheels and an ESP32.
by remrc
RoboticsOpen-hardware
Built withESP32Arduino3D printing
- difficulty
- ●●●●○
- time
- a weekend-plus
- license
- No licence file (all rights reserved)
- repo
- repo ACTIVE543 stars
●●●●○ · a weekend-plus · No licence file (all rights reserved) · 543 stars · repo ACTIVE
WHAT YOU’LL NEED
Jump to section
COMPAREE VERDICT
This is a genuine demonstration of reaction wheel control, the same principle used to point satellites. Three Nidec 24H brushless motors (drivers built in) spin weighted wheels to create torque, while an MPU6050 IMU feeds orientation to an ESP32 (an Arduino Nano version exists too). Set it on an edge or a single corner and it holds itself there, correcting when nudged. The firmware is complete and the parts list is specific. The difficulty is in the details: the sensor orientation must match the firmware (the 2024 code changed it, so older prints need one part reprinted), each balancing point has to be calibrated once over Bluetooth, and the controller gains may need tuning for your build. If a motor spins the wrong direction, the cube will fight itself instead of balancing - the author's motor test sketch exists exactly for that. The payoff is a project that genuinely looks like it defies physics and teaches real control theory.
IN THE REPO
GOOD TO KNOW
- —Printable parts are on Thingiverse (thing:6695891); the GitHub repo holds the firmware, schematics and a motor test sketch.
- —Full Arduino firmware is included with PID tuning parameters.
- —The parts are named in the README and schematic: ESP32 (or Arduino Nano), MPU6050, three Nidec 24H motors, a 3S 500 mAh LiPo, a 7805 regulator and a buzzer.
- —Assembly instructions are present but assume comfort with motor wiring and calibration.
- —No PCB — everything wires point-to-point inside a small enclosure.
- —No licence is stated in the repository, so by default all rights are reserved — fine to build one for yourself, but ask the creator before selling.
Parts to buy
8 itemsFrom our check of the build. Exact quantities and part numbers are in the creator’s BOM.
Can I build this?
Build at your own risk. Projects involve tools, electronics and sometimes mains voltage — follow the creator’s safety notes.
Videos
The creator's own build video (ReM-RC, 'How to build self balancing cube'); separate videos cover setting the balancing points and the motor test sketch.
More builds like this
All projectsGallery
Start here
Navigation into the creator’s own docs — we don’t rewrite the guide, we route you to the source.
- 1.Read the full README, look at the photos and schematics, and watch the linked build video to understand the balancing behavior (The photos and schematics show the layout; the build video and the balancing-point video show it in action)
- 2.Print the STL files — the cube shell, motor mounts, and base cap(The printable parts are on Thingiverse; print them solid enough to hold the motors firmly, since the wheels correct constantly while it balances)
- 3.Order the parts named in the README and schematic: three Nidec 24H motors, ESP32 (or Arduino Nano), MPU6050, 3S 500 mAh LiPo, 7805 regulator, 5 V buzzer (Motor weight and moment of inertia matter — substitutions will require PID retuning)
- 4.Flash the firmware to the ESP32 and calibrate the IMU orientation before final assembly(Test IMU readings on a flat surface first to confirm axes are correct)
Resources
Documentation, files and community threads for this build — we link straight to the original sources and never rehost the creator’s files.
KNOWN ISSUES
- Motor direction: if even one motor spins backwards relative to the firmware expectation, the cube will thrash instead of stabilize — test each motor individually before assembly.
- IMU orientation: the MPU6050 must be mounted exactly as shown in the photos, or the firmware will interpret tilt in the wrong direction.
- Loose wiring: the cube is constantly corrected by fast-spinning wheels, so secure every wire; an intermittent IMU or motor connection makes it fall.
- PID tuning: the default parameters work for the exact motors listed, but any substitution (different weight or inertia) requires re-tuning by trial, which takes time.
- Battery placement: the center of mass must stay near the geometric center — a badly placed battery will make balancing impossible.
- Skipping the balancing-point calibration: after flashing, connect over Bluetooth and record the three edges and the vertex (send c+ / c-) — the creator has a separate video on this step.
Can I use different motors?
Yes, but you will need to retune the PID parameters in the firmware — motor weight and moment of inertia directly affect the control loop.
How long does it balance on one charge?
The creator does not publish a runtime. It runs on a small 3S 500 mAh LiPo, so expect short sessions; runtime depends on how much correcting the wheels do.
Does it need to be calibrated every time I turn it on?
No — once the IMU is calibrated and the firmware is tuned, it powers on and balances immediately.
What happens if a motor fails mid-balance?
It falls. On an edge the cube relies on one wheel, on the corner on all three, so a failed motor ends the balance either way - which is why the author provides a motor test sketch to check all motors and directions first.
Can it balance on surfaces other than a hard floor?
Use a firm, flat surface: on carpet or a soft mat the edge or corner sinks and shifts, which makes the balance point unstable.
Community builds
No community builds yet — be the first, we feature the best ones.
Discussion1
FROM THE COMPAREE TEAM
Three reaction wheels spinning inside a cube keep it balanced on an edge or a single corner, the same principle used to point satellites in space. Would you tune the controller gains by trial over Bluetooth, or model it first?
remrc
Built this cube as a demonstration of reaction wheel control, the same physics that keeps satellites stable in orbit. The project documents the entire mechanical and firmware design, including the PID tuning process.
DISCLAIMER
- Comparee is not the author of the projects featured here. All rights to each project belong to its creator — every page links to the original source, and we never host creators’ files.
- Information is provided without warranty and may become outdated as projects evolve. Prices are indicative bands only — always check the creator’s parts list for current costs.
- Building and operating any project is at your own responsibility. Protective equipment, safe workshop practice and compliance with local regulations are the builder’s responsibility.
CompareeTEAM2mo agoedited
Practical notes from our verification: the repository has firmware for an ESP32 (plus an Arduino Nano version), a motor test sketch and schematics, while the printable cube itself is on Thingiverse (thing:6695891). The README links the creator's own build video and a video on setting the balancing points. The build uses three Nidec 24H brushless motors with built-in drivers, so there are no separate ESCs to wire or calibrate; you also need an MPU6050, a 3S 500 mAh LiPo, a 7805 regulator and a buzzer. Controller gains can be tuned remotely over Bluetooth, and the balancing points for each edge and the corner are calibrated with a simple serial procedure saved to EEPROM. No PCB is provided, so plan your wire routing before final assembly. Note that the repo has no licence file, so reuse rights are not granted by default. Correction (4 October 2026): we re-checked this page line by line against the project's own repository, documentation and videos, and fixed errors in earlier versions.