With the rise in crime rates, the demand for effective security systems has become more critical than ever. Whether it’s your home, office, or apartment, having a reliable security system ensures peace of mind and protection. As technology continues to evolve across all aspects of life, there is a growing need to enhance and modernize security tools. In this article, we’ll guide you through building a cutting-edge Laser Tripwire Home Alarm System.
You may have fond memories of playing with laser toy guns as a child or seen lasers in action in science fiction movies. You might also recall the laser maze challenge games where touching a laser triggers an alarm. This concept forms the basis of laser tripwire alarms, which function similarly.
What is a Laser Tripwire?
As the name suggests, a Laser Tripwire uses laser technology to provide users with a robust security solution. By deploying beams of light, this system can cover an entire area or location, creating a protective barrier that detects intrusions.
Hardware Components
To build your Laser Tripwire Home Alarm System, you’ll need the following components:
Steps to Build the Laser Tripwire Alarm
The components required for this project are straightforward and listed above. Once you’ve gathered them, follow these steps:
Schematic Diagram
Refer to the circuit diagram below to make the necessary connections.
How the circuit works
The laser tripwire alarm system consist of laser transmitter and the laser receiver system. The laser transmitter consist of LM317 adjustable voltage regulator and the laser diode itself. The laser receiver system consist of Arduino Board, LDR, LED and the Buzzer.
The laser transmitter laser beam is directed at the LDR, such as across a hallway or door. At the receiver, the LDR and the 10KOhm forms a voltage divider which is used as sensor interfacing to the Arduino board analog pin A0. When the light beam is intercepted/disrupted, then the voltage sensed by the Arduino analog pin will change because the resistance of the LDR is changed and so the biased voltage at the junction of the voltage divider. Then Arduino is used to acquire the voltage and compare to a threshold value and turn on the buzzer connected to digital pin 9 and LED connected to digital pin 3 if the laser beam is interrupted. If the lease beam is of not interrupted then the buzzer and LED are turned off.
Installing Arduino IDE
Begin by downloading and installing the Arduino IDE software from its official website. For detailed instructions, check out this step-by-step guide on “How to Install Arduino IDE.”
Code
Copy the following code and upload it to the Arduino IDE:
const int buzzerPin = 9;
int led = 3;
const int buzzerPin = 3;
const int ledPin = 9;
const int ldrPin = A0;
void setup() {
Serial.begin(9600); //set Serial output baud rate
pinMode(buzzerPin, OUTPUT);
pinMode(ledPin, OUTPUT);
//For output format
Serial.println("\nADC value, Voltage(V):");
Serial.println("--------------------------------------------------\n");
}
void loop() {
int ldrValue = analogRead(ldrPin);
float ldrVoltage = (ldrValue/1023.0)*5;
if(ldrValue <= 350){
digitalWrite(buzzerPin, HIGH);
digitalWrite(ledPin, HIGH);
}
else{
digitalWrite(buzzerPin, LOW);
digitalWrite(ledPin, LOW);
}
Serial.println(String(ldrValue)+","+String(ldrVoltage)+"V");
delay(100); //100ms delayto prevent any duplicates
}
Testing the Circuit
It’s time to test your setup! Power up the Arduino while the laser beam is directed at the LDR. Now, interrupt the laser beam with your hand, and the buzzer should start beeping. See the following videos for circuit simulation and the actual physical implementation.
How It Works
Let’s break down the functionality of the circuit:
- Pin Definitions : The Arduino pins connected to the buzzer and LED are defined as
buzzerPin
andled
. - Setup Function : The serial monitor is initialized, and both the LED and buzzer pins are set as outputs.
- Loop Function : The
analogRead(A0)
function reads the values from the LDR (connected to pin A0) and stores them in the variablesensorValue
. If the value drops below 800 (indicating the laser beam has been interrupted), the buzzer sounds, and the LED flashes.
When the laser shines on the LDR, the Arduino continuously monitors its readings. If someone crosses the laser beam, the LDR’s resistance changes, triggering the alarm via the buzzer. The system will remain active until you manually reset the Arduino.
Applications
This Laser Tripwire Alarm System can be used in various scenarios, such as:
- Intruder detection systems
- Home and office security setups
Conclusion
We hope you found this guide to building a Laser diode based Home Alarm System helpful. We can also make this laser tripwire receiver without a microcontroller which you learn from the guide on LDR and LM311 comparator light detector. If you encounter any challenges while assembling it, feel free to ask questions in the comments section below.