Latch circuit single button switch on/off

Thread Starter

morfeus

Joined Nov 18, 2012
18
Hi,

I made a circuit based on this: https://electronoobs.com/eng_circuitos_tut60.php and everything works ok except that when the output is switched off, a simple touch with a finger to the contact marked as "2" of the S1 switch is enough to switch the circuit on. Also, if I put a long wire (10m) and then connect switch to the other end of the wire the circuit is switched off only when I hold the switch pressed but as soon as I release it, it switches back on. So my questions are:
1. why such behaviour?
2. how can I improve this circuit so a long wire can be inserted betweenthe contacts and switch?

Thanks!

Kind regards,
Gabrijel
 

LowQCab

Joined Nov 6, 2012
4,075
Is it a "requirement" that the Switch will work with only one Push-Button ?
2 Push-Buttons is easier to do, and probably less problematic, for a long-Wire-Run.
.
.
.
 

Irving

Joined Jan 30, 2016
3,895
That's because the circuit is badly designed. It has no immunity to noise. The base of transistors Q2 and Q3 only need a tiny bit of 'mains hum' or 'RF pickup' to switch them, and the output, on. A long wire only makes it worse. It's possible the original prototype had relatively low gain transistors so it was more reliable, and yours are better (there's a wide range for that device), which paradoxically makes things worse for you!
 

crutschow

Joined Mar 14, 2008
34,460
everything works
Sorry, but I don't see how that circuit can reliably work, since Q3 rapidly discharges C1 when the button is pressed and, contrary to what his description says, the voltage across C1 doesn't stay low when the output is ON (high).and the PB goes open.
Edit: Okay, I now see that current through R2 keeps the transistors on and the C1 voltage low when the output is ON.

Below is the Ltspice of a similar circuit that only requires one control transistor (it's an N-MOSFET since it has a higher switching gate volage and impedance to allow higher resistance values and better noise immunity).

1703186945483.png
 
Last edited:

Irving

Joined Jan 30, 2016
3,895
Oh it works alright...

1703187822341.png

Until you inject a little noise into the bases ...

1703188646325.png

A small capacitor, say 100nF or so, from the bases to ground might cure it, but the long wire may still prove problematic.

1703188867893.png
 

LowQCab

Joined Nov 6, 2012
4,075
This Circuit requires 3-Wires, and 2-Push-buttons, and is bullet-proof.
There are other designs,
but everything depends upon what exactly You are trying to accomplish with your project.
.
.
.
Push Button 1 .png.
 

crutschow

Joined Mar 14, 2008
34,460
Oh it works alright...
Well, it works in the sim but I don't know about alright. :rolleyes:
It depends upon both Q1 and Q2 being on with the two bases connected in parallel.
While that works with perfectly matched transistors in the simulation, in a real circuit the differences between two transistors could make that problematic.
Adding base resistors in series with both transistors (e.g. 10kΩ) would minimize that as a problem.
That should also increase the noise tolerance.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,055
I re-drew the circuit in a more conventional manner, and that did make its operation more clear. However, I didn't see any advantage over the more common 2-transistor version.

ak
 

Tonyr1084

Joined Sep 24, 2015
7,905
Why not a Flip Flop? Requires a debounced switch. If the output needs to be higher then either a BJT or a MOSFET. With Q and /Q (NOT Q) you can choose either. Or both.
 

Tonyr1084

Joined Sep 24, 2015
7,905
More complex.
Requires more parts and can only operate up to 15V with a CD4000 FF.
It's been ages since I drew a FF circuit and even longer since I've debounced a switch. But this is what I was thinking:
1 switch
3 resistors
1 cap
1 NPN BJT
1 chip (CD4013) or equivalent.

Doesn't need to be high speed so no 74HS series chips. And if I've debounced the switch properly (quite possibly wrong) it should result in a very high reliability circuit without the sensitivity to noise.
1703267105771.png
can only operate up to 15V with a CD4000 FF.
Did I miss something? Will have to look back through the thread to see what voltage the signal source is.
 

Tonyr1084

Joined Sep 24, 2015
7,905
crutschow I highly respect your expertise. But even your drawing showed a 13V source.
1703267560605.png1703267582749.png
And it looks like Irving's circuit operates on 6V. Aside from morfeus' first and only post I don't see any mention of operational voltages. All I see is merely a question.
 

Tonyr1084

Joined Sep 24, 2015
7,905
The FF normally requires a fast rise-time clock signal for proper operation (see spec sheet) so you need a debounce circuit that does that.
Debouncing switches is something I've rarely done. I'm sure I drew the debounce wrong. I just wanted to express another option to using a single switch to activate and deactivate a circuit.

One last thought I'm having - maybe morfeus isn't interested in getting an answer but rather stirring the pot.
 

crutschow

Joined Mar 14, 2008
34,460
But even your drawing showed a 13V source.
Yes, but that's purely an arbitrary value.
It could go up to the voltage ratings of the transistors.

But the FF circuit is a viable alternate, if that's what you prefer.

If you like an IC approach, here's a circuit using a CMOS inverter package:
(It operates on the same basic latch principle as the circuit in post #4).
It also inherently ignores switch bounce.

1703306567899.png
 
Last edited:
Top