Solving TTL Latch Problem with Circuit Building

  • Thread starter Thread starter xtremeblue
  • Start date Start date
  • Tags Tags
    Ttl
Click For Summary
The discussion centers on issues encountered with a TTL latch circuit when a switch is pressed too quickly, causing rapid high/low output pulses. Participants highlight the importance of adding flyback diodes across relay coils to prevent damaging voltage spikes and suggest that the current supply may not be adequate for the capacitor used in the circuit. The feedback loop design of the latch is noted as clever but potentially risky due to corner cases, with recommendations to simplify the circuit by using digital logic instead of relays. Suggestions include implementing a Schmitt trigger for better pulse management and ensuring proper debounce mechanisms. Overall, addressing these design flaws is crucial for achieving stable circuit performance.
xtremeblue
Messages
3
Reaction score
0
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.
 

Attachments

  • tic toc1.JPG
    tic toc1.JPG
    25.7 KB · Views: 546
Last edited:
Engineering news on Phys.org
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.
 
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.
 
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.
 
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.

http://en.wikipedia.org/wiki/Ring_oscillator

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.

http://en.wikipedia.org/wiki/Schmitt_trigger
 
Last edited:
es1 said:
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.
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.
 
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. :)
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 34 ·
2
Replies
34
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
7
Views
7K
  • · Replies 29 ·
Replies
29
Views
4K
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K