Instructables
Picture of Secret Knock Detecting Door Lock
knock_lock_side_view.jpg
knock_sensor_bb.jpg
Protect your secret hideout from intruders with a lock that will only open when it hears the secret knock.

This started out as a bit of a joke project, but turned out to be surprisingly accurate at judging knocks. If the precision is turned all the way up it can even detect people apart, even if they give the same knock! (Though this does trigger a lot of false negatives, which is no fun if you're in a hurry.)

It's also programmable. Press the programming button and knock a new knock and it will now only open with your new knock. By default the knock is "Shave and a Haircut" but you can program it with anything, up to 20 knocks long. Use your favorite song, Morse code, whatever.

Maybe a video will explain it better:


Important Notes:
(I hate to even have to say this, but since someone's going to say it, I'll say it first:)
1) This is for entertainment purposes only. Really. This decreases the security of your door by adding another way to unlock it, and it makes your unlock code known to anyone who can hear. If you put this on your door, be sure to carry your key too. The batteries might die, the suction cups might fail or you might forget your knock. Don't complain to me if someone imitates your knock and steals all your stuff, you've been warned.

For obvious improvements to safety, security and whatever, see the final page of the Instructable.


2) This is not a project for a beginner! Read through it carefully and be sure you understand it before you start! I will not take time to answer questions that are already in the instructions or from people who have gotten in over their head.

(If you think this project is too complex you might go here and sign up for the kit mailing list. The kits will be much more simple than this.)

Sorry about that. Now that that's out of the way, lets get to work.
 
Remove these adsRemove these ads by Signing Up
« Previous41-80 of 294Next »
reyscreamz4 months ago

what type of door lock should i use?

please specify :D

thank you so much

reyscreamz4 months ago

what type of door lock should i use?

please specify :D

thank you so much

reyscreamz4 months ago

what type of door lock should i use?

please specify :D

thank you so much

reyscreamz4 months ago

what type of door lock should i use?

please specify :D

thank you so much

reyscreamz4 months ago

what type of door lock should i use?

please specify :D

thank you so much

igorandrade5 months ago
ndiaz95 months ago

im just wondering. why do you need to put the knock detector at the back of the door and not in the front door? thanks for your reply, if ever :)

longandy made it!5 months ago

Here's my build - thanks for an awesome instructable!

changes - replaced motor with relay to trigger an external motorized door opener

inverted some of the green LED states so it is normally off but flashes on when knocking

knock.jpeg
sarci7 months ago

we have a filipino who made this project? just txt me this is my # 09169033782 and help me how to do this project! please! tnx...

ell092792 sarci6 months ago

docu please :)

Roberto11t12t6 months ago

What size does the SPST momentary pushbutton have to be?

maski17 months ago

does it have to be gear motor or can i use solenoid lock instead?

palominom9 months ago

I'm a guy from Spain and I am doing this proyect for a competicion but I have a problem with the gear motor. All is good except the gear motor it isn't move i don't know why?

Please help me, THANK.

I-robostein10 months ago

AWESOME!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Danny14111 months ago
Please help I need this for a school project please...
Danny14111 months ago
Hi guys! Please what changes do I add to the code if I want to replace the knock sensor with a capacitive touch sensor
mbessam11 months ago

i have all things goin great but my motor is not spining

billbillt12 months ago

very cool

Matienzo1 year ago
Hi there, I hope there is someone hanging out in this project.
I got a problem with my motor.
I made it work in the breadboard but when i solder that circuit it doesn't work. I'm getting the knock and the button running but the motor does not react when the lock is opened. I checked the circuit for about 3 hours and it looks exactly as the one here (not the breadboard, the other one)
Any one made it like that?
jkctech1 year ago
idk why but my programming button isnt working, is this because im using an arduino uno or did i mess it up? everything works but the programming button.
KGuy jkctech1 year ago
Check the polarity of your rectifier diode.....and if that doesn't work continuously check the circuit diagram for any mistakes on your breadboard
KGuy1 year ago
Whew! After a few weeks, I have successfully completed the (perfectly running) circuit. I did have to make a few modifications to the code to increase the sensitivity of my piezo (thanks to your helpful hints) but hope to find a way to increase it even more. I plan to finish this project (the hardware) in the next few weeks.....
I find your projects amazing, good sir.

And for all those who can't seem to get their motor running.....
MAKE SURE YOU KNOW THE VOLTAGE....my first few motors were over the standard voltage of 5v. If your motor uses around 6 or 7 volts, I recommend using the vin pin, which gives you a little extra power (keep it safe though). If your motor doesn't work no matter what, get a lower voltage motor :)
sleepyone1 year ago
Hi there, I am currently working on this project and manage to get everything run smoothly. However instead of using a buzzer to detect knocks, I use two digital arduino pins to create a touch sensor as well as replacing the gear motor with a servo. Now, for added security, I would like to prompt the user to key in the original touch rhythm before they are allowed to key in the new touch rhythm they desire when the button is press. I am not very good in programming, I was wondering if you would be able to assist me in this perhaps? hope to hear from you soon. thanks in advance.
jkctech1 year ago
How to program the knock?
nahtanoj1 year ago
Can someone please tell me were you can get the 5v gear motor ad the perfboard?what if
okay1231 year ago
hello Steve
I decided to recreate this project for a school project I have coming up this month. I saw this video a couple of years ago and recently bumped into it again. I really want to build it. I have done all of the construction used for this project but I need a little help with the code. I used a servo instead of a gear motor and there for the code does not work. I do not know how to code a Arduino at all!!!!!! Could you please give me a code that will work for an Arduino?? it would really help me a lot. in one of the other vids there was a guy who could unlock his door and then press a button and it would lock again. If you have time could you please make the code enable that feature too. I really need your help.......
okay1231 year ago
Any ideas how I can attach a servo instead of a motor.
Jawknee51 year ago
I don't know if anyone who has successfully completed this actually checks the comments, but im in the process of doing this- but i added an H-bridge to do two seperate knocks, one to lock and one to unlock... The circuit is correct, by switching the wire motor output from one pin to the other on my Hbridge IC, i can get the motor to move in two different directions, but apparently I'm not the best with programming...but i know a quite a bit.

Im just not sure on where i would add programming, just a simple knock of three, that would make a digital pin(7 in my case) HIGH and enable my motor through the Hbridge...... any help would be great!
Hi. Im interested in making your project but the only motor I have with me right now is a 12V stepped motor. The one with 5 wire-cables ( red-ground, orange, pink, blue, yellow ). I was wondering is it different compared to the gear reduction motor u used for this project? I assume the arduino codes will need some changes? Hope to hear from you soon! :)
cstawell1 year ago
brilliant, I think my little girl would find this a brilliant toy, XD
Andsetinn1 year ago
Very interesting idea and well executed. I've been thinking of putting similar system on the doorbell in my apartment building so that ringing the bell in a certain pattern would open the downstairs door.
There are security issues that stop me. :(
whitkari41 year ago
My senior project team just got our device to work with a servo. Yay we plan on adding wifi so that we can figure out how to lock and unlock remotely via a website and mobile application. Once we get everything we plan on posting our code etc for others.
snibbalol1 year ago
My red Light is all ways on so that`is not a good thing right? and another trouble i am having is eaven tho reject value and average reject both are above 80 and my knock is just simple 4 knocks 100, 100, 100, 100, 0, 0, 0,.... etc my device wont regonize the knock as right one and wont do anything to motor what so ever could someone please assists me with this issue since i would need to complete this work by the end of this week / begin of the next week. thank u so much beforehand. :)
dmarinho1 year ago
hey, newbie here, can someone upload the code to the lock and unlock system? also the gear motor, does it hold the key or you got to put the device literally inside the door?(sorry for bad english =\ )
enagel31 year ago
that got my attention

masonson2 years ago
cool next project
hanyc932 years ago
Does anyone know what is the use of the diode? I know it allows current to flow in one direction only but when I remove the diode, the motor still can turn properly.
Grathio (author)  hanyc932 years ago
It's called a Flyback Diode and you really want to keep it in there. Electric motors generate spikes of current when they're stopped and the diode is to protect that current from feeding back into the rest of the circuit, destroying the Arduino or whatever other circuitry you have attached. It's the 3¢ part that will save you $300.  Read the link above for much more information.
mrmerino2 years ago
Oh my god, I just realized that putting this in my hypothetical future kid's treehouse would make me the coolest dad ever.
n79c2 years ago
I am having a problem with button - it adds a knock when I release the button - any suggestions? Everything else works.
« Previous41-80 of 294Next »