Schmitt trigger questions

I have several different push buttons in my project and think I'll just use Schmitt triggers to deal with debounce, rather than adding complexity to my code. But I have a couple of questions:

  1. I have seen two different schematics for how to connect a Schmitt trigger for debouncing switches with Arduino. Can anybody advise if one is better than the other, and why? Examples of each version attached. You can see that one circuit has an addition resistor, R2. Not sure what that does?

  2. Possibly understanding is that with a Schmitt trigger (and surrounding resistor-capacitor circuit) I don't need a pull-up or pull-down resistor between the Schmitt output and the Arduino input pin, because the Schmitt trigger will always put out either a high or low signal (so long as it has power) -- correct ASSumption?

Thanks for your valuable insight!


Schmitt 2.png|410x248

Schmitt 1.jpg|471x263

#1 has delay on release.
#2 has delay on push and longer delay on release.

Your schmitt trigger is either high or low.

All settled! Thanks Larry!


The circuit with one resistor shorts the 10uF capacitor to ground though the switch contacts, which might cause wear and tear to the switch when large discharge currents flow.

Software debounce can be easier - so long as you keep the debounce code separate from the rest of the logic, either via a function or library - then it won't add complexity to the business logic. You can then tune the debounce delay later without having to resolder your circuit!

Proper software debounce - not using interrupts - is much more reliable.

The whole point of using microcontrollers is to reduce the need for hardware solutions to problems. It is most unlikely that you will be running out of code space just for some proper debounce code.

The resistor values are wrong, resulting in asymmetry.

The second one with the two resistors is definitely the better way to go - especially if you have one of those tactile type switches with light contacts. Discharging the capacitor directly without any current limit will eat those switches in a fairly short period of time - the second one with R2 as a current limit for the discharge is much better (you could even go lower on R2 to make it faster).

Paul_b hit the nail on the head. If you don't want to use software to serve the solution, why are you wasting time with a micro controller? I've got bucket loads of 2n2222's, 2n3904's, NE555's, and 74xx chips you can use.