switch debouncing techniques

Discussion in 'General Electronics Chat' started by athulascc, Jan 27, 2015.

  1. athulascc

    Thread Starter Member

    Aug 15, 2014
    I am going to do micro controller based project.
    so I need to use push button.
    I am afraid about switch de bouncing effect because it causes to fail my before digital ic based project
    I used capacitor to reduce it but it wasn't work.

    anyone know good techniques?

    and please give me little explanation how it works

    I know we can use code in micro-controller to do that but I need hardware simple solution which can use any where?

    I like if there is ICs to do that

    many thanks
  2. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
  3. Bernard

    AAC Fanatic!

    Aug 7, 2008
    I like fig 2 in PDF above , but use a schmitt trigger like 40106.
  4. ian field

    AAC Fanatic!

    Oct 27, 2012
    You can use a SPDT switch driving a SR flip-flop made of 2x 2 input gates, or these days most people do debounce in the MCU firmware.
  5. ramancini8

    Active Member

    Jul 18, 2012
    Debouncing a switch with a flip flop is risky because there is always the possibility that the output pulse may trigger your logic but not the flop. If this happens you will go about half nuts; that is responsible for my poor mental state.
    Jack Bourne likes this.
  6. MrChips


    Oct 2, 2009
    Use this:

  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Debouncing a switch when you have a micro is very simple and easy. I do it by checking the buttons every so often, and if two readings agree I know the buttons are stable and goto whatever function the button does. For circuitry all you need is a switch and a resistor.

    For the buttons I use now a 25mS period works well: stops bounces from entering the electronics and is responsive enough to keep the user happy.
  8. MIkePelkey

    New Member

    Oct 12, 2017
    There is an even better way to avoid switch bounce altogether if you like. Use a bounce-free switch from LogiSwitch.
    Last edited by a moderator: Oct 12, 2017