Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Feedback for TTL latching

Status
Not open for further replies.

Burningmace

New Member
The following works in Multisim, but I'm dubious as to if it would work in real life.

8830-x6fomu.png


To set the alarm, one would open the door and turn the alarm key to ON (J1 closed). When the door closes, J2 closes and ALARM_SET goes high. After this point, J2 can open and close as much as it wants, but ALARM_SET won't go low again until J1 is opened again.

In theory, U1A and U2A keep each other's outputs high using feedback. R1 works as a weak pull-up to help keep the feedback stable. However, in Multisim you can remove R1 and it continues to work. R2 is probably completely unnecessary, but I have it there because Multisim bitches at me if I don't include a ground.

The reason I'm dubious is that somebody once told me that when you use feedback designs such as this in TTL logic, it doesn't work. I seem to remember them mentioning the switching speed of the transistors as the cause of the problem, but I don't remember the details.

I'm sure there's a better way to do this using a PIC, but I'd rather stick to standard logic for this project.
 
Last edited:

hdc090360

Member
Feedback

I don't think you would have a problem with this circuit as the "feedback" path only latches an existing condition.

One change that you might think about making is using the resistors as pulldowns on the inputs that have switches attached to them.

The way it is drawn, when the switches are open, the inputs are floating which is not a good idea and more likely to be a problem in the real world.
 

audioguru

Well-Known Member
Most Helpful Member
The key switch and the door switch do nothing because the TTL inputs float high.
They are never low.

The logic parts are the wrong ones. A set-reset latch made with gates use inverting gates.
 

Burningmace

New Member
Yeah, I forgot to mention that this is part of a bigger circuit and the switches shown actually have a 10k pulldown and a 100nF capacitor to help reduce the effect of bouncing.

Audioguru - what do you mean they're the wrong parts?
 

audioguru

Well-Known Member
Most Helpful Member
You posted a schematic that is different to what you were talking about. That wastes everybody's time.

Cross-coupled gates to make latches are usually inverting types.
Two NOR gates or two NAND gates. Yours has an OR gate and an AND gate.
 

Burningmace

New Member
Having the pulldowns on the switches doesn't really count as being a different schematic, as it is the principle of the feedback section (U1A, U2A) that is in question.

Cross-coupled NOR gates make a flip-flop, but I'm not building a toggle latch like a T-Flip-Flop (i.e. one press on, one press off) - I'm building something comparable to a thyristor, where one pulse on the door switch sets ALARM_SET high, and it remains high until the key is set back to the off position.
 

hdc090360

Member
Right or Wrong?

It doesn't really matter what you use as long as it works and your circuit should work. There are always many solutions to any problem. There are circuits that use less gates. If you want to use only one gate you could use a D latch as shown. Q is held low by the CLR input until the ARM switch (S1) is closed. The next time the door switch is closed it clock a high onto the Q output until the arm switch is opened again.


flip flop.GIF
 

Burningmace

New Member
Thanks for the solution hdc090460. Do you know if the 7474's clock works on rising or falling edges? In Multisim it uses falling, but this might not be the case in real life.

If it uses falling edges, then this design will actually work better for the purpose, as the alarm can be activated with the door closed without ALARM_SET instantly going high.
 

hdc090360

Member
My data sheets show it as a rising edge, which is why I drew it that way. But if you want it the other way, take the door switch to gnd and your ripple cap and pull down to Vcc. This will give the rising edge on switch open.
 

Burningmace

New Member
Sorry, I meant to say it'd be best if it used rising edges, not falling.

Here's my design for the alarm logic:
8833-x6iydt.png


The theory is as follows:
Close SW1 (key). Close SW2 (door) to arm. U1A's Q goes high and remains high until SW1 is opened.
Open SW2 (door). U2C's output goes high, causing U1B's Q to go high and trip the alarm.

I'll next need to design a 15 second timer, but I'm opening a new thread for that as it's a separate issue altogether.
 
Last edited:

Burningmace

New Member
*doh*

Can't believe I missed them out. I've added a 22k resistor to each base.

Edit: Ah, I know why I missed them out - it was 3am when I drew that bit up.
 
Last edited:
Status
Not open for further replies.

EE World Online Articles

Loading
Top