HOME MOTION INTRUDER ALARM

 

 

OVERVIEW

This project aims to help you design a simple alarm system that you can create to detect the presence of an intruder in your home. The PIR motion sensor is what we would be using for this project.

The PIR motion sensor works on the principle of reflected light waves or heat emitted by an object or person with the aid of a Pyroelectric sensor. It can sense the slightest movement in front and around it so far as the movement is within its range, its sweep/distance is fixed but you can adjust the sensitivity and Pulse Duration with the help of the two Potentiometers attached to it. They are small, inexpensive, easy to use and require low power to operate and so therefore commonly found in appliances and gadgets used in homes and  businesses.

 

 

DETAILS

The PIR Motion Sensor works on the principle of reflected light waves or heat and are used to detect the movement of a body or object within or out of its range. The PIR sensor itself has two slots in it, each slot is made of a special material that is sensitive to IR. When the sensor is idle, both slots detect the same amount of IR, the ambient amount radiated from the room or walls or outdoors. When a warm body like a human or animal passes by, it first intercepts one half of the PIR sensor, which causes a positive differential change between the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the sensor generates a negative differential change. These change pulses are what is detected.

 

COMPONENTS NEEDED;

All these components are available in the Invent Arduino Starter Kit.

The PIR Motion Sensor has three(3) pins which are VCC, OUT and GND. The VCC is connected to 5v, the OUT is connected to any of the digital pins and in this case pin 12 and the GND is connected to ground.We would be connecting an Led and a buzzer so that when there is any motion detection, the Led lights up and the buzzer goes off.

SCHEMATIC

 

 

CODE

int buzzerPin = 12;                          //BUZZER INPUT PIN.
int ledPin = 13;                            //LED PIN.
int pirPin = 10;                            //MOTION SENSOR INPUT PIN.
int sensorValue = LOW;                      //DEFAULT SENSOR STATE.

void setup() {
  // put your setup code here, to run once:
  pinMode(buzzerPin, OUTPUT);               //SET BUZZER AS OUTPUT.
  pinMode(ledPin, OUTPUT);                  //SET LED AS OUTPUT.
  pinMode(pirPin, INPUT);                   //SET PIR AS INPUT.
}

void loop() {
  // put your main code here, to run repeatedly:
  sensorValue = digitalRead(pirPin);        //READ PIR INPUT PIN.
  if ( sensorValue == HIGH) {               //IF MOTION IS DETECTED.
    tone(buzzerPin, 1200);                  //BUZZ THE BUZZER. 
    digitalWrite(ledPin, HIGH);             //ON LED.
    delay(1000);                             //TIME DIFFERENCE BETWEEN HIGH(ON)& LOW(OFF).
    digitalWrite(ledPin, LOW);              //OFF LED.
    delay(100);                             //TIME DIFFERENCE BETWEEN HIGH(ON)& LOW(OFF).
  }
  else {                                    //IF NO MOTION IS DETECTED.
    digitalWrite(ledPin, LOW);              //OFF LED.
   }
}

 

CONCLUSION

The circuit and program for this arduino motion detector project is already discussed above. Now, you can build this circuit on a breadboard by following the schematics given above and upload the program which could found at the end of this tutorial. Once your connections are done, your set-up should look like something shown above

0 0 vote
Article Rating
0
Would love your thoughts, please comment.x
()
x