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)

enter image description here

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

enter image description here

  • 1
    \$\begingroup\$ But show us your actual circuit. Have you tried to connect a capacitor (100nF or more) across the switch? \$\endgroup\$
    – G36
    Apr 14 '20 at 17:31
  • \$\begingroup\$ 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. \$\endgroup\$
    – user103380
    Apr 14 '20 at 17:41
  • \$\begingroup\$ @G36 the actual circuit is the first shown \$\endgroup\$ Apr 14 '20 at 17:44
  • \$\begingroup\$ @KingDuken I see the second circuit uses a smaller capacitor, not larger, so which one would you suggest? \$\endgroup\$ Apr 14 '20 at 17:45
  • \$\begingroup\$ 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? \$\endgroup\$ 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)

  • \$\begingroup\$ simulation \$\endgroup\$ Apr 14 '20 at 20:54
  • 1
    \$\begingroup\$ thank you, increasing RC constant worked perfectly \$\endgroup\$ Apr 15 '20 at 15:01
  • \$\begingroup\$ @DimitriPetrucci most welcome. analysis always \$\endgroup\$ Apr 16 '20 at 20:58
  • \$\begingroup\$ Tony - please look at my answer here and advise if it seems to overcome the problem that you identified with other answers. \$\endgroup\$
    – Russell McMahon
    Apr 19 '20 at 3:50
  • \$\begingroup\$ 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 \$\endgroup\$ Apr 19 '20 at 6:32

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.