Arduino Based Silent Intruder Alarm


This simple project explains how to build a silent alarm system using Arduino.

The objective is to inform the resident(or authorities) that the home/office/storage/shop..etc has been breached, without alerting the people who are responsible for the breaking in.

This way, the authorities has the advantage over the intruders for a quick and silent response without making a scene and wasting time.

This system can be installed both domestically and commercially. 

A PIR sensor is used to detect motion.The PIR should be installed on point of entry for better results.(doors,windows,duct entries,..etc)

In this project, only one PIR sensor is used for a specific area.But multiple PIR sensors can be used for multiple areas as per user requirement.(living room,bed rooms,kitchen,office room,storage,garage...etc)

If PIR sensor detects movement, a text message will be sent to a predefined phone number immediately.

At the same time the LCD module displays the condition of the alarm(ON/OFF) and the location of the motion.

The LCD is only used to identify the location of the movement.

Note : The entire system including PIR sensor and GSM module must be in a hidden place which has access only to the user of the establishment.Otherwise intruders may try to engage and disable the alarm and will realize that they have been exposed.

The whole system must be powered by a auxiliary power source(rechargeable  battery), to avoid power loss to the alarm system even if the main power is offline.

Tools & Components

1 X Arduino Nano

1 X PIR sensor (HC SR501)

1 X GSM Module (SIM900A)

1 X 16x2 LCD Module + I2C Module

1 X Breadboard

1 X Rechargeable Battery Pack (5V)

1 X Working SIM Card

Jumper Wires

Soldering Iron 

Connecting Components

LCD Module + I2C Module Connection


Circuit Diagram 


Arduino Pin A0 - PIR Sensor Out Pin

Arduino Pin A4 - I2C Module SDA Pin

Arduino Pin A5 - I2C Module SCL Pin

Arduino Pin D10 - GSM Module Tx Pin

Arduino Pin D11 - GSM Module Rx Pin

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

PCB Layout(Top View)


PCB Layout(Bottom View)



PCB Layout(Side View)


Arduino Code

//www.craftybin.net
//Author : Chathura H.

#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());
  }
}
         //Upload the code to the Arduino board and test the system.

Note : You can edit the code and use multiple PIR sensors and cover multiple areas. 
Safety First !

Always Connect the power supply if you are absolutely sure that the components are connected correctly without changing polarity and short circuited the wiring.

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

Your Feedback is very important to us.

Please Leave a comment about how you feel about this project.

2 Comments

  1. There are many different types of soldering iron that are available. Very broadly they can be split into three main categories. Check out the full article at Weller Soldering Iron Tips

    ReplyDelete
  2. One of the leading Security System Installation services in canada

    ReplyDelete

Post a Comment

Previous Post Next Post