Log in

View Full Version : Getting value from Potentiometer on SRX Talon


Fred326
13-03-2015, 15:39
Hi,
We're using a command based robot written in Java and trying to use a 10 turn precision potentiometer (am-2619) hooked into an SRX Talon for our lift system but we cannot figure out how to get the value of its rotation back from the Talon.

ozrien
13-03-2015, 23:16
talon srx software reference manual
http://www.crosstheroadelectronics.com/control_system.html

Fred326
14-03-2015, 15:22
We've tried using AnalogInPosition, getPosition, and AnalogInVelocity and the only one we get changes from is AnalogInVelocity.

Ether
14-03-2015, 16:17
We've tried using AnalogInPosition, getPosition, and AnalogInVelocity and the only one we get changes from is AnalogInVelocity.

Post a (focused) picture showing the connections at both the Talon end and the MA3 end.

FrankJ
14-03-2015, 22:35
Go the talon page on web dashboard and make sure the input is reading correctly. Hardware wise it is easy to exchange the wiper with one of the ends of the pot. Makes for funky readings that sort of work

Fred326
15-03-2015, 19:32
I won't be able to get any pictures till Monday but thank you for your help so far.

Fred326
17-03-2015, 09:15
Here's the pictures. I wasn't sure what the MA3 was so I just took a picture of all the connections I could.
https://i.imgur.com/OZ8nWia.png
https://i.imgur.com/ifabFw7.png
https://i.imgur.com/eYKJTHH.png

ozrien
17-03-2015, 16:04
So what value did you get from getAnalogInPosition().

If it's near 0, then the analog input pin is being pulled to ground externally.
If it's near 1023, it's being pulled to positive voltage (greater then 5V at the analogbreakout input, or greater than 3.3V at the Talon input).
If it's near 100 then it's floating (not connected to anything).

Also it might just be easier to grab the self-test results in the web-based config (section 2.4). That will rule out bad code.

Use a DC meter to confirm you are getting 0 - 5V swing on the analog input pad on the breakout. Your MA3 might not be getting power. Rotate the mechanism slowly while monitoring the voltage of the analog signal.

Fred326
17-03-2015, 23:22
So what value did you get from getAnalogInPosition().

If it's near 0, then the analog input pin is being pulled to ground externally.
If it's near 1023, it's being pulled to positive voltage (greater then 5V at the analogbreakout input, or greater than 3.3V at the Talon input).
If it's near 100 then it's floating (not connected to anything).

Also it might just be easier to grab the self-test results in the web-based config (section 2.4). That will rule out bad code.

Use a DC meter to confirm you are getting 0 - 5V swing on the analog input pad on the breakout. Your MA3 might not be getting power. Rotate the mechanism slowly while monitoring the voltage of the analog signal.

It was 102 so I'll talk to electrical about it tomorrow. Thank you for your help.

ozrien
17-03-2015, 23:37
Yep sounds like it's floating (section 16.21 in Talon SRX Software reference manual).