I got this circuit from an example.


simulate this circuit – Schematic created using CircuitLab

What kind of circuit is this? I know its an RC circuit and I also know that its designed to be a simple switch debounce circuit.
Is it also a kind of filter circuit? (low-pass/high-pass/etc.)

The EXAMPLE stated that this is one simple version of a debounce circuit.
How does this circuit help eliminate contact bounce?

If it does eliminate contact bounce: How much bounce will this current setup eliminate? What will the voltage and current be at "A"?
If I want to try to eliminate contact bounce within the first 10 ms, how can I design this circuit to do that? 20 ms?

What kinds of potential side effects could I see from this circuit?

Sorry I am noob and not EE.

  • \$\begingroup\$ Why don't you use the CircuitLab simulator you used to draw the schematic with and find out for yourself? \$\endgroup\$ – EM Fields Feb 23 '15 at 1:11
  • \$\begingroup\$ it does analysis for free?? why cant somone help me learn the material so i can do it myself? im not exactly asking for number answers, im more so asking for explanations, guidance, and walkthroughs. i would like to understand it better \$\endgroup\$ – Zero Feb 23 '15 at 2:18
  • \$\begingroup\$ This is a reasonably good question. It is a high-pass filter. The time constant is dominated by C1 and R2. I don't know how well it will work. I have no experience with this particular type of circuit for debouncing. The best way to debounce is in software whenever possible. \$\endgroup\$ – mkeith Feb 23 '15 at 6:55
  • 1
    \$\begingroup\$ You ask "How does this circuit eliminate contact bounce?" I have no idea. If you Google for "debounce circuit images" (without the quotes) you'll see hundreds of circuits, and none like yours. In those, the capacitor (if there is one) always goes to ground, or across the switch (or both). \$\endgroup\$ – tcrosley Feb 23 '15 at 8:15
  • \$\begingroup\$ @Zero. 1.)Except for your investment in time in learning how to use it, Yes, it does analysis for free. , and the material is all there for you to learn to help yourself. 2.) If you want to do it by yourself, then you shouldn't be asking for help. \$\endgroup\$ – EM Fields Feb 23 '15 at 20:08

It's too late for me to think about sketchy circuits found on the internet, but the more conventional RC debounce is this:


simulate this circuit – Schematic created using CircuitLab

It's operation is simple. A t=0-, with the swtich open, C1 charges up through R1 and R2. This takes \$5(R_1+R_2)C_1\$ seconds without the diode and \$5(R_1)C_1\$ seconds with. After a sufficiently long time, we can say \$V_c = +V\$. When the switch closes, C1 discharges through R2 in \$5R_2C_1\$ seconds. Once the switch opens again, C1 will charge back up in either \$5(R_1+R_2)C_1\$ or \$5(R_1)C_1\$ seconds depending on if the diode is included.

This scheme gives a logic low with the switch close, but can be reconfigured to give a logic high by switching a couple components around. I'll leave that as a thought exercise for the reader.

|improve this answer|||||
  • 1
    \$\begingroup\$ This answer doesn't actually address the question. \$\endgroup\$ – tcrosley Feb 25 '15 at 5:05
  • 2
    \$\begingroup\$ @DwayneReid The diode is correct. The circuit is fairly classic now and comes from this document by Jack Ganssle where he goes into a lot more detail about why the diode is needed. \$\endgroup\$ – tcrosley Feb 25 '15 at 5:07
  • 1
    \$\begingroup\$ @tcrosley maybe not, but unlike the thing originally posted, it will work. \$\endgroup\$ – Matt Young Feb 25 '15 at 5:08
  • \$\begingroup\$ @MattYoung so are you claiming that the "thing originally posted" will not work? care to add that to your answer with explanation please? then i can mark it. (your original post was very helpful) \$\endgroup\$ – Zero Feb 27 '15 at 3:19
  • 1
    \$\begingroup\$ You need to add an inverting Schmitt trigger at the node labelled GPIO. Wilf Rigter helpfully provides one (second diagram). \$\endgroup\$ – Agi Hammerthief Jul 5 '19 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.