I want to adjust the angle of the arm with the Talon position

I would like to adjust and maintain the arm angle at the Talon position, but what should I do?
It depends on the angle, but is it possible to use Talon’s Position?
The arm looks like this.

It has a variable resistance.
If necessary, an absolute encoder can be installed.

1 Like

I’m not sure if a Talon alone can do it, and I highly doubt it can. You could use an encoder, but a better option would be to use a servo. Servo’s can be programmed to position or angle, and can go from 0 to 180 degrees, which fits your design.

We did something similar on our arm last year using an encoder. Given the number of encoder ticks in one rotation of the motor, you can use it to estimate the angle above the horizontal, and then use PID and FF to adjust the angle.

A servo is not a better option. If you can find a legal servo (<$75) that has enough torque to lift that arm, let this thread know because I would sure be interested.

A Talon is capable of performing what you would like as long as you connect a form of sensor. Whether you use an absolute or relative encoder determines you’re zeroing procedure. (On robot code init, zero encoder? Or don’t touch it because its absolute). You can pass an arbitrary feedforward into the Talon, like a calculated offset to gravity. For arms, it’s cos(angle) * volts_to_keep_level.

Tons of teams every year have sensored mechanisms (elevators, arms, drivetrains) and use encoders. I’d say that’s your best bet.

1 Like

Why not use a motor + Talon SRX + encoder?


Is volts _ to _ keep _ level a value to keep the arm?
Because the center of gravity is shifted, the force required to maintain depends on the angle.

When multiplying by the cosine of the current (or target angle if running a motion profile) of the arm, you’re scaling volts_to_keep_level to be full when the arm is horizontal, and 0 when the arm is vertical or horizontal.

1 Like

Use an SRX Mag Encoder (and a hex bore housing if needed), preferably on the arm’s pivot, and plug it directly into the Talon. That is your best solution to get the data you need to the Talon. From there, what you’re trying to do is pretty simple.

@Teraterayuki I don’t think servo would be the way to go. They are very expensive and I don’t even think you would be able to find one with enough torque to lift the mechanism. You can accomplish this with an Encoder. Use a board on the talon or using a talon data cable direct to the encoder. I suggest the CTRE mag encoder. Mentioned by someone earlier you may need the hex adapter. With this hardware you can use motion magic to set to an angle using position closed loop control.

What’s the best way to determine this experimentally?

Also, I don’t know if people missed but the OP did indicate they have a variable resistance, I read this to mean there is a potentiometer connected to the arm. So I would suggest this be wired into the Talon SRX data port as an analog sensor input.

The OP is on a team in Japan so if he does not have the encoder, it may be difficult to get one before his competitions. If @Teraterayuki has a potentiometer (variable resistor) connected to the pivot of the arm, he should use it as @GreyingJay suggested. That is one of the common ways to control the position of an arm. Just ask here if you need help on how to make the connections.

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