Maker Pro
Maker Pro

What the latch?

BeagleFaceHenry

Nov 11, 2016
20
Joined
Nov 11, 2016
Messages
20
In a past life I programmed PLCs, creating a latching circuit was easy. I'm starting to think it's not as simple with basic electronic components.
My needs are simple. I want to depress a pushbutton that will make an LED (or some flashing LEDs, or maybe a buzzer) turn on and stay on until 1 of 2 reset buttons (normally closed pushbuttons?) are depressed. Also note, this project will include 20-25 latching circuits and I'm trying to keep the project as close to $100 as possible (and of course there's a huge list of other components).
I do know that latching relays are a thing. I'm calling them Plan B. They strain the relay budget a bit.
I found THIS SCHEMATIC uses a PNP and NPN transistor but no relay. I haven't had the greatest of success getting them to work properly. Something seems off, in the 'picture', is the LED oriented the wrong way?
I've also found THIS CIRCUIT that does incorporate a relay. I haven't tried it, hopefully tonight (playoff football slowed me down).
Before I make myself crazy, can someone break down the latching circuit for me?
What's the simplest, cheapest way to make a stable, latching circuit?
Side question, where would you buy your components (aside from the obvious, Radio Shack).?
Thanks,
-j
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
I found THIS SCHEMATIC uses a PNP and NPN transistor but no relay. I haven't had the greatest of success getting them to work properly. Something seems off, in the 'picture', is the LED oriented the wrong way?

looks ok, LED orientation is correct ... build it and try it out. Its easy to put together



I've also found THIS CIRCUIT that does incorporate a relay. I haven't tried it, hopefully tonight (playoff football slowed me down).
the operation is fully described for both circuits
 

BeagleFaceHenry

Nov 11, 2016
20
Joined
Nov 11, 2016
Messages
20
Thanks for the input, guys, I've put it together a couple times, I'm not thrilled with it.
I was hoping someone here had experience with latching circuits and could suggest something they know works. Again, I'm hoping to find the simplest, cheapest solution and it would be great to talk to someone specifically about the operation, etc. I'm not necessarily looking for google's suggestions.
 

BeagleFaceHenry

Nov 11, 2016
20
Joined
Nov 11, 2016
Messages
20
Great question. I'm going to make 20ish individual circuits that will have dedicated set and reset button, plus a master reset that will reset them all with 1 push.
So Set# 1 will set LED #1. Reset #1 will reset LED #1. and Master Reset will Reset LED #1-20.
Thanks for asking!
-j
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
A SCR does the same thing as your 2 transistor circuit with a single component.

Bob
 

BeagleFaceHenry

Nov 11, 2016
20
Joined
Nov 11, 2016
Messages
20
I'm intrigued, Bob. Can you tell me more about them? I just goggled, I've seen them but always assumed they're transistors. I'll try to pick a couple up if they have some at Radio Shack.
Thanks!
-j
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
You still have a radio shack?

An SCR works like this: It is off until a positive pulse is seen on the gate. After that it acts like a diode and remains on as long as there is current through it. Your PNP NPN circuit does essentially the same thing.

Bob
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
Notice that the first schematic does not have a resistor in series with the PNP base, but the second schematic does. This is a critical error, leading to premature death of the PNP. The second sch is correct.

A consequence of both of those circuits is that the input should be floating when not being set or reset. Pull the input high to set, low to reset. If you want something where all switches return to the same circuit point (GND, Vcc, whatever) for simplified wiring, there are tons of flipflop integrated circuits out there. But I like the old ways.

Does each of the 20-25 circuits have to be physically separate from the rest, or can you have one chip with 4 latches?

Also, in case I missed it:
Power supply voltage?
load current?

ak
 

BeagleFaceHenry

Nov 11, 2016
20
Joined
Nov 11, 2016
Messages
20
Ok,
Bob, yeah, we actually have 2 Radio Shacks in the county, 1 very close to my house, but neither seems to carry an SCR.
Analog, good catch with the resistor. That's the kind of info I came here looking for. I'm game for 1 chip, or whatever makes the project cheapest (but still awesome).
I'm thinking 9v supply, because I have a 9v wall wort, and I like the idea of a wall voltage or battery backup, but I'm up for suggestions. I'm only running a bunch of LEDs, maybe some buzzers. I'm making a "game" for my kids,
Thanks guys!!
-j
 

Pyramid

Jan 17, 2017
24
Joined
Jan 17, 2017
Messages
24
How about something like this:

FlipFlop.jpg
7414 chips are ~0.50 and you get 3 circuits per chip. You can have individual set switches and one reset switch for the whole group if you isolate them with a diode.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
As noted above, a single SCR is the entire circuit if you have both normally open and normally closed switches. In this schematic, add a second reset switch in series with the one already there.
http://www.zen22142.zen.co.uk/Circuits/Switching/latch2.htm

Here are some other options. The left side is a classic 2-transistor flipflop; a few more parts than the SCR circuit, but they are easier to get than an SCR these days.
LatchLedGame-1-c.gif

Two hex inverters make a nice latch as in post #13, but a) many 74HC parts will not run on 9 V; b) they also will not source 20 ma. Best to add a 2N7000 or 7002 to the output as an LED driver.

Another approach is a quad set-reset flip flop CMOS IC, CD4043 or CD4044. This gets you four latches per chip, but you still need LED drive transistors.

Something to consider is battery life. The CMOS latch circuits draw almost zero power when the LEDs are off.

Last up is the ULN2804, the right side schematic above. This is 8 darlington transistors, enough for 4 latches, and the transistors can sink 1/2 amp each, way more than enough for a few LEDs. The upper right image is what is inside each inverter symbol for a sister part.

If you want the LEDs to flash, then you can consider a CD4093. This is a quad 2-in NAND, enough gates to make one latch and an oscillator to flash the LEDs. But like the other CMOS circuits above, it will need a driver transistor.

ak
 

Attachments

  • LatchLedGame-1-c.pdf
    12.1 KB · Views: 62

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
Not all CMOS is created equal.

The circuit in post #13 triggered a thought. The prime requirements for a latch are 100% positive feedback (that keeps the outputs stable when the input is removed) and a way for the input to override the latched state and force the circuit to the other state. So if you can arrange your switches so that the set switch pulls the input low and the reset switch(es) pull the input high (like the two schematics in post #1), then enter the AC series of CMOS.

AC (and ACT) parts are fast, but not so fast that the generate tons of interference, and they have a beefy output stage that can source or sink 24 mA. In CMOS-land, that's a lot. So if you start with an AC series *non-inverting* octal buffer, octal line driver, octal transparent latch, etc., then you need only one gate per latch, and1 chip and 8 resistors gets you 8 latches and small LED drivers.

ak
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
If you have multiple inputs you want to reset with a single signal (using the method described above), then you'll need to isolate the rest signal with diodes.

In addition you need to handle the case where the input is asserted at the same time as the reset. Judicious use of resistors can not only fix this but also determine whether the input out the reset has priority.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
Re-reading post #5, yes - the master reset button needs an isolation diode. Nice catch.

ak
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
I like this thread... brings back fond memories of mid-20th Century technology. Of course you could implement this with a handful of PICs. There might be some fun in that.
 

BeagleFaceHenry

Nov 11, 2016
20
Joined
Nov 11, 2016
Messages
20
I don't know if anyone is still following this thread, is anyone able to verify?
I can't find an easily accessibly 7414 flip flop, but I did FIND THIS.
I'm just trying to latch (set and reset push buttons) LEDs (maybe a buzzer or two). I have a 9v power supply, but I assume I can make that work? Before I invest I was hoping someone could confirm that this is the chip for me.
Thanks,
-j
 

Pyramid

Jan 17, 2017
24
Joined
Jan 17, 2017
Messages
24
74 series chips will almost all be TTL levels so limited to 5V supplies.

You could try this 4000 series CMOS equivalent to the 7414: http://www.digikey.com/product-detail/en/texas-instruments/CD40106BEE4/296-36082-5-ND/1690637

It is pin compatible to the 7414 and can drive 3-4mA directly; also runs from 3-18VDC on the supply. I've used these to directly drive small LED indicators with no problem, but you need to limit the current accordingly (or add drive transistors). If you use high brightness LEDs, you may be able to get adequate illumination at 4mA.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
The 7414 is not a flipflop, it is a hex inverter, and is available in a ton of different technologies (LS, HC, AC (my fav), etc.)

ak
 
Top