This is my second year in FRC, and in this season we used sparks only for the robot, and my question is if talon Srx’s are able to know how much distance it does? For example if i will be able to know how much height the elevator is…
The motor controller itself cant unless you add a sensor. We used a VersaPlanetary gearbox this year with an integrated encoder. The encoder plugged directly into the SRX and that was able to tell us positions.
Is it good idea to put a ultrasonic range finder under the elevator to tell the distance?
Probably use an encoder. An ultrasonic or any other rangefinder could be fooled by parts, pieces, noise, and could easily be fooled.
That is one way to identify range, but likely will end up with a fair bit of headache for you as you attempt to identify the correct ultasonic sensor to use and ensure that there’s nothing that can provide false readings in its Field of View at any height of the elevator. A more common solution may be a potentiometer, encoder, or string potentiometer. Limit switches at the ends of range of motion (or other notable heights) may also play a role in your control scheme.
Which encoder do u recommend to purchase?
You very much want to use an encoder. It’s true that Talon SRXs are very good at taking in info from the right sensors directly, which makes programming any motion much easier, but you still need the sensor. We had a Talon SRX running the motor for our elevator this year, with a CTRE magnetic encoder plugged directly into the Talon. These encoders are made for this and integrate with the Talon flawlessly. The encoder itself was positioned at the end of the drive shaft for the elevator. That allowed our programmers to get absolute values for the various elevator positions and program a series of buttons on our button box controller to automatically run the motor to produce the required number of shaft rotations to get the elevator to the desired positions. It worked flawlessly and was very easy to program (in Java, at least.)
Do i need to buy something else to run the sensor, like cables or mounting stuff?
There is a specific ribbon cable that you can get from Andymark that will link the Talon to the encoder. The only drawback is that the longest one I know of is 6", so you need the Talon to be near where the encoder mounts. By the way, here’s a link to the CTRE magnetic encoder.
You can buy couplers for the cables, or you can buy the parts and and bulk ribbon cable and make custom lengths.
There are quite a few that are popular.
AMT102Vs are very popular: https://chadk.co/ga3s
The mag encoder is another popular option. RS775 encoder comes with the KOP
Versaplanetary encoder is popular and plugs right in to the talon with a data cable.
US digital and grayhill encoders are popular on the drivetrain
We used 2 775s powered by Talon SRXs using a AMT102v encoder. Worked without issue the whole year. One talon had the encoder and the second followed
I would also recommend mounting a limit switch at the bottom of the elevator that resets the encoder value to 0 every time the elevator hits bottom. This way, if the count gets slightly off on the encoder, it won’t try to overrun the motors and ultimately breaking either the elevator or burning up the motors.