The easy way to protect your home or office using this Laser security alarm using arduino. This simple guide will help you to build a beautiful home protection system for anti theft.
To do this project you need to purchase an Arduino uno board, Laser module, LDR module and a piezo buzzer. The basic working of this project is, the LDR module and laser light are placed in the opposite directions and the laser lights fall on the LDR module so the circuit will not send any data to the arduino.
In any situation the laser lights get cut or blocked by some objects the LDR module sends the data to the arduino board and the arduino starts to initiate a buzzer sound.
Circuit Diagram
Arduino Code
int Laser = 8;
int Ldr = 9;
int buzzer = 11;
void setup()
{
pinMode(Laser,OUTPUT);
pinMode(Ldr,INPUT);
pinMode(buzzer,OUTPUT);
}
void loop()
{ digitalWrite(8,HIGH);
if(digitalRead(Ldr)==LOW)
{
digitalWrite(11,LOW);
}
else
{
digitalWrite(11,HIGH);
}
}