Any alternative for switch debouncer?

Tommy Tsang

Joined Apr 28, 2016
7
I know that "By using RC with NOT gate" can make a switch debouncer. (like circuit below)

However, I don't have a NOT gate on hand.

Can anyone suggest an alternative for building a hardware debouncer?

1. Hardware Debouncing
2. R-C Debouncing
3. Software Debouncing
4. Using Debouncing IC’s

Attachments

• 104.6 KB Views: 9

Picbuster

Joined Dec 2, 2013
1,027
Always use a cap and de-bounce in software. Connect to an interrupt set flag when occurs.
The flag is set at first pulse regardless how many follow.
In main handle flag and reset flag after N msec disabling so unwanted bounce pulses to fool(f....up) the system.

crutschow

Joined Mar 14, 2008
27,444
What circuit types/gates do you have on hand?
It doesn't have to be a not gate.

jpanhalt

Joined Jan 18, 2008
11,088
I know that "By using RC with NOT gate" can make a switch debouncer. (like circuit below)

However, I don't have a NOT gate on hand.

Can anyone suggest an alternative for building a hardware debouncer?

1. Hardware Debouncing
2. R-C Debouncing
3. Software Debouncing
4. Using Debouncing IC’s

View attachment 105142

I do have a circuit for a hardware debouncer based on the LM555/NE555, if you are interested.

Please let us know what you really want/need.

John

dannyf

Joined Sep 13, 2015
2,197
Can anyone suggest an alternative for building a hardware debouncer?

Tons of alternatives, all depending on what you can work with.

eetech00

Joined Jun 8, 2013
2,493
I know that "By using RC with NOT gate" can make a switch debouncer. (like circuit below)

However, I don't have a NOT gate on hand.

Can anyone suggest an alternative for building a hardware debouncer?

1. Hardware Debouncing
2. R-C Debouncing
3. Software Debouncing
4. Using Debouncing IC’s

View attachment 105142
Hi

What is this the state of the input to the debouncer? Normally open? Normally closed?
What is the requirement for the output of the debouncer? A pulse? High? Low?
What is the input voltage and required output voltage levels?

mcgyvr

Joined Oct 15, 2009
5,394
Can anyone suggest an alternative for building a hardware debouncer?

1. Hardware Debouncing
This was a test of reading comprehension.. You all failed.. except for John..

hp1729

Joined Nov 23, 2015
2,304
I know that "By using RC with NOT gate" can make a switch debouncer. (like circuit below)

However, I don't have a NOT gate on hand.

Can anyone suggest an alternative for building a hardware debouncer?

1. Hardware Debouncing
2. R-C Debouncing
3. Software Debouncing
4. Using Debouncing IC’s

View attachment 105142
Any gate will do. Transistor ... it only isolates the R-C circuit from the rest of the circuit.
Then there is the CD4490 a chip designed to be a contact bounce eliminator.

Attachments

• 166.4 KB Views: 6

Tommy Tsang

Joined Apr 28, 2016
7
Always use a cap and de-bounce in software. Connect to an interrupt set flag when occurs.
The flag is set at first pulse regardless how many follow.
In main handle flag and reset flag after N msec disabling so unwanted bounce pulses to fool(f....up) the system.
What is the name of the software?

jpanhalt

Joined Jan 18, 2008
11,088
What is the name of the software?
Code:
DelayCy  (10*msecs)
John

Tommy Tsang

Joined Apr 28, 2016
7
What circuit types/gates do you have on hand?
It doesn't have to be a not gate.
I just have op-amp, cap, resistor, diode, BJT, Mosfet, fuse. Is it possible for building a switch debouncer?

Tommy Tsang

Joined Apr 28, 2016
7
What is this the state of the input to the debouncer? Normally open? Normally closed?
What is the requirement for the output of the debouncer? A pulse? High? Low?
What is the input voltage and required output voltage levels?
As now I am required to use a switch for triggering a digital multimeter (DMM) to capture reading once I close the switch. The switch is connected in between a 2V DC voltage and the primary side of the the opto-coupler. The opto-coupler is used to generate a trigger signal for DMM because the DMM requires a 0V in more then 23us for trigger 1 reading.

And now my facing problem is that
1. When I close the switch , 2V cannot be 2V for the opto-coupler. It is 2 pulses first and then 2V continously. As a result, the DMM received 2 0V pulse and triggered 2 times.
2. When I open the switch, it is a similar situation. The switch is still be triggered because it see 0V which means the switch cannot clearly open for providing 0V for the opto-coupler. It generated some pulses for the opto-coupler.

Based on above observation, that's why I need to build a switch debouncer. Unfortunately, I got limited electronic components for building the RC debouncing circuit.

Now I want to see whether it is feasible for building a debouncer by using limited electronic components and/or free resources.

eetech00

Joined Jun 8, 2013
2,493
What is the part number of the opto coupler?

hp1729

Joined Nov 23, 2015
2,304
What is the name of the software?
Software???
Read the input a few times before considering the input stable. Read, delay a bit, read, delay a bit ... then call the input stable.

Tommy Tsang

Joined Apr 28, 2016
7
Software???
Read the input a few times before considering the input stable. Read, delay a bit, read, delay a bit ... then call the input stable.
Which means I need to make use of a micro-controller?

hp1729

Joined Nov 23, 2015
2,304
Which means I need to make use of a micro-controller?
Then you have little need to consider hardware alternatives.

ElectronicMotor

Joined May 1, 2016
53
I used an R-C de-bounce once when I was 16 and it failed miserably. I only use PIC's now, and software de-bouncing is infallable (and easy, if you want my typical routine, ask. It is about 10 lines long).

Tommy Tsang

Joined Apr 28, 2016
7
I used an R-C de-bounce once when I was 16 and it failed miserably. I only use PIC's now, and software de-bouncing is infallable (and easy, if you want my typical routine, ask. It is about 10 lines long).
I want to have a look.

Tommy Tsang

Joined Apr 28, 2016
7
Code:
DelayCy  (10*msecs)
John
What is the meaning of :

Code (Microchip Assembler):

1. DelayCy (10*msecs)
Is it a function provided in Microchip Assembler already? Please explain more.

GopherT

Joined Nov 23, 2012
8,012
What is the meaning of :

Code (Microchip Assembler):

1. DelayCy (10*msecs)
Is it a function provided in Microchip Assembler already? Please explain more.
You said above that you did not want a hardware solution. That means software was our only alternative. Now you say you don't want a Microcontroller (software based) solution by implying you don't have those. So, which is it? Will Hardware solutions work for you?