# Double jointed arm physics: calculated voltage way too small?

We’re planning on using an arm for our robot and we decided to try using Team 971’s feed forward code for the arm from 2013. This is the link for their python script that calculates the feed forward for the arm, but I created a shortened gist that removes the unnecessary parts of their code.

The code works so far to calculate the torque to lift the arm. The calculated torque is 2.5 Nm, which is reasonable to lift the arm. However, when it converts the torque to voltage, I get 0.064 V as the voltage applied to the arm motor, which is obviously too little.

The math they use the get the motor voltage from the torque checks out for me, but I don’t understand motor physics 100%, so can someone please check if this math is correct?

Motor 1’s gear ratio is 100 and the stall torque of our Falcon 500 motors are 4.69 Nm, so if we want to apply a torque of 2.5 Nm, the math makes gets us:

But this doesn’t make sense. 0.064 V is obviously too small and when applied to our motor it was almost nothing.

Can someone please check if this math is correct? Or am I doing something wrong? Or is there a better/simpler way to get the motor voltage required for a torque?

Is the 2.5 Nm the required torque before the reduction or after? 2.5 Nm seems like a very small amount of torque to move an arm of any meaningful size. I’m guessing you’re off by a factor of 100 and would have to apply 6.4V.

1 Like

It is before reduction. We’re getting the voltage required for a specific torque.

1 Like

If I’m understanding you correctly, you’re trying to figure out the voltage to apply to the motor to get 2.5Nm of torque at the motor’s output shaft (not the gearbox output shaft). If this is the case, you shouldn’t be factoring in the gear reduction in this calculation.

Instead, you should have

\frac{12 V}{4.69 Nm} *2.5 Nm = 6.4 V

which makes sense. 2.5 Nm is about half of the stall torque, so you should have to apply about half of the max voltage. 6.4V is about half of 12V.

EDIT:

I like using ReCalc. The value you are looking for is the Estimated kG.

1 Like

No, we are trying to calculate the voltage to get 2.5Nm of torque at the gearbox output shaft. Does that seem unreasonable?

What is your arm setup? 2.5 Nm is the equivalent of 1.84 ft-lbs or a 1.84-pound mass at the end of a one foot arm.

Each of our arm segments is 31 inches (0.7874 meters) long and weighs 0.8 lbs (0.381 kg). If we’re trying to calculate the torque to just hold the arms against gravity (which 0.064 volts doesn’t come close to doing), wouldn’t the torque to do that when both arms are straight out be around 0.7874 m * (2 * 0.381 kg) * 9.8 m/s^2 = 5.88Nm? These are all simplified torque calculations so they might not be exact, but I don’t think they’re wrong enough to account for all the discrepancy we’re seeing.

Yeah, your math checks out if the CoM is in the middle of each arm segment. If we plug those numbers into Recalc, we see that the estimated kG is 0.14V which is twice what was calculated earlier. I would try that value out and see how it works for you. See the calculation here.

Does this also works with a brushless motor with PWM controller? We’re using the Falcon 500 motor, but 971 was using a brushed DC motor not PWM. Is it possible that DC motor equations don’t work for PWM control?

If the motor voltage is 0.064 volts - as in my example - I think that the motor voltage is so small that the PWM controller simply may not output anything as it is so low.

I think the problem isn’t the math but your estimations. You’ve only included the mass of the extrusion or pipe or whatever it is you are using and ignoring anything else. Don’t you have any shafts on the arm? Chains? Bearing block? A gripper? Even the game piece is missing - if your arm is ~1.5 meters long, and you’re holding a ~650g cone at the end of it, that alone should add 1.50.65g ≈ 9 NM. If you have a 1kg gripper at the end that’s another 15Nm. Put these together with the ~6Nm you’ve calculated for the arm material and you’re already at 30Nm, and likely to be more.
In addition, unless I’m missing something, the calculation you presented is for the case of stall, or the bare minimum of voltage you need to provide for the arm not to fall under its own weight. You’ll need to provide significantly more voltage for it to move at any practical speed.

3 Likes

I’ll add a shameless plug for my calculator, which should do this calculation for you. Here’s the link to your case. You can see that the stall voltage (i.e. voltage needed to hold the arm in place) is indeed ~0.07V.

But I think @bardd is correct; your assumption of 2.5Nm seems way too low. I’m guessing you either didn’t calculate this correctly (T=\sum mgr), or you messed up the unit conversion from imperial to Nm (which you wouldn’t need to do with my calculator, it does unit conversions for you)

4 Likes

I tried applying larger torques to see if 2.5 Nm is low, but that didn’t work. I applied 5 Nm and 7 Nm and the same thing: the motor voltage output was around 0.2-0.3 Volts. But the problem isn’t simply that the arm falls down, I feel that it doesn’t apply any power on the motor. I tried turning the arm a little with the voltage applied to the motor, but I didn’t feel any resistance. It felt the same as if the motor was off. And, yes, at larger voltages, the motor did turn. So I’m now thinking that for so little volts the PWM controller doesn’t output any power on the motor.

Have you looked at the Falcon 500 deadband in the data sheet?

1 Like

Have you weighed the entire arm assembly?

1 Like

I think you’re still severely underestimating the torque you need to apply. 7 Nm is equivalent to a 2 ft long arm that weighs about 2.5 lbs. I’m guessing for this game your arm is longer and weighs more than that.

1 Like

I agree it feels like an underestimate. I just wanted to clarify your post in that for calculating torque, the distance (length) should be the distance to the center of mass of the moving assembly. To a first order, however (particularly for FRC, which often has a heavy actuator on the end of an arm), using the entire length is an easy approximation, and will add some built-in margin to the design.

To the OP: note the mass in the torque calculation needs to be the total mass of the moving assembly, including the game piece. It’s generally good to also make sure you’re on the left side of the motor power curve so that your motor has a bit more power to draw from in case of increased load due to unknowns (friction, the game piece getting caught on something, other external forces, etc).

2 Likes

I’m really confused. Is there a motor controller mode where you can control the output voltage? I thought the motor controllers (Talon, etc.) output the 12V from the input just chopped at a variable duty cycle which controlled the current or power to the motors.

found my own answer “the controller switches the full input voltage on and off very quickly, varying the amount of time it is on based on the control signal. Because of the mechanical and electrical time constants of the types of motors used in FRC this rapid switching produces an effect equivalent to that of applying a fixed lower voltage (50% switching produces the same effect as applying ~6V).”

https://wpilib.screenstepslive.com/s/3120/m/7912/l/85777-driving-motors-with-speed-controller-objects-victors-talons-and-jaguars

We figured out the issue. There were 2 main problems: one, we actually weren’t using Falcon 500s! So we were using the wrong motor constants. Also, our arm is controlled by a chain, and we didn’t account for the weight of the chain (given that the arm segment is only 0.3 kg and the chain was also 0.3 kg, this made a big difference).

Yes, both CTRE

Cross The Road Electronics
and REV motor controllers support absolute voltage output.

WPILib also has a setVoltage function for motor controllers that don’t, which uses the system voltage to calculate the necessary duty cycle output. (MotorController (WPILib API 2023.4.3))

FYI, this documentation is from the 2014 control system- it’s correct as to the method that controllers control voltage, but is out of date for many things.