Log in

View Full Version : Estimated Drive Time in Dashboard


jojoguy10
12-08-2015, 18:29
Hey CD,

Ha anyone ever tried putting an "Estimated Drive Time" in the dashboard? I think it would be cool to use at competitions to know how long the battery *should* last.

Joe Kelly

TheHolyHades1
13-08-2015, 10:13
I'm not sure the calculation would be a simple one, or even possible beyond very rough guesses. The problem is that depending on the way the match is played, your current draw can vary significantly, thus affecting battery life.

For example, I inadvertently left a robot idling overnight and it was still on, but the battery was down to about 6V. This was almost a 10 hour period. I would hazard a guess and say that the immediate battery voltage reading is "good enough."

jojoguy10
13-08-2015, 19:47
Thanks for your reply!

I didn't expect it to be easy :-)

I'm hoping to maybe use this on Summer robots when we don't really have a "replace per match" basis.

Just an idea.

thatprogrammer
13-08-2015, 21:24
You could set a time that only runs when the joystick to move the robot is moved beyond a certain point (0.1?), and when buttons for mechanisms are held. If your mechanisms are somewhat autonomous, you could set the timer to count when the motor controllers for these objects are set to .1 or higher.
Note: You can count the amount of times a piston is used and use a seperate timer for when the compressor runs.

timytamy
13-08-2015, 21:59
I've been very interested in using the current monitoring capabilities of the PDP, combined with the voltage readings and some sort of model of a SLA battery to achieve something along those lines.

There are all sorts of non-linear properties to batteries, not to mention each battery will be different, but I think it could be interesting to see how close one could get to an accurate prediciction given just the KoP electronics.

TheHolyHades1
14-08-2015, 19:56
I've been very interested in using the current monitoring capabilities of the PDP, combined with the voltage readings and some sort of model of a SLA battery to achieve something along those lines.

There are all sorts of non-linear properties to batteries, not to mention each battery will be different, but I think it could be interesting to see how close one could get to an accurate prediciction given just the KoP electronics.

You might be able to simplify everything and just assume that batteries plugged in when the robot is turned on are at full charge, and then just use the current monitoring to figure out remaining charge, and apply some sort of derivative to extrapolate the remaining drive time. That might work well enough for a first guess, at least?

BenGuy
15-08-2015, 10:01
I'm not sure the calculation would be a simple one, or even possible beyond very rough guesses. The problem is that depending on the way the match is played, your current draw can vary significantly, thus affecting battery life.

For example, I inadvertently left a robot idling overnight and it was still on, but the battery was down to about 6V. This was almost a 10 hour period. I would hazard a guess and say that the immediate battery voltage reading is "good enough."

Like a car guesses how many miles until empty, that value could be dependent on the current rate of discharge that is constantly re-averaging itself as it continuously takes in more data, then the average and all data is wiped clean when robot is restarted - Just like a car. :cool:

jojoguy10
15-08-2015, 10:52
Great ideas! I'll have to look into them for this upcoming season!

Thanks!

P.S. I wonder if it's possible to check the current with the old cRIO system. I knw you can through the CAN network on the Jaguars. Is there a good way to basically add all of the current and use that as "total" amperage?

TheHolyHades1
15-08-2015, 13:51
Like a car guesses how many miles until empty, that value could be dependent on the current rate of discharge that is constantly re-averaging itself as it continuously takes in more data, then the average and all data is wiped clean when robot is restarted - Just like a car. :cool:

Well, I suggested using a full charge because apparently there's non-linearity associated with the battery voltage (unlike gasoline, I'm assuming). That said, as suggested above, a simple model of an SLA battery might do the trick.

TheHolyHades1
15-08-2015, 13:53
Great ideas! I'll have to look into them for this upcoming season!

Thanks!

P.S. I wonder if it's possible to check the current with the old cRIO system. I knw you can through the CAN network on the Jaguars. Is there a good way to basically add all of the current and use that as "total" amperage?

You can also get the current running through each individual TalonSRX via CAN. I think the new PDB also communicates the current back through CAN, so it might be possible to just use the new PDB along with the old cRIO and get all of the current monitoring through CAN, either via the motor controller or the PDB itself?