Let's Make Robots! | RobotShop

Self Balancing Robot Tends to Drift Around

I recently built a self balancing robot and it balances quite well as long as the surface is a high friction surface like a carpet or bed. But put the robot on a smooth floor and it will balance momentarily then drift away. Tried lots of sollutions like cascading PID routines, increasing main loop HZ, programming fixes but nothing worked. Then found this blog: https://polyengineer.wordpress.com/2014/08/08/self-balancing-robot-pid-control/

where he suggests increasing Ki to five times Kp. Did it and it works. Probably only want to do this when Error is near 0 but it is a nice quick fix. 

My other possible fix was to make my own spongy tires. Now don't have to.