Step 4: Prepare The Case

If you're making your own case you can skip this step. Otherwise grab your PVC and saw and lets get cracking.

We're just testing for fit here.  Don't glue or fasten anything yet!

#1: The Button mount
Take one of the PVC end caps and drill a hole through the center appropriate for your push button. For my button that was 3/8". Secure the button in the hole.

Plug this into one of the 4 radial holes in the 5-way connector.  (ie: not the one that points down.)

#2: The Motor mount
Take the other PVC end cap and drill a hole big enough for the shaft of your motor to pass through.  You might also need to make it even bigger if your motor has a bearing that sticks out.

Depending on the design of your motor you may want to sand down the thickness of the plug so that you have more of the motor shaft to work with.  Test the fit by placing the motor through the back of the plug.  If it's too tight you might have to sand/file/grind the inside of the plug so it will fit. 

Use a paper template to place the holes for the fastening screws, drill the holes and attach the motor to the plug. (In my case using the two 2M screws.)  Countersink the screws if possible.

Plug this into the "down" facing hole on the 5-way connector.

#3: The 'arms'
Cut one piece of PVC pipe 5 inches long.  We're going to call this the "long arm".  Put a right angle connector on one end.  Plug the other end into the 5-way connector opposite the button.

Cut two pieces of PVC pipe two inches long.  We'll call these the "short arms".  Half way along their length drill a 1/4" hole through one side.  Put right angle connectors on one end of each arm.  Plug these into the two remaining holes on the 5-way connector.  You should really start to see it take shape.

#3b: A Few Extra Holes

with a pencil or marker draw a line down the center of the top and the bottom of the long arm.  On the top side, make marks for two holes, one 3/4" from the 5-way, and another 1 1/2" from the 5-way.  Drill a 3/16 (5mm) hole at each of these places.  This is where our LEDs are going.

Also make a line along the bottom where the long arm connects to the 5-way.  Using a saw, cut a short way through the pipe, from the bottom up, until there is about a 1/2" hole into the pipe. (this is where the spring for our detector will attach.  Also on the bottom, drill a 1/8" hole 1/4" further along the pipe (Away from the 5-way).   We will thread the sensor's wires through here.

#4: The 'legs'
These are the parts that attach to the door.  You may not want to cut these yet,  The length depends on the design of your door lock, the length of the shaft on your motor and the final design of the Lock Turning Clamp in the next step.  All three of mine were 2 5/16" long, but you're better off cutting them long and trimming them down to size later

If they're too long the motor won't reach the lock to turn it.  If they're too short the suction cups won't reach the door.

When you do cut these, hot glue the suction cups in one end and stick the other ends in the right angle connectors on the ends of our legs.

<p>Cheers, I turned this into a geocache, and built it into a ammo can =)</p><p>https://www.youtube.com/watch?v=ufI1bx3c7rg</p>
I have made a prototype, still have to assemble it to my door. I used a self made relay module to power my motor. Thanks for the instructable...... it works like a dream.
<p>My version is installed in a fridge and using an electromagnetic lock - keep those office thieves away! </p><p>http://ink361.com/app/users/ig-240858804/jas_cal/photos/ig-870056726990911200_240858804</p>
<p>Guys - thank you for this tutorial! I used the code to program a secret sliding library door project and it works great. The secret knock is the part people like the best. People giggle when I show it to them. I owe you a beer!</p><p>http://www.instructables.com/id/Automatic-Secret-Library-Door/</p>
Fantastic work! I love how well the bookshelf hides your secret room. Never would have guessed it was a pocket door.<br><br>Thanks for sharing!
<p>Here we are! Finally done after months of procrastination! I added a buzzer and a third led (not in the picture). The code was changed very slightly but it works perfectly. A latch in the back hangs it on the door. I must thank you, however for the genius of this invention.</p>
<p>hi sir, how did you do this one. where do i put the new code for the led and the piezo.. please, needed for a presentation, our prof. did not give us enough time to master this. and it serves as our final exam.. thank you in advance..</p>
<p>Beautiful work! Thanks for sharing!</p>
<p>here is my little one in an iphone box<iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/HhrNM2kSQzk" width="500"></iframe><br></p>
I have modified the Arduino code to add the functionality of ''Users''. What it does is that it let you program a secretCode for four users. For example: If you push the button X times, after 4 seconds the green LED will blink X times and then you enter program mode (simply do your secret code). I also added the functionality to take a picture when your sequence is bad with LabVIEW and a WebCam camera. Then the picture is saved in my folder and pictures are incrementing with numbers.
Looks great, and really nice added features! I had done a version with his &amp; hers knocks, but this goes well beyond that!<br><br>Fantastic job!
I saw your project some time back and I thought it was great. I decided to take it and improve on it, the result was a system that locks and unlocks. Also if a person inputs an incorrect knock, the system will send a signal via bluetooth to a computer terminal to snap a picture and save it.<br> <br> <a href="http://www.youtube.com/watch?v=6k6XwyB8Hh0">http://www.youtube.com/watch?v=6k6XwyB8Hh0</a><br> <br> Check out the vid. Hope you like it.<br>
That really made my week! It looks fantastic and works great. And the bluetooth camera is a great idea of added security.
Hi Steve!<br /> As you know, I already started to do mine, with a few modifications. I uploaded a new video with a new option:<br /> <object height="344" width="425"> <param name="movie" value="http://www.youtube.com/v/d-HtuH90IMw&amp;hl=en_US&amp;fs=1&amp;hd=1" /> <param name="allowFullScreen" value="true" /> <param name="allowscriptaccess" value="always" /><embed allowfullscreen="true" allowscriptaccess="always" height="344" src="http://www.youtube.com/v/d-HtuH90IMw&amp;hl=en_US&amp;fs=1&amp;hd=1" type="application/x-shockwave-flash" width="425" /></object><br /> <br /> As soon as I finish my project I'll post the code online<br />
Did you finish yet?&nbsp; Can't wait to see the code.<br />
Fantastic work with the servo and the unlock option. &nbsp;(And an off&nbsp;switch!)<br /> <br /> It looks like your setup is really sensitive. &nbsp;Really nicely done! Your&nbsp;achievement&nbsp;patch is on the way!<br />
I have been playing around with this code for the past hour or so and found out how you can hard code in your own rhythm if need be.... at the part that looks like this<br /> // If we're recording a new knock, save the info and get out of here.<br /> &nbsp; if (digitalRead(programSwitch)==HIGH){<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=0;i&lt;maximumKnocks;i++){ // normalize the times<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; secretCode[i]= map(knockReadings[i],0, maxKnockInterval, 0, 100); <br /> <br /> add this little guy<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Serial.println(secretCode[i]);<br /> and open up your serial monitor....<br /> make sure you un-commented the serial begin up at the setup and then it should spit some numbers back at you... put these numbers into the array and enjoy.<br />
<object height="344" width="425"> <param name="movie" value="http://www.youtube.com/v/zBNTQkVUHvw&amp;hl=en_US&amp;fs=1&amp;" /> <param name="allowFullScreen" value="true" /> <param name="allowscriptaccess" value="always" /><embed allowfullscreen="true" allowscriptaccess="always" height="344" src="http://www.youtube.com/v/zBNTQkVUHvw&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" width="425" /></object>Whoot finally got my relays for my motor and heres a neat little Idea for your visual feedback....<br /> <br />
<object height="344" width="425"> <param name="movie" value="http://www.youtube.com/v/ZGCkVcrUNXM&amp;hl=en_US&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999" /> <param name="allowFullScreen" value="true" /> <param name="allowscriptaccess" value="always" /><embed allowfullscreen="true" allowscriptaccess="always" height="344" src="http://www.youtube.com/v/ZGCkVcrUNXM&amp;hl=en_US&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" width="425" /></object>&nbsp;
Oh, and for your&nbsp;awesome&nbsp;work you have been added as an&nbsp;official&nbsp;Master of Secret Knocks. &nbsp;Your patch is on its way!
&nbsp;This is awesome! &nbsp;Thanks for sharing your code and video. &nbsp;Having the door unlatch too makes it that much more mysterious. &nbsp;And I like the feedback through the peephole.<br /> <br /> Great work!<br /> <br /> And if I ever have any questions about taping something to something else I'll be asking you. :)<br />
<p>sir can you show me the image how all the wire been soldering.....i dont know how to solder which wire...can please show full image the board that you solder...thank you sir...</p>
<p>This project is awesome.i made it but i want to store the new password in EEPROM.Can you please tell me how to edit the code so that it stores the new password in EEPROM.</p><p>Thank you,</p><p>Aamir</p>
<p>Hi,</p><p>I really liked the idea and stuff. I want to make it for my class project. I need a kit as early as possible as I have to submit it by 11/30/2015. Can anybody tell me how can I get the kit quickly? </p><p>Thanks for your cordial help in advance.</p>
<p>I noticed that if I power cycle the arduino, it looses the knock pattern.</p><p>Is there a way to have it save the pattern so it doesn't get lost in case of a powercycle?</p>
<p>Can i do it on atmega 8?</p>
<p>Can it be made without the arduino? I plan on making it as a college project and I can just use an PIC18F45K20</p>
<p>Good one!</p><p>manoj</p><p>www.nrdcentre.com</p>
bro do u hav the codingfor the reset button
<p>Can I use a side button to generate a <strong>auto lock</strong> function?</p>
i would use it in the school locker
<blockquote>how to open it <strong>inside ?</strong></blockquote>
<p>how to control inside?</p>
<p>I really want to see a code and parts list . Can you give me a code and parts list? <br><a href="mailto:woong0111@koreatech.ac.kr" rel="nofollow">woong0111@koreatech.ac.kr</a> <br>Thank you</p>
Great job
<p>First of all, congratulations for this nice project.</p><p>Grathio, i'm a Brazilian student and i'm going to develop a similar object using Arduino at school, but i have one doubt. How can i use a digital knock sensor instead an analog piezo sensor? Is it very difficult to convert your code (using analog entries) to a code with digital entries(like ky-031)?</p><p>Thanks</p>
<p> Here's an adjunct idea for those more paranoid. As long as an arduino is employed, one can add an keypad for entering a secret code. But the code is not correct if it is not punched in on the right cadence.</p>
<p>For the lock clamp...why not get a large piece of PVC (large enough to encompass the lock), and then fill the innards with some sort of hardening putty. Press your lock knob into the putty enough to make a perfect indent, then let the putty harden. Then mount the motor to this somehow. Or you could use putty to make a mold of your knob, and make it from something stronger, like cast aluminum.</p>
<p>Geeeze, Just when I was about to give up on instructables because of the endless dumbass projects using duct tape and making fudge this brilliant piece of irreverent mind expansion comes along - faith restored - thanks! </p>
<p>Nice, you should enter it in the home automation contest!</p>
<p>can we use arduino uno for knock detecting door lock system?</p>
<p>Yes, any Arduino should be able to handle this. Are you asking if the Arduino can detect if the lock is engaged/on?</p>
Your schematics is the clearst i have ever seen...u rock..ur r an awesome inventor...love u

About This Instructable


1,525 favorites


Bio: Creative swashbuckler. Writer for MAKE Magazine, presenter of inventions on TV, radio, magazines and newspapers. Professional problem solver. Annoyingly curious. Hacker of all things from ... More »
More by Grathio: Book Light Reading Light Video: Making your glove work with a touch screen 60 Second Mobile
Add instructable to: