GSM Based Home Security System With SMS Alert

This project has GSM technology and anti-theft system using PIR motion detection. Whenever Motion is detected it sends the SMS on predefined mobile number. We have connected PIR Motion sensor with this project.

GSM based home security system with SMS alert, it uses PIR Motion Sensor, GSM Modem and 16×2 LCD is used to display system status,  It Sends SMS through GSM modem that is attached to Serial Rxd and Txd  Pins when motion is detected from PIR sensor, Set your mobile number inside the code in SendSMS subroutine.

1. Sends Theft Alert SMS to Given number.
2. Displays status of system on LCD.
3. Uses PIR Motion sensor
4. Low Cost
This project is very useful for Monitoring home security
In this project GSM Modem, PIR Sensor, 16×2 LCD and Arduino are main parts.
You can try this project using Protius simulation. Circuit diagram, is provided with code. Download respective files.

Step 1: Make connections as per circuit diagram
GSM Home Security
Step 2: Program the Arduino

Program the arduino using following code

Home Security System with SMS Alert 2016

 Demonstrates the use of PIR Motion sensor and GSM Module.  The Project
 generate SMS when motion is detected on PIR Sensor

 PIR Sensor is connected to Arduino Pin 8 and GSM Module on Serial Communication 
 Lines, Remove GSM Module While Programming. 
  The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground


// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

const int PIR=8;

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);

void loop() {
  // Print a message to the LCD.
  lcd.setCursor(0, 0);
  lcd.print("Security System ");
  lcd.setCursor(0, 1);
  lcd.print("   Activated    ");
      // Print a message to the LCD.
      lcd.setCursor(0, 0);
      lcd.print("Theft Detected  ");
      lcd.setCursor(0, 1);
      lcd.print("Sending SMS.....");

void sendSMS()
     Serial.println("AT+CMGD=1");    //Delete privious sent SMS
     Serial.println("AT+CMGF=1");   //Set SMS configuration
     Serial.print("AT+CMGW=");          //Write New SMS
     Serial.write(34);                  //Double quotes ASCII Code
     Serial.print("+9198--------");         //Enter Your Mobile number
     Serial.println();                  //Send Crrige return
     Serial.println("Alert: Theft Detected");

     Serial.write(26); //Cntrl+Z

     Serial.println("AT+CMSS=1");      //Send SMS from memory location 1

Read More:  GSM Based Home Security System With SMS Alert

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

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

Scroll to Top