Electrical – Schmitt trigger in button debouncer

debounceschmitt-trigger

While researching how to debounce a switch for digital applications, I often come around this diagram :

schematic

simulate this circuit – Schematic created using CircuitLab

Or other similar diagrams, with modified resistance / capacitance values.
I understand that R1 is a pull-up, and R2 is here to limit the discharge rate of C1 and to augment the value of the time constant and to avoid short circuit when discharging, but why is there a Schmitt trigger ?

When the button is open

The current is flowing through R1 and R2, and is sourcing current for whatever circuitry there is at the Schmitt trigger / output of the sub-circuit.

When the button is closed

The capacitor C1 discharges through R2 to the common ground, following the equation of the discharge of a capacitor. But, at the junction between R2 and Schmitt trigger / output, the voltage should drop instantly, given that the resistance R2 is lower than the one of a Schmitt trigger IC, or any transistor base pin for the matter. So the Shmitt trigger shouldn't be required, given that we don't need any hysteresis ?

There is obviously a flaw in my reasoning, but I don't find it. Any transistor base pin or Schmitt trigger should have an impedance high enough so almost no current would come in, and the voltage would be too low for the threshold of the transistor, so , not only the Schmitt trigger would not be required, but fail the sub-system ? It's obvious there's a mistake I'm making, but again, I don't find it. Sorry if i'm stupid.

Best Answer

Your circuit does not show a Schmitt trigger.

A Schmitt trigger needs active components, transistors and/or an IC.

Some examples:

A logic gate Schmitt trigger (on a chip) is often made like this:

enter image description here

Using an opamp we can do this:

enter image description here

You can connect the output to a Schmitt trigger but that's not really needed for detecting a button press. Most microController inputs don't have Schmitt trigger inputs.

To reliably detect button presses without contact bounce problems just add a short delay after a button press is detected and detect if the button is still pressed.