In the next few days I expect our team to diving into making our ball shooter more consistent. One thing a team member mentioned today was using a encoder to dial in a consistent shooter rate.
We have a Rev hex shaft encoder at our disposal. The team’s initial thought was to use that in conjunction with some PID code we had to regulate RPMs. A great idea!
But before we dive into implementing another software side PID, I wanted to check with the community to see if there’s anyway for us to use that encoder in conjunction with a Talon SRX and utilize the native Talon controls to regulate RPMs.
I see lots of options to pair the speed controller with either an encoder connected directly to the Talon OR via a CAN enabled device. For example see this post. Unfortunately it looks like the Rev encoder is neither of those.
Right now I’m leaning towards “can’t be done”. I guess this makes sense considering you’d want the Talon communicating directly with the feedback device vs relying on the rio to supply the information back to the Talon. But before we dive into more PID code I wanted to ensure I wasn’t missing something obvious.
You absolutely can use the Rev Through bore encoder. All you need to do is cut the included 4 wire jst cable, and solder it to one of these and connect an SRX data cable between the breakout board and the SRX. This is how I have been getting our shooter at a consistent velocity.
Very cool. My question was more if this could be achieved with software alone. That’s where I was a bit more pessimistic.
If we did go with a breakout board I think we’d go with one from Swyft since we also use their board for our pneumatic control module.
I see theirs uses a 5 pin connector with the extra being “IDX (Optional)”. Does anyone know if that’s the same as “Enc I” coming from the encoder?
The I pin is the same as IDX. Both mean “index” and pulse once every rotation. From a software prespective, implementing it is very doable as all you would need to change from any CTRE encoder implementation would be the encoder resolution.
I did this tonight with the 6-wire cable. Soldered 5V (Red), A(Blue), B(Yellow), GND(Black) to the SRX adapter. Hooked it up and confirmed it was working well through Phoenix tuner.
I am using it to help our winch position.
For our launcher, we have a Talon Tach. It is positioned by the pitching wheel and picking up a strip of white gaffers taper on the wheel.
Feedback is definitely helpful. First, adding PID control to the shooting wheel reduced the recovery time between shots from around 0.8 seconds to less than 0.2 seconds. Second, this lets us slow the shot down if we want. A softer shot is often less likely to bounce out.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.