Summary

  • A self-balancing robot is a great way for people to learn about control systems, sensor fusion, and embedded programming, as it involves a challenging dance with the laws of physics.
  • This particular build by mircemk uses an MPU6050 accelerometer/gyroscope combo to establish the required levels of tilt and movement.
  • An Arduino Uno then runs this data through a PID loop before commanding an L298N motor driver to adjust the speed and direction of two DC motors.
  • The power for this robot comes from two Li-ion batteries, which is enough to keep it upright.
  • The real magic, however, comes with tuning the PID (proportional-integral-derivative) control, with inappropriate settings leading to a robot that wobbles like a confused penguin, or worse, falls flat on its face.
  • A good tip is to start with only the proportional gain, then slowly add the derivative and integral gains until it stabilises, and remember to calibrate the MPU6050, as each sensor has unique offsets.

By Heidi Ulrich

Original Article