In this post, we are going to construct a laser security circuit which can send SMS alert to owner of the property or anyone else and activate loud alarm to deter the crook, which can be interfaced via relay.

By: Girish Radhakrishnan

We always fear about crooks especially when we leave our property alone, this where security systems come in handy. Loud alarm may be enough to grab everyone’s attention nearby area and deter the thief.

SMS alert warns the user to take necessary action just after the crook broke in to your property.

The security systems should be implemented at week points of your house/office, such as doors and windows, sometimes multiple numbers of security systems are required for maximum protection against thief at different points of your home or office.

How it Works

The circuit consists of Arduino, which sense intrusion and take decisions. GSM modem receives command for sending SMS to user and few other passive components to detect intrusion.

The Arduino scans the laser beam for interruption in light 500 times a second. The LDR senses the presence laser light and gives signal to Arduino.

The 10K and LDR forms voltage divider, the analogue signal is taken from a point between these two components.

When the incident light intensity reduces to certain degree or light completely cut-off the arduino recognize as intrusion.

The 10K resistor which is connected to “activate button” acts as pull down resistor to prevent the arduino pin from activating randomly.

The transistor activates the relay in case of an intrusion and the diode protects the rest of the circuit from high voltage spike while switching the relay on and off.

You can connect a siren or lights or whatever you wish to connect to relay.

To activate the security system, we have to press the activate button, the LED indicator confirms that the button is pressed.

The system gets activated only after 2 minutes; this will give time to lock you property and leave the place.

When you return home, to deactivate the system press the reset button. Solder a push-to-on button from reset button terminal of Arduino, so that the reset button to deactivate the system is easily accessible from outside the setup.

Once the circuit detected intrusion, the relay will be activated for 2 minutes and it turns off and it will be ready to detect next intrusion.

The GSM modem need external power supply as arduino can’t provide enough current to the module. Please insert a valid SIM card with a working SMS plan.

That’s all about this SMS based laser security circuit; now let’s see how to implement the setup in correct way.

How to implement the setup:

Place the laser source and arduino circuit in such a way that the laser light falls exactly on LDR. You can also try mirrors reflecting the laser beam to cover a large area.

If you own pets and to prevent accidental or false alarm, elevate the whole setup to hip level of an adult. You pets will go under the laser beams preventing false triggering.

The LDR is susceptible to errors/false alarm when ambient light falls on it. To avoid these kinds of errors, we need to enclose the LDR with opaque hollow cylinder with one end open and other end closed made up of plastic or any other material.

LDR Setup

Make sure the front portion of the tube is covered as well and only tiny hole with few millimeters in diameter for entering laser beam.

When the laser beam falls on the LDR the value read by the arduino is low but when light interruption is detected the value will go to peak at the same instant, which you can witness the same from serial monitor.

Once the light intensity goes below the pre-determined threshold, arduino trigger the relay and send SMS alert to the user.

Program Code:

//--------------Program developed by R.Girish---------------//
#include <SoftwareSerial.h>
SoftwareSerial gsm(9,8);
int LDR = A0;
int OP = 7;
int start = 6;
int LED = 5;
int th = 300;
int x;
unsigned long A = 1000L;
unsigned long B = A * 60;
unsigned long C = B * 2;
void setup()
void loop()
x = analogRead(A0);
goto A;
Serial.println("Sending SMS......\n");
gsm.println("AT+CMGS=\"+91XXXXXXXXXX\"\r"); // Replace x with mobile number
gsm.println("Security Warning: Intruder detected."); // The SMS text you want to send
gsm.println((char)26); // ASCII code of CTRL+Z
Serial.println("Message is sent\n");
goto A;
//--------------Program developed by R.Girish---------------//

Please replace the “XXXXXXXXXX” with your phone number to receive SMS.

Need Help? Please send your queries through Comments for quick replies!