bad encoder ?

Status
Not open for further replies.

nlecaude

Well-known member
Hello, I just digged up this encoder: https://www.sparkfun.com/products/10982 that I bought a couple months ago.
I'm trying it with a Teensy 3.1 using the Encoder library via the basic examples.

When I spin the encoder slowly it seems to work great but if I try to spin it moderately fast I get erratic results, for example, instead of getting a continious steam like this:
120
121
122
123
124
I get something like this:
120
121
120
121
122
121
122
123

It will increment and decrement but with duplicates.
I tried another encoder I have, an alps one and that one seems to work flawlessly with the same setup.
So I assume this particular encoder is a piece of junk ?
 
Looks like it's working, but with some mechanical chatter.

The real question is whether it's always ending up with the right count when you stop at any particular angle?
 
You have to debounce the signal, those encoders have mechanical contacts. Look at page 4 of their data sheet, they mention about chatter.
 
I assume that if I want to use the Encoder library it would be best to do the debouncing in hardware ?
 
I would give that a try first. Look at the comments on spark fun's page for the encoder, lots of other people have similar problems.
 
Status
Not open for further replies.
Back
Top