DIY PIR sensor based Burglar Alarm
- 16x2 LCD, 4X4 Matrix keypad, 5v 1A, Arduino, Arduino Project, Buzzer, DC Power Supply, DC-DC step down, Digital Lock, DIY, HC-SR501, LM2596 DC-DC Buck converter, Piezo, Piezo buzzer, PIR, Power supply, Radar, Relay module, RFID, Servo, SIM800L Module, Solenoid lock, TSOP1738, TSOP1838, Ultrasonic Sensor
- 07 May, 2021
Let's get started with this innovative Arduino tutorial on how to build your own burglar alarm system. You will learn to interface Sim800L GSM GPRS module, PIR (Passive Infrared Receiver) sensor and Piezo buzzer with Arduino board. Every time you leave your house, there is a chance that a burglar will break in. This project will help you create a system to get rid of this issue.
- SIM800L Module
- Arduino Board
- Bread board
- HC-SR501 PIR sensor
- Piezo buzzer
- Connecting Wires
- Power Supply
- DC-DC Buck converter LM2596
- Sim Card
What is a SIM800L Module?
SimCom's SIM800L GSM cellular chip is at the heart of the module. The chip's operating voltage ranges from 3.4V to 4.4V, making it an excellent candidate for direct LiPo battery supply. This makes it an excellent choice for embedding into projects with limited space.
To use the module for voice or data communications, as well as some SIM commands, an antenna is required.
The first is a Helical GSM antenna, which is usually included with the module and connects directly to the NET pin on the PCB.
The second is a 3dBi GSM antenna and a U.FL to SMA adapter, both of which can be purchased online for less than 200INR. Snap-fit this antenna to the small U.FL connector on the module's top-left corner.
One of the most important aspects of getting the SIM800L module to work is providing it with enough power.
Depending on which state it is in, the SIM800L can be a relatively power-hungry device. During transmission burst, the module's maximum current draw is around 2A. It won't usually pull that much, but it may need around 216mA during phone calls or 80mA during network transmissions.
The SIM800L Cellular Module has an LED on the top right side that indicates the status of your cellular network. It will blink at different rates depending on the state it is in.
LED blinking every 1 second indicates that the module is operational but has not yet connected to the cellular network.
LED Blinking every 2 seconds indicates that the GPRS data connection you requested is active.
LED blinking every 3 seconds indicates that the module has made contact with the cellular network and can send/receive voice and SMS messages.
As the SIM800L module lacks an onboard voltage regulator, an external power supply with a voltage range of 3.4V to 4.4V (ideal 4.1V) is required. The power supply should also be capable of supplying 2A of surge current, or else the module will continue to shut down. Here are some options for properly powering your GSM module.
3.7V Li-Po Battery
DC-DC Buck Converter
You must be extremely careful not to disconnect GND before VCC and to always connect GND before VCC. Otherwise, the module will use the low voltage serial pins as ground and will be destroyed.
How does a PIR motion sensor work?
PIR sensors detect infrared light emitted by objects in their field of view. Anything that moves in front of a PIR sensor with a temperature different than the background temperature of the view area will cause a pair of pyroelectric elements on the sensor to react to the temperature change with instantaneous output differences. These variations in output generate energy, causing the sensor to send a detection signal to activate the alarm. The sensor detects motion that indicates the presence of an occupant in the space, and the call is initiated.
What is an LM2596 DC-DC buck converter?
It is an LM2596 DC-DC buck converter step down power module with a high-precision potentiometer that can drive a load of up to 3A with high efficiency and is compatible with Arduino UNO, other mainboards, and basic modules. The LM2596 converter is a switch-mode power supply with significantly higher efficiency than popular three-terminal linear regulators, especially at higher input voltages. The LM2596 has a switching frequency of 150 kHz thus allowing smaller sized filter components than what would be needed with lower frequency switching regulators.
SIM800L module, PIR sensor, Piezo buzzer are connected with Arduino board. If PIR sensor detects any unwanted movement in the area it makes digital input HIGH at pin 7 of arduino and Arduino trigger the piezo buzzer and SIM800L module, GSM module connect a call to the number stored in Arduino memory. You can even add a Reed switch as a sensor to the door/window, If someone tries to open the door/window you will get an alert call on your mobile phone.
const int PIR= 7;
//Create software serial object to communicate with SIM800L
SoftwareSerial mySerial(3, 2); //SIM800L Tx & Rx is connected to Arduino #3 & #2
//Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
//Begin serial communication with Arduino and SIM800L
mySerial.println("AT"); //Once the handshake test is successful, i t will back to OK
mySerial.println("ATD+ +91xxxxxxxxxx;"); // change xxxxxxxxxxx with phone number to dial
delay(20000); // wait for 20 seconds...
mySerial.println("ATH"); //hang up
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port