Selfbalancing robot (Arduino)

In the video you can see that the robot stays at roughly the same spot on the floor and handles a lighter push without any problem. To achieve this I have two cascade PID controllers and low pass filter on both wheel speed and the robot's angle.

Source code, component list and more info

[Update 2012-07-27]

I programmed a simple moving average filter. This will remove the rapid changes and make the robot calmer and with less overshoots. It also handles pushes much better than before. Video here.

  • Actuators / output devices: geared motors
  • Control method: PID
  • CPU: arduino leonardo
  • Operating system: Arduino
  • Power source: NiMH 12V 1600mAH
  • Programming language: Arduino
  • Sensors / input devices: motor encoders, IMU sensor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/selfbalancing-robot-arduino

Good Starting-Point for Self-Balancing Robot

Nice work, Sebastian. The code is understandable and makes a good starting point for an equal self-balancing robot using an Arduino. Collected!

Thank you for bringing the built-in EEPROM back into my mind. Forgot about it… but is useful.

I also like this project of you. Keep up the good work.

And welcome to LMR.

Thank you! :slight_smile:

Thank you! :slight_smile: