View Single Post
  #13   Spotlight this post!  
Unread 28-02-2012, 23:55
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Consistent encoder rate

Here are a couple other things to consider:

Quote:
Originally Posted by jaysun View Post
I tightened the encoder discs on the axle as shown in the video, and I made sure there wasn't any slipping. When I rotated the encoders by hand, the Distance count was kind of consistent: I'd say about +-10 counts.
+-10 out of how many? and roughly how accurately did you rotate it (i.e. by "eye" or did you make a mark etc)

Quote:
Originally Posted by jaysun View Post
The Rate value jumps around a lot, even when we use 1x decoding and choose to average 127 samples.
127 samples at 20ms per sample? That's 2½ seconds. That's not what you meant is it?

Quote:
When we made our own rate code based on the encoder's Distance, the variance persisted.
This doesn't sound right. Would you mind describing exactly what you did?

- 1x or 4x?

- Counter class or Encoder class or something else?

- sample time? how controlled? measured or assumed?

- did your code look like this: read count, subtract previous count, divide by measured elapsed time since previous sample?