Electronic – Suitable RC debouncing circuit

circuit-designdebounce

I'm trying to implement an RC debouncing circuit into a design I'm currently working on, and I have been using this PDF as a reference: https://my.eng.utah.edu/%7Ecs5780/debouncing.pdf

In the PDF, the math is described on how to obtain values for R2 and C. I want to account for a button that has about 10ms of noise, so using the formula in the PDF I get that my values for R1, R2, and C should be

  • R1 = 10Kohm
  • R2 = 160Kohm
  • C = 0.1 uF

The Schmitt Trigger inverter that I plan to use is the 74HC14D. Its datasheet is found here: https://www.nexperia.com/products/analog-logic-ics/asynchronous-interface-logic/buffers-inverters-drivers/74HC14D.html

And the following circuit setup is from the PDF as well:

enter image description here

However looking around, I find that there are people similar to me who also want to implement a debouncing circuit for their buttons as well. Most of the time, I am finding that the following values for R1 and R2 and C work as well:

  • R1 = 10Kohm
  • R2 = 10Kohm
  • C = 0.1 uF

The only difference between my values and the above is that my R2 is really high. Looking around on the EE stack exchange, I've also found that R2 should not be too high, or else the voltage at point A on the diagram will not be low enough for the inverter to register the voltage as LOW. Do I trust my calculations, or have I incorrectly done my calculations somewhere along the way/misinterpreted the PDF?

Best Answer

As per the math on the PDF and the circuit, your calculations are correct for R2. R2= 160k ohms may bias approx 16 mV on Schmitt trigger inputs which is a demerit with respect to the switching point of the Schmitt trigger. But you can adjust this by using a smaller resistor and correspondingly scaling C up.

Scaling R2 down to 10k ohms effectively scales down the debouncig time by 1/16 times as well, since C remains the same. Then your requirement of 10 ms is not met anymore. It depends on what's the typical bouncing time on the switch (typically more than 1ms), and then how fast you want your MCU to register a switching event. Putting 10 ms maybe a little pessimistic and makes switching detection delayed from user perspective. But again delays less than 50 ms are barely noticeable by a user.