Latch circuit single button switch on/off

MisterBill2

Joined Jan 23, 2018
27,714
If the goal is simply reliable alternate action switching, with zero standby power and no complex circuits, a simple alternate action push-button switch is an alternative, very old school option. None of the "cool" factor, but good for about 50,000 operations before it would be unreliable.
 

JohnSan

Joined Sep 15, 2018
127
Because that is not the question that was asked.

ak
Yes it was.

One of the questions asked was 'How could it be improved'.

Additionally, if the load is a problem, the switch could contol an appropriately rated relay.

IMO. The original circuit is nothing more than a bunch of components looking for something to do.....
 

AnalogKid

Joined Aug 1, 2013
12,174
One of the questions asked was 'How could it be improved'.
Your are correct, the question was about improving the circuit, not replacing it.

The answer is to de-sensitize both the Q1 gate circuit and the Q2 base circuit. Decreasing both R1 and R2 will make the circuit much less susceptible to both radiated and conducted noise. I would start by decreasing both resistors to 10 K. Neither the source circuit page not the TS state the operating voltage, so increased power dissipation might be a minor issue.

Also, the R3-C1 time constant is 6.8 seconds. That seems way too long to track multiple button pushes.

ak
 
Last edited:

Thread Starter

morfeus

Joined Nov 18, 2012
18
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).

View attachment 310514
Hi,

I was folowing all answers and tested with this circuit with following changes:
R2=2MOhm, C1=47nF, M3=IRF4905, C2=22nF, C3=22nF, R3=22kOhm.
On my test circuit, I just left a wire from G2.
- When I touch it with my finger nothing happens. That's ok.
- When I touch R2-C1 connection, Output switches ON. That's OK.

- If I again touch R2-C2 connection while the circuit is on, the circuit stay ON.
- If I touch GND then the circuit switches OFF.
Measuring R2-C2 connection with an oscilloscope, the point is at 5.2V when circuit is OFF and 1.2V when ON. If I touch the R2-C2 connection with the wire while the circuit is ON, the point goes to +12V.
Perhaps the change in values make the circuit in practice work differently than on simulation?
 

Thread Starter

morfeus

Joined Nov 18, 2012
18
Just to add a few more words of what I am trying to do. The circuit is supposed to run on 12V and be able to power on and off a relay with a single pole switch (momentary contact switch). I would make a PCB (to have multiple channels) and put it into electrical cabinet in my house for lights switching on and off. So wires from the cabinet would go all the way to the switches in every room. That's why I connected like 10m of wire from momentary contact switch to the circuit (because it's the longest one in the house).
 
Last edited:

Thread Starter

morfeus

Joined Nov 18, 2012
18
Is that the circuit I posted?

I don't understand why you think touching the wires is a valid test for the circuit(?).
That's not feasible to simulate.
Yes, I built the circuit you posted. With the values slightly changed (because I don't have the exact C and R you have put on the schematic).

I also wired a momentary switch. The result is the same: on switch press, the circuit switches output ON and then I can't switch it OFF.
 

LowQCab

Joined Nov 6, 2012
5,101
You are working towards creating a huge, indoor, "multi-band-Antenna".

Serious consideration will have to be given to Filtering-out RF-Noise,
and making the external Circuits very low-Impedance.

Cat-6 Cable would solve a lot of potential Noise problems,
in addition to that, it will provide multiple Conductors to choose from,
making the "2-Button-Circuit" that I provided earlier the better solution.
And, Cat-6-Cable is dirt-cheap and Fire-Rated.

My Circuit would be ideal for implementing an LED "Night-Light" as well,
since it's already baked into the design on purpose.

If I was going to all this trouble,
I would design this will 2-Buttons in each room.
The Top button, when held-down, would "fade" the Lights on,
and the Bottom Button would "fade" the Lights down.
.
.
.
 

AnalogKid

Joined Aug 1, 2013
12,174
Just to add a few more words of what I am trying to do.
Given that, I would consider the circuit in post #20. Without paralleling multiple gates, you get three switch circuits per IC. To the outputs I would add a ULN2004 as a 7-channel relay driver. Three IC packages gets you six independent control channels with very few external components. I get the appeal of doing it all discrete, but you will get better performance with ICs.

There are a lot of toggle flipflop circuit out there, including using actual toggle flipflops such as the CD4013. This approach would get you two control channels per IC. You still would need the relay driver part.

The key to reliable operation with long wires is keeping the input circuit impedance low. For example, scale the resistors such that the currrent through the switch is 5 or 10 mA, instead of the normal CMOS microamps. This is way more difficult for external influences to overpower. The good news is that this does not affect the circuit's power dissipation because there is current through the wires only when the button is pressed.

At this point, we need to know the relay coil characteristics - voltage, current, power ?

ak
 

Tonyr1084

Joined Sep 24, 2015
9,744
The very first MOSFET I got my hands on I played with it. Took a small motor and an appropriate battery and ran the motor through the FET. When I touched the gate the motor speed increased. But when I touched something grounded and touched the gate the motor slowed. I added a length of wire to it - maybe 3 to 4 inches. When my hand got close to the wire the motor speed increased. When holding ground and putting my hand near the wire the speed decreased. The longer I held these positions the more the speed increased or decreased. Touching a circuit can introduce noise. Since you have an 0-scope just touch the probe tip and see what you get for a wave form. What you're seeing is noise from any of the myriads of electronics in your home changing an otherwise straight line into a sine wave. That's noise. Unless you can quantify it testing by means of touch is not an effective method of testing and diagnostics. My Tom Foolery with that FET was just that - fooling around. And learning something. Electronics can be affected by noise.
 

MisterBill2

Joined Jan 23, 2018
27,714
"testing by means of touch is not an effective method of testing and diagnostics. My Tom Foolery with that FET was just that - fooling around. And learning something. Electronics can be affected by noise."
That is the most profound statement that I have seen in a while!! Certainly a reality that we should all be aware of.
 

Irving

Joined Jan 30, 2016
5,170
Just to add a few more words of what I am trying to do. The circuit is supposed to run on 12V and be able to power on and off a relay with a single pole switch (momentary contact switch). I would make a PCB (to have multiple channels) and put it into electrical cabinet in my house for lights switching on and off. So wires from the cabinet would go all the way to the switches in every room. That's why I connected like 10m of wire from momentary contact switch to the circuit (because it's the longest one in the house).
That's going to be an incredibly unreliable solution... is there a reason for centralising the switching? You can buy a small module on Amazon or eBay that does touch on/touch off at the wall switch for under $5 - you'll spend more than that on wire alone..
 

Thread Starter

morfeus

Joined Nov 18, 2012
18
I am using HF41F/12-HT relay in DIN mount housing (with protection and indication circuit inbuilt).
The reason for centralising everything is for future possibility to "upgrade" the system with a microcontroller that can be connected to LAN so the lights can be switched using a mobile app or simmilar.

Just to answer to #35 regarding change of values. I don't have "at hand" 200kOhm and 470nF so I changed values to have the same RC constant of that part of circuit. I'll try with proposed values as on schematicbut in a couple of days when the components arrive.

For all the comments like "hey, electronics can be affected by noise", "touching a wire is not a method of testing", "....I was fooling arround by touching mosfet gate...." I really don't see how this helps in this topic. We all know that noise affects electronics and touching a wire, in my case, was a way to test the circuit while I was able to "see" where the problem is. And we all at some point "fooled arround" for example, by shorting a fully charged capacitor....
 
Top