View Single Post
  #14   Spotlight this post!  
Unread 14-03-2009, 11:16
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Problem with quadrature encoder

Quote:
Originally Posted by Ken Streeter View Post
The problem with incorrect rates was present in both the C++ and the LabVIEW code. A workaround for this was released in the most recent official update to WPILib (for both C++ and LabVIEW). For C++, I know this was addressed in "C/C++ Update 3.0.1718". (See http://first.wpi.edu/FRC/frcupdates.html ) Discussion on this matter can be found at http://forums.usfirst.org/showpost.php?p=26395 as Joe Ross mentioned.

However, due to the manner in which the length of the "most recent" pulse is used to determine the rate, the fact that the encoder pulse widths are asymmetric leads to significant rate errors when using 2x and 4x pulse decoding. Accordingly, I personally would suggest using 1x decoding when using the encoders for rate measurement.

A few people are working on a software workaround to the pulse asymmetry issue by averaging a greater number of periods, which has achieved some improvement, but not as much as expected. (See http://forums.usfirst.org/showthread.php?t=12218 for further discussion.)
Great info. I have definitely noticed the "noise" in the rate signal from our encoders at 4x as well, and got around the problem by low pass filtering. But asymmetry coming into play makes perfect sense.