So in this article, we have discussed a method to make a security system that will be as efficient as the system available in the market but will be very low in cost. This project can be made from the components that are easily available in the market. The heart of this project is Arduino Uno which is the microcontroller used in this project. The PIR sensor will sense any motion in the range of 6 meters and if the motion is detected, it will send a signal to the microcontroller. Arduino will then use a GSM module to first send an SMS to the owner and then make a call on the specified number.
How to Make A Security Alarm Using GSM Module?
Enough security from burglars, smoke, fire, etc. can be provided by using modern security systems. These security systems alert us as soon as they detect any unknown object moving into the area under surveillance. So the main aim of this project is to make a low-cost and efficient intruder alert system that will send an SMS to the owner and with a delay of two seconds, call him when it detects any intruder.
Step 1: Gathering The Components
Before starting any project, make sure you have all the components that you are going to use in the project. If you don’t have all of them, the best approach is to make a complete list of all the components and buy them from the market in the first place. This is an excellent technique if you want to save a lot of time and want to prevent yourself from getting stuck in the middle of the project. A complete list of all the components that we are going to use in this project is given below:
Step 2: What is GSM?
The GSM module we are using here is SIM900A. It is a very reliable and ultra-compact module. It is a complete dual-band GSM/GPRS solution. It has a built-in RS232 interface. It works on a range of 900/1800 MHz frequency. The RS232 interface helps this module to be connected to a PC or any other microcontroller serially. After it is connected to a microcontroller using a serial cable, it can send SMS, make voice calls or access the internet.
Step 3: Working
As the abstract of this project is already discussed, let us move a step further and go through a brief study of the working of this project. A Passive Infrared (PIR) sensor is an electronic sensor that detects the infrared rays radiating from objects in its field of operation. These sensors are most commonly used in motion detecting devices. The word passives indicate that these sensors do not emit energy to detect, they work entirely by detecting the IR rays emitted by different objects. So when the PIR sensor will detect any motion in its surroundings, its output PIN will go HIGH which was initially LOW when no motion was detected. The PIR sensor can operate very well within a range of 6 meters. When the circuit is assembled and powered on, the PIR sensor is required to warm up for about a minute. This is required because the PIR sensor has to observe the surroundings and settle its IR detector according to the surrounding. The PIR sensor can be calibrated using the potentiometer on it. During this time, try that no motion is produced near the PIR sensor so that it settles its IR detector properly. So, when the PIR sensor will detect any motion in its surroundings, it will send a HIGH signal to the Arduino board. As soon as the Arduino gets the single form the PIR sensor, it will send communicate serially with the GSM module and then the GSM module will send an SMS to the specified SIM number and alert the person that someone has entered the area that was under surveillance.
Step 4: Assembling The Circuit
Now as we have an idea about the working of this project, let us move ahead and assemble all the components together. As we are using the PIR motion sensor to detect the motion in a particular area, the connection of this sensor with the Arduino board is pretty simple. The output pin of the PIR motion sensor is connected to the pin5 of the Arduino board. The Vcc and the ground pin of this sensor are connected to the 5V and ground of the Arduino board resp.comectively. The connection of the GSM module with the Arduino board is established serially. The Tx pin and the Rx pin of the GSM module are connected to the Rx pin and the Tx pin of the Arduino board respectively. While uploading the code on Arduino, make sure that the GSM is disconnected from the Arduino board.
Step 5: Getting Started With Arduino
Arduino IDE is a software on which you can write, debug, and compile a code that will run on an Arduino microcontroller. This code will be uploaded to the microcontroller through this IDE. IF you have no previous experience with this software, there is nothing to worry about because the whole procedure to use this software is given below.
Step 6:Code
The Code is very simple and well commented. Although it is very simple to understand, it is briefly explained below:
- AT the start, Pins of Arduino are initialized that will be connected to the buzzer, led and the PIR motion sensor. LED will be connected to pin12 of Arduino, Buzzer will be connected to pin8 of the Arduino and the PIR motion sensor’s output pin will be connected to pin5 of Arduino Uno.
- void setup() is a function that is executed only once in a program. It only runs when the microcontroller is turned on or the enable button is pressed. Baud rate is set in this function using the Serial. begin command. Baud rate is actually the speed in bits per second by which microcontroller communicates with the external components attached. Then the pin of the microcontroller that is used, is declared to be used as OUTPUT. In the end, a LOW signal is sent to the LED, buzzer and the PIR motion sensor’s output pin.
- void loop() is a function that runs repeatedly in a loop. In this function, the output pin of the PIR sensor is checked continuously. If the pin shows a HIGH signal, which means that the motion is detected, the led and the buzzer will turn on and an SMS will be sent to the mobile number that is specified in the code. After sending the SMS, it will wait for two seconds and then call the specified phone number. So this was the whole procedure to make an intruder alarm bu integrating a PIR motion sensor and a GSM module with the Arduino Uno microcontroller board. Now you can follow the above steps and enjoy making your own intruder alarm very easily at home.