4 Switch Alarm code

Discussion in 'The Projects Forum' started by meopin, Sep 17, 2015.

  1. meopin

    Thread Starter New Member

    Sep 17, 2015
    3
    1
    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.
     
  2. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,995
    745
    Lets start with a diagram of the circuit that you have in mind...
     
  3. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,686
    2,748
    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.)
     
    meopin likes this.
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,801
    1,105
    You could use SPDT switches wired in parallel to an alarm-enabling circuit, or else series-wired to a disabling circuit.
     
    meopin likes this.
  5. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,686
    2,748
    Yes, that is *exactly* what I said.
     
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,801
    1,105
    I'm a slow typist. You beat me to it :).
     
  7. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
    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
     
    meopin likes this.
  8. meopin

    Thread Starter New Member

    Sep 17, 2015
    3
    1
    Thanks for the answers I ended up using the SPDT switches in series.
     
  9. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,686
    2,748
    Then, according to your requirements, you did it wrong.
     
  10. meopin

    Thread Starter New Member

    Sep 17, 2015
    3
    1
    Sorry, I meant SPDT in parallel.
     
    joeyd999 likes this.
  11. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
    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
     
  12. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,686
    2,748
    I stand by my assertion.
     
Loading...