Connect with us

Hardware Debouncing Help

Discussion in 'General Electronics Discussion' started by Dylfish, Dec 11, 2012.

Scroll to continue with content
  1. Dylfish

    Dylfish

    6
    0
    Dec 11, 2012
    Hey Guys,

    I've been playing around with my Arduino lately and i want to start playing with interrupts. I've decided I need to use hardware denouncing and I've been trying alot of different methods to no avail.

    This below one is currently not working and I'm wondering what I'm doing wrong. I have it connected to a sketch where it is meant to scroll through an array, but it seems to jump on every press leading me to believe I've done something wrong on the circuit for the de bouncing.

    This is the circuit I'm using at the moment using a RC filter system and a 74LS14 inverted schmitt trigger. Can anyone see what I'm doing wrong?

    [​IMG]

    Cheers,
    Dylan
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    9,543
    1,969
    Nov 17, 2011
    Can you show us the schematic. It is a bit hard to figure it out from the connections.

    A very simple and proven debounce circuit is this one using 2 Nand gates.

    Using an RC filter, that's what I take from your image, is less stable.
     
  3. Dylfish

    Dylfish

    6
    0
    Dec 11, 2012

    Hi Harald,

    [​IMG]

    That is the one I am using.

    Cheers :D
     
  4. duke37

    duke37

    5,273
    733
    Jan 9, 2011
    I've never used one of the plastic breadboards, my last breadboard was made of pine with some one inch nails knoched in for connections.

    You do not have capacitors before and after the voltage stabiliser. Also, the earth wire seems to go round the long way. This should be as short and direct as possible
     
  5. Harald Kapp

    Harald Kapp Moderator Moderator

    9,543
    1,969
    Nov 17, 2011
    Use at least a gate with a Schmitt-Triger input, e.g. a 74HC14.
    If you don't have one, you can try using two inverters in series (note that this will invert the signal level compared to your circuit) and a feedback resistor from the output of the second inverter back to the input of the first inverter. Make the feedback resistor approx. 10*R2.
    (it looks like this circuit where A is the series connection of two inverters and B is the feedback resistor.

    Harald
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    9,543
    1,969
    Nov 17, 2011
    I disagree. Generally it is is sound advice to have capacitors at the input and at the output of the voltage regulator. I'd be willing to discuss the need for electrolytics. But most, if not all, datasheets recommend at least 100nF capacitors.

    Harald
     
  7. duke37

    duke37

    5,273
    733
    Jan 9, 2011
    Yes, there should be capacitors before and after the stabiliser but I do not see them so I said he did not have them.

    He said he was using the 74LS14 Schmitt trigger device.

    Duke
     
  8. Dylfish

    Dylfish

    6
    0
    Dec 11, 2012
    Yeah ive got it wired up to a 74LS14. Ive played around with as many values as I can but so far no luck. im not really sure what im doing wrong to be honest =(
     
  9. Dylfish

    Dylfish

    6
    0
    Dec 11, 2012
    is it possible that since the gnd is taking the long way that not all of my "presses" are meeting the required voltage to meet logic 1 and instead falling in the "dead zone" so to speak?
     
  10. duke37

    duke37

    5,273
    733
    Jan 9, 2011
    Without capacitors at the input and output of the stabiliser, it can go into oscillation and produce random voltages. Any long connections have significant inductance so earth can not be defined as earth and there may be no 'dead zone'.

    As I said, I have not used one of these breadboards. Have you got bypass capacitors close to the regulator?
     
  11. Dylfish

    Dylfish

    6
    0
    Dec 11, 2012
    I haven't touched it, it is still in the same setup as my first post. il try shorten the grounds.
     
  12. Dylfish

    Dylfish

    6
    0
    Dec 11, 2012
    this is very odd, but soon as i removed the pullup resistor it started working properly =/
     
  13. Harald Kapp

    Harald Kapp Moderator Moderator

    9,543
    1,969
    Nov 17, 2011
    It seems there are electrolytic caps, but I'd recommend additional 100nF ceramic caps.

    That's not logical. Are you sure your setup is identical to the schematic you've shown us? What kind of gate do you use(CMOS; TTL...)?

    Harald
     
  14. duke37

    duke37

    5,273
    733
    Jan 9, 2011
    Another thought

    The chip will contain more than one gate. The unused gates should have their inputs defined to stop oscillation.
     
  15. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,267
    Nov 28, 2011
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-