Arduino Projects

Arduino and Gsm based laser security system

Laser Security System Project Description:

 

Arduino GSM Laser Security System– This Tutorial is based on the Laser Security system using Arduino and GSM sim900A module. This tutorial explains step by step  How to make your own GSM-based laser security system using Arduino, LDR, and sim900A GSM module. The main processing will be performed by the Arduino Uno or Mega. For the laser detection, we will be making our own circuit using LDR” light dependent resistor”.

This Project can be easily modified by adding other types of sensors like for example;

PIR Sensor

Magnetic Reed sensors

Ground Sensors etc.


Amazon Links:

12v Adaptor:

Arduino Uno

Arduino Nano

Mega 2560:

Sim900A GSM Module:

DC 5V 2A Adaptor

Other Tools and Components:

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!


SIM900A gsm Module:

laser security system

This is the GSM module, in the market, we have different types of GSM modules, the one I will be using today is sim900A if you want you can also use any other gsm module, like for example sim900D. I have also tested the same programming using sim900D but with a different baud rate, the rest of the program remains the same.

If you are from Pakistan, Bangladesh or India make sure you double-check the GSM module and purchase the unlocked version of the sim900A. This GSM sim900A module as you can see on the screen has no Onboard voltage regulator, so be careful while applying the voltage. The ideal voltage for this GSM module is 4.7v but you can also connect it with a 5v adaptor. If you don’t have a 5v adaptor then you can make your power supply using an lm317t adjustable variable voltage regulator, I have a very detailed tutorial on lm317t explaining everything. Watch the video.

As you can see clearly in the picture above this module has so many pins that are clearly labeled, but we will be using only 5 of these pins, the power supply pins, GND, Rxd 5v, and TXD 5v. The GND will be connected with the Arduino GND, TXD will be connected with the Arduino pin8 and RXD will be connected with the  Arduino pin8.


Arduino GSM Laser Security System Circuit Diagram:

laser security system

This schematic is designed in cadesoft eagle 9.1.0 version, if you want to learn how to make schematics and PCB’s then you can watch my tutorial .

Tx of the sim900A is connected with pin number 7 of the Arduino, the Rx pin of the sim900A module is connected with pin number 8 of Arduino, and GND is connected with the Arduino’s ground. a power supply is connected with sim900A ideal voltage is 4.7v to 5v as already explained.

An LDR is connected in series with a 10k resistor which makes a voltage divider circuit. As you know an LDR is basically a variable resistor, whose resistance changes with the amount of light falling on the LDR. So a change in resistance will result in a change in voltage. This change in voltage can be monitored using The analog pin A1 of the Arduino.

For the step by step explanation watch Video Tutorial given at the end of this article.


Arduino GSM Laser Security System Programming:

#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8); // gsm module connected here
String textForSMS;
int data = 0; 

int sensor = A1; 

void setup() {


  randomSeed(analogRead(0));
  Serial.begin(9600);
      SIM900.begin(9600); // original 19200. while enter 9600 for sim900A
 Serial.println(" logging time completed!");
pinMode(sensor, INPUT); 

  delay(5000); // wait for 5 seconds

  
}

void loop() {

data = analogRead(sensor); 
Serial.println(data); 
  
     if ( data < 400) // 
  {
       textForSMS =  "\nIntruder detected";  
  sendSMS(textForSMS);
  Serial.println(textForSMS);
  Serial.println("message sent."); 
delay(5000);
  }
}


void sendSMS(String message)
{
  SIM900.print("AT+CMGF=1\r");                   
  delay(1000);
 SIM900.println("AT + CMGS = \"+923339218213\"");  // recipient's mobile number, in international format
 
  delay(1000);
  SIM900.println(message);                         // message to send
  delay(1000);
  SIM900.println((char)26);                        // End AT command with a ^Z, ASCII code 26
  delay(1000); 
  SIM900.println();
  delay(100);                                     // give module time to send SMS
 // SIM900power();                                   // turn off module
}

Watch Video Tutorial:

 

Other GSM Related Projects:

RFID based students attendance system with message Alert

RFID & GSM based student Attendance Alert message to parents

Arduino GSM Project: Security Alert message to multiple numbers

Car accident location tracking using GSM, GPS, and Arduino

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button