View Single Post
  #4   Spotlight this post!  
Unread 09-10-2005, 01:19
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: Non Contact Magnetic Encoder with PWM Output

Quote:
Originally Posted by seanwitte
Quadrature doesn't require a state machine to decode the input. Use one channel on an interrupt and the other on a regular digital input. In the ISR, the value of the channel on the digital input provides the direction.
That can fail if the encoder wobbles back and forth in one place. Unless you keep track of the previous actions, you'll keep counting pulses in one direction and ignoring them in the other. It's not usually a problem with the kind of mechanical systems used in FIRST robots, but it did affect our "ground travel" sensors last season until we put in the necessary state machine.

Something like the encoder mentioned here would have made it easier to use more sensors without worrying too hard about interrupts.