Does Balancing Robot PID values become obsolete as motor battery diminishes?

Hi All,

I'm wiring up yet another attempt at a balancing robot (smoked a motor driver IC last time) and I just thought of something.

If I connect the motor driver to a 12V battery, then tweak my PID parameters, everything is going to go smoothly at first.  But then when the 12V battery diminishes, to say 9V, the motors will be a bit less responsive, and then I'd have to go ahead and tweak the PID parameters again.

Of course I wouldn't go ahead and keep tweaking the PID for every millivolt drop, lol!  But would the best course of action be to put the 12V battery into a voltage regulator to lower the output voltage to 9V.  That way the motor will get a steady voltage for a longer period of time before acting up once the motor voltage gets too low.

Is this the best way to solve this issue? Or perhaps is this not an issue at all, and PID parameters at 12V will suit the motors even as the motor voltage drops?  Any insights would be appreciated.  Thanks once again for helping me out LMR community!

just over a year ago i was cutting foamboard to make the body of a first (failed) balancing robot.  Since then, with the help of LMR, Im now on my 4th balancing robot, i keep improving the design with each iteration.  This one will finally balance without smoking!

 

I’m not sure, but I think
I’m not sure, but I think that the PID values should work OK for the battery during the discharge cycle. Though be sure not to over-discharge it or you’ll damage the battery.

My reasoning is that I’ve seen balancing robots move at various speeds. Changing the speed is done by changing the PWM, which is effectively giving a new voltage to the motor. And I haven’t heard of modifying the PID values once they are set.

This is just a proof by observation. I don’t have anything mathematical behind it.

Good luck with the bot!

If your battery is going to
If your battery is going to have large voltage differences, go ahead and use a switching voltage regulator.

thanks very much

for the information!  I’ll be sure to not over discharge the battery, and i’ll go ahead and use the buck module.  I think yes, the motor will be seeing large voltage differences from the battery.

If you use a buck module, it
If you use a buck module, it will regulate the voltage to a (more or less) constant value. So the motors will actually see constant voltage.