Close this search box.


GSM Based Home Security Alarm System Using Arduino

Home Security Systems are an important feature of modern residential and office setups. Home security systems must be affordable, reliable and effective.

Modern complex home security systems include several security features like fire, intruders, electronic door lock, heat, smoke, temperature, etc. Some security systems may be a combination of all the security measures.

Arduino GSM Home Security Alarm System image

Such complex systems may be expensive and may not be affordable by everyone. There are individual security systems based on the requirement.

In this project, we designed a simple but very efficient home security that has a function of calling the homeowner on his/her mobile number in case of an intruder alert.

The project is based on Arduino, PIR motion detection sensor and GSM Module.

GSM Based Home Security Alarm System Using Arduino

Circuit Diagram

Arduino GSM Home Security Alarm SystemHardware Required

  • Arduino UNO  [Buy Here]
  • PIR Motion Detection Sensor
  • SIM 900A (or any other) GSM Module with SIM inserted

Circuit Design of Arduino GSM Home Security Alarm System

As the project is based on an Arduino, the connection is pretty simple. PIR motion detection sensor module has a digital output pin. This is connected to any of the digital I/O pins of the Arduino.

The GSM Module communicates with the microcontroller in a serial manner. It has an Rx and Tx pins on the board. These pins are connected to the Tx and Rx pins of the Arduino.

It is important to note that while uploading the program (sketch) to Arduino, the GSM module must be disconnected as it might interfere with the serial communication with the Arduino IDE.

Component Description

PIR Motion Detection Sensor

Passive Infra-Red or PIR Sensor is a Pyroelectric device that detects motion. Hence, it is also called as motion detection sensor. It detects motion by sensing the changes in infrared levels emitted by nearby objects.

GSM Module (SIM 900A)

SIM 900A is the GSM/GPRS module with built in RS232 interface. It has dual band GSM/GPRS system that works on 900/1800MHz frequencies.

With the help of RS232, the modem can be connected to PC or microcontroller via serial cable. Voice calls, SMS and internet access are possible with this module.

There are on board connections for microphone and headphones with which we can make or receive calls.

Arduino UNO

It is the main controller used in this project. It detects the signals from PIR sensor and sends commands to GSM Module accordingly. The serial pins of the Arduino are used in this project to communicate with GSM module.

Working of Arduino GSM Home Security Alarm System

Home Security Alarm Systems are very important in present day society, where crime is increasing. With the technological advancements we have achieved in the recent years, a homeowner doesn’t have to worry about home security while getting off his/her home.

Modern home security systems provide enough security from burglars, fire, smoke, etc. They also provide immediate notification to the homeowner.

The aim of this project is to implement a simple and affordable, but efficient home security alarm system. The project is designed for detecting intruders and informing the owner by making a phone call.

The working of the project is explained below.

PIR sensor detects motion by sensing the difference in infrared or radiant heat levels emitted by surrounding objects. The output of the PIR sensor goes high when it detects any motion. The range of a typical PIR sensor is around 6 meters or about 30 feet.

For proper operation of PIR sensor, it requires a warm up time of 20 to 60 seconds. This is required because, the PIR sensor has a settling time during which it calibrates its sensor according to the environment and stabilizes the infrared detector.

During this time, there should be very little to no motion in front of the sensor. If the sensor is not given enough calibrating time, the output of the PIR sensor may not be reliable.

When the PIR sensor detects any motion, the output of the sensor is high. This is detected by the Arduino. Arduino then communicates with the GSM module via serial communication to make a call to the pre programmed mobile number.

An important point to be noted about PIR sensors is that the output will be high when it detects motion. The output of the sensor goes low from time to time, even when there is motion which may mislead the microcontroller into considering that there is no motion.

This issue must be dealt with in the programming of Arduino by ignoring the low output signals that have a shorter duration than a predefined time. This is done by assuming that the motion in front of PIR sensor is present continuously.



  • A GSM based home security alarm system is designed using Arduino, PIR motion detection sensor and a GSM module.
  • When the system is activated, it continuously checks for motion and when the motion is detected, it make a phone call to the owner.
  • Only intruder alert is present in this system and can be upgraded to other security alert systems like fire, smoke etc.

77 Responses

  1. hello ,
    I am very impressed with this project and i would like to as my final proj .please provide me with the software details alond with the code.that would mean a lot to me .

    thank you,
    with regards,

        1. Arduino software is used and above these comments there is a code . then u can upload this code to Arduino .for more detail u can watch video that how to upload Arduino

  2. How the SIM900 gets initialized
    Is it proven code, seems incomplete
    If I go through everything mentioned in this article , will it work

    1. SIM900 will be automatically initialized. To check whether the SIM900 module is working or not, send “AT” in the serial terminal of Arduino. It should reply with “OK”. Select “Carriage Return” beside baud rate in serial terminal. The code is tested and will work as mentioned.

  3. LED1 is used to indicate that PIR sensor is warmed up and ready to be operated. RX and TX of GSM must be connected to TX and RX of Arduino respectively (follow the circuit diagram). They must not be connected while programming the Arduino. Connect them only after the code is uploaded.

  4. gsm not calling to my mobile no
    serial monitor is showing this
    please solve this problem

    1. Hi, We have bought the PIR Sensor from a local electronics store. Try online portals like ebay or Amazon.

  5. hi im impressed with ur work. i would like to ask u a question… is there a simulation which i can run for arduino? tqvm

  6. sir can i implement with same ardunio of home automation circuit? is it possible to run both by single ardunio?

      1. is it work with arduino software ? if not work pleas send me the code that can work with arduino software my email(

    1. Yes. You can use SIM800L. But check the AT Commands for that module and make changes in the code if necessary.

  7. there is mistake in the circuit diagram, the pir output should be conncted to pin 5 according to the program.

  8. gsm not calling to my mobile no

    please solve this problem

    i have only 2 days to submit this project
    please help me

    1. Hi, if you followed the connection as per the code and circuit diagram, the Arduino should command the GSM Modem to make a call when the PIR Sensor detects any motion.

  9. Hello
    Thank you very much. I was searchin for arduino based security projects and your project helped me alot. Can we add a magnetic switch insetead of the pir sensor. How can i do so plz help

    1. Hi, PIR Sensor detects motion and hence can be used for detecting intruders. Can you suggest us how would you like to use the magnetic switch? If it is possible, we will try to implement it.

  10. Very impressive work, I am curious to know how the sensor is able to differentiate between an intruder and the home owner or does it assume every motion sensed is of an intruder?

    1. The PIR Sensor does assume every motion is of an intruder. One way to differentiate is disabling and enabling the alarm whenever required. (Not an efficient security system). If you have any suggestions, post them here. We will try to implement.

  11. Sir I just want to ask that, Is it possible to upload the program to arduino and after we will connect gsm module to do the desired function without selecting the port of gsm module.

  12. Pls .can u add in code to receive msg when motion detection.
    And add in code how to control relay by mobile which connected to arduino and gsm

  13. hi brother plz update this code for 2 things
    first additional to call – when motion on 1 send (SMS)

    how we can control relay by sent (SMS) to GSM ?

    plz brother we wait ur help

  14. Hi.. There is problem with the connection… Pir output should be connected to pin 5..if u have updated it then where it is… My next question is that is this code able to make mess or call?? Reply asap

    1. Hi, Yes. The PIR Output should be connected to Pin 5 of the Arduino (as per the code). And the code will make a call.

  15. Hi,
    I am Virupaksha, working on your circuit & code, using sim800 GSM, it is not calling my number, but it is showing in serial monitor, what might be the problem, even I checked sim800 gsm with hyper terminal for AT commands found working but not working with ardiuno & with given code
    expecting helf


  16. Hello sir,
    At the place of call to the number i want to implemwnt the camera when motion sensor detects the motion it will capture the photo and send it to the number ising multimedia message…
    I have to submit this in my college please tell me if it is possible

  17. Can you suggest some projects using only the components in the arduino kit? It is for us to have no more expenses as students. Thank you

  18. This project work well but some days after give false trigger I don’t know what where are problem any buddy have suggests ?..

  19. Hi Sir, thanks a bunch for this project idea, exactly what i was looking for… but i will like to know if you have any recommendation for a good arduino simulation software, i was asked to use a software to simulate this project. thanks.

  20. when I am uploading the code it is saying invalid library found. my circuit diagram is as given here and i have arduino ide 1.8.5 . Please help it’s very urgent.

  21. arduino board, GSM Module and PIR sensor connect individually or combine???? please show the full connection diagram…

  22. hello sir.
    I need the method of implementation of this project if there is any video of implementation on youtube plz post the link thanks.

  23. Is it possible to combine a fingerprint door lock system with this security system in a single arduino ?

  24. Is the power supplied to PIR & Sim900a from Arduino itself?
    as I can see 5V & GND supplied to them from Power Pins of 5V & gnd of Arduino

Leave a Reply

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