Hi folks, I've made a 2 wheeled balancing bot with a ps2 controller for steering and am looking to go a bit further. It balances fine but I'd like to look into having it self calibrate and balance on slopes and am looking for some advice on that.
My angle detection is working pretty well and I'm using pid control based on the angle to control the motors.
On this arduino forum post - http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1284738418/210#223
a poster asks:
(1) in the setup, with the function calibrateSensors(); you have to put the robot (each time you switch it on) exactly in the static equilibrium position in order to evaluate zero values.
is this a little bit boring and could produce errors (if it is not perfectly perpendicular)?
If during the calibrateSensors() i'll give a tilt, the Robot will work to keep the tilt!
To which someone replies:
If you tilt the bot forward before calibrateSensors(), it will move forward and find a vertical equilibrium
This will happen only with encoder(s) implementation, look here
I've looked at the wheel encoder implementation mentioned, all it does is add P and D terms for the wheels based on position and velocity respectively. I can't understand how that would help find the point of equilibrium as the set point is never adjusted, could anyone explain? I can only see that this would encourage the robot back to it's starting position but surely it will still work to keep the set point at the non equilibrium position it started in which would immediately force it to move again to stay upright?
The other question I have is on the theory of getting the bot to balance on a slope, which I guess is in the same area, anyone have any tips?