How To: Forget Keys—Use a Secret Knock to Open Your Locked Boxes

Forget Keys—Use a Secret Knock to Open Your Locked Boxes

There is something special about a secret knock. It gets you into secret super villain meetings and is a surefire way to test for rotating bookcase passages. Secret knocks usually work with an intimidating drug lord and for policeman listening at the door for the correct pattern of raps.

If you want the novelty of a secret knock, but want to forgo all of the mystery and proximity to organized crime, you can make a simple Arduino knock sensor for your home, cigar box, or safe.

Materials

  • Arduino
  • Piezo buzzer
  • 1 megohm resistor
  • Servo
  • Box or door to lock

Step 1: Circuit

Our circuit consists of just an Arduino, a servo, and a piezo buzzer. If you just want the fun of knocking and receiving a response, you could write an Arduino program that uses the buzzer as both a sensor and an audio output.

Note that the 1M resistor attaches across the leads of the piezo element.

Step 2: Test

Upload this code to the Arduino and try tapping on the piezo element with your hand. You should see a response in the serial monitor. Every time you hit the piezo hard enough, the word "knock" appears in the terminal.

NOTE: I did not have a 1 megohm resistor on hand, but was able to use this modified code to get the knock sensor working.

Step 3: Install

I used a cigar box as my knock activated safe.

Image via wonderhowto.com

The lock mechanism is just a servo motor that holds the lid down when activated. Smaller servos work better for this as they take up less volume inside the box.

Image via wonderhowto.com

Cut a groove into the lid of the box as shown below. Make sure it is tall enough and wide enough to allow the servo horn to move freely.

Image via wonderhowto.com

You can use wood screws to fasten your servo to the box, but I just used hot glue.

Image via wonderhowto.com

To make sure the piezo element picks up the knock vibrations, we need to hot glue it to the inside lid. I don't know which orientation maximizes the vibration inside the element, but the positioning shown below worked fine for me.

Image via wonderhowto.com

Put your Arduino and battery inside the box and make sure all the wires are still connected. Bring the lid down and knock the box once. The servo should move away from the latch allowing you to close the lid, and then return to the closed position, locking the box closed.

Step 4: Horde

Now that you have a secret box, you need stuff to hide! Try picking up a jewelry thieving habit or type up those memoirs of your time at the CIA. Whatever you need to hide, this design can easily be modified for differently sized boxes, doors, and compartments.

What would you hide in knock box? Let us know in the comments below or post your ideas and questions in the Mad Science forum! We love to hear from you. Try making your very own knock box today!

6 Comments

This is brilliant. You're a mad genius sir.

Hii..
I've a question.
How to change the knock code ?

This box opens with just one knock. Check out this door lock project for clues on code. http://blog.makezine.com/2009/11/02/secret-knock-detector/

I want to make knock detect with face detection can u help me?!

Share Your Thoughts

  • Hot
  • Latest