Skip to main content
Version: ACS CC

Self-Balancing Cube

A self-balancing cube controlled by an STM32 microcontroller, using IMU feedback and internal reaction wheels to balance on an edge or corner.

info

Author: Ana-Maria-Raluca Lupu
GitHub Project Link: acs-project-2026-lupuana

Description

This project implements a self-balancing cube based on reaction-wheel control. The system reads motion and orientation data from an IMU sensor, estimates the cube state, and computes corrective motor commands in real time. Three internal motors spin reaction wheels to generate stabilizing torques, allowing the cube to recover balance and remain upright on an edge or corner.

Motivation

I chose this project because it combines embedded programming, control systems, electronics, mechanical design, and real-time testing in a single system. It is a good practical challenge because it requires both hardware integration and software development, especially sensor processing, feedback control, and actuator coordination on an STM32 platform.

Architecture

The main architecture components of the project are:

  • Sensing layer
    Reads acceleration and angular velocity data from the IMU.

  • State estimation layer
    Processes raw IMU data and computes the current orientation and angular motion of the cube.

  • Control layer
    Runs the balancing algorithm and computes correction values for each axis.

  • Actuation layer
    Sends control signals to the three reaction-wheel motors.

  • Communication and tuning layer
    Allows calibration and parameter adjustment through a Bluetooth serial connection.

  • Power layer
    Supplies the motors directly from the battery and powers the logic through a regulated 5V rail.

Architecture Diagram

Log

Week 14 - 29 April

  • Finalized project theme and received approval.
  • Researched and ordered components.

Week 4 - 10 May

  • Components arrived

Week 11 - 17 May

  • Tested components separately
  • Started assembling the project

Hardware

The hardware platform is built around an STM32 microcontroller, an MPU6050 IMU for motion sensing, three brushless motors with encoders for the reaction wheels, a 3S LiPo battery for power, a 5V regulator for the logic section, a Bluetooth module for tuning, and a buzzer for status feedback.

Schematics

Schematics

Bill of Materials

DeviceUsagePriceLink
Dupont wire kitPrototyping and signal wiring24.39 RONAliExpress
2x MPU6050 GY-521IMU sensing48.84 RONAliExpress
3x Nidec 24H brushless servo motorsReaction-wheel actuation138.57 RONAliExpress
HC-05 Bluetooth moduleWireless tuning and calibration24.35 RONAliExpress
3S LiPo 11.1V 500mAh batteryMain power source85.33 RONAliExpress
Active 5V buzzerAudio feedback / status signal15.72 RONAliExpress
LM7805 5V regulator moduleLogic power regulation16.72 RONAliExpress
3S LiPo balance chargerBattery charging28.24 RONAliExpress
ON/OFF switchMain power control21.29 RONAliExpress

Software