0

I got this circuit from an example.

schematic

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.

Zero
  • 173
  • 1
  • 11
  • Why don't you use the CircuitLab simulator you used to draw the schematic with and find out for yourself? – EM Fields Feb 23 '15 at 01:11
  • 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 – Zero Feb 23 '15 at 02:18
  • 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. – user57037 Feb 23 '15 at 06:55
  • 1
    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). – tcrosley Feb 23 '15 at 08:15
  • @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. – EM Fields Feb 23 '15 at 20:08
  • @tcrosley where do you think i got this circuit from? its there if you actually looked. and yes I actually looked at many sites and circuits. just not completely understanding it from doing the research and taking the time. I would like to see if anyone (who DOES understand how this one works, and in the manner it works) would be able to give insight or can just flat out tell me that it DOES NOT. thanks – Zero Feb 25 '15 at 03:16
  • @EMFields Only a Sith deals in absolutes. why do we have forums? what is this site for? I have spent the time already and have read many documents so far, and STILL am. I am not EE. In addition, sometimes people need more help than trying on their own, and other times people want help to get to answers quicker. I hope thats understandable. this is a specific noob question about a specific circuit. now if you are going to just continue to be unhelpful, why not just ignore this question (or do whatever you want to do, like give it a -1) and move on? – Zero Feb 25 '15 at 03:21
  • @Zero I went back and looked at the first hundred or so circuits, and still didn't see it. If I had, I would have liked to click on the link to the page where it came from. It would useful to say where you got this circuit from. I still have no clue how it works. – tcrosley Feb 25 '15 at 03:29
  • @tcrosley well i thank you for trying anyway. I will try to find the source again... – Zero Feb 25 '15 at 03:57
  • @EMFields Have you tried using the CircuitLab simulator? Multiple times perhaps? From what I have read before (http://electronics.stackexchange.com/questions/1024/good-tools-for-drawing-schematics), I thought you only get a demo with limited time. Now, I tried using it because I started doubting my brain after reading your comment, and it did block me after some time (20 min i believe)... best sith advice ever. now i cant use it to try a more complicated analysis =( or for learning. – Zero Feb 25 '15 at 04:11
  • @Zero: I've used it a couple of times, just to check it out, and I didn't care for it. If you want to, you can download LTspice [here](http://www.linear.com/designtools/software/) for free, and if you need help with it there's an excellent support group [here.](http://groups.yahoo.com/group/LTspice/) – EM Fields Feb 25 '15 at 07:19
  • @EMFields I will probably need that support. Thank you. – Zero Feb 27 '15 at 03:18
  • @Zero: You're welcome. I forgot to mention it, but there are some great tutorials on YouTube to help you get up and running pretty quickly. – EM Fields Feb 27 '15 at 12:44

1 Answers1

5

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

schematic

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.

Matt Young
  • 13,734
  • 5
  • 34
  • 61
  • 1
    This answer doesn't actually address the question. – tcrosley Feb 25 '15 at 05:05
  • 2
    @DwayneReid The diode is correct. The circuit is fairly classic now and comes from [this document](http://www.eng.utah.edu/~cs5780/debouncing.pdf) by Jack Ganssle where he goes into a lot more detail about why the diode is needed. – tcrosley Feb 25 '15 at 05:07
  • 1
    @tcrosley maybe not, but unlike the thing originally posted, it will work. – Matt Young Feb 25 '15 at 05:08
  • @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) – Zero Feb 27 '15 at 03:19
  • @tcrosley i was in the middle of reading that. loving that document so far. – Zero Feb 27 '15 at 03:23
  • 1
    You need to add an inverting Schmitt trigger at the node labelled `GPIO`. [Wilf Rigter helpfully provides one](http://solarbotics.net/bftgu/tutorials_schmitt.html) (second diagram). – Agi Hammerthief Jul 05 '19 at 08:13