Demo
I hold it on its corner until it catches, then let go, and it stays up by itself while the wheel on its back spins back and forth. At the end I stop the motor and it tips over.
How it works
The CoreS3 stands on one of its corners, so it can only fall to the left or to the right. The Roller485 on its back is a small motor whose outside spins, and spinning it up one way pushes the CoreS3 the other way, so whenever it starts to tip, it spins the wheel just enough to push itself back up.
It checks which way it is leaning hundreds of times a second with its built-in motion sensor, and its screen shows whether it is balancing, how far it is leaning and how much battery is left.
Tuning it
The USB cable was stiff enough to hold it up by itself, so I tuned it without one. The CoreS3 serves a web page over Wi-Fi with live graphs of how it leans and how fast the wheel spins, and sliders that change how hard it reacts while it is balancing.

Getting it to stand
At first it only slowed its fall, and three problems were in the way:
- Its motion sensor thought it was turning while it stood still, so it misjudged which way was up.
- The part meant to keep the wheel slow was pushing the wrong way, so the wheel reached its top speed within a second and had nothing left to catch with.
- The USB cable had been propping it up, so it leaned to one side as soon as I unplugged it.
Once those were fixed, it balanced for almost six minutes on battery alone.
Hardware
- M5Stack CoreS3Senses the tilt, drives the motor and shows the state on its screen.
- Unit Roller485The motor on its back, whose spinning outside is the wheel.
- Battery baseA small battery underneath that powers both.
It can only catch small pushes, because on the CoreS3’s 5 V the wheel can’t spin fast enough for bigger ones. A heavier wheel or a higher voltage would help, but I wanted it to run from the one small battery.




