Electronic – A question about a debouncing circuit

debouncepassive-networksschmitt-trigger

I was reading a tutorial on debouncing the outputs of a rotary-encoder which are read by a micro-controller.
Below is the circuit given:

enter image description here

The writer of the tutorial claims the following:

"In the above circuit we use a 1uF capacitor with an SN7414 Schmitt-trigger input NAND gates that clean up the switch-contact noise."

I have couple of questions regarding this claim and the circuit.

1-) I can understand the reason for the use of capacitors, they act as RC low pass filters and can filter bounces.
But how does the SN7414 Schmitt-trigger help debouncing here? Is that really needed or does it improve debouncing?

2-) In the above circuit the resistor and the capacitor forms a low-pass filter with a cut-off freq. fc.
What is the motivation/idea when it comes to sizing the capacitor here. Why 1uF?
I mean let's say we have a rotary-encoder and it is recommended to be used with 10k resistors.
Which parameter of the encoder from its data-sheet should be taken into account when sizing the capacitor.
Is there a method or reasoning between choosing the capacitance and a parameter in the data-sheet?

Best Answer

The schmitt trigger doesn't help debouncing in itself. But it is required because after the RC-filter, the signal will have slow rise/fall times (this is obviously the purpose). And signals with slow rise and fall times are not appropriate for feeding regular logic inputs. If the gate inputs stay "inbetween states" for a long time, you'll experience higher power consumption and may see instability problems. This is fixed by the schmitt triggers.

The capacitor can be sized easily, and depends on the "boucing time" indicated in the encoder datasheet. It also depends on the values of the pullup resistors. Basically, take a RC time constant (here 10k * 1µ = 10m) and it should be higher than the max bouncing time.