Just consider the scenario that you are entering into any suspicious place and suddenly, by mistake, you interrupt an invisible LASER beam and an ALARM or SIREN blows. Nowadays this is a very common scenario. Many people secure their home, office, shops, warehouses, etc with the LASER beam security system. Not only buildings or premises, but many precious things like jewellery, diamonds, precious antique items in the museum, etc many other things are also secured using such invisible LASER beam.
In this system, there is an invisible LASER beam that is continuously ON and it is detected by any light sensor. Whenever any object or person comes in between LASER and sensor the beam interrupts and the sensor does not detect LASER light. And that’s ALL!!!! As soon as the beam interrupts (cuts) the siren blows for intruder alert.
We can build very simple such system using keychain LASER and LDR (light dependent resistor) as a sensor. Just we need is a very simple circuit built using few common components like transistor, resistors, buzzer, relay etc.
Here the given project demonstrates one of such LASER security system. It is built using arduino. It also includes matrix keypad to enter the password to enable or disable the system. Means the system can be turned ON (enabled) or turned OFF (disabled) by entering the correct password only. In this, the security system can be turned ON at any convenient time and also can be turned OFF by the user. Just he has to enter the correct password. If the password is wrong the system can not be enabled or disabled.
So let us see how it is done.
CIRCUIT DESCRIPTION
As shown in the figure, the circuit consists of Arduino board, matrix keypad, laser torch (keychain laser type), LDR and few other components.
• The 3 columns of matrix keypad are connected to arduino digital pins 0, 1 and 2 and 4 rows are connected to pins 3, 4, 5 and 6 as shown
• One 8Ω speaker is connected to digital pin 7 directly
• One LED is connected to digital pin 19 (analog input pin A5) as shown for indication of intruder
• The LDR is connected in pull down configuration using a pull down resistor. The output of pull down resistor is given as input to analog input pin A0
• The four data pins D4 – D7 of LCD are connected to arduino pins 10 – 13. Control pin Rs of LCD is connected to arduino pin 8 and En pin of LCD is connected to pin 9 of arduino. One more control pin RW of LCD is connected to ground to enable LCD write always.
Here is the snap of circuit and other arrangements.
Fig. 1: Prototype of Arduino based LASER Security System
CIRCUIT OPERATION
• When the circuit is given supply through USB, initially the security system is disabled. The message is displayed on LCD as “System is disabled. Enter password to enable system”
• At this moment, if laser light (beam) is interrupted, the alarm does not sound
• When the user enters the correct password, the system enables. The message is displayed on LCD as “System is enabled. Enter password to disable system”
• Now as the laser beam is interrupted, the light does not fall on LDR, and its resistance increases. So the analog input voltage at A0 pin of Arduino falls down to certain threshold value
• This triggers the alarm and turns ON the LED. The alarm sounds for 5 – 10 seconds
• If the laser beam is resumed, both alarm and LED turns OFF. Otherwise, both remains ON till beam is interrupted
• Once again to disable the system, the user has to enter the correct password through the keypad. When correct password is entered, the system is disabled and the same initial message is displayed on LCD
• If anyone enters the wrong password, the system does not enable or disable. It gives “wrong password message” on LCD and gives audio notification.
Project Source Code
###
#include <Keypad.h> #include <LiquidCrystal.h> #include<String.h> const byte ROWS = 4; // Four rows const byte COLS = 3; // Three columns // Define the Keymap char keys[ROWS][COLS] = { {'1','2','3'}, {'4','5','6'}, {'7','8','9'}, {'#','0','*'} }; char set_pswrd[5] = "1234"; char pswrd[5]; int d=0,sys_en_flag=0,count=0; // Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins. byte rowPins[ROWS] = { 3, 4, 5, 6 }; // Connect keypad COL0, COL1 and COL2 to these Arduino pins. byte colPins[COLS] = { 0, 1, 2 }; // Create the Keypad Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); LiquidCrystal lcd(8, 9, 10, 11, 12, 13); #define ledpin 19 void setup() { pinMode(ledpin,OUTPUT); digitalWrite(ledpin, LOW); lcd.begin(16, 4); lcd.clear(); lcd.print("System Disabled "); lcd.setCursor(0,1); lcd.print("Enter Passward"); lcd.setCursor(0,2); lcd.print("to Enable System"); lcd.setCursor(0,3); } void loop() { int i; int sensorValue = analogRead(A0); if((sensorValue<350) && (sys_en_flag == 1)) { for(i=0;i<5;i++) { digitalWrite(ledpin,HIGH); tone(7,1500,1000); digitalWrite(ledpin,LOW); tone(7,750,1000); } } char key = kpd.getKey(); if(key) // Check for a valid key. { switch (key) { case '*': break; case '#': if(strcmp(set_pswrd,pswrd)==0) { count++; if((count%2)==1) { lcd.setCursor(0,0); lcd.print("System Enabled "); lcd.setCursor(3,2); lcd.print("Dsable"); lcd.setCursor(0,3); lcd.print(" "); lcd.setCursor(0,3); sys_en_flag=1; } else { lcd.setCursor(0,0); lcd.print("System Disabled "); lcd.setCursor(3,2); lcd.print("Enable"); lcd.setCursor(0,3); lcd.print(" "); lcd.setCursor(0,3); sys_en_flag=0; } } else { lcd.clear(); lcd.print("wrong passward"); tone(7,500,1000); delay(2000); if(sys_en_flag==0) { lcd.clear(); lcd.print("System Disabled "); lcd.setCursor(0,1); lcd.print("Enter Passward"); lcd.setCursor(0,2); lcd.print("to Enable System"); lcd.setCursor(0,3); } else { lcd.clear(); lcd.print("System Enabled "); lcd.setCursor(0,1); lcd.print("Enter Passward"); lcd.setCursor(0,2); lcd.print("to Dsable System"); lcd.setCursor(0,3); } } d=0; break; default: lcd.print('*'); pswrd[d] = key; d++; if(d==4) d=0; delay(250); } } }
###
Circuit Diagrams
Project Video
Filed Under: Electronic Projects
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.