The CoreS3 tipped onto one corner with the Roller485 on its back and BALANCING on its screen
Back to projects
Internship project

Self-Balancing Core

A CoreS3 that balances on one corner by itself. The Roller485 on its back spins to push it back up whenever it starts to tip, and I tuned it from my laptop over Wi-Fi.

Built with
ESP32-S3PlatformIO

Internship project at M5Stack, December 2026. M5Stack CoreS3 and Unit Roller485.

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.

The CoreS3 balancing on one corner on my desk, its screen showing BALANCING, the tilt and the battery
Balancing on my desk

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.

More to explore

Other projects

Personal
OCR Reader with DrumNet, an OCR water meter solution

OCR Reader

A battery-powered water meter reader where a 693K-parameter DrumNet pipeline on an ESP32-S3 reads the drums and reports over LoRaWAN, built on a custom KiCad PCB inside a 3D-printed shell.

Personal
Project June rover

Project June

A 5G rover with three live camera feeds, GPS, a laser pointer and seven sensors, driven from a web console.

Internship
Pip, a cyan desk pet, on the M5Stack Tab5

Pip

A desk pet on an M5Stack Tab5 whose brain is the DeepSeek Harness on my server, so it can drive a browser, build its own apps and watch my other agents.