View Single Post
  #4   Spotlight this post!  
Unread 26-11-2011, 08:07
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Re: [DFTF] Closing the loop on Wheel Velocity...

Quote:
Originally Posted by EricVanWyk View Post
The Stellaris microcontroller does quadrature decoding in dedicated hardware, so there is no additional processing burden for running the encoders faster. The upper limit of that circuitry is 1/4th the speed of the processor. <snip>
Do you know if the processor "does the right thing" in terms of speed calculations, by which I mean, does it get 4 readings per nominal encoder tick (rising edge channel A, rising edge channel B, falling edge channel A, falling edge channel B) AND create the time as rising edge to (the same) rising edge and falling edge to (again, the same) falling edge?

The reason I say this is that the encoder folks do a much better job at spacing their ticks than they do at getting exactly 50-50 ON-OFF duty cycles and spacing the phasing between the sensors A and B (remember their is only 1 encoder wheel, the 90 degree shift in the signal between the two phases is done by physically spacing the encoders N+/-(1/4) encoder pulses apart.

The reason I ask is that I want to get 4X the speed readings doing it this way provides over just a single speed reading per encoder tick which is the most obvious way to do things (see the above discussion about keeping high PID loop times at slow speeds -- without 1,000Hz sensor reading, it makes little sense to have a 1,000Hz update rate on the PID loop).

Joe J.
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2
Reply With Quote