Any alternative for switch debouncer?

Discussion in 'General Electronics Chat' started by Tommy Tsang, Apr 28, 2016.

  1. Tommy Tsang

    Thread Starter New Member

    Apr 28, 2016
    7
    0
    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?

    No need answer for:

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

    upload_2016-4-29_11-47-47.png
     
  2. Picbuster

    Member

    Dec 2, 2013
    373
    50
    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.
     
  3. crutschow

    Expert

    Mar 14, 2008
    12,983
    3,222
    What circuit types/gates do you have on hand?
    It doesn't have to be a not gate.
     
    Roderick Young likes this.
  4. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,675
    899
    Your question is unclear. That is, it is self-contradictory.

    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
     
  5. dannyf

    Well-Known Member

    Sep 13, 2015
    1,769
    357
    Tons of alternatives, all depending on what you can work with.
     
    panic mode likes this.
  6. eetech00

    Active Member

    Jun 8, 2013
    647
    110
    Hi

    You need to provide more info...
    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?
     
  7. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
    This was a test of reading comprehension.. You all failed.. except for John..:p
     
    cmartinez and shortbus like this.
  8. hp1729

    Well-Known Member

    Nov 23, 2015
    1,938
    218
    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.
     
  9. Tommy Tsang

    Thread Starter New Member

    Apr 28, 2016
    7
    0
    What is the name of the software?
     
  10. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,675
    899
    Code (Microchip Assembler):
    1.  
    2. DelayCy  (10*msecs)
    3.  
    John
     
  11. Tommy Tsang

    Thread Starter New Member

    Apr 28, 2016
    7
    0
    I just have op-amp, cap, resistor, diode, BJT, Mosfet, fuse. Is it possible for building a switch debouncer?
     
  12. Tommy Tsang

    Thread Starter New Member

    Apr 28, 2016
    7
    0
    More information on my application:
    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.
     
  13. eetech00

    Active Member

    Jun 8, 2013
    647
    110
    What is the part number of the opto coupler?
     
  14. hp1729

    Well-Known Member

    Nov 23, 2015
    1,938
    218
    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.
     
  15. Tommy Tsang

    Thread Starter New Member

    Apr 28, 2016
    7
    0
    Which means I need to make use of a micro-controller?
     
  16. hp1729

    Well-Known Member

    Nov 23, 2015
    1,938
    218
    Then you have little need to consider hardware alternatives.
     
  17. ElectronicMotor

    Member

    May 1, 2016
    53
    6
    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).
     
  18. Tommy Tsang

    Thread Starter New Member

    Apr 28, 2016
    7
    0
    I want to have a look.:)
     
  19. Tommy Tsang

    Thread Starter New Member

    Apr 28, 2016
    7
    0
    What is the meaning of :

    Code (Microchip Assembler):

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

    AAC Fanatic!

    Nov 23, 2012
    5,986
    3,725
    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?
     
Loading...