Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

switch debouncer, sort of

Status
Not open for further replies.

quarque

New Member
I am trying to design a circuit using 555/556 for handling a switch input with specific requirements. All the debounce circuits I've seen react to the leading edge of the switch actuation. I need a circuit that will ignore the input changes until it is stable (on) for about 250 msec. at which time the output changes state. Any narrow pulses or bouncing should be ignored. The output should stay active until the switch is released. The output can change state after switch release with any delay (0 - 250 msec.). Has anyone seen an application like this or know how to do it? TIA.
 
Here's one way:

Connect the switch to trigger the 555 designed as a one-shot (monostable) with a 250ms period. Have the trailing edge of the 555 pulse period trigger (clock) a FF to it's high state. Connect the FF output to a 2-input AND gate with the second input connected to the switch output. That way the output of the AND gate will go high in response to the switch only after 250ms.

Connect the switch to reset the FF when the switch goes low. That will set the AND gate output signal to low and prepare the circuit for the next switch operation.
 
Last edited:
1 meg is a little high, I would drop that to 33k or 47k, and reduce the 10k pulldown to 1k. Then change the value of C1 to give the desired time constant.

Also you labeled C1 as 220 Farads! ;)
 
1 meg is a little high, I would drop that to 33k or 47k, and reduce the 10k pulldown to 1k. Then change the value of C1 to give the desired time constant.

Also you labeled C1 as 220 Farads! ;)

Thanks for pointing out the Cap error. I have replaced the attachment with the correction.

I don't see why you recommend reducing the resistors.

In fact I used 10M in a similar circuit in the Garage Door Opener that I designed some time ago.

It has been working for several years without any problem.

I used it to keep the light on for about 3 minutes after the door has been opened or closed. So the timing is not critical.

As for the 10k: many years ago, the rule of thumb for switch & relay contacts was that they need at least 5 Volt across them when open & at least 1 mA through them when closed.

I don't know if this applies to modern contacts, but I abide by it anyway.

So the circuit does not meet this criterion for a supply voltage of < 10 Volt so the 10k could be reduced in proportion.

Modern practice is to use much lower currents through the switches.

I have a problem with my Printer/Scanner as the Scan button often does not work, so I have to press it 2 or more times.

So I wonder if that issue would not occur if they had obeyed the "rule of thumb".
 
...
I don't see why you recommend reducing the resistors.

In fact I used 10M in a similar circuit in the Garage Door Opener that I designed some time ago.

It has been working for several years without any problem.
...

Generally it's considered bad form to use really high value resistors for source impedance, as a high source impedance can mean that noise will have a large effect on the voltage at the IC input. Because you have a cap at the IC input you will get away with it generally, but it doesn't mean it's a good design choice.

Also the IC input will be some megohms, and likewise the cap leakage too, so a high source impedance of 1M might not get you the right voltage at the IC input especially if the IC is swapped for a different spec chip or the cap is later swapped for one with more leakage, or moisture on the PCB adds some leakage etc.

Because of potential problems it's good to avoid really high value resistors for source coupling unless absolutely necessary to give really low power consumption or to deal with high voltages etc. A value of 47k is pretty typical and about as high as I would go, unless there was a specific need for a very high value resistor. Maybe the EE experts might chip in here with their views as my view comes mainly from years of examining commercial equipment. :)

As you said 10k was a bit high for the button pullup, it's not unreasonable but again if power consumption is not a major issue I think a 1k is a better choice.
 
Thanks for your comments.
I looked at the data sheets of several Schmitt triggers and at 25° C, the input resistance of the gate is greater than 150 M.
I don't know what the leakage of the ceramic capacitor is, but I expect it would be much less than the leakage of electrolytics.

I take your point about moisture on the PCB, but in case of my garage door opener, the air here is reasonably dry. Also, the PCB is mounted vertically and is protected from dust.

The timing is not critical, so the variation in the delay due to noise does not matter.
 
Status
Not open for further replies.

Latest threads

Back
Top