Skip to content

Commit 4de2c31

Browse files
authored
Project/ana maria.lupu1304 (#1013)
* Added initial documentation * Added title * Final * Final * Fixed image * New Diagram * Added schematics * Updated schematics image * Milestone 2
1 parent 7fb9152 commit 4de2c31

2 files changed

Lines changed: 136 additions & 0 deletions

File tree

30.2 KB
Loading
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Self-Balancing Cube
2+
3+
A self-balancing cube controlled by an STM32 microcontroller, using IMU feedback and internal reaction wheels to balance on an edge or corner.
4+
5+
:::info
6+
7+
**Author**: Ana-Maria-Raluca Lupu \
8+
**GitHub Project Link**: [acs-project-2026-lupuana](https://github.com/UPB-PMRust-Students/acs-project-2026-lupuana)
9+
10+
:::
11+
12+
<!-- do not delete the \ after your name -->
13+
14+
## Description
15+
16+
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.
17+
18+
## Motivation
19+
20+
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.
21+
22+
## Architecture
23+
24+
The main architecture components of the project are:
25+
26+
- **Sensing layer**
27+
Reads acceleration and angular velocity data from the IMU.
28+
29+
- **State estimation layer**
30+
Processes raw IMU data and computes the current orientation and angular motion of the cube.
31+
32+
- **Control layer**
33+
Runs the balancing algorithm and computes correction values for each axis.
34+
35+
- **Actuation layer**
36+
Sends control signals to the three reaction-wheel motors.
37+
38+
- **Communication and tuning layer**
39+
Allows calibration and parameter adjustment through a Bluetooth serial connection.
40+
41+
- **Power layer**
42+
Supplies the motors directly from the battery and powers the logic through a regulated 5V rail.
43+
44+
### Architecture Diagram
45+
46+
```mermaid
47+
flowchart LR
48+
subgraph PWR["Power Layer"]
49+
BATT["3S LiPo Battery 11.1V, 500mAh"]
50+
REG["5V Regulator"]
51+
BUZ["5V Buzzer"]
52+
end
53+
54+
subgraph SENS["Sensing Layer"]
55+
IMU["MPU6050 IMU"]
56+
end
57+
58+
subgraph PROC["Processing and Control"]
59+
STM["STM32 Microcontroller"]
60+
STATE["State Estimation"]
61+
CTRL["Control Algorithm"]
62+
CAL["Calibration and Parameter Tuning"]
63+
end
64+
65+
subgraph COMM["Communication Layer"]
66+
BT["HC-05 Bluetooth Module"]
67+
USER["User / Serial Commands"]
68+
end
69+
70+
subgraph ACT["Actuation Layer"]
71+
MOT["3x Brushless Motors / Reaction Wheels"]
72+
end
73+
74+
subgraph PHY["Physical System"]
75+
CUBE["Self-Balancing Cube"]
76+
end
77+
78+
IMU -->|Motion data| STM
79+
STM --> STATE
80+
STATE --> CTRL
81+
CTRL -->|Motor commands| MOT
82+
MOT -->|Stabilizing torque| CUBE
83+
CUBE -->|Motion/orientation changes| IMU
84+
85+
USER -->|Bluetooth commands| BT
86+
BT --> CAL
87+
CAL --> STM
88+
89+
BATT -->|11.1V| MOT
90+
BATT --> REG
91+
REG -->|5V| STM
92+
REG -->|5V| IMU
93+
REG -->|5V| BT
94+
REG -->|5V| BUZ
95+
96+
```
97+
98+
## Log
99+
100+
### Week 14 - 29 April
101+
102+
- Finalized project theme and received approval.
103+
- Researched and ordered components.
104+
105+
### Week 4 - 10 May
106+
107+
- Components arrived
108+
109+
### Week 11 - 17 May
110+
111+
- Tested components separately
112+
- Started assembling the project
113+
114+
## Hardware
115+
116+
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.
117+
118+
## Schematics
119+
120+
![Schematics](./images/schematic.webp)
121+
122+
## Bill of Materials
123+
124+
| Device | Usage | Price | Link |
125+
|---|---|---:|---|
126+
| Dupont wire kit | Prototyping and signal wiring | 24.39 RON | [AliExpress](https://www.aliexpress.com/item/4000203371860.html?spm=a2g0o.order_list.order_list_main.5.b7a61802PaQuli) |
127+
| 2x MPU6050 GY-521 | IMU sensing | 48.84 RON | [AliExpress](https://www.aliexpress.com/item/1005008796700745.html?spm=a2g0o.order_list.order_list_main.11.b7a61802PaQuli) |
128+
| 3x Nidec 24H brushless servo motors | Reaction-wheel actuation | 138.57 RON | [AliExpress](https://www.aliexpress.com/item/1005005779471604.html?spm=a2g0o.order_list.order_list_main.17.b7a61802PaQuli) |
129+
| HC-05 Bluetooth module | Wireless tuning and calibration | 24.35 RON | [AliExpress](https://www.aliexpress.com/item/32582656795.html?spm=a2g0o.order_list.order_list_main.23.b7a61802PaQuli) |
130+
| 3S LiPo 11.1V 500mAh battery | Main power source | 85.33 RON | [AliExpress](https://www.aliexpress.com/item/1005006702079264.html?spm=a2g0o.order_list.order_list_main.29.b7a61802PaQuli) |
131+
| Active 5V buzzer | Audio feedback / status signal | 15.72 RON | [AliExpress](https://www.aliexpress.com/item/1005010321957502.html?spm=a2g0o.order_list.order_list_main.35.b7a61802PaQuli) |
132+
| LM7805 5V regulator module | Logic power regulation | 16.72 RON | [AliExpress](https://www.aliexpress.com/item/1005005382976127.html?spm=a2g0o.order_list.order_list_main.41.b7a61802PaQuli) |
133+
| 3S LiPo balance charger | Battery charging | 28.24 RON | [AliExpress](https://www.aliexpress.com/item/1005007620618797.html?spm=a2g0o.order_list.order_list_main.47.b7a61802PaQuli) |
134+
| ON/OFF switch | Main power control | 21.29 RON | [AliExpress](https://www.aliexpress.com/item/1005009232308550.html?spm=a2g0o.order_list.order_list_main.53.b7a61802PaQuli) |
135+
136+
## Software

0 commit comments

Comments
 (0)