4 Switch Alarm code

Thread Starter

meopin

Joined Sep 17, 2015
3
In the project I'm working on there are 4 switches that represent a pass-code to break the circuit when switched in the right order and thus disables the alarm. The problem is I can't seem to figure out how to wire the switches so that of all 16 possible combinations, only one breaks the circuit. The only way of doing it that I've thought of is that 3 switches stay on the entire time and the last one breaks the circuit when switched off. This will solve the problem yet it's very simple to decode it and I would like a more complicated code e.g. Switch 1: on Switch 2: off Switch 3: on Switch 4: off (1010)? Thanks.
 

joeyd999

Joined Jun 6, 2011
6,279
You want the circuit open if (A*B'*C*D'), which implies closed if (A*B'*C*D')'.

Does this help? (FYI, the circuit can be realized with 4 spdt switches.)
 

AnalogKid

Joined Aug 1, 2013
12,127
As noted above, you can do this using four SPDT switches in series with whatever disables the alarm. Very efficient, but difficult to reprogram to a different code. If you want something that is easier to change, you can add four more SPDT switches to the string such that four of them are public and four of them are hidden. For a more techy, solid state solution you can use a magnitude comparator IC. More soldering and assembly, but possibly more useful.

ak
 

AnalogKid

Joined Aug 1, 2013
12,127
Then, according to your requirements, you did it wrong.
No. he didn't. The "only way of doing it that (he) thought of" isn't the only way that will work. Even though we don't know the alarm disable mechanism, circuit requirements, or logic polarity, either series or parallel wiring plans still will work.

ak
 

joeyd999

Joined Jun 6, 2011
6,279
No. he didn't. The "only way of doing it that (he) thought of" isn't the only way that will work. Even though we don't know the alarm disable mechanism, circuit requirements, or logic polarity, either series or parallel wiring plans still will work.
...The problem is I can't seem to figure out how to wire the switches so that of all 16 possible combinations, only one breaks the circuit....
I stand by my assertion.
 
Top