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.
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.
Outline
ToggleGSM Based Home Security Alarm System Using Arduino
Circuit Diagram
Hardware 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.
Code
NOTE
- 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
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,
Nandini
We have uploaded the code in the article please go through it
i can’t find the code. and can i know what software is used? thanks a lot 🙂
Can u tell me the software plz
Energia is the software used code arduino
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
Can u share full documentation of home security alarm system using arduino.
code please
We have mentioned code end of the post, please go through the above article.
please provide code this project
We have mentioned code end of the post, please go through the above article.
How the SIM900 gets initialized
Is it proven code, seems incomplete
If I go through everything mentioned in this article , will it work
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.
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.
LED 2 , GND1, GND 2 indicates what???
Hi, LED1 and GND1 are supply and ground pins for one LED. Similarly, LED2 and GND2.
Which person call or alert by this GSM module ??
Which person call or alert by this module ??
Sir
what is led2 gnd1 gnd2 is for please mention…
Hi, LED1 and GND1 are supply and ground pins for one LED. Similarly, LED2 and GND2.
gsm not calling to my mobile no
serial monitor is showing this
OK
ATD+919968612343;
ATH
OK
please solve this problem
HOw to program the code to micro chip
How to register a particular mobile number for the system can u help me
Hi, Sorry. We couldn’t understand your query. Could you add some details?
Where can we get the PIR sensor? If u have links please provide me
Hi, We have bought the PIR Sensor from a local electronics store. Try online portals like ebay or Amazon.
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
You can use Proteus for simulation…But you have to download the library file of arduino…
sir can i implement with same ardunio of home automation circuit? is it possible to run both by single ardunio?
Yes you can implement security feature in home automation.It makes programming bit complex.
is it work with arduino software ? if not work pleas send me the code that can work with arduino software my email(hassansedaqat66@gmail.com)
can we use gsm module sim 800L..rather than of sim 900A.?
Yes. You can use SIM800L. But check the AT Commands for that module and make changes in the code if necessary.
there is mistake in the circuit diagram, the pir output should be conncted to pin 5 according to the program.
Hi, Yes.We have updated the circuit diagram.
gsm not calling to my mobile no
please solve this problem
i have only 2 days to submit this project
please help me
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.
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
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.
the project is so interesting,my question is,the above code commands the GSM to call or make a call?
Arduino commands the GSM to make a call.
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?
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.
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.
Hi, Sorry, Your query isn’t clear. Could you ask the question more clearly.
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
Gsm module 900a is not available in market so plz gv me an advice nw what i have to do
Hi, If SIM900A is not available, you can use SIM800 GSM Module.
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
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
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.
which gsm module i bought ? actually i live in india….can you send me the link
Where I can have the arudino board
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
thanks
Virupaksha
Hi sir
I need both code for call and msg would plz send me
Good work done .please can u send to me your circuit block diagram?
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
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
Can you share the video of this project? Thank you
Hi friends I make it its work 100% amazingly nice project thnks
This project work well but some days after give false trigger I don’t know what where are problem any buddy have suggests ?..
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.
Have any sensor or any detector to detect the current flow when a genarator is turned on
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.
pls i need your help, how do i use pcb instead of breadboard
You have to design the board yourself.
arduino board, GSM Module and PIR sensor connect individually or combine???? please show the full connection diagram…
Hi
What software is used in this project?
Please.
hi
this cod working with SIM800L ?
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.
Hi
Can anyone send me the code of the above project please
Thanks for this project though I have not done it yet
interesting. please can you help with the complete circuit diagram?
Is it possible to combine a fingerprint door lock system with this security system in a single arduino ?
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
Hello!, can we use Ultrasonic sensor instead of PIR motion sensor ?
Is there any video for the demonstration?