View Single Post
  #7   Spotlight this post!  
Unread 22-11-2006, 18:14
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Need help with shaft encoders

Quote:
Originally Posted by mluckham
His code is great, I was able to very easily adapt it to a different encoder - as long as they have "phases" (two signal wires outputting pulses) - one wire is connected to a Digital Input to trigger an interrupt, the other wire goes to a second DI which the software checks for a HI or LO state, thus determining direction of rotation.
We easily adapted Kevin's encoder code to work with the gear tooth sensors from last year's kit of parts. They only have a single output. All it took was removing the part of the interrupt code which checks the second phase. We replaced that check with a flag which reflects the currently commanded direction of the motors (it works okay except at very low power where the wheel might actually be forced by friction with the carpet to turn in the opposite direction than desired).

Quote:
The difficulty with encoders seems to be how to attach them to motors, shafts, whatever. And they aren't cheap. The US Digital E4 Encoder http://www.usdigital.com/products/e4/index.shtml seems like good value for the price, with the encoder wheel and electronics mounted stably inside a housing.
Have you actually used the E4 or E4P encoders? I'd be grateful to hear how you mounted them (pictures would be wonderful) and how well they worked.