Go Down

Topic: Quadrature Encoder Error Question (Read 1 time) previous topic - next topic

fiddler

Yes, the Z output gives you one pulse per revolution.

So you can use the Z output to read the count and determine if the count is correct.
If you encoder has X count per revolution, then each time Z signal occurs, it should be in multiple of this count.

And I guess you could also measure the length of each signal, A and B, to filter out noise, however a hardware filter may be a better solution.

Also most commercial quadrature encoders has the following 6 outputs, A, A Not, B, B Not, Z, and Z Not.
I'm not sure if the "A" and "A Not" signals are just inverted (but otherwise aligned) of the same signal or if they are in fact a separate measurement/signal, but by comparing both signals you should be able to guard against some errors at least.

BTW, this is for position control.

Kim

fiddler


Quote
How does one detect sensor errors without having multiple sensors?

Generally you are write, however:-
In this case the two bits have a pattern. For any one pattern there are two valid patterns that happen next, one for clockwise and the other for anti clockwise. This leaves one transition that is not valid. If you see that, it is an error.


Yes, only one bit of the 2 bits can change at anyone time, ie you cannot have both bits change at the same time.

retrolefty

Quote
Also most commercial quadrature encoders has the following 6 outputs, A, A Not, B, B Not, Z, and Z Not.
I'm not sure if the "A" and "A Not" signals are just inverted (but otherwise aligned) of the same signal or if they are in fact a separate measurement/signal, but by comparing both signals you should be able to guard against some errors at least.


Not exactly. Many industrial encoders make you state the output type option you wish to have when you order them. The A and NOT A you describe is a full differential output option (and yes one is just the inversion of the other), best for long cable runs as it has better noise handling ability and double the signal to noise ratio over single ended outputs, however it has no 'error detecting' abilities over any of the other output options. Other optional output types are single ended output at various voltage levels (5v, 12v, 24v are common options) and finally open collector output option. Each option as an advantage for certain installations.

fiddler

Well, yes, that should of course have been: a common output configuration is  A, A Not, B, B Not, Z, and Z Not.

The 2 bit pattern comparison should guard against noise and going to fast for the micro type scenario.
Using the Z input should guard against counting errors.

Should be good enough for me for now.

Will start to work on the library.

Cheers
Kim

fiddler

After some more thoughts, I have decided to do the Encoders in a FPGA, mainly because I will need interrupts in other parts of the program as well and also think that it will get too slow for what I want to achieve.

Papilio has some boards and I got both the 250K and 500K in my hands :-)
Interesting thing is that you can program it using the Arduino IDE.
http://papilio.cc/

Here is a link to a pretty good summary about quadrature encoders
http://electronics.stackexchange.com/questions/12845/quadrature-decoding

Cheers

Go Up