
24-01-2012, 10:01
|
 |
Mentor, LRI, MN RPC
 FRC #2177 (The Robettes)
Team Role: Mentor
|
|
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,813
|
|
|
Re: Alternate encoders?
Quote:
Originally Posted by DonRotolo
We had a similar issue in finding a decent encoder. I found and gutted an old Ball Mouse, using the optical components to sense a slotted wheel.
A ball mouse has four IR LEDs (clear case) that shine onto four Photodiodes (red case). Starting with a 7805 voltage regulator (to convert robot's 12V), I fed a pair of LEDs (wired in series) the 5V through a 100 Ohm resistor.
Each photodiode has a surface-mount 10k resistor associated with it. +5 goes to one side of the photodiode, I pick off the signal from the other side of the photodiode (which also goes to the resistor), and the other side of the resistor is ground.
The Photodiode output is fed through a 74LS14 inverting Schmitt Trigger ('cause that's what I had) but I suppose any TTL device would buffer it OK. (A Schmitt Trigger is used exactly for this kind op application, 'debouncing' any inputs)
I think the cRio can handle the data rate, if I measure the time between pulses to check speed. If not, we might use an Arduino board to handle the counting via Interrupts and also do the PID calculations, feeding only motor speed control data back to the cRio.
Testing it tomorrow.
(Are you old enough to know what a Ball Mouse is?)
|
That's interesting. I've never taken apart a ball mouse before, but now I want to. The only question is where to find one. I suppose I could go ask at the local ancient history museum...
(and yes, I'm old enough... I started programming about 18 years ago )
|