Electrical – Buttons and encoder debouncing

buttondebounceencoder

I'm trying to figure out the way of debouncing encoders and tact buttons with Schmidt triggers, but I'm confused with 2 existing schematics:

schematic

simulate this circuit – Schematic created using CircuitLab

Which of those two options are right?
Values are shown for 5.0V inputs level, would the be the same for 3.3V?
Or for 3.3V I should use another Schmidt trigger IC (not 7414)?

Thanks in advance!

Best Answer

The first is the better option. Notice that the second circuit does not provide the output gate with the intended 0 V ground when the switch is closed. It is supplied a low level voltage through a voltage divider.

However, when the switch is closed in the first circuit, the gate's input is pulled down to ground, but slowly- as the cap discharges. This is what you want.

Edit also read all the comments. I agree with mkeith that, if this is for a microcontroller project, consider denouncing in firmware.

And jonk is right (as he often is) that there may be better, prepackaged, options depending on your needs.

Edit: 3.3 V will work fine with a 7414, provided you supply the IC with 5 V nominal on the VCC pin to power the chip. The resistors are up to you. The values of the resistors and capacitor affects the capacitor's charge/discharge time. Higher values provide more denouncing, but increase the wait time allowed between subsequent triggers. You might also want to add a voltage follower as an output stage.

For Example: Example circuit

and...

Regarding your 7414 question in the comments: 7414 Datasheet