# Suitable RC debouncing circuit?

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:

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?

• What is the button used for? Where is it connected to? It kind of determines what kind of debouncing, if any, is needed. Also, what might be important, is what kind of button is it. If it has a datasheet, you can read the maximum it can safely handle, and minimum current needed to keep contacts clean, and that may help in determining resistance values, and that combined with the debouncing time can be used to determine the capacitance value. – Justme Nov 7 '20 at 22:43
• I do not have a datasheet for the button, I just went off assumption to be safe that at most the button will have 10 ms of bounce time. I want the button to be connected to ground (like on the image) and the output of the Schmitt Trigger is to an Arduino, where I want the Arduino to read if the input is high or low. – transienttoast Nov 8 '20 at 0:46
• Yes, but what requires that the button signal is debounced? Simply reading a button does not require debouncing. But if you plan to generate interrupts with the button, debouncing starts to be a good idea. – Justme Nov 8 '20 at 10:09
• Ah I see. Basically when the button is pressed, I want the signal to go into an Arduino that will see if the input is high or low. If the input is high, the Arduino sends an outward signal to a transistor that will trigger a solenoid. I understand since this is being done with an Arduino I could probably perform debouncing there but I have to account for the a scenario where I may have to remove the Arduino and the transistor switching must still occur. I am also running it through an Arduino in the first place because I have other functions that run through it as well. – transienttoast Nov 8 '20 at 19:15

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.

• Sorry, but what do you mean that I will bias 16 mV on the Schmitt trigger input? I guess I read the datasheet incorrectly, but I thought the switching point would be somewhere around 2V? Also yup I am just putting 10ms to be safe but overall it shouldn't be a 50ms switch so the delay should be unnoticeable. I don't have a datasheet for the switch unfortunately but I am going off the assumption that at most it will have a bounce time of 10ms. – transienttoast Nov 8 '20 at 0:49
• Ideally it has to be zero. But yea additional drop across R2 because of the little leakage current thru Schmitt trigger input. 16 mV is an approximation took from the document you shared. – Mitu Raj Nov 8 '20 at 1:02
• I see! Would you also recommend that I use 10K for R1 and 100K for R2 as someone on here mentioned as well then? Also if I may ask, how did you perform the approximation from the shared document? – transienttoast Nov 8 '20 at 19:17
• 180k ohm biases 18mV says the document. So assuming input impedance of Schmitt Trigger to 10M ohms. Using 100K should be fine as well if the reduced debouncing time is okay for you. – Mitu Raj Nov 9 '20 at 3:31

The ratio of R1 to R2 isn't that critical. The charging RC time constant is (R1 + R2) * C and the discharging time constant is R2 * C. When R2 is much larger than R1, the circuit will be more symmetrical, but symmetry isn't really that important.

Note that if this signal goes to a microcontroller, you can usually de-bounce in software.

• This signal is actually going to an Arduino! But the whole reason why I am implementing a physical debounce circuit is that I have to consider a case where I must remove my Arduino in case it fails, so this circuit is a sort of backup. In this case should I primarily focus on the discharging time constant since the discharging capacitor is what helps smooth out the button input? – transienttoast Nov 7 '20 at 21:00
• The combined time constant will determine how fast the button can be acknowledged. Too fast and it won't always de-bounce, too slow and you may annoy the user. How fast the user might want to repeatedly press the button will depend on the application. Don't overthink this, there are probably a hundred more important issues in your project. I would use 10k for R1 and 100k for R2. Mostly because I have tons of these values. – Mattman944 Nov 7 '20 at 22:31