Latching Circuit - Page 1
Forum section: electronics / beginners

author: clevis
author_rank: Newbie
timestamp: September 16, 2018, 10:43:05 am
content: Hi All,I tried out the simple latching circuit described in EEVBlog #262 (the first circuit diagram discussed, not the one eventually built). This is a two button circuit, first button to latch, second to unlatch. The problem is that current flows immediately after turning on power, without pressing the first button. I suspect this may be down to some leakage current but I have tried several tweaks but no luck. I tried modelling this in LTSpice (schematic and trace attached), and on a breadboard - with same unexpected results.Any advice?Thanks.

author: MK14
author_rank: Super Contributor
timestamp: September 16, 2018, 11:17:45 am
content: Is the problem with the LTSpice , because of your initial voltage settings, inside the simulator ?It lets you start up with different methods/voltages, via the settings/options stuff, called something like initial starting conditions.I think one is called something like, "click here to start at 0V".

author: clevis
author_rank: Newbie
timestamp: September 16, 2018, 12:46:55 pm
content: MK14,I suspected something like that and had tried with a "pulse" LT Spice supply which turns from 0V to 3.3V after 1 second. The latching button is closed on 4 seconds which should turn things on, but circuit is already on and the button has no effect. I attached that revised simulation and trace, plus the input voltage profile.I already tried the original circuit (without input delay) on a breadboard and same result as LTSpice.Thanks.

author: MK14
author_rank: Super Contributor
timestamp: September 16, 2018, 12:53:59 pm
content: The page I was talking about, looks a bit like this:"Start external DC supply voltage at 0V" and other settings to play with.Otherwise the simulator can do funny things, because it automatically sets the initial conditions. Which might not be what you want and/or are expecting.EDIT:I thought/assumed you would connect it to the supply voltage, rather than powering it from a pulse.

author: MK14
author_rank: Super Contributor
timestamp: September 16, 2018, 01:13:59 pm
content: Also R2 100K, will have a tendency, to attempt to turn the unit ON, at first power up. Because of its capacitance (and combined with the various transistor junction capacitances). Also, the various capacitances (stray), of the various transistor junctions.So I can well believe it powers up, NOT in the way you want (presumably OFF is what you want, I think you said so, earlier).These circuits (power on/off switch substitution) can be a real pain in the neck, to get them to behave as exactly as you want.Some of these circuits, are better and much more reliable than other circuits. You are best, going for one of the reliable ones (which that might be, but I'm not sure off-hand. I think the reliable ones that work well, have more complexity to them).I think there have been threads about it here, which could be a good source of better circuits and/or, later in that video you mentioned.

author: clevis
author_rank: Newbie
timestamp: September 16, 2018, 01:43:56 pm
content: MK14,Thanks for the replies - yes maybe I need to try other circuits. This seemed such an easy one - it works in theory but in reality it is not robust.Regards.

author: MK14
author_rank: Super Contributor
timestamp: September 16, 2018, 01:46:26 pm
content: Quote from: clevis on September 16, 2018, 01:43:56 pmI agree.You might get some joy, by putting one or two tiny capacitors (and maybe a lot more than, that), in the right place. But it is a lot of messing about and hard work.Finding a good/quality circuit, to begin with is best. It saves a lot of hassle, sweet and tears.

author: rstofer
author_rank: Super Contributor
timestamp: September 16, 2018, 02:28:22 pm
content: You can try a small capacitor across the STOP button. At t=0 this capacitor will look like a short circuit, an OFF pulse. Maybe 0.1 ufd?

author: clevis
author_rank: Newbie
timestamp: September 16, 2018, 05:42:21 pm
content: RStofer,Thanks for the suggestion, I tried several capacitors of different values across the stop button, on the breadboard - they produced a pause before the LED lit (I am using an LED to check the output), but it still came on without pressing on button.Cheers.

author: Beamin
author_rank: Super Contributor
timestamp: September 16, 2018, 06:00:47 pm
content: I found with LTspice that if a circuit works using tiny differences in tolerance the simulator will not work or literally crash. I modeled a multi vibrator in it and it froze. The multivibrator gets stared by one side having a tiny bit of voltage potential over the other. Makes sense because when you turn on two identical circuits where only one can be on how do you know which one goes first?Are there other circuits where LTSpice can't model? If so how do you over come this, build a small "virtual" circuit or misalign the values to make it work.Seems like a good way to get the borg to destroy it self. Did you know the borg runs on Linux and has a root?

author: clevis
author_rank: Newbie
timestamp: September 16, 2018, 07:47:56 pm
content: All,I found an alternative circuit (attached) which is simple and works well both in LTSpice and on the breadboard. I just added a cap to ensure it always turns on in the same state, I will use just one of the outputs. Fingers crossed it works in my project.Thanks for all the suggestions.Cheers.

author: MK14
author_rank: Super Contributor
timestamp: September 16, 2018, 08:12:09 pm
content: Also known as a RS flip flop, ormonostable (one-shot)with that extra capacitor.Not quite a normal monostable. As you want it to still be bi-stable.Well done, I'm glad you got it sorted out.