# Secret Code Book Puzzle

9,339

148

33

## Introduction: Secret Code Book Puzzle

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.

## Step 1: Materials

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.

## Step 2: Prepare the Box and Latching Mechanism

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.

## Step 3: Install the Switches. Wire It UP.

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).

Participated in the
STEM Contest

## Recommendations

56 4.2K
1 110 9.8K
140 21K
28 10K

• ### Cardboard Speed Challenge

The project looks like very fun, but I had a bad thought about the batteries. What if they lose their charge as they get older?. How could you open the box?

If you read the write up, you will see that you can apply the appropriate voltage to the two bolt heads that hold the solenoid in place. That will open the box. I designed that work-around as I had the same thought.

Perfect. I didn't read that part. Sorry.

Were can I get the box from r plans fr

I hope you have possible external power connection. Another way when the batteries go out, you never open this😭

Sorry, I do not read everything, two bolts, OK.

No problem. You could also just remove the switch holding the latch in place. That would allow access to the box as well.

Check the write up again. The solenoid terminals are connected to the bolts which hold it in place. These are accessible on the bottom. Just apply the voltage to them and the box opens. In a worse case scenario, you could always remove the switch holding the latch as well. These are the work-arounds I designed into it.

I got mine at a decorating store. Marshall's or HomeSense (Canada). Any box with a hinged lid will work though. Try a Dollar Store or Craft store. If you are a woodworker you could easily make one. Just make sure it is non conducting. (Not made of metal.)

Hi, I checked the parameters and it will work. You will only need 3 volts so I would buy a battery holder for 2 AA batteries and use those for your power. You will then be able to eliminate both resistors, just connect the LED's directly. Good luck and don't forget to post a picture of the finished product.

Hi, technologyguy. I've order all the parts I need. If I can't find a box that I like, I may "carve out" a thick book to use as the box. Also, rather than solder all the wires to the switches, I going to be using mini-plugs on all the wires. This will allow me to reconfigure the A and B codes.

For example, I could make a B code that uses only the first 4 switches at the top and tell the solver this fact. This would be good for kids to be able to solve it.

I will definitely post a photo of the end result.

Thanks again for the great idea!

Good to know. I picked up my book box at Marshall's. You would be better to use a box with a hinged lid than carving out a book. You will complicate the locking mechanism if the box doesn't have a positive open and close. Good idea to be able to change the codes. Looking forward to seeing the result. Please remember the LED's have to be installed with correct polarity or they will not light. Some LED's have a short and long connector. The short one is negative. Enjoy the build.

The ten switch do have 4096 combinations… but 64 of them will open the box. That means that your chances of guessing the correct combination is 64/4096 ==> 1/512: One in five hundred and twelve.

Thanks, Geowar. Math is not my strong suit.

With so many combinations it may take a long time before anyone gets inside the box. Maybe a prize without an expiry date would be better. A small collectable such as an old coin, special rock, seashell or gemstone, or even another small puzzle to solve.

Don't worry. Anything edible would never last, as I would be opening the box myself to get at it. I will actually be giving the box to my pre-teen grandson with a money gift inside. He will have to work to get it.

That is a great idea.

I can't imagine a 9 year old (or 90 year old) in the world that would not want to own that box!!

This is an amazing project. If you are looking for suggestions, I would have placed the switches in the centers or bottom left corners of the illustrated boxes and ovals along the outer edge of the lid (with the remaining switches randomly on islands in the map), and the LED lights in the center of the circular inset and on one of the large countries of the map. No particular reason for this, except that people would then wonder if the images on the artwork were part of the puzzle.