I’ve been doing some PID tuning on conestoga this week. The only thing I can say is start with P at a low value. My wheel encoders give me both a count (90 pulses per wheel revolution which is about a yard) and a velocity (between 0 and 1000 for the speeds conestoga runs at). I have hard coded conestoga’s speed limit to a velocity of about 500 which is a little over 2 mph. Right now I have P at .03, I at .02 and D at 0 with the sabertooth drive “ramping” in the intermediate range (if you were crazy enough to go from full forward to full reverse the sabertooth would do it in about .6 seconds with my ramp setting). Acceleration is reasonably fast to the set speed and when it gets there it does not “hunt”. If P seems low remember that the output of the PID must match the units that the sabertooth uses which are 0 – 127 (I have hard coded a limit of 60 for both forward and reverse). I expect to be tweaking PID settings quite a bit from here on out as I have 4 PID routines which have to interact: right wheel, left wheel, navigation heading and cone tracker.
I mentioned starting PID tuning with P low (which I didn’t do). The first test run spun the wheels up fast (on the test stand, it wasn’t going anywhere), so fast in fact that a weakness in drive gearing showed up. The pinion on one of the motors was not meshing with the gear it was driving correctly (either the motor mount was loose or the gear was sitting too high off the driven gear). I ended up pulling the wheel and gear, adjusting the motor mount and tightening it down (I actually ended up drilling and tapping the motor mount for a larger bolt. I will probably do the same thing on the other wheel when I have a chance).