Building A Combination Lock With Logic Chips

The component gods must have smiled on [Darrell], because he recently ran into a cabinet full of 7400-series logic chips for sale at his local college surplus. All the regulars were there – flip-flops, logic gates, and SRAMs – in DIP packages. the 7400-series of logic chips gets very esoteric as the numbers increased, so when [Darrell] found a 74ALS679 address comparator, he didn’t quite realize what he had. After a quick review of the relevant datasheet he had a fairly good idea of the actual function of this chip and decided to make a combination lock.

From the datasheet, [Darrell] figured out how this small logic chip can compare two 12-bit addresses with only 20 pins: each of the 12 address pins are hardwired to match a single four-bit value. If the four-bit ‘key’ is set to 0110, the first six address pins are tied low, and pins 7-12 are tied high. After wiring up his address comparator to a trio of Hex dip switches, [Darrell] had a combination lock that used the word ‘FAB’ as a key.

In the 7400-series of logic chips, there are some oddballs; the 7447 seven-segment display driver is useful, but the 74881 ALU and 74361 bubble memory timing generator aren’t exactly something you would find in a random component stash. If you’ve got a weird logic chip build (there’s a 300-baud modem, you know), send it on in. You can check out an animated gif of [Darrell]’s lock after the break.

10 thoughts on “Building A Combination Lock With Logic Chips

  1. Welcome to Logic Electronics 102. Most of us that acutally learned electronics did this exact thing in a lab.

    Cool to see him not being lame and using an arduino.
    1337 Hax0r5 use logic chips.

    1. well the problem is, with logic chips someone could easily go through all 4096 combinations in under a minute. With a micro-controller the device is extensible, thus one could put in a small delay, failure attempt lockout, auditing, time and date restrictions, one way access, multiple key access and so on.

      This chip has it’s uses, certainly. It would be amazing to throw it on another project and have it execute functions when just the right combination of keys go down the line.

      e.g. add it to your ‘1337 Hax0r’ box via keyboard input to look for an exceptionally odd combination. When triggered throwing power over an ingition, say, coarse magnesium powder which in,turn would be hot enough to start some thermite that is poised over your hard drive. You eebil hacker you.

  2. There’s much simpler ways of making a practical lock, and many better ones, that’s not the point of the H-A-C-K!

    You gave an awful, and wrong, description of how the address decoder works. Basically, if we imagine our desired address, it contains so many 0s, and so many 1s. You tell the chip how many 1s you’re looking for. Obviously the rest are 0s.

    When all the “1” pins have 1, and all the “0” pins have 0, then it activates. So the configuring only involved telling it how many 1s to look for, then connecting them accordingly. So it’s not connected to an address bus with the pins in the right order. Just as long as the 1s and 0s of your desired address are connected to the 1 and 0-expecting inputs, it works.

    This means it needs a PCB re-do if you wanted to change the address it recognises, but this chip isn’t designed for ever doing that.

  3. I like the commercial locks based on a 4017, a few resistors, 4-6 rows of 10×2 pin headers and a panel of 10 individual (not raster coupled) buttons.

    The idea is that pressing the right button will activate the clock pin, and pushing the wrong button will activate the reset pin. The outputs will power the next level of inputs.

    Kind of hard to explain in words but these things are all over.

Leave a Reply to SvenCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.