# improving this debouncing circuit

I'm using the circuit to debounce a momentary push button switch (and drive a relay). Probably the switch is not that great (it is a stomp switch) so I got a lot of bouncing, and the end result is not reliable.

do you think there is a way to improve this circuit? The PSU voltage is +9V, and the gates are CD40106 (Schmitt trigger)

Also, I'd like to try this one too. Do you think is an improved design over the previous one?

• But show us your actual circuit. Have you tried to connect a capacitor (100nF or more) across the switch?
– G36
Apr 14 '20 at 17:31
• There are a few ways to reduce bouncing including getting a new switch that bounces less when closed (i.e. something with a better buffer spring, a spring that's more damp, etc). You can also try using a larger capacitor, as you've done with your second picture. I don't think your second picture will remove all bouncing but performance will be better.
– user103380
Apr 14 '20 at 17:41
• @G36 the actual circuit is the first shown Apr 14 '20 at 17:44
• @KingDuken I see the second circuit uses a smaller capacitor, not larger, so which one would you suggest? Apr 14 '20 at 17:45
• In order to design a debouncing circuit you first have to establish the duration of the debouncing so that you don't miss intended actuations. Also, your circuit is not just a debounce, but also a toggle. Is that intended? Apr 14 '20 at 17:46

The circuit design is almost OK, but the RC time constants of 100k * 0.1uF or 10ms is not OK. Your large "stomp switch" will likely have a bounce time on the order of 30ms to 50ms. You might want to be able to repeat stomp quickly, yet filter the noise in between for a reliable single toggle step.

My solution is the change the ratio of (positive feedback)/(low pass filter) from (1/2) to (1/3) so as to reduce the step voltage from the switch but at the same time increase the filter time constant x3 to increase the debounce from 10ms towards 50ms.

This only requires you change the RC filter resistor from 100k to 300k ~ 330k or more if you prefer slower stomp cycle rates.

## Proof concept simulation link this >> tinyurl.com/rafocgm

There is also a chance of a positive feedback metastable oscillation to which I added 10 pF the switched input. Short leads in a tight layout may be necessary with a ground plane. (having some browser issues here)

• simulation Apr 14 '20 at 20:54
• thank you, increasing RC constant worked perfectly Apr 15 '20 at 15:01
• @DimitriPetrucci most welcome. analysis always Apr 16 '20 at 20:58
• Tony - please look at my answer here and advise if it seems to overcome the problem that you identified with other answers. Apr 19 '20 at 3:50
• It’s perplexing at first it seems to work and then you realize your logic is going in the output of the Diode XOR bridge rather than the AC input of the XOR diode bridge, so Dave is correct that version won’t work, .... but almost Apr 19 '20 at 6:32