I bought an incremental/quadrature rotary encoder for a project I'm working on.
They provide a diagram of a suggested filter circuit for debouncing the contacts on the encoder.
I'm not an electrical engineer, but I get the basic idea of an RC based filter. The resistor values make sense: They pull the switch up to logic 1 value while limiting the current drawn from the 5V rail. How do you select a capacitor value for such a circuit? Do you measure the maximum rate-of-change for the square wave pulses you'd get from this switch, round up a little for safety, and then design a low pass filter that blocks signals at higher frequencies? Do you identify the frequency of the jitter and design a filter that filters that?
The project is built using an Arduino microcontroller and a digital input. I have written an interrupt service routine (ISR) that detects a falling edge on one of the inputs of the encoder, and then compares the value to the value of the other input to determine rotation direction.
I'm not sure how much hysteresis an Arduino digital input line has. The whole arrangement would probably work better with a Schmitt trigger in it, but I don't have a lot of room left on my project board for a DIP package, and don't have the skills for surface mount soldering.
(I'm beginning to think the digital input on the Arduino can't handle the slow-changing signals from the filtered output of the encoder and that I will need to add a Schmitt trigger.)