# Calculating a Current Limit for a Climber Arm System

Good afternoon.

Our team uses a climber arm that has quite a bit of torque compared to what it needs to accomplish the goal of rotating the robot mass as it transitions between bars in the climber zone.

What we have found is that our arm has so much torque in fact that during some unintended operation it can permanently twist the 7075 arm hex shaft out of shape. We chose a Falcon500 motor with a reduction of 125:1 on a REV MaxPlanetary gearbox and then a 12 tooth to 60 tooth chain final reduction for this arm.

What we need to implement is a current limit profile to safely let the arm do itâ€™s job but not allow it to apply so much torque that it can destroy the arm shaft. The drivers are manually controlling the arm via a joystick to swing the robot up to the next bar so we want to reduce the chance they accidently apply to much throttle once the arm is pressed up against the bar.

What would be the smartest way to figure out/calculate a current limit to use?

1 Like

First, figure out the maximal amount of torque youâ€™ll need in ordinary operation - call this \tau_{max}. Then, calculate the current limit I_{max} as follows:

I_{max} = I_{stall} * \frac{\tau_{max}}{\tau_{stall}}

where I_{stall} is the stall current of the motor and \tau_{stall} is the stall torque of the motor (youâ€™ll have to account for gearing, ofc).

This might also be something where the variables are not worth the calculation. Exactly how efficient is your gearbox? What is the exact distance between the axis of rotation and the COG of your robot? Figuring this out may not be worth it. How about start by limiting the motor to 5 amps and see if it can still do the job? If it canâ€™t, slowly increase the limit until it can reliably complete the task. Then maybe give it a couple of extra amps beyond that just to be safe. Now see if you can twist that axle.

Also, while limiting torque via limiting current is definitely a viable solution, you might also consider other means of preventing motors from twisting the shaft. I donâ€™t know the complete mechanics of your system, but itâ€™s very easy to wire up a limit switch to a falcon motor to prevent it from breaking itself, and it doesnâ€™t even require a change in code. Also consider a position control loop using the internal encoders of the Falcon or an external potentiometer.

5 Likes

Second the answer of incremental testing. Calculation is nice, but in FRC, reality rarely matches theory, and there isnâ€™t time to do rigorous analysis. That means that you overdesign everything, and for things like setting overcurrent limits you incrementally test to hone in on the correct setpoint. This is way faster than trying to pinpoint it with analysis.

3 Likes

A naive estimate requires two known values that can be looked up online, and a single guess at the maximal loading torque under ordinary operationâ€¦

Wow, this sounds very familiarâ€¦
Thereâ€™s a lot of math you can do, but generally speaking, the best way is empirically. If the calculator is correct, you could probably limit the current to 40A and try it, if that causes a stall somewhere in the climb increase it by 5A and try again. It wonâ€™t hurt the Falcon to stall at 40-50A for a "while (at least 30s).
You could calculate everything, then find out that friction in the arm shaft or the extra torque needed to swing or half a dozen other factors meant that your limit was wrong.
Try and figure out what the weak point of your system is - sounds like itâ€™s the torque limit on the shaft, but our experience was that we kept finding more weak points (chain skip, couplers breaking, etc) and itâ€™s as much a problem of shock loading as output torque.

When doing empirical testing, keep in mind that the battery voltage changes as the match goes on. You might find that an acceptable current limit with a new battery wonâ€™t be enough power after running a hard match and having a lower voltage!

Personally, Iâ€™m a fan of current limits for some aspects of a robot, like an intake or a conveyor system. These types of systems rely on speed, where a high current condition indicates something very bad is happening. With a climber, youâ€™re focused much less on speed and much more on torque. In this situation, you might expect a high current event. There can be a fine line between â€śenough current to do whatâ€™s neededâ€ť and â€śtoo much currentâ€ť, and that line depends on the length of time youâ€™re running at that current.

When it comes to climbers, I prefer to look at the movement rather than the current. In our case, weâ€™re running our climber with Neoâ€™s, and use the built-in encoder to see if the motor is stalled. If itâ€™s stalled for too long, then the code stops it to prevent it from burning out. You can find our code here. If you struggle with finding an appropriate current limit, consider implementing a similar no-stall mode! It would help ensure the motor stops when it hits the bar, instead of over-driving and twisting the shaft.

1 Like

This is why current limits designed to limit the motorâ€™s torque should use the stator current limit and not the supply current limit. The former limits the current on the motor controllerâ€™s output, which is directly related to the motor torque. The latter is a limit on the current at the motor controllerâ€™s input, which will be dependent on the supply voltage.

From CTREâ€™s docs:

4 Likes

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