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.

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>why I do like you, but it does not work.reply shivaduy248@gmail.com,please</p>
<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>
<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>my friend and i have made it, but we're using different code, we made the code by ourself, because your program was not working for us, we don't know why. and we add some features : LCD 16x2, servo, and buzzer</p><p>we inspired by yours, </p>
<p>very good </p>
<p>Hey, this is a really cool project and I have got it completed. Two items that are vexing me. 1. The motor runs all the time, but stops for 650 when the knock is applied correctly (polarity maybe?) I know it is a simple fix, but it is just escaping me. 2. The NPN transistor gets smoking hot. I have the correct resistor and even changed it out with a new one. Still getting hot (very). Thoughts. I love this and we are adding it into our business. Thanks for the help. I will send you a pic of the final project if you would like. It is eventually going to run a 12V relay to a maglock. </p>
<p>why I do like you, but it does not work.reply shivaduy248@gmail.com,please</p>
<p>can i use any type of buzzer or what else can be substitute for the function of the piezo speaker </p>
<p>can i use any type of buzzer or what else can be substitute for the function of the piezo speaker</p>
<p>can't open the code:(</p>
<p>can't open the code:(</p>
<p>can't open the code:(</p>
<p>can you progam it lock win you do the knock?????</p>
my green led is blinking all the time- then the ref led . Is the poezo to sensitiv?says &quot;wrong code&quot;( 2 blinks)
<p>Hye sir..can i know the full coding to make the motor turns clockwise and anticlockwise..(open and close lock). I'm using a reduction gear motor</p>
<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>
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>

About This Instructable


1,672 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: