# ๐ค Self-Balancing Vertical Robot
[](https://github.com/BeratTezer/self-balancing-vertical-robot/actions)
[](LICENSE)
[](CITATION.cff)
[](https://github.com/BeratTezer/self-balancing-vertical-robot)
The **Self-Balancing Vertical Robot** is a modular research platform featuring a 3D-printed chassis, low-cost electronic components, and open-source software, designed for both **academic research** and **industrial prototyping**.
---
## ๐ Table of Contents
- [โจ Features](#-features)
- [โ๏ธ Hardware (BOM)](#๏ธ-hardware-bom)
- [๐จ๏ธ 3D Printing](#๏ธ-3d-printing)
- [๐ป Software](#-software)
- [๐ง Algorithms](#-algorithms)
- [๐งช Tests & Results](#-tests--results)
- [๐บ Roadmap](#-roadmap)
- [๐ค Contribution & License](#-contribution--license)
- [๐ Citation](#-citation)
---
## โจ Features
- โก Arduino UNO-based control system
- ๐ฅ IMU-based motion sensing and orientation estimation
- ๐ Modular chassis powered by a 2S Li-ion battery pack
- ๐จ๏ธ Fully customizable using 3D-printed components
---
## โ๏ธ Hardware (BOM)
| Component | Qty | Description | Link |
| ------------ | --- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Arduino UNO | 1 | Main controller | [Datasheet](https://docs.arduino.cc/resources/datasheets/A000066-datasheet.pdf) |
| Hobby Motor | 2 | Actuator | [Example Sale Link](https://www.botnroll.com/en/dc-motor/2975-hobby-gearmotor-200rpm-65mm-wheel.html) |
| Motor Wheel | 2 | Wheels | [Example Sale Link](https://www.botnroll.com/en/dc-motor/2975-hobby-gearmotor-200rpm-65mm-wheel.html) |
| MPU6050 | 1 | IMU sensor | [Pinout](https://components101.com/sensors/mpu6050-module) |
| L298N | 1 | Motor driver | [Datasheet](https://www.handsontec.com/dataspecs/L298N%20Motor%20Driver.pdf) |
| 18650 Li-ion | 2 | Power supply | [Datasheet](https://www.mouser.com/datasheet/2/855/ASR00050_18650_2500mAh-3078640.pdf?srsltid=AfmBOoqWewHHNYpYeiml4Sg5m18XAfgiU2DQwppWHurnN8My09zVFvFn) |
| Chassi | 1 | Robot Body | [STL File](hardware/3d-model/robot_chassi.md) & [Link](https://makerworld.com/en/models/1538080-balancing-robot-chassi#profileId-1613796) |
For the extended Bill of Materials, see: [`hardware/bom.md`](hardware/bom.md)
---
## ๐จ๏ธ 3D Printing
- STL/STEP files: [`hardware/3d-models/`](hardware/3d-models/)
- Recommended printing settings:
- Layer height: **0.2 mm**
- Infill: **20โ40%**
- Material: **PLA**
---
## ๐ป Software
๐ Project structure:
```
software/
โโโ main.ino # System initialization, setup(), loop(), main control loop (1 kHz)
```
---
### ๐ Quick Start
**Arduino IDE:**
1. Install Arduino Uno board definition.
2. Open `src/main.cpp`.
3. Install libraries: `Wire`, `MPU6050`.
4. Upload to board.
---
## ๐ง Algorithms
- **PID Control** โ Used for balancing, includes proportional, integral, and derivative terms with gyro-based derivative filtering.
- **Complementary Filter** โ Combines accelerometer and gyroscope data for stable tilt estimation.
- **Slew Limiter** โ Prevents sudden jumps in motor commands by limiting step changes.
- **Safety Cut-off** โ Motors stop if tilt exceeds `ยฑ60ยฐ` (SAFE_TILT).
---
## ๐งช Tests & Results
- โก **Maximum speed**: ~1.2 m/s
- ๐ **Battery life**: ~40 minutes continuous use
- ๐ฏ **PID tilt error**: ยฑ2ยฐ
- ๐ ๏ธ Includes built-in **motor self-test** and **IMU calibration** routines (run on startup).
---
## ๐บ Roadmap
(maybe)
- [ ] Implementing path finding algorithm
- [ ] ROS2 entegration
---
## ๐ค Contribution & License
Contributions are warmly welcomed. Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines.
This project is released under the **MIT License**.
---
## ๐ Citation
If you use this project in your work, please cite it according to the **CITATION.cff** file.
---