You are on page 1of 19

Electronics Project Kits For Students Click Here

ELECTRONICS HUB
P R O J E C T S | T U T O R I A L S

HOME ARDUINO GSM BASED HOME SECURITY ALARM SYSTEM USING ARDUINO

GSM Based Home Security Alarm System Using Arduino


FEBRUARY 21, 2016 BY ADMINISTRATOR 39 COMMENTS

Contents [hide]

1 Circuit Diagram
2 Hardware Required
3 Circuit Design of Arduino GSM Home Security Alarm System
4 Component Description
4.1 PIR Motion Detection Sensor
4.2 GSM Module (SIM 900A)
4.3 Arduino UNO
5 Working of Arduino GSM Home Security Alarm System
6 Code
7 Related Articles

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.

Help us in selecting the next DIY Arduino Project. : Select your Favourite Project

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

Circuit Diagram

Hardware Required
Arduino UNO
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 doesnt 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
1 int LED1=12;

2 int GND1=13;
3 int LED2=8;

4 int GND2=9;
5 int pirOutput=5;

6 void setup()
7 {

8 Serial.begin(9600);

9 pinMode(LED1,OUTPUT);
10 pinMode(GND1,OUTPUT);

11 pinMode(LED2,OUTPUT);
12 pinMode(GND2,OUTPUT);

13 pinMode(pirOutput,INPUT);
14
15 digitalWrite(pirOutput,LOW);
16 digitalWrite(GND1,LOW);

17 digitalWrite(GND2,LOW);
18 digitalWrite(LED1,LOW);

19 digitalWrite(LED2,LOW);
20 delay(15000);

21 digitalWrite(LED1,HIGH);
22 }

23 void loop()

24 {
25 if(digitalRead(pirOutput)==HIGH)

26 {
27 digitalWrite(LED2,HIGH);

28 Serial.println("OK");
29 delay(1000);

30 Serial.println("ATD+91xxxxxxxxxx;");//add target mobile number in place of xxxxxxxxxx


31 delay(15000);

32 Serial.println("ATH");
33 digitalWrite(LED2,LOW);

34 delay(1000);
35 }

36 }

Arduino GSm Based Home Security hosted with by GitHub view raw

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.
Related Articles

Obstacle Avoiding Voice Activated Home Arduino Solar Tracker Arduino Alarm Clock
Robot using Arduino Automation

Arduino Mail Notifier Arduino Based Color How To Build A Simple GSM Controlled Robot
Detector Arduino Robotic ARM using Microcontroller
[DIY]

FILED UNDER: ARDUINO

Comments

nandini says
MARCH 6, 2016 AT 9:29 PM

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

Reply

Anusha says
APRIL 12, 2016 AT 1:48 AM

We have uploaded the code in the article please go through it

Reply
Diyana says
JUNE 26, 2016 AT 11:29 PM

i cant find the code. and can i know what software is used? thanks a lot

Reply

Gurjinder says
MARCH 16, 2016 AT 12:39 PM

code please

Reply

Administrator says
APRIL 29, 2016 AT 11:27 AM

We have mentioned code end of the post, please go through the above article.

Reply

Shravyakudupudi says
MARCH 28, 2016 AT 9:25 AM

please provide code this project

Reply

Administrator says
APRIL 29, 2016 AT 11:27 AM

We have mentioned code end of the post, please go through the above article.

Reply

ally says
MAY 12, 2016 AT 3:09 AM
Hi!
please can any one help me what is led 1 for and how can I connect rx and tx of the gsm
not specified on code.
I connected rx to tx of arduino and tx to rx of arduino but still it cant make a call to me.

thanks and kind regards


ally

Reply

Admin says
MAY 26, 2016 AT 1:35 AM

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.

Reply

vishnu.t.s says
APRIL 2, 2017 AT 2:12 PM

LED 2 , GND1, GND 2 indicates what???

Reply

Anusha says
JUNE 30, 2017 AT 1:13 AM

Hi, LED1 and GND1 are supply and ground pins for one LED. Similarly, LED2
and GND2.

Reply

Uttam Dutta says


MAY 14, 2016 AT 6:08 AM

How the SIM900 gets initialized


Is it proven code, seems incomplete
If I go through everything mentioned in this article , will it work

Reply
Admin says
MAY 26, 2016 AT 1:34 AM

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.

Reply

Niraj says
JUNE 25, 2016 AT 2:51 AM

Which person call or alert by this GSM module ??

Reply

Niraj says
JUNE 25, 2016 AT 2:55 AM

Which person call or alert by this module ??

Reply

subir says
AUGUST 28, 2016 AT 2:21 PM

Sir
what is led2 gnd1 gnd2 is for please mention

Reply

Anusha says
JUNE 30, 2017 AT 1:14 AM

Hi, LED1 and GND1 are supply and ground pins for one LED. Similarly, LED2 and GND2.

Reply
kuldeep panchal says
NOVEMBER 2, 2016 AT 11:07 AM

gsm not calling to my mobile no


serial monitor is showing this
OK
ATD+919968612343;
ATH
OK
please solve this problem

Reply

Prabhul says
NOVEMBER 6, 2016 AT 9:24 AM

HOw to program the code to micro chip

Reply

Deep says
MARCH 1, 2017 AT 2:03 AM

How to register a particular mobile number for the system can u help me

Reply

Anusha says
JUNE 30, 2017 AT 1:14 AM

Hi, Sorry. We couldnt understand your query. Could you add some details?

Reply

Rajesh says
MARCH 3, 2017 AT 11:26 PM

Where can we get the PIR sensor? If u have links please provide me

Reply
Anusha says
JUNE 30, 2017 AT 1:14 AM

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

Reply

Asri says
MARCH 9, 2017 AT 2:09 AM

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

Reply

Anusha says
MARCH 23, 2017 AT 1:49 AM

You can use Proteus for simulationBut you have to download the library file of
arduino

Reply

Thangam says
MARCH 18, 2017 AT 4:20 AM

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

Reply

Anusha says
MARCH 23, 2017 AT 4:39 AM

Yes you can implement security feature in home automation.It makes programming
bit complex.

Reply
Chandru Vijay says
MARCH 20, 2017 AT 11:29 PM

can we use gsm module sim 800L..rather than of sim 900A.?

Reply

Anusha says
JUNE 30, 2017 AT 1:14 AM

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

Reply

akshay jaiswal says


MARCH 23, 2017 AT 12:42 AM

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

Reply

Anusha says
JUNE 30, 2017 AT 1:13 AM

Hi, Yes.We have updated the circuit diagram.

Reply

Manasa says
APRIL 4, 2017 AT 11:35 PM

gsm not calling to my mobile no

please solve this problem

i have only 2 days to submit this project


please help me

Reply
Anusha says
JUNE 30, 2017 AT 1:13 AM

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.

Reply

Bipin says
APRIL 19, 2017 AT 1:47 AM

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

Reply

Anusha says
JUNE 30, 2017 AT 1:12 AM

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.

Reply

mike says
MAY 19, 2017 AT 11:40 AM

the project is so interesting,my question is,the above code commands the GSM to call or
make a call?

Reply

Anusha says
JUNE 30, 2017 AT 1:12 AM

Arduino commands the GSM to make a call.

Reply
Aduh says
JUNE 2, 2017 AT 2:06 AM

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?

Reply

Anusha says
JUNE 30, 2017 AT 1:11 AM

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.

Reply

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

Comment

Name *

Email *

Website
reCAPTCHA

Please upgrade to a supported browser


to get a reCAPTCHA challenge.

Alternatively if you think you are getting


this page in error, please check your
internet connection and reload.

Why is this happening to me?

POST COMMENT

Search this website

Suggest A Topic [or] Project

COMPLETE STEP BY STEP GUIDE


ads by media.net

Home Alarm Systems

Home Alarm Services

Wireless Surveillance System

Smart Home Security Systems

Latest Home Security Systems

Best Home Security System

Wireless Home Security Systems

Electronics Hub

YouTube 16K

Electronics Hub

Follow On

Electronics Hub

Suivre +1

+ 71 285

SUBSCRIBE FOR FREE PROJECT CIRCUITS


Enter your email address:

SUBSCRIBE

Delivered by FeedBurner

Electronics Hub
666,419 likes

Like Page

Be the first of your friends to like this

ads by media.net

Home Alarm Systems

Best Home Security System

Homeland Security

Home Security Services

Internet Security Software

How To Make Money Online

Business Startup Grants

Innovative Business Ideas

Home Based Jobs

Internet Business Opportunities

Small Business Ideas

How To Start Your Own Business

Home Based Employment

Wireless Alarm Systems

Top Rated Home Security

Systems

PROJECTS BY CATEGORY

Arduino Projects (200+)


Electronics Projects (250+)
Mini Project Circuits (160+)
Mini Project Ideas (150+)
ECE Projects (150+)
EEE Projects (150+)
8051 Projects (110+)
Raspberry Pi Projects (101+)
Electrical Project Ideas (100+)
Embedded Projects (100+)
Latest Electronics Ideas (100+)
Microcontroller Mini Projects (100+)
Robotics Projects (100+)
VLSI Projects (100+)
Solar Projects (100+)
IOT Projects (100+)

Communication Projects (70+)


LED Projects (70+)
Power Electronics Projects (60+)
RFID Projects (60+)
Home Automation Projects (50+)
Matlab Projects (50+)
EIE Projects (50+)
Wireless Projects (50+)
LabView Projects (45+)
Zigbee Projects (45+)
GSM Projects (40+)
555 Timer Circuits (40+)
Sensor Projects (40+)
ARM Projects (60+)
DTMF Projects (30+)
PIC Projects (30+)
Electrical Mini Projects (25)

GENERAL

Tutorials

Symbols

Courses
Calculator

Contact

PROJECTS

Electrical

Electronics

Embedded
Power

Robotics

ARM

IOT
PROJECTS

Mini projects
Microcontroller

Aurdino

Solar

Free circuits

Home Automation

TUTORIALS

Capcitors

Resitors

Filters

Diodes

Transistors

TUTORIALS

Amplifiers

IO Devices

Thyristors

DC Circuits

Nummber System

FOLLOW US

Facebook

Youtube

Google Plus

Twitter

Copyright 2017 Electronicshub.org

You might also like