Optical sensor for use with retroflective tape

AIUI, the 250 CPR encoder has 500 edge transitions (rising+falling) per channel per rev. At 7200 RPM, that would be 7200/60*500 = 60,000 edges/sec which is acceptable because the FPGA polls each channel for edges at 153KHz.

If you do decide to use a 250 CPR encoder at 7200 RPM to measure shooter wheel speed, you don’t need both channels since you’ll always be going in the same direction.

You can use the Counter class with only one channel of the encoder.

If you use the GetPeriod() method of the Counter class, you will get up to 1400 RPM peak-to-peak jitter due to the 153KHz FPGA polling rate if you don’t use the FPGA’s built-in averaging capability.

In C++ or Java WPILib, you can make a small modification to counter.cpp (or counter.java) to tell the FPGA to return the elapsed time between the most recent N+1 rising edges (N<127), and WPILib will divide that by N, effectively averaging. If you set N to 125 for example, you’ll be averaging over half a revolution and should get a nice clean signal with jitter approx 11 RPM p-p.