Automatic Door Locking and Unlocking System With Arduino.
Components Required:-
1.Arduino MEGA
2.Keypad 4*4
3.Infrared Module (*2)
4.LCD Display 16*2
5.Power Supply(it can be between 5v to 12v max)
(I have used 12v adapter for arduino and a 5v adapter for servo motor)
6.breadboard(optional)
7.box for Fitting the lcd and keypad
8.jumper wires
**(I have used an external power supply for servo motor because, arduino is not capable for supplying large current greater the 600mA and their are two many thing attached to arduino here which is continuously taking current through it, so it may happen that servo motor stop working due reduction in current)
**(This has happened with me,the arduino keep on going reboot again and again)
Working of the lock:-
Password for this is 1234.
First if the door is closed and we enter the password 1234,it will print "Access Granted" on LCD and the door will open using the servo motor,I have connected a Aluminium Wire with the servo motor to the inner door lock. Now after opening the door it will print "Door is OPEN" ,(this happens due to the ir module placed on the top right of the door,after opening it gives a low signal to arduino).
Now if you just shut the door the ir module give a high signal to arduino(Wall Comes in front of it),and then again servo motor function and closes the door.
If someone wants to come out from inside,he just have to place his hand in front of the second ir module,it gives a low signal to arduino and again the servo motor functions,and opens the door.
Servo motor Attached to inner lock
Second ir Module Attached to Arduino(for Opening door from inside)
Plastic box is the 5v power supply for Servo motor (Arduino is not capable for supplying lagre current greater the 600mA )
Arduino Sketch for this lock:--
/* This code is writen by Sameer verma
For More Projects log on to www.arduinoexpert.blogspot.com
video for the working's --
*/
// This code is weitten for Educational purposes only
#include <Keypad.h>
#include<LiquidCrystal.h>
#include<EEPROM.h>
#include <Servo.h>
Servo servo1;
LiquidCrystal lcd(22,23,24,25,26,27); // pins of the LCD. (RS, E, D4, D5, D6, D7)
char password[4];
char pass[4],pass1[4];
int i=0;
#define ira 28
#define irb 29
char customKey=0;
const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
char hexaKeys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {7, 6, 5, 4}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {3, 2, 8, 9}; //connect to the column pinouts of the keypad
Programming an Arduino(Level 2) using loop statements 1.Conditional statements(if/else) These statements are executed when the condition which is specified in it becomes true And these statement's are used when when we need to perform a specific task after the condition becomes true ,we can write this statement if the void loop field like this if(condition) { (Task which need to be performed goes here) } else { (If the condition becomes false then this block of code will be executed) } Example of code if ( x > 120 ) digitalWrite (LEDpin, HIGH ); if (x > 120 ) digitalWrite (LEDpin, HIGH ); if (x > 120 ){ digitalWrite (LEDpin, HIGH ); } if (x > 120 ){ digitalWrite (LEDpin1, HIGH ); digitalWrite (LEDpin2, HIGH ); } 2.While loop(while) A while loop will loop continuously, and infinitely, until the expression inside the parenthesis, () becomes false. Something must change the tested varia
MULTI FEATURED ROBOT WITH ARDUINO This robot was mainly built for understanding Arduino and combining various projects of Arduino to form a Multi Featured Arduino Robot. And further, who doesn't want to have a pet robot? So I named it BLUE ROVIER 316. I could have bought a beautiful tracked chassis but making it from scratch teaches you more and gives you more pride after you have completed it. The robot is capable of understanding voice commands, answering simple questions, controlling as an RC car and even avoiding obstacles while moving. It is mainly controlled through an Android phone which is connected to it through Bluetooth. Based on Android features such as Google Voice Recognition and Tilt sensing, it can really behave like a cute, smart robot. I added BLUE in its name because it is mainly based on Bluetooth. It was actually my first Arduino project and I wanted it to be unique . If you like the project, please do vote for me in the Robotics Contest ! You w
Nice :D Try to use (CTRL + T) in Arduino IDE when you write code. Your code will looks better ;)
ReplyDeleteOh Yeah, thanks bro ...😲😄😄
Delete