Overview

Keys can often be bothersome and keyless entry can be costly. With that in mind, we built an automatic door lock that responds to a secret knock to unlock the door. Also, it is able to be "trained" (through a programming button feature) to listen for a specific knock pattern that you can provide.


A little bit more about this project

The initial idea for this project came from wanting a door lock that could be switched on and off over WiFi. But since there are hundreds of these types of door locks out in production currently (and for a price $$), we thought we might get a little more creative. We think of this project as a secret passcode like "open sesame", but with knocks. Below are pictures and more information about the project and how you can make this yourself.

This project uses a piezoelectric speaker as a sensor to detect the vibration of knocks on the door. It also has a passive IR motion sensor on the inside of the door, so that it can remain unlocked while anyone is in the room. Additionally, it has a magnetic sensor to detect if the door is currently open or closed.

Parts!

Part: ~Price: URL:
Deadbolt Lock $12 Link
Protoboard ~$5 Link
Wood (to substitute for full door) ~$15
Servo motor $12 Link
Arduino board $22 Link
Passive IR motion sensor $10.76 Link
Magnetic door sensors $1.78 Link
Piezo speaker $3.24 Link

How To

Before beginning, make sure that you have access to a soldering tool and solder, as well as some spare wires. If not, you will need to buy some. Also, since this was only a prototype for us, we built our own door and we fixed the project to it in a more permanent way, so you may want to think about other ideas of securing this to the door before beginning. Beyond that, here are some of the basic steps.

1. Build your circuit as shown in the diagram below. You can use a breadboard or solder all components onto a protoboard. All power for the circuit comes from the Teensy via USB.



2. Cut a piece of wood thick enough so that your servo will rest just above the deadbolt and a thinner piece of wood to extend out over the deadbolt and hold the servo. Screw the servo to this piece and this piece to the thicker piece. Look at the pictures below for an idea of how we put this together.

3. Attach the circuit to the wood, the wood to the door, and the servo to the deadbolt. For mounting on the door, we used wood glue to make it permanent. You may wish to come up with a more clever and less permanent solution. For the servo, we used an X shape made of two zip ties to secure it to the lock. Make sure when attaching these that the servo has room to rotate to both lock and unlock the door.

4. Attach a magnet to the door frame and the magnetic switch on the door adjacent. These need to be as close as possible to each other to ensure that we can detect when the door is closed.

5. Load the code (found here) into the Teensy. If you connected anything to different pins, then you will need to adjust the code. More than likely, you will also need to calibrate the knocking sensitivity by changing the line "if(diff > 15 || diff < -15)". Larger numbers will make knocking less sensitive.


In total, this project should take about 8 hours without concentrating on the structure of the project, building your own door (which takes quite a few extra hours), or creating your own working code.

Project Timeline



Detailed SCRUMM

Pictures

About the group

Brenden Leonard Jay Zuerndorfer
5th year CS major
Project role: Mechanical design and construction
4th year CS major
Project role: Software design and wiring