View Single Post
  #68   Spotlight this post!  
Unread 28-04-2010, 13:00
vamfun vamfun is offline
Mentor :Contol System Engineer
AKA: Chris
FRC #0599 (Robodox)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Van Nuys, California
Posts: 182
vamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of light
Send a message via AIM to vamfun
Re: Unexpected results from Encoder::GetRate()

Quote:
Originally Posted by Alan Anderson View Post
I'm confused. I'm getting the impression you don't understand how quadrature encoding works, but I can't believe that's the case
Sorry for the confusion...Its funny, I know we have the exact same picture in mind, but choose to describe it so differently. So I will break the limit cycle in interest of your sanity and perhaps any readers and not try to re clarify.






Quote:
Kevin Watson implemented two different schemes for reading quadrature encoders, based on the different features of hardware interrupts on the PIC input pins. I used a routine that would count up and down as the phase A signal changed state; the other could be fooled into continually incrementing or continually decrementing at the noisy edge. It was indeed used for closed loop control, with two encoders being read to determine robot heading based on the difference in their values. (A third encoder provided odometer information. It was read by the simpler routine because it did not suffer from noisy rotational motion.)
Did your decoder also use B phase to halt the continuous counting similar to Kevin? If so wouldn't it have incorporated a type of hysteresis?

Probably at that time you did not have a need for special rate processing of your decoded heading unless heading rate was involved in your loop...right?
Reply With Quote