Monday, 2 February 2015

Arduino based House Security system



Making a Arduino based house security system is very easy.The above schematic shows how to work on PIR sensors,door sensors,vibration sensors and trigger a buzzer for emergency.The above model can be enhanced by adding GSM module to give a call to your mobile or check your security cameras on your mobile remotely.
Several advancement in house automation will be shared on blog as per the portions on Arduino based on difficulty level. 

Working

The working of the above connections with the Arduino is very simple. Arduino gets a input from the sensor as digital signal and triggers the alarm when the burglar system is active.
placement of various sensor must be the factor responsible for better enhancement of security. Door sensor must be placed on one side of the door and the magnet has to be fixed on the other closing end in such a way that the opening of the door must trigger the Arduino.

Motion sensor cannot detect the movement if a glass is placed in its sensing area so if you want to reduce the extent of detection to a certain area glass can be used for a cover.

vibration sensors can be used on your safe so that tampering the safe or locker would trigger the Arduino and a alarm is striked.

Program   //code is not tested but soon after a test vid will be posted

int vibrationsensor=4;
int motionsensor=8;
int doorsensor=5;
int buzzer=12;
int button=3;
boolean state=true; // To check the state whether the burgler alarm is ON or off
void setup()
{
  pinMode(vibrationsensor,INPUT);
  pinMode(motionsensor,INPUT);
  pinMode(dooorsensor,OUTPUT);
  pinMode(buzzer,OUTPUT);
  pinMode(button,INPUT);        // connect a switch or a button to the 3rd pin with a resistor connected in series and the other end to ground
  Serial.begin(9600);
}
void loop()
{
  
  int buttonread=digitalRead(button);
  if((buttonread==HIGH)&&(state==TRUE))
  {
  Serial.println("SYSTEM ON");
  int vibration=digitalRead(vibrationsensor);
  int motiondet=digitalRead(motionsensor);
  int doorsen=digitalRead(doorsensor);
  
  if((vibration==HIGH)||(motiondet==HIGH)||(doorsen==HIGH))
  {
    buzzer();
  }
  else'
  {
    if(buttonread==HIGH)
    {
      if(state==false)
      {
        state=true;
      }
      else
      {
        state=false;
      }
  }
  }
  void buzzer()
  { 
  digitalWrite(12,HIGH);
  delay(2000);
  buttonread=digitalRead(button);
  id(buttonread==HIGH)
  {
    state=true;
  }
  else
  {
    state=false;
  }
  }
  

enhancements

A charging circuit has to be added to Arduino with a inbuilt batteries to safe guard its running during power failures.

All wired connections can be made wireless.

Full module can be added with the house automation for better result.

Using of networks could make easier for the user to control the device.



No comments:

Post a Comment