Instructables

Arduino Light & Knock Detecting Door Lock

Picture of Arduino Light & Knock Detecting Door Lock
This is a great gadget for a secret clubhouse and for people like me who always seem to loose their keys! This project is based on the original Secret Knock Lock instructable by Grathio (available below) with the following main modifications:

1) Has a second secret input for when people are around who could overhear your knock. Now a photo-diode can register a "photo knock" (light flash) through the peep hole!

2) Includes an H-Bridge, giving it the ability to both Unlock and Lock a door (changes the direction of voltage across motor)

3) Programing now records the average (background) noise/sound levels and adjusts the sensitivity (threshold values) accordingly

***The information here is adapted from Grathio's instructable. Many thanks and credit go to Grathio Labs for making such a comprehensive guide available to the rest of us! I will take you through the steps for programming and wiring the electronics and then send you to the step in Grathio's instructable for making a PVC door mount (sadly, I am still in the process of creating a functional case)

For Grathio's original Knock-Lock instructable, go to http://www.instructables.com/id/Secret-Knock-Detecting-Door-Lock/
 
Remove these adsRemove these ads by Signing Up

Step 1: Tools, Supplies, and Skills

Skills:
To complete this project you should be able to:
    Do basic soldering.
    Read a schematic.
    Have some knowledge of microcontrollers (I'll be using the Arduino.)
    Improvise

Tools:

    Drill (ideally a drill press) and an assortment of drill bits.
    Saw capable of cutting PVC pipe. (ie: Pretty mcuh any saw.)
    Soldering iron and solder.
    Pliers.
    Screw drivers.
    Heat-shrink tubing and/or electrical tape.
    Wire stripper.
    Vice.
    Safety glasses.
    Gloves.

Other things you might find handy:  a ruler/tape measure, a multimeter, a breadboard, some tape, a magic marker, sand paper, files, hot glue.  And if you're like me a well stocked first aid kit.

Materials:

Electronics:

    1  Arduino Uno (or similar) Microcontroller
    1  12v Gear reduction motor with high torque
    1  Small Microphone
    1  SPST momentary pushbutton. (normally "off" / "open")
    1  Red LED
    1  Green LED
    1  Photodiode
    1  Quadruple half H-Bridge SN754410NE chip
    1  100k ohm resistor (1/4 watt)
    1  10k ohm resistor (1/4 watt)
    1  1M ohm resistor (1/4 watt)
    2   560 ohm resistor  (Or whatever will run your red and green LED's at 5v)
    1  small piece of perf board.  5x15 holes or longer.
    1 12V Wall Adapter plug for Arduino


It's also a good idea to have a breadboard for setting up and testing the circuit before you solder it.  We'll be doing this in step 3.

Case:
(This design comes directly from Grathio source.)

    20" PVC  Pipe 1/2".
    3   right angle 1/2" PVC connectors.
    1   5-way 1/2" PVC connector. (example)
    2   1/2" PVC end plug.
    3   1 1/2" suction cups. (Available at hardware stores and craft centers.)  NOTE: If your door is unsuitable for suction cups then replace these with three end caps and you can use adhesive strips or screws to mount the lock.
    6"  of 1/2" wide by 1/64" thick metal strip (steel, tin, copper, etc.) (available at hardware, craft, and art supply stores.)
    4.5" of 1" wide metal sheet, 1/32" thick (steel, tin, copper, etc.) (available at hardware, craft, and art supply stores.)
    2  3/32" x 3/8" screws with nuts. (1/8" will work too if you can't find the smaller ones.)
    2  1.6M (metric) 16mm screws. Ideally with countersunk heads if you can find them. (For securing the motor.  Check your motor specs to see what screws it needs. One motor I tried used 1.6M, the other 2M.  You'll probably have to buy long ones and cut them to length.)
   1 Large Suction Cup (for photodiode)
anhpham011 months ago
Hi lilgfergi,

Would it be possible for you to post the links to where you bought all your electronics?
law642ju1 year ago
hello! i am quite impressed with you project? But i am somewhat confused with the photodiode? can you explain how the photodiode works in this project? what i am confused regarding the photosensor is that if you stick it close to the peephole, the light will be already stricking at the photodiode. So how the light effect will act as a secret code?
tolstoyan1 year ago
hi lilgfergi, im from the Philippines and i already build the secret knock detecting door lock created by grathio and i build it correctly, know i want to try yours, im just concern, do i have to record the same code for the knock and the flash of light? because we only have one reset button so if i want to changed the knock light, it will also changed the knock? i really need your answer as soon as possible. tnx and nice revision by the way
Kiteman1 year ago
"Based on"?

So why are the images identical?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!