Sequential Manual Switches with Logic Gates

Thread Starter

dmarciano84

Joined Oct 1, 2023
36
I am currently working on a project (Tesla Coil) and I built a very simple controller which connects to the neon sign transformer (NST). First there is a main switch which connects to the 120V mains and then a second "activate" switch which provides power to the NST. This is the current design which is working fine:
1696195895541.png

However, I want to improve upon this for two reason:
1. I eventually want to integrate a PIC microcontroller which can record the run time (in V2)
2. With the current design, if the first switch is already closed, then if the second switch is closed, power will immediately flow to the circuit.

With my V1 design I am trying to resolve that second concern. I am trying to design a circuit which:

1. If Switch 2 is closed and Switch 1 is switched from open to closed, no power will flow though the second lamp/to the NST outputs
2. If Switch 2 is open and Switch 1 is switch from open to closed, and then Switch 2 is closed, power will flow as it would in the above circuit

Basically the requirements to get output power should be:
1. Both switch must start Open
2. Switch 1 must be closed first
3. Switch 2 must be closed AFTER Switch 1 is closed.
4. If Switch 1 is closed, and then opened, closing Switch 2 does nothing (i.e., no output power)

My thought is that I will need some kind of latch to save the states of the switches and combine the logic to figure out the order the switches were opened/closed; although I admit I am not 100% sure that this would even be possible, but I assume there is some way. I attempted to model something in Multisim using Triacs and latches but couldn't get it working. I am kind of stuck here:

1696196260554.png

I been searching Google but haven't found anything about this without using a microcontroller. The only reason I was currently avoid this at the moment, is because I would probably need to upgrade the one I am currently using because most of the ports will probably be used for additional buttons, LCD screen, etc. so if I can do this with basic components/logic gates, it is preferable.

Any suggestions/links to similar circuits would be greatly appreciates. TIA.

NOTES:
1. The lamps I am using are LED indicator lamps designed to run directly on AC power without any resistors/caps
2. NST input current is 6A
 

vu2nan

Joined Sep 11, 2014
357
A 120 V ~ electromagnetic relay 'K1' and an SPDT switch 'S2' are required.

Here's the schematic.

1.png

Switching on 'S1', with 'S2' off, energises and latches the relay 'K1'. At this point, switching on 'S2' energises the neon sign transformer.

Nothing happens should 'S2' be switched on first and then 'S1'. At this point 'S2' is required to be switched off and on again to energise the neon sign transformer.
 
Last edited:

crutschow

Joined Mar 14, 2008
38,314
Basically the requirements to get output power should be:
1. Both switch must start Open
2. Switch 1 must be closed first
3. Switch 2 must be closed AFTER Switch 1 is closed.
4. If Switch 1 is closed, and then opened, closing Switch 2 does nothing (i.e., no output power)
What about when Switch 1 is closed and Switch 2 is closed, opened, and then closed again?
 

Thread Starter

dmarciano84

Joined Oct 1, 2023
36
What about when Switch 1 is closed and Switch 2 is closed, opened, and then closed again?
If SW2 is closed and then SW1 is closed, there should be no power coming out of SW2, even if SW2 is opened and then closed again. My goal is for power to be available both switches must start in the open position and then SW1 is closed, then SW2 is closed. If SW2 is close, but SW1 is open, SW2 and SW1 must both be opened and then SW1 is closed, followed by SW2.
 

crutschow

Joined Mar 14, 2008
38,314
Here's the sim of a logic circuit, that I think does what you want:
It uses one dual D flip-flop IC and one quad, 2-input NAND gate IC to generate that interesting sequential logic.
I tried several variations of the circuit before getting one that met all the criteria.

The inputs are the switch outputs SW1 (red trace) and SW2 (yellow trace).
Note that the output SW2_Out (green trace) only goes high once when SW1 is high before SW2 goes high, even if SW2 goes low and high more than once.
So SW2_Out will not go high for a second SW2 going high even if SW1 was initially low or remained high.

SW2_Out then goes low when either SW1 or SW2 goes low.

What will be the nature of the S1 and S2 signals?
If from a mechanical switch, some form of a simple debounce circuit must be added to SW2.

1696438313144.png
 
Last edited:

vu2nan

Joined Sep 11, 2014
357
Here's a circuit that should satisfy your requirement.

It's a low voltage control circuit that utilises two electromagnetic relays and three momentary push button switches.

1.png

The 'NO' contacts of relays K1 & K2 are to be used, instead of the toggle switch contacts, in the 120 V ~ circuit.

Relay K1 is latched by actuating push button switch S1.

With K1 energised, K2 is latched by actuating S2.

K1 & K2 get de-energised on actuating S0.

K1 & K2 also get de-energised when utility power fails and they are to be latched again through S1 & S2.

Nandu.
 
Last edited:

BobTPH

Joined Jun 5, 2013
11,463
If SW2 is closed and then SW1 is closed, there should be no power coming out of SW2, even if SW2 is opened and then closed again. My goal is for power to be available both switches must start in the open position and then SW1 is closed, then SW2 is closed. If SW2 is close, but SW1 is open, SW2 and SW1 must both be opened and then SW1 is closed, followed by SW2.
You cannot do that with logic alone because the same state (sw1 on, sw2 on) has two different results depending on what has happened in the past. When that is the case, you need a memory element in addition to the logic.
 
Top