Something other than PID

We use a shooter that is different than most of the robot out there. We call it a fling-a-pult. It is extremely accurate but looses force as battery voltage is reduced causing us to be short sometimes.

Unlike the standard wheeled shooters our two fisher price motors only run for a fraction of a second so PID really doesn’t work. What we need is a good way to simply adjust the voltage applied to the shooter motors in accordance with the reduction in battery voltage.

We are using java, any good ideas.

Run a few batteries down to varying levels of charge.
Find the right speed control value that will do the trick for that voltage and interpolate in between.

GetBatteryVoltage() lives in the DriverStation class.

Your battery voltage reading is available in software, and can be used to inversely adjust the power to your shooter. See this post: http://www.chiefdelphi.com/forums/showthread.php?p=1137469#post1137469

From what it sounds, you’ll need to create a ratio of motor speed to battery voltage then apply this to what speed you really want. Obviously, the easiest way would be to add an encoder and use that to adjust motor speed but in some circumstances it is very difficult to mechanically get one on where you need it.

If you are using Jag controllers via CAN, there is a voltage command mode.

You command the desired voltage, and the Jag automatically adjusts the output PWM duty cycle to give you that desired voltage, regardless of the supply voltage. Unless, of course, the supply voltage is less than the commanded voltage.