I was browsing the TechCrunch website a while ago, when I stumbled on an article talking about gesture recognition technology being used to open door locks. While the product is not out yet, I thought to do my best with my smartphone and some components I have laying around.
- An Arduino board (I am using an Arduino Uno here)
- One micro servo
- One door bolt (the one i am using is already mounted on the door)
- Male to male jumper wires
- A piece of striped wire
- The Arduino IDE which you can download here
- Get the 1Sheeld Arduino library and the phone app here
Make sure the power switch shown above is turned to 5V (for Arduino Uno users) if you're using another Arduino board check here.
- Mount the 1Sheeld on the Arduino board
- Connect your servo motor as shown in figure
VCC ==> to the 5V in your 1Sheeld GND ==> to your GND in 1Sheeld
Signal ==> to pin 10 in your 1Sheeld
- Simply, the code reads the values of your phone's accelerometer and checks for a predefined gesture.
- Upload the attached code and let's move to the next and final step.
PS: Make sure the 1Sheeld is in upload mode as seen in the image above.
- Mount the components on the back of the door as seen in pictures.
- Attach the servo to the bolt using the striped wire.
- Connect the servo to the 1Sheeld as specified in step 2.
- Connect the Arduino to your laptop and make sure the code is uploaded.
- Switch the 1Sheeld back to operating mode.
- Open your 1Sheeld app and connect your phone to your 1Sheeld board (check 1Sheeld tutorial here if you haven't already).
- Select the accelerometer and buzzer shields (the first two from the top), and press on the multiple shields icon at the top right of the app.
- Now, hold your phone flat -screen facing upward, rotate your phone left until the screen is facing left, and put your phone in an upright position. (Or you can watch the video :D)
- Voilà! The door is unlocked (and will automatically re-lock after a short delay).
Finally I want to encourage you to tinker around with the project; add or remove from it however you see fit. And if there's anything I can help you with, please let me know.
PS: Tune the delay to see what works best for you.