Best and simplest debouncing method

Thread Starter

mikeysela

Joined Jul 24, 2010
87
I already tried the simple debouncing method with an RC circuit and it didnt work all too well. My next step is a schmitt trigger but then eventually maybe a sophisticated chip to take care of it.
 

t06afre

Joined May 11, 2009
5,934
I already tried the simple debouncing method with an RC circuit and it didnt work all too well. My next step is a schmitt trigger but then eventually maybe a sophisticated chip to take care of it.
And why did it not work? In order to get any further I think you have to post some schematics, and also the switch configuration. Else we will be guessing for the next year what you are trying to do.
 

Thread Starter

mikeysela

Joined Jul 24, 2010
87
It should be put i put the circuit together and the debouncing wasnt that effective. Then i turned to using a 555 timer to do my debouncing and it helped alot but i would like to keep it simple and use the minimal amount of circuitry.
 
The circuit you're using doesn't seem to have Schmitt-trigger input. I looked at the data sheets for 4017N and I didn't see any mention of Schmitt inputs. You could put a Schmitt input buffer between the switch and the chip's clock input. You could use a simple Schmitt-input IC or you could build your own. It starts to add up in component count. C'est la vie. But perhaps try my next suggestions first.

The time constant of the RC is around 0.6 ms, which is maybe too fast. You could use a larger resistor, maybe 100K, to make it 6 ms. That specialized chip uses 140 ms minimum pulse width to debounce the input, to give a ballpark of what other designers are using for time constants.

You could also try a resistor between the switch and the node where the top resistor and capacitor meet. If you use 100K for the pull-up resistor then maybe use a 1K for the resistor to the switch. That will at least "soften" the influence of the switch.

As you've drawn it, when the switch is pressed, the capacitor is drained immediately. But on the microsecond level, it may look jagged as the switch first makes unsure contact. Who knows, this may last 50 microseconds. A 1K resistor would dampen that and give it about 100 microseconds of time before it reaches 1/3 the supply voltage... that might help it out. That would be the easiest, because of adding nothing more than a single resistor.
 

Thread Starter

mikeysela

Joined Jul 24, 2010
87
Thanks Sage. I will start looking into that. As i was thinking more and more though with that circuit, do you think it would be a wise idea to eventually use a micrcontroller to do the roles of the 4017 and the debouncing and drive relays from say an 8051 micro outputs?
 
Thanks Sage. I will start looking into that. As i was thinking more and more though with that circuit, do you think it would be a wise idea to eventually use a micrcontroller to do the roles of the 4017 and the debouncing and drive relays from say an 8051 micro outputs?
I am almost always in favor of using a microcontroller for things like this, because they are so versatile and take care of so much of the circuit algorithms... and they're adjustable by reprogramming after you've built the circuit. So my suggestion is "yes". I'm partial to AVR, PIC, and MSP430 myself but you can use whatever you like.

The drawback may be if you're not experienced with microcontrollers, then they add a new level of complexity.

It can definitely debounce an input with code alone, and it can count and turn on relays in any sequence you want. Add a $0.25 crystal and it can keep real time. Add a TMP100 and it can respond to temperature. ... etc...
 

Thread Starter

mikeysela

Joined Jul 24, 2010
87
I am almost always in favor of using a microcontroller for things like this, because they are so versatile and take care of so much of the circuit algorithms... and they're adjustable by reprogramming after you've built the circuit. So my suggestion is "yes". I'm partial to AVR, PIC, and MSP430 myself but you can use whatever you like.

The drawback may be if you're not experienced with microcontrollers, then they add a new level of complexity.

It can definitely debounce an input with code alone, and it can count and turn on relays in any sequence you want. Add a $0.25 crystal and it can keep real time. Add a TMP100 and it can respond to temperature. ... etc...
That sounds awesome Sage. I dont have any Micro-Controller experience but the thought of programming one for this task really excites me. The fact that such a small chip can do so much excites me and i defenetely want to learn them and look into it. The only issue is the circuit has to be easy to troubleshoot and replace parts of it quick and easy, so i suspect using a microcontroller is much tougher to troubleshoot and replace for an average folk than logic chips..
 

Thread Starter

mikeysela

Joined Jul 24, 2010
87
and although i dont have micrcontroller expeirence, i am in electrical engineering and have done Assembly and C before and i believe they use the same programming principlas
 

BMorse

Joined Sep 26, 2009
2,675
You can actually get a pic micro up an running in no time at all, all you will need to get started is a basic uc such as the pic16f628a or the pic16f88, these have internal oscillators which reduces the required components to run it, if the internal oscillator (crystal) is used all you will need is a pullup resistor for the MCLR/Vpp pin if using it as a master reset, and a power source, that's it, (and of course a programmer such as the pickit2 or pickit3 both can be bought either as just the programmer or in a starter kit)...
B. Morse
 
and although i dont have micrcontroller expeirence, i am in electrical engineering and have done Assembly and C before and i believe they use the same programming principlas
Then you should be fine, and it is about time to learn to use a microcontroller, as a versatile tool in your toolbox.
 
Top