Introduction: Door Security

Picture of Door Security

Door Security using Arduino and 1sheeld:

Step 1: Door Security:

Picture of Door Security:

Door Lock security using 1Sheeld

application

This project is about securing a door with a security code inserted by a mobile phone using 1 Sheeld application on android mobile.

First these are the requirement below:

· Arduino

· 1Sheeld.

· Servo Motor.

· Android phone.

· door!!! :D

Quote"

What is a Servo motor, anyway ?

If you are like me, then you knew very little about servo motors, and how to use them, so we should start from the beginning. A Servo motor uses pulse width modulation (pwm) from a microcontroller or a 555 timing IC (or something different I haven't heard about) to know what position to move its horn to. They can move both clockwise or counterclockwise thanks to an H bridge which is hardwired into them. Most Servos, unlike conventional electric motors do not move in continuous rotations. the standard servo moves anywhere between 0 and 180 degrees, which make them useful for animatronics and robotics. The servo has three wires coming out of it which usually ends in a female jack. the wire colors are black, which gets connected to ground, red which gets connected to the positive power supply, and white or yellow which gets connected to the output of the microcontroller or 555 IC, and receives the pwm. Okay now that you know the basics.

"

Let’s get started:

· First attach the 1sheeld on the top of your Arduino.

· Then connect your servo motor with the 1sheeld as shown in the picture down.

(Red wire with 5V , Black wire with Ground , and yellow or white with pin 9)

· Install 1Sheeld application on your android mobile phone

· Insert 1Sheeld code library into Arduino folder.

· Write the code below on the Arduino IDE:

/* Sweep
by BARRAGAN
This example code is in the public domain.
modified 8 Nov 2013
by Scott Fitzgerald
<a href="http://arduino.cc/en/Tutorial/Sweep" rel="nofollow"> http://arduino.cc/en/Tutorial/Sweep>
*/
#include <servo.h>
#include <onesheeld.h>
Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards
void setup()
{
OneSheeld.begin();
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop()
{
if(Keypad.isRowPressed(0) && Keypad.isColumnPressed(0)){
myservo.write(0);
myservo.write(180);
delay(5000);
myservo.write(0);
}
}

· If you want to change password use the line of code :

if(Keypad.isRowPressed(x) && Keypad.isColumnPressed(y))

· x for 0 –4 and y for 0—4

· we put 180 degree for half circle to open the door for 5 seconds then close automatically

· Use the keypad shield on your android application.

Thank you very much.

Comments

tomatoskins (author)2015-04-10

Cool! Thanks for sharing!

About This Instructable

2,401views

38favorites

License:

More by EhabA1:Door Security
Add instructable to: