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 t...
How to make a LED cube 4*4*4 with Arduino Contents-: Arduino (mini,mega etc any board can be used) 2. LED bulb 3mm - 64pcs (take 70 instead) 3.Jumper wires 4. PCB 5.Header Pins(around 20pcs) 6.Resistors 100 ohm -4pcs 7.Soldering iron and wire Make the LED Zig:- Downlod this PHOTO and print it and then paste it to a cardboard or a wooden board ,then make holes on the circles with a drill. Make the LED structure:- Just place the led bulbs in the holes of the wooden board and solder them ,here the arrow in the photo denotes the NEGATIVE terminal of the led bulb which will not be folded Now fold all the POSITIVE terminals as according to the photo(Red arrow marked is positive) then solder them. Repeat this step 4 times then place the layers one above the other and solder all the NEGATIVE terminals of all the four layers. And you are DONE!! Your Led structure is ready Connections-: ...
Nice :D Try to use (CTRL + T) in Arduino IDE when you write code. Your code will looks better ;)
ReplyDeleteOh Yeah, thanks bro ...😲😄😄
Delete