Getting Velocity from Through Bore Encoder

I’m attempting to use this video to get us a good auto, but we are using Talon 500’s with a gear box, so in an attempt to accurately read rpm data, we decided to use through bore encoders. The problem is that I’m not able to find a way to get velocity or rpms. I looked at another thread that mentioned using the DutyCycleEncoder library, but that doesn’t seem to return live rpm data at first glance. Does anyone know a way to get velocity data from a through bore encoder?

It is not possible to grab rpm data via the absolute encoder signal.

You can use any of the quadrature signals along with the Counter class to get velocity that way, and then use the absolute signal for positioning. But the absolute signal can not give a velocity readout by itself.

I do love the Through Bore Encoders, we used a bunch of them. But why not just use the Talon FX’s encoder and factor in the gearbox to calculate RPM? The Talon FX reads 2048 edges per motor revolution, just factor in your gear ratio.

1 Like

We created our own class to get the velocity from Duty Cycle Encoders. Here it is:

This class uses some other classes that we found in the Cheesy Poof’s code. The classes you’ll need are all in this folder:

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