Dynamically Limit Voltage Through Software on Spark/TalonSRX

I’ve heard about people limiting voltage to say 6 volts or so but I thought that was pointless until I realized that you can stall a 775 pro without smoking it at 6 volts. Is it actually possible to do this and if there is, where is the documentation?

Just run it at 50% of percent output maximum instead of 100% max. The Talon SRX can also do this via the Voltage control mode.

You do realize that limiting the motor voltage to 6 volts cuts the max speed in half, cuts the max torque in half, and reduces the max power by a factor of 4, yes?

Assuming that you’re using some gamepad axis to control it, you can just limit the max value that you pass along to your motor controller.
Here’s the pseudo code:
gpInput = gamepad.getRawAxis(1)
if gpInput > . 5 then gpInput = .5
if gpInput < -.5 then gpinput = -.5

Or you could just divide your gamepad input by 2 if you want a more linear response.

As Ether noted, voltage limiting is not the best option - limiting the amount of current is the way to go, though there are questions about the efficacy of SRX current limiting. We burned up a CIM last month by stalling it at 10% for a long time (through a couple of battery changes in a parade). At 10% duty cycle, a stalled CIM still draws over 30A and gets pretty hot dissipating that power. The current/power numbers are similar for a 775 pro - though it will heat up faster when stalled because it has less thermal capacity.

Voltage limiting is more effective at clobbering your performance than saving your motors.