Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

TTL Latching Problem

  1. Oct 14, 2006 #1
    I built this circuit with a computer program. Basically when the switch S1 is pressed to fast I get a high/low pulse coming through the latch which really messes up the output. ( Output will continually go from high to low rapidly) I was wondering if this will be present also if I was to build the circuit. It will be a pushbutton and may be pressed pretty fast. I put a 100k resistor and a 2.2uf cap in the circuit to try to stop problems from debouncing but I think the problem is that there is just not enough time to get the latch. If this will carry over to a real circuit please let me know if there is anything I can add to it to stop this. Thanks

    I cannot get this image to look good on this site you will have to save it and open it from windows picture and fax viewer.

    Attached Files:

    Last edited: Oct 14, 2006
  2. jcsd
  3. Oct 14, 2006 #2
    Several things are likely to be happening. One mistake you have made is that you don't have a diode across the relay coil to prevent flyback pulses. Another mistake is dumping that 2.2 uF cap across the 5 volt power supply. It is quite likely the 5 volt power supply cannot supply the sudden current demand of the discharged cap which causes the supply to dip. I'll look at your circuit closer later.
  4. Oct 23, 2006 #3


    User Avatar

    Staff: Mentor

    I agree with supernova that your gates will blow up when you build the circuit if you do not include flyback catch diodes on the relays. Hopefully your text or other learning resources discuss how to add those diodes to your circuit. I'm not very clear on what the circuit does or what the failure is that you are seeing. If you could post a simplified circuit that just exhibits the behavior, and post a plot of the bad simulated behavior, that would help a lot.
  5. Oct 27, 2006 #4


    User Avatar

    Flyback sure, but also transient and dc current. If S1 closes quickly and stays closed shorting RLY2's coil to V1, v(RLY2)=Ldi/dt and the +5V source will probably supply a good amount of short circuit current.

    Assume +5V limits current and slew rate (i.e. an intentionally horrible voltage source).

    When the switch is pressed (strong drive to +5V) shouldn't L1 stay off? The switched node is wired directly an input of the 74LS27. If any input of the NOR is high the output should be low. As this is a strong pull high to an input directly I doubt there is a race condition or anything.
  6. Oct 27, 2006 #5


    User Avatar

    I see why the simulation oscilates. The circled 74LS08 is just a buffer for the right settings of the keypad.

    If S1 is closed for a long time the feedback loop from the 74LS08 completes and the output is latched, aka stays high due to the circled or-gate even when the switch input goes away. (If the keypad is changed the feedback loop is opened and L1 goes off.)

    If S1 is closed for a very very short time the circled or-gate filters the pulse.

    If S1 is closed for a time greater than the minimum input pulse of the circled or-gate but less than the prop delay of the circled and-gate, you get a ring oscilator as both outputs are just functioning as buffers.


    The feedback loop is actually a clever way to build the latch. I personally like hacks like this but they are dangerous becuase of corner cases. An alternative would be to, I dunno, just use a latch.

    I would recommend fixing the problems with RLY1 and RYL2 (BTW, why make your life hard with relays, use digital logic here too), remove the redundant logic, and add a circuit to gaurentee the min pulse width of S1 (plus debounce).

    If it were me, I would have the switch drive a high input impedance schmitt trigger and just do everything else with digital logic.

    Last edited: Oct 27, 2006
  7. Oct 27, 2006 #6


    User Avatar

    Staff: Mentor

    The relay coil will have a resistance that is sized for the drive voltage, and the datasheet will specify what the drive current is. So you might have a 12V relay that requires 40mA to hold, or a 5V relay that requires 60mA to hold.

    Good answer on the feedback oscillation, es1.
  8. Oct 28, 2006 #7


    User Avatar

    I thought the relay input side acted just like an inductive element. It was up to you to limit the current (via transistor, resistor, whatever) otherwise you got a dc short (just like with any inductor).

    I guess these days, buy a relay get a resistor free. :)
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: TTL Latching Problem
  1. TTL gate (Replies: 9)

  2. Latching relay (Replies: 10)

  3. TTL NOT-gate (Replies: 8)

  4. TTL circuit (Replies: 10)