Secret Code Book Puzzle

by technologyguy in Circuits > Gadgets

11258 Views, 168 Favorites, 0 Comments

Secret Code Book Puzzle

Finished.jpg

I had the idea to build a locking box which responds to a binary code, which the user inputs by flicking the correct combination of switches. I designed it to respond to only 2 codes. Even so, there are more than 4000 combinations that can be made with the 12 switches, so it is more challenging to solve than it looks.

The only controls visible are the 12 switches and two LED,s. One LED lit shows that the power is on. The box won't respond without power. Two LED's lit means the code has been solved - the lid is unlocked and can be lifted exposing what has been concealed inside. None of the switches or LED's are labelled, adding to the mystery.

This can be built in any box that has a hinged lid but I decided it would look more enticing if I used a box that looks like a vintage book. These are easy to find in decorating stores at a reasonable price.

Materials

Components.jpg
Book.jpg
Book Open.jpg

I hate to buy anything, so I used what was in my parts bin. Beside the Book Box, you will need:

4 DPDT switches (Double pole double throw)

8 SPDT switches (Single pole double throw)

1 solenoid (Basically an electromagnet that pulls a plunger when activated)

A power source (I used 2- 9 volt batteries and battery clips for connection)*

2 Panel mounted LED's

2 resistors (Mine were each 7500 Ω (Ohms)*

Some scrap aluminum, solder, wire, and small bolts and nuts as well.

* LED's usually use 3 volts and draw about 2 milliamps. If you use a power source larger than 3 volts you will have to protect the LED's with an appropriate resistor. If you can find a solenoid that uses 3 volts, you can eliminate the resistors altogether. If not, use this formula: Supply voltage- LED voltage/ current=Ω

Since my solenoid uses 18 volts I had to calculate the resistance, so 18- 3/.002=7500 Ω

If you are purchasing everything anyway, buy a 3 volt solenoid, 2 AA batteries and a double AA battery holder and eliminate the resistors.

Prepare the Box and Latching Mechanism

Book Drilled.jpg
Latch.JPG
Latch: Solenoid.JPG
Latch installed.JPG
Solenoid installed.jpg

After careful measurement, drill the box top with the proper size holes for the switches and LED's.

From a piece of aluminum, make a latch. Bend at a 90 degree angle, drill the short end the same size as one of the switch holes. Drill the long end slightly larger than the solenoid's plunger. Test fit to make sure it meshes.

Install the latch using the most central switch closest to the end that opens, to hold it in place.

Install the solenoid on the bottom of the box so it meshes with the latch. I used a plastic pipe clamp to hold mine in place and drilled holes, using small bolts and nuts to hold it in place. I also connected the solenoid's leads to the bolts. I found I had to shim the solenoid with cardboard to get it to mesh with the latch. I also had to slide it back and forth to get the locking action just right.

NOTE: If the box locks and you can't get it open, just apply your supply voltage to the two bolt heads on the bottom of the box. If it still doesn't open, just keep removing the switch to release the latch until you get it right. Have patience, this will take a while.

Install the Switches. Wire It UP.

switches installed.jpg
wiring.jpg
schematic.jpg

This is the fun part. I have provided a schematic to guide the wiring. Make sure to solder all connections.

Once it is wired, you will see how to solve the code since you have the box open. I would make a note of the codes as you will forget.

Remember, if the battery dies or you do forget the codes, you can always apply voltage to the two bolt heads holding the solenoid. This will open the box.

Just leave the book lying on a table in a conspicuous place. I like to conceal a prize, like a Cadbury egg inside as a reward. People can't resist playing with it to retrieve the prize but few will solve the code(s).