Self Balancing Robot with Yellow Motors on Smooth Surface

Demo and explanation of how to get a yellow motor Self Balancing Robot with no encoders to balance on a smooth surface. Mostly my research and experiences of finding that good balance is achieved with a correct timing loop and P and I terms of the PID controller.

I built this robot 6 years ago and it balanced then on a smooth surface but later could not replicate it - now I know why and how. It is all about timing, frequency - Tesla was right.


This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/self-balancing-robot-with-yellow-motors-on-smooth-surface
1 Like

Interesting topic. Will you be developing this further or this is just one time test?

Hi. Thanks. I will just be adding the RoboRemo Bluetooth app controls for directional control. But nothing further on the massive increase of the Integral term for the PID controller as the linked research paper covers it in great depth and far beyond my capabilities to really understand it.
As far as the timing loop, I would proably have to use better plotting techniques than the simple RoboRemo plotting to see any correlation between the PID settings, robot angle sensor readings and motorPower plots. That is way beyong my skill level and having no math skills either would probably be an exercise in futility.
I hope someone takes it up as I have seen a lot of research papers on SBRs but not much about timing.

1 Like

Thank you for clarification.

Something else I noticed while playing with tuning the PID parameters, another parameter that is never talked about is what loop time to use. For instance my robot will balance at a variety of loop speeds from 3ms up to 20ms but each have their own peculiarities and affect the robots ability to balance in different ways. With 3 to 5 ms timings, greater P term is required to balance and the faster the robot reacts but it seems the robot wants to drift off more. With timings up to 15ms, it is easier to balance the robot and lower P term is required but when moving forward or backward, it wants to oscilate more. Need to do more research on this when I get the directionality of the robot working.

1 Like

While playing around with the battery locations on the robot I found that moving both batteries to the top did help in robot stability when I am using the forward and backward controls but led to more drifting when it was trying to stand still. Moving one of the batteries to the bottom allowed the robot to stand still better but led to greater instabilities when moving forward and backward; it was more difficult to control.

1 Like