Self Balancing Bot Andrey Sysoev
Zur Navigation springen
Zur Suche springen
Self Balancing Bot – Internship Project (Andrey Sysoev)
| Author: | Andrey Sysoev |
| Subject: | Intership |
| Date: | From 13.10.2025 to 01.02.2026 |
| Module: | Internship/Exchange Semester, ELE-B-2-5.01 |
| Working Hours: | 39,83 h/w, Anwesenheitspflicht im Labor |
| Supervisor: | Prof. Dr.-Ing. Schneider |
| Co-worker: | Marc Ebmeyer |
Introduction
This project focuses on developing a self-balancing two-wheeled robot using an Arduino platform. The goal is to design, assemble, and program a prototype that uses sensors: GY-85 (gyroscope and accelerometer) and UltraSonic to detect the tilt angle and maintain balance using a PID control algorithm.
Components Used
- Arduino Uno R3
- SparkFun Ardumoto Shield (L298P motor driver)
- GY-85 (Accelerometer + Gyroscope module)
- DC motors (6V, 200 RPM,110mA-240mA)
- 9V / 2A Power Supply
- Optional: Ultrasonic distance sensor (HC-SR04)
- Li-ion battery with BMS for mobile use
System Overview
The robot uses a GY-85 sensor to measure angular position and speed. These signals are processed with a complementary filter to obtain a stable pitch angle. The control algorithm (PID) adjusts the motor speed and direction to keep the robot balanced.
Creating a Prototype
Sensor Calibration
- Calibrated the gyroscope offsets (gx_offset, gy_offset, gz_offset).
- Implemented a complementary filter for sensor fusion:
`pitch_filtered = α * (pitch_gyro) + (1 - α) * (pitch_acc)`
- Verified stability and accuracy of the measured tilt angles.
Motor Driver Testing
- Tested the SparkFun Ardumoto Shield with both motors.
- Verified correct motor direction (FORWARD / REVERSE) using PWM control.
- Used test sketch to confirm each motor responds independently.
- Adjusted pin configuration (DIRA/DIRB and PWMA/PWMB).
PID Control Implementation
- Implemented PID control algorithm:
`u(t) = Kp * e(t) + Ki * ∫e(t)dt + Kd * de(t)/dt`
- Initial gains: `Kp = 20.0`, `Ki = 0.5`, `Kd = 1.2`
- Verified correct output sign and tested response to tilt.
- Currently tuning PID parameters for stable balancing.
Next Steps
- Finalize PID tuning for stable balance.
- Integrate both motors and verify synchronization.
- Design 3D-printed chassis for mechanical stability.
- Add ultrasonic sensor for obstacle detection.
- Document test results and simulation data.