Quick Guide to PIR Sensor

Quick Guide to PIR Sensor

Welcome to this interesting series of sensors. Today, I will explain PIR sensor.

🍁What is PIR Sensor?

A passive infrared sensor is a type of electrical sensor that detects infrared light emitted by objects. PIR sensor can detect animal/human movement within a certain range. These sensors detect heat. They do this by measuring the ambient temperature of the room using several detection beams.

🍁How a PIR sensor looks like?

pir1.png

🍁Pin Description Of PIR sensor

  • Vcc -> connected to the positive supply 5V DC.

  • Vout -> corresponds to the source terminal of the device. It is the output pin of the sensor that carries the detected IR signal to an amplifier.

  • Gnd -> connected to the ground

🍁Working Funda of PIR sensor?

PIR is made up of a pyroelectric sensor (a sensor for converting human infrared radiation into electricity) that can detect various amounts of infrared radiation. It senses infrared radiation from its surroundings. Focusing on the optical system allows the pyroelectric device to create a sudden electrical signal once there is infrared radiation from the human body particle with temperature.

If human infrared radiation is directly irradiated on the detector, it will, of course, produce a temperature change, resulting in the emission of a signal. However, the detection distance will not be increased as a result of all of this. An optical system must be installed to gather infrared light in order to increase the detector's detection distance. Plastic optical reflection systems or plastic Fresnel lenses are commonly utilized as infrared radiation focusing systems.

pir1.png

🍁Interfacing of PIR sensor with Arduino

pir2.png

🍁Source Code

int sensor=2; //The output of PIR sensor connected to pin 2
int sensor_value; //variable to hold read sensor value
void setup()
{
pinMode(sensor,INPUT); // configuring pin 2 as Input
Serial.begin(9600); // To show output value of sensor in serial monitor
}

void loop()
{
sensor_value=digitalRead(sensor); // Reading sensor value from pin 2
Serial.println(sensor_value); // Printing output to serial monitor
}

🍁Applications of PIR Sensor

  • PIR sensors in lighting controls can detect a human body’s presence and automatically turn on the room’s lights.
  • PIR sensors are used in automatic door opening systems in malls.
  • PIR sensors are used in Security Alarm Systems.

Stay tuned to this series of sensors to gain knowledge of next sensor .... [ Gas detecting Sensor].

Did you find this article valuable?

Support 🍁Welcome to Techie Tweed🍁 by becoming a sponsor. Any amount is appreciated!