PIR MOTION SENSOR | SECURITY ALARM USING ARDUINO

 PIR MOTION SENSOR | SECURITY ALARM USING ARDUINO.

In this article we will use the PIR MOTION SENSOR and Arduino to create a simple Security System or Security Alarm. In which the PIR Motion Sensor  will automatically detects the movement of any object and turn on the Alarm or Light . Which we will know that someone is doing human or animals movement. If you want to lamp interface to relay. So you visit this article GUIDE FOR SPDT RELAY INTERFACE WITH ARDUINO UNO.
PIR MOTION SENSOR | SECURITY ALARM USING ARDUINO


WHAT IS PIR SENSOR ?

The passive Infrared Sensor (PIR) is electronics sensor. Which detects the infrared light radiation of the an object. It is a simple and low cost sensor. Which can easily interface with Arduino ,Raspberry pi and any programming board. The PIR sensor usually detects the movement of any objects. This sensor is mostly used in security Alarm and Automation fields.

HOW DOES PIR SENSOR WORKS?

We know that all objects emits infrared radiation above zero (0 kelvin-273.15oC)temperature.
In which human body included. If the object is warmer, the more infrared light radiation is emit. The PIR sensor is specially designed for detect infrared radiation from any objects. When any object movements inside the range of the sensor, the PIR sensor detects the infrared radiation ,emit from the object. This sensor can give to operate the 4.4v DC to 12v Dc power supply but 5v Dc power supply is suitable to operate the pir sensor.
The PIR sensor module consists of two in-built potentiometer .
  • Sensitivity.
  • Delay.
Sensitivity:-1st potentiometer is used to adjust the range of distance of PIR sensor.
Delay:-2nd potentiometer is used to adjust the time in second to see how long the  output will remain High.

The PIR sensor has 3 pins

pir motion sensor pin out


VCC            -      Power Supply Pin
GND           -      Ground pin
OUTPUT    -      Output Pin          
                  

APPLICATION

  • PIR sensor is used to Home Security system and any other areas.
  • The use of PIR sensor can be used to create many types of projects.
  • PIR sensor is used to Automation and security system. 

COMPONENT REQUIRED   

  1. Arduino Uno with cable.
  2. PIR sensor.
  3. Buzzer.
  4. Red led and Green led.
  5. Bread board.
  6. jumper wire.
  7. 9v Battery.

PINOUT

PIR SENSOR     -    ARDUINO UNO

VCC                   -    Connect to 5v Pin

GND                  -    Connect to GND Pin
 
Output              -    Digital Pin(D2)

BUZZER          -    ARDUINO UNO

(-) Terminal     -    Connect to GND Pin
 
(+) Terminal    -    Digital Pin(D3)

SCHEMATICS DIAGRAM AND CIRCUIT DIAGRAM

There are two types of diagrams available here. You can follow any of those diagrams.

SCHEMATICS DIAGRAM

schematics diagram of pir sensor with arduino


CIRCUIT DIAGRAM

circuit diagram of pir motion sensor with Arduino Uno


INTERFACE PIR MOTION SENSOR TO ARDUINO AND BUZZER,LED

To create  a project, the given circuit will prepare the project by following the schematics diagram or the circuit diagram. In this project PIR sensor will read the data from the output pin of sensor. When any object movement.

when the sensor detects the movement of any objects ,the pir sensor at that time provide 1 value. It means PIR sensor of output is High.

And whenever the PIR sensor does not detect the movement of any object, the PIR at that time  provides 0 value, it means PIR sensor of output is Low. And all data will display on serial monitor.

CODE

int pirPin = 2;
int buzzer = 3;
int pirVar;

void setup() 
{
  
Serial.begin( 9600 );
pinMode( pirPin, INPUT );
pinMode( buzzer, OUTPUT );

}

void loop()
 {
  
pirVar = digitalRead( pirPin );
Serial.print( " PIR Valu = " );
Serial.println( pirVar );

if( pirVar == 1 )
{
  digitalWrite( buzzer, HIGH );
  Serial.println( " Object Is Detected ! " );
}
else
{
  digitalWrite( buzzer, LOW );
  Serial.println( " Object is Not Detected ! " );
}
delay( 500 );
}











Post a Comment

0 Comments