Connect with us

What the latch?

Discussion in 'General Electronics Discussion' started by BeagleFaceHenry, Jan 16, 2017.

Scroll to continue with content
  1. BeagleFaceHenry

    BeagleFaceHenry

    20
    0
    Nov 11, 2016
    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
     
  2. davenn

    davenn Moderator

    13,654
    1,888
    Sep 5, 2009
    looks ok, LED orientation is correct ... build it and try it out. Its easy to put together



    the operation is fully described for both circuits
     
  3. Alec_t

    Alec_t

    2,890
    775
    Jul 7, 2015
    Will they all be reset with the same two buttons, or will they have respective reset button pairs?
     
  4. BeagleFaceHenry

    BeagleFaceHenry

    20
    0
    Nov 11, 2016
    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.
     
  5. BeagleFaceHenry

    BeagleFaceHenry

    20
    0
    Nov 11, 2016
    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
     
  6. BobK

    BobK

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

    Bob
     
  7. BeagleFaceHenry

    BeagleFaceHenry

    20
    0
    Nov 11, 2016
    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
     
  8. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    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
     
  9. AnalogKid

    AnalogKid

    2,393
    665
    Jun 10, 2015
    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
     
  10. BeagleFaceHenry

    BeagleFaceHenry

    20
    0
    Nov 11, 2016
    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
     
  11. Pyramid

    Pyramid

    24
    5
    Jan 17, 2017
    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.
     
  12. AnalogKid

    AnalogKid

    2,393
    665
    Jun 10, 2015
    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
     

    Attached Files:

  13. AnalogKid

    AnalogKid

    2,393
    665
    Jun 10, 2015
    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
     
  14. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,412
    2,780
    Jan 21, 2010
    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.
     
  15. AnalogKid

    AnalogKid

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

    ak
     
  16. hevans1944

    hevans1944 Hop - AC8NS

    4,536
    2,112
    Jun 21, 2012
    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.
     
  17. BeagleFaceHenry

    BeagleFaceHenry

    20
    0
    Nov 11, 2016
    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
     
  18. Pyramid

    Pyramid

    24
    5
    Jan 17, 2017
    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.
     
    hevans1944 likes this.
  19. BeagleFaceHenry

    BeagleFaceHenry

    20
    0
    Nov 11, 2016
    Awesome Pyramid!! Thanks! I'm going to order a pile of them!
    -j
     
  20. AnalogKid

    AnalogKid

    2,393
    665
    Jun 10, 2015
    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
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-