Arduino ProjectsIoT Projects

IoT based Silent Intruder Alarm using Arduino

Today in this project we will build an IoT based silent intruder alarm using Arduino. The main purpose of this project is to inform the authorities (or the resident) that the house/office/warehouse /shop..etc is breached, without alerting the thief. In this way, the authorities can take advantage of this system. Without creating any scene and wasting time can take quick action.

Actually, this system can be installed as both domestically and commercially. A PIR motion sensor is used to detect the movement of thieves. The PIR sensor should be placed at the entry point like (Doors, windows, duct entries, etc.) for the most effective results.

In this project, just one PIR sensor is used for a particular area. But more than one PIR sensor can be used for several areas as per user requirements. (Living room, bedroom, kitchen, office room, storage, garage … etc)

Working of Silent Intruder Alarm

Whenever the PIR sensor detects a movement, a text message will be sent immediately to the default phone number. At the same time, the LCD module displays the status of the alarm (ON/OFF), and also the movement location. LCD is simply used to identify the location of movement.

IoT based Silent Intruder Alarm using Arduino
SMS Alert For Silent Intruder Alarm

Note: the whole system, including the PIR sensor and GSM module, must be in a hidden location that is accessible only to the user who installed it. Otherwise, intruders will disable the alarm and realize that they have been exposed to the owner.

Even if the main system is offline, the whole system must be powered by a secondary power source (rechargeable battery) to avoid power loss in the IoT based silent Intruder Alarm.

Hence, this piece of articles describes the way to create an IoT based silent Intruder Alarm using Arduino.

Components and Tools Required

Below is the list of the tools and components that are required for making an IoT based Silent Intruder Alarm using Arduino.

  • Arduino UNO
  • PIR sensor (HC SR501)
  • 16×2 LCD Module + I2C Module
  • GSM Module (SIM900A)
  • Rechargeable Battery Pack (5V)
  • Working SIM Card
  • Breadboard
  • Jumper wires

Interfacing components of IoT based Intruder Alarm

Arduino and I2C circuit connection
16×2 LCD + I2C Module to Arduino

First of all, we will interface a 16×2 LCD with I2C module, and then to the Arduino UNO. Similarly, the PIR motion sensor and GSM Module will be interfaced. The assembling circuit is super easy. you can look at the circuit diagram and the table attached below to assemble the circuit.

Circuit diagram of IoT based Silent Intruder Alarm
Circuit Diagram
Arduino PinI2C Module Pin
A4 SDA 
A5 SCL 
GNDGND
5VVCC
Arduino PInPIR Motion Sensor
D2 Signal pin
5vVcc
GNDGND
Arduino PinGSM Module
D10 Tx 
D11Rx 
5VVCC
GNDGND
Interfacing all components to the Arduino

Point to be noted: If the power input of a module is higher than 5V, then it must be connected to Vin Pin of Arduino board instead of 5V Pin. The input power is regulated to 5V by an onboard voltage regulator. (Vin Pin max voltage = 12V)

Warning: Safety First!

Do to supply the main AC/DC source unless you are absolutely sure about the connections. First, make sure that the components are connected correctly without changing polarity. Avoid short circuit while wiring.

Even if it seems nothing is wrong: DOUBLE CHECK EVERYTHING !!

Others Similar Projects:

Program Sketch/Codes

For the demonstration purposes, I have used a single PIR sensor for a particular location. However, you can edit the program code and use multiple PIR sensors to cover multiple areas. Before that let me explain, how the code is written for IoT based Silent Intruder Alarm project. It helps you to edit the code for multiple sensors.

First of all SoftwareSerial header library file is defined. To download Software serial library file for GSM Module visit this link.

#include <SoftwareSerial.h>

Now GSM Module TX and RX pin is defined.

SoftwareSerial mySerial(11, 10);

Similarly 16×2 LCD I2C and wire header library file are included.

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

Following variable of type integer are predefined.

int sensor = A2;              
int state = LOW;             
int val = 0;

In void setup() PinMode function is used as an INPUT for PIR sensor. Similarly, Serial Monitor and my serial is initiated at the baud rate of 9600. LCD is also initiated with lcd.begin(); function. Finally some information like “Silent Alarm” is displayed on LCD.

void setup(){
  pinMode(sensor, INPUT);
  Serial.begin(9600);
  lcd.begin();
  mySerial.begin(9600);
  Serial.println("Silent Alarm ");
  Serial.println("Initializing System");
  delay(100);

change “YY” value with country code and “xxxxxxxxxxx” with phone number. This will be your default number for sending Alert messages.

mySerial.println("AT+CMGS="+YYxxxxxxxxx"");

This is the default Alert message. you can modify it according to your requirements.

mySerial.print("Alert : INTRUDER ALERT || SILENT ALARM TRIGGERED || Location : xxxxxx"); 

This will activate your LCD display and Print Alarm is Activated. Not only that, but The current movement location of the Intruder is also displayed to the LCD.

lcd.backlight();
  lcd.print("Alarm Activated");
  delay(500);
  lcd.clear();
  lcd.print("Location : X");

Final Program Code

#include <SoftwareSerial.h>
SoftwareSerial mySerial(11, 10);

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

int sensor = A2;              
int state = LOW;             
int val = 0;

void setup(){
  pinMode(sensor, INPUT);
  Serial.begin(9600);
  lcd.begin();
  mySerial.begin(9600);
  Serial.println("Silent Alarm ");
  Serial.println("Initializing System");
  delay(100);
 }
void loop(){ 
  val = digitalRead(sensor);
  
 if (val == HIGH){
  mySerial.println("AT"); 
  updateSerial();
  mySerial.println("AT+CMGF=1"); 
  updateSerial();
  mySerial.println("AT+CMGS="+YYxxxxxxxxx"");//change YY with country code and xxxxxxxxxxx with phone number to sms
  updateSerial();
  mySerial.print("Alert : INTRUDER ALERT || SILENT ALARM TRIGGERED || Location : xxxxxx"); 
  updateSerial(); 
  mySerial.write(26);
  
  lcd.backlight();
  lcd.print("Alarm Activated");
  delay(500);
  lcd.clear();
  lcd.print("Location : X");
  delay(500);
  lcd.clear();
  delay(1000);

  if (state == LOW) { 
      state = HIGH;       
    }
  }

 else {
      Serial.println("Lamp Off!");
      lcd.clear();
      delay(200);           
      
      if (state == HIGH){ 
        state = LOW;   
    }
  }
}

void updateSerial()
{
  delay(500);
  while (Serial.available()) 
  {
    mySerial.write(Serial.read());
  }
  while(mySerial.available()) 
  {
    Serial.write(mySerial.read());
  }
}

Now copy the above program code for IoT based silent intruder alarm and paste it on Arduino IDE. Compile the code by selecting the Arduino UNO board from the board manager. After successful compilation uploads it to the Arduino board. Now you have successfully made Arduino Based Intruder Alarm.

IoT based Silent Intruder Alarm using Arduino
Demo of Silent Intruder Alarm

More IoT based Arduino Projects:

Wrapping Up

Finally, we have Made IoT based Silent Intruder Alarm using Arduino UNO, PIR Sensor, and GSM Module. Although the project is simple, it is useful and powerful. I hope you found this Internet of Things (IoT) based project useful! Drop a comment below if you have any doubts or queries. Your Feedback is very important to us.

Related Articles

Leave a Reply

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

Back to top button