Pages: 1 [2]   Go Down
Author Topic: Switch de-bounce circuit.  (Read 383 times)
0 Members and 1 Guest are viewing this topic.
Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34209
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
and a 10 pF capacitor
You sure about that capacitor value? A 10pF capacitor will do nothing in a circuit like that. Are you sure it was not 10nF?
Logged

NSW Australia
Offline Offline
Faraday Member
**
Karma: 88
Posts: 3560
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've seen variations with two resistors, but I don't know why.  It's probably some neurosis vis-a-vis the grave consequences of discharging a 0.01uF capacitor straight to ground, I suppose
That would be precisely the reason for the second resistor, between the 100k and switch, and the capacitor on the gate input.

As I calculate it, the time constant of 100k and 0.1µF is 6 ms but the 4093 thresholds do not correspond to 1/e so it is more like 3 ms.  Now since you are directly shorting the capacitor, this time constant applies to the contact opening, not closing, nevertheless this may me somewhat short for comfort.  100k may be somewhat high to account for wiring leakage and interference pick-up though of course the capacitor suppresses the latter.  I would tend to be looking at 10k and 1µF.

If I had a reason to do hardware debouncing in the first place, where I was not using a microcontroller.  smiley-grin

Dunno if I was clear in my explanation. The button I debounced is the interrupt trigger, not something that I'm using an interrupt for.
Then you do not need to debounce it in hardware.  Just switch off/ disable the interrupt except when you need it to wake the MCU from sleep.

Sorry for taking over the thread for this small side discussion, but I considered it better than starting a new thread just for this.
Seems entirely relevant to me.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
and a 10 pF capacitor
You sure about that capacitor value? A 10pF capacitor will do nothing in a circuit like that. Are you sure it was not 10nF?
I just looked now and it's 10 µF. Should i change it or it's ok like this? (It works as intended)
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34209
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Do what you like, remove it and it won't make the slightest differance. You are only 6 orders of magnitude out!
Logged

Lacey, Washington, USA
Offline Offline
Edison Member
*
Karma: 155
Posts: 2362
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

And that's why I'm pedantic.
Logged

Steve Greenfield AE7HD
CET Consumer Electronics and Computer
Please don't read your attitudes into my messages

Pages: 1 [2]   Go Up
Jump to: