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

FULL CAD BOM FIRMWARE DOCS

RoboticsOpen-hardware

difficulty
●●●●
time
a weekend-plus
license
MIT
repo
repo ACTIVE527 stars

WHAT YOU’LL NEED

  • 3D printer + filamentprintable parts — files are in the repo
  • Electronic partsfull list with part numbers in the repo BOM
  • Dev board / microcontrollerruns the project firmware
  • Soldering kit + basic toolsone-time buy, serves every future build

Partner

Reach your Pi from anywhereRemote desktop to the machine running this build — no port forwarding, works right from the browser.Try Getscreen.me
1

COMPAREE VERDICT

This is a genuine demonstration of reaction wheel control, the same principle that keeps satellites oriented in space. The cube uses three brushless motors spinning weighted discs to generate torque in any direction, while an IMU feeds orientation data to the ESP32 at high speed. The result is a cube that flips itself upright from lying flat and balances motionless on a single corner, correcting itself instantly when pushed. The firmware is complete and the parts list is specific. The difficulty is high because the motors must be wired carefully, the PID parameters need adjustment for your exact motor weight and battery, and the initial calibration requires trial and multiple test runs. If a motor spins the wrong direction or the IMU orientation is backwards, the cube will thrash instead of balance — you will spend time debugging. The payoff is a project that genuinely looks like it defies physics and teaches real control theory. Most likely to go wrong: incorrect motor direction or loose wiring causing intermittent IMU readings during the violent flip maneuver.

NOT IN THE REPO

  • STL files for the cube shell and motor mounts are present.
  • Full Arduino firmware is included with PID tuning parameters.
  • Bill of materials lists three brushless motors, ESCs, IMU, ESP32, and battery.
  • Assembly instructions are present but assume comfort with motor wiring and calibration.
  • No PCB — everything wires point-to-point inside a small enclosure.
  • MIT license — commercial use is allowed.

Can I build this?

PrintCube shell, three motor mounts, base cap
Buy3× brushless outrunner motors, 3× ESCs, MPU6050 IMU, ESP32 DevKit, LiPo battery, wiring, screws
Tools3D printer, soldering iron, hex keys, motor/ESC programming tool or Arduino IDE
SkillsIntermediate electronics (motor ESC setup), basic soldering, willingness to tune PID loops by trial
Time8–12 hours: 4–5 hours print, 2–3 hours assembly and wiring, 2–4 hours calibration and PID tuning
Cost$$ — three brushless motors and ESCs dominate the bill, expect $60–$90 depending on motor choice
SafetyLiPo battery — charge in a fireproof bag, never leave unattended. Spinning motors inside — keep fingers clear during testing.

Build at your own risk. Projects involve tools, electronics and sometimes mains voltage — follow the creator’s safety notes.

A desktop 3D printer that prints in full colorPartner · Kickstarter
A desktop 3D printer that prints in full color

HeyGears G1: 10M+ colors and transparent parts in one print, plus UV printing on flat objects. Figures, parts and labels — no painting.

See how it prints

Gallery

upload://cmruss2170002ri1z79e8b4sy/upload-83d78dbd.jpg

Start here

Navigation into the creator’s own docs — we don’t rewrite the guide, we route you to the source.

  1. 1.Read the full README and watch the embedded demo GIFs to understand the balancing behavior (The GIFs show both the flip-up and corner balance in action)
  2. 2.Print the STL files — the cube shell, motor mounts, and base cap(Use 20% infill or higher for structural strength during flips)
  3. 3.Order the parts from the bill of materials — focus on the exact motor and ESC models listed (Motor weight and moment of inertia matter — substitutions will require PID retuning)
  4. 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 flips violently during startup — any loose wire will disconnect mid-flip and cause a crash.
  • 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.
  • ESC calibration: some ESCs require manual throttle range calibration before they respond correctly to the PWM signal from the ESP32.

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?

Typically 15–20 minutes depending on battery capacity and how much correction the motors are doing.

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?

The cube will immediately fall — it needs all three reaction wheels to generate torque in every direction.

Can it balance on surfaces other than a hard floor?

It needs a rigid corner point — carpet or soft surfaces will absorb the corrective torque and make balancing impossible.

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 a single corner — the same principle that orients satellites in space. Would you tune the PID by trial, or would you model it first?

CompareeTEAM1mo agoedited

Practical notes from our verification: the repository includes working Arduino firmware with PID parameters already tuned for the listed motors, and the STL files are print-ready. The single biggest variable is motor choice — the default parameters assume specific brushless outrunners, and any substitution (different weight, different KV rating) will require re-tuning the PID gains by test runs. The assembly instructions assume you are comfortable wiring ESCs and interpreting IMU axis orientations. There is no PCB — everything is point-to-point inside the cube, so plan your wire routing before final assembly or you will be disassembling it.

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.

GitHub

Star the project on GitHub

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.