top of page

Carl Bot

In this project, I developed a balancing robot that relies on a Teensy microcontroller for real-time computations. The robot uses an MPU6050 sensor to gather gyroscopic and accelerometer data, providing crucial information about the robot's orientation. This data is processed by a Kalman filter to reduce noise and ensure accurate measurements of angular velocity and tilt angle. To maintain balance, the system employs two NEMA 17 stepper motors controlled by DRV8825 stepper drivers. These motors adjust the robot's position dynamically based on a PID (Proportional-Integral-Derivative) control loop. The PID controller continuously calculates the error between the robot’s current angle and its desired upright position, adjusting motor power to bring the robot back to balance. The integration of the Kalman filter for sensor data fusion and the PID control loop for balance makes the robot capable of self-correcting and staying upright, even when subjected to disturbances.

0_6qwQPLegKNIOW_Et.png

PID Control Loop

1_SqxbTMej6796NZrdds2Q6Q.png

Control System 

comp_filter.jpg

Complimentary Filter

bottom of page