|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Optical sensor for use with retroflective tape
Quote:
Get out one of those photoswitch sensors (Unfortunately they're out of FIRST Choice) and attach it about a centimeter away from your rotating object. Attach a piece of retroreflective tape to the rotating object and adjust the photoswitch so that it only triggers when the wheel passes. After this its just programming. I believe we used the hardware counters (I cant remember exactly what its called) available on the CRIO to count the super fast pulses the sensor gives at those speeds. Our readings were just as accurate as any of those handheld tachometers you can buy. |
|
#2
|
|||||
|
|||||
|
Re: Optical sensor for use with retroflective tape
We used a Banner red-light or IR light adjustable object sensor and an aluminum wheel with black gaffer's tape lines. It worked really well. We had one of each sensor, so the practice bot got one and the comp bot got the other. We had a 4-line disc with very uneven dark/light spacing and not terribly accurate angular spacing, but if we setup the counter to average 12 samples then any phase error between the lines would cancel out and we got a really nice clean signal.
We were running our wheel up to 2800rpm last year. If we were dropping pulses, we could have made a half black half aluminum disc and still had plenty of resolution due to the extremely high speed. For cheaper sequencing object detection, we found some really nice, light sensors made by Sick that could detect balls easily. They look kinda like the Banner ones but they're not adjustable and have a clear housing. We weighed them at 28g including cable (1m or so) and plastic locking nut. By comparison, the 2011 KOP and FIRST Choice ones weighted around 1/3rd lb EACH including cable. I don't think we found a speed spec for the SICK sensor, but it was perfect for detecting balls. |
|
#3
|
||||
|
||||
|
Re: Optical sensor for use with retroflective tape
Quote:
Last edited by Ether : 23-01-2013 at 11:07. |
|
#4
|
||||
|
||||
|
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. |
|
#5
|
|||
|
|||
|
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.
|
|
#6
|
||||
|
||||
|
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 |
|
|