Incremental rotary encoders (Part 7)
I received many requests and questions regarding the encoder posts. Here is some sort of a FAQ section related to the PlainENC library.
Q: Is PlainENC really working?
A: Yes it is! I tested it and I am actually using it routinely in various applications without the least problem
Q: Some encoder’s datasheets specify that a pair of anti-bouncing capacitors must be used. They are not mentionned in Arduinoos.
A: Correct, some vendors specify that bounces may be filtered by capacitors. But! Once I forgot them and I noticed that the encoder was still working like a charm. Then, I developped the booster algorithm and capacitors may degrade the performances of this nice feature. So you may skip the capacitors.
Q: Are encoders all the same?
A: No! PlainENC is designed for encoders which generate 1 pulse for 2 detents (Whatever the number of detents). The libray manages the axial pushbutton too, which is extremely convenient when the encoder is used for human interfaces.
A detent is the click that you feel while rotating the encoder. Encoder may have from 12 up to 30 detents per turn. Some have no detents! A pulse is a full electrical cycle, not only a raising or falling edge.
Here is a collection of screen captures from an Alps rotary encoder, 30 detents, 15 pulses per round.
CW rotation, one detent
CW rotation, next detent
CCW rotation, one detent
CCW rotation, next detent
CW rotation, multiple detents
Q: I do not have an oscilloscope. How can I diagnose my encoder?
A: The lastest version of PlainENC library contains some checking using a control led (The good ol’ builtin PINB5 led). The led toggles at each detent.
Q: Do you plan to develop PlainENC versions for other types of encoders?
Q: Which is the references that you use?
A: ALPS, 11mm Diameter, 30 detents, 15 pulses per round, ref# EC11B15242AF sided pins arrangement, 1.5 mm travel switch.
Q: Is the latest revision of PlainENC available on request?