|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
Re: Optical sensor for use with retroflective tape
Quote:
Last edited by Ether : 23-01-2013 at 11:07. |
|
#17
|
||||
|
||||
|
Re: Optical sensor for use with retroflective tape
Lightfoot26: recommendation for a part number?
|
|
#18
|
||||
|
||||
|
Re: Optical sensor for use with retroflective tape
Quote:
|
|
#19
|
||||
|
||||
|
Re: Optical sensor for use with retroflective tape
Quote:
Increasing it to 12 helps to further cancel out the jitter due to the 6.5us resolution due to the rate at which the FPGA looks for pulses. |
|
#20
|
|||
|
|||
|
Re: Optical sensor for use with retroflective tape
Can the cRio process fast enough to read something like a standard 250 count encoder at 7200 RPM? I'm just curious.
|
|
#21
|
||||
|
||||
|
Re: Optical sensor for use with retroflective tape
Quote:
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. Last edited by Ether : 29-01-2013 at 11:22. Reason: typo |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|