Programmatically Setting Current Limits / Managing Power on Robot

Is there a way to limit current use — or conversely reserve current — on the electrical bus? This season requires a good amount of compressor use. We have had some intermittent electrical issues and suspect that we are tapping the upper end of our electrical budget on the robot. It would be great to affirmatively, and programmatically control the current budget. Are there best practices for this? Is this a function or capability of the PDP? Are there any Java-related recommendations? Thank you!

The PDP doesn’t inherently have the ability to limit current, but you can look at bus channels for the heavy hitters, as current draw is reported across the 16 main channels. Compared to drive motors or other mechanisms, a compressor is rarely a major source of draw that would cause electrical gremlins (13 amps maximum).

If you have more advanced motor controllers (Talon SRX, Spark Max) you can limit current allowed to be output on the controller end, but otherwise you’d have to model and calculate current draw for a given motor for a given bus voltage and given motor model.

If you’re specifically concerned about compressor use, you have some ability to control it in code. Specifically, you can disable the closed-loop compressor control during certain times.

For example, in Steamworks we had a climber gearing that would get us up the rope quickly but drew a lot of current from the motor. We actually experimented with a few different gear ratios - one of them was super fast but the battery just couldn’t always handle it, especially after a match of heavy pushing and shoving. So we stepped it down a bit from there. Still, the last thing you need is the compressor kicking in while you’re trying to climb in those precious last seconds. So, our code disabled the compressor whenever the climber motor was engaged.

For this year we’re using Talon SRX’s on our lift and we’re playing with its own current limiting features, but we still haven’t dialed in the right values. We want our lift to be strong and fast, yet cut itself off if it detects that something has jammed so the motor doesn’t tear the whole lift apart.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.