Solving TTL Latch Problem with Circuit Building

  • Thread starter Thread starter xtremeblue
  • Start date Start date
  • Tags Tags
    Ttl
Click For Summary

Discussion Overview

The discussion revolves around issues encountered when simulating and building a TTL latch circuit, particularly focusing on problems related to switch debouncing, flyback pulses from relay coils, and feedback oscillations. Participants explore the implications of circuit design choices on performance and reliability.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant notes that pressing the switch S1 too quickly causes high/low pulses through the latch, leading to rapid output fluctuations.
  • Another participant suggests that the absence of a diode across the relay coil may lead to flyback pulses that could damage components.
  • Concerns are raised about the placement of a capacitor across the power supply, which may cause voltage dips due to sudden current demands.
  • Some participants discuss the behavior of the circuit when S1 is pressed for varying durations, indicating that feedback loops can lead to oscillations under certain conditions.
  • A participant proposes using a Schmitt trigger to ensure a minimum pulse width for S1, along with digital logic to simplify the design.
  • There is mention of the relay's resistance and the need to limit current to prevent short circuits, drawing parallels to inductive elements.

Areas of Agreement / Disagreement

Participants generally agree on the need for flyback diodes and current limiting measures, but there are differing opinions on the circuit's design and the best approaches to mitigate the issues presented. The discussion remains unresolved regarding the optimal solution to the problems identified.

Contextual Notes

Limitations include assumptions about the circuit's behavior under different conditions, the impact of component specifications, and the potential for oscillations that have not been fully explored or quantified.

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: 560
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 because 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
7K
  • · Replies 34 ·
2
Replies
34
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
7
Views
8K
  • · Replies 29 ·
Replies
29
Views
4K
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K