Help with debounce circuit, pls.

Discussion in 'The Projects Forum' started by louarnold, Nov 9, 2012.

  1. louarnold

    Thread Starter New Member

    Feb 18, 2011
    5
    0
    I've wired up the debounce circuit in Fig 3 of this article http://www.ganssle.com/debouncing-pt2.htm.
    debouncerrc2.jpg

    The circuit works fine with the schmidt trigger inverter disconnected; the capacitor discharges to ground when the switch is closed and recharges to almost 5V when its opened. With the inverter connected, however, the cap discharges to only about 0.8 volts. That's not low enough to trigger a change in the inverter's output. Why doesn't that cap voltage go to ground with the inverter connected?
    Here are the components:
    R1: 27K
    R2: 27K
    C: 1 microfarad.
    D: 1N4001 (max forward voltage is 1.2V)
    Inverter: SN74LS14N
    Supply voltage: 4.9V

    Regards,
    Lou.
     
  2. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    You did nothing wrong, but the forum software picked up on the links and assumed the worst. I have approved it, and you are good to go.

    You are describing one of my standard schemes....

    [​IMG]
     
  3. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    Go and look up the specs of the LS input gate you're using. I think you will find that in its low state, it sources current out of the pin. In fact, the difference between what's recognized as low or high is whether that current is allowed to flow, or not. Now if you do the math for what that current is, and the voltage drop it causes across a 27K resistor, I think it'll explain what you're seeing.

    Personally I wouldn't use LS logic in this day and age. CMOS is easier to work with, draws less power and is usually cheaper.
     
  4. louarnold

    Thread Starter New Member

    Feb 18, 2011
    5
    0
    Well, ok. I'm pretty new to this. I looked up the specs and did the math. 27K ohms x 0.8ma gives 21.6 volts. I see 880mv. That value is somewhat close to the forward voltage of the diode. But I don't understand what's happening here that produces the result that I have. Can you explain that?

    I agree with the CMOS comment. Its just a matter of trying to reproduce an example so that I can learn from it. And I am learning.
     
  5. k7elp60

    Senior Member

    Nov 4, 2008
    478
    69
    I would suggest you eliminate R2 in your circuit, and have the input of the gate go to the junction of the switch and the capacitor. It is possible that 27k may be to much resistance for the 74LS series also.
     
  6. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    So far all the previous comments are correct.
    LS logic input requirements are very different from CMOS logic.
    If you are using a 74LS14, replace R2 with 0Ω and R1 with 4k7Ω.
    Replace C with 10μF.
     
  7. louarnold

    Thread Starter New Member

    Feb 18, 2011
    5
    0
    R1 to 4k7 Ω? You mean 47K Ω.
     
  8. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    No. That is an unambiguous and safe way of writing 4.7kΩ.
     
  9. louarnold

    Thread Starter New Member

    Feb 18, 2011
    5
    0
    Here is the circuit again.
    [​IMG]
    (I can't see the image for some reason.)

    I left R2 in because without it there is no debounce effect when the switch closes. As it happens, R2 seems not very helpful: it stops the inverter from switching when R2 is high, and gives a short fall time when its value is lower.

    I did some tests with R1 at 4.7KΩ, C=6.6uf ( I don't have a 10uF.)
    I put a pot in for R2 and adjusted it

    The inverter starts switching when R2 drops to about 8KΩ. The input voltage drops to 800mV. The rise-time is about 68ms and the fall time about 130msec.

    At R2 about 1440Ω, the low input voltage is at 200mv, the rise-time is about 20ms, and the fall-time is about 100ms.

    At R2 about 300Ω, the low input voltage is down at about 40mV. The rise-time is less than 12ms, and the fall time about 80ms.

    Removing the diode increases the rise-time when R2 is high (800mv, its almost 200 ms) and has less effect as R2 decreases (at 200mV, the rise-time is still at 100ms and the fall time is below 24ms). This is as expected. The value of C could have been smaller to get to 20ms - double the expected switch bounce duration.

    I looked at the National Semiconductor (CMOS) MM74C14 data sheet and the Input-Low current is -1.0 uA max; big difference from the TTL version. Could the CMOS version allow a greater R2?

    That's it. Thanks for your help.

    Lou.
     
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    Seems it's neither an unambiguous nor a safe way in this case. :D
     
  11. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    That is because the OP assumed it was a typo error.

    If one makes a typo error on 74 ohms on what should be 47 ohms, then one could understand the error.

    If one sees 4k7 and one does not know the rules then one should immediately investigate its meaning and not assume a typographical error.

    The reason for writing 4k7 instead of 4.7k is because the dot can be much more easily obscured than k in printed documents.

    And 4k7 is pronounced "four" "k" "seven" as in "four thousand, seven hundred".

    and btw, all the op had to do was Google 4k7.
     
    Last edited: Nov 11, 2012
  12. louarnold

    Thread Starter New Member

    Feb 18, 2011
    5
    0
    Now really. ErnieM made a joke. Did you not see the smiley?? And what good does it do to Google "4K7" if I wasn't sure it was a typo in the first place. Take a step back and think.
     
  13. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    That's because the image is on your system's H: drive (H:/ElectronicComponents/debouncerrc2.jpg) and we can't get there from here. See this post for instructions on attaching an image http://forum.allaboutcircuits.com/showthread.php?t=32762
     
Loading...