learn and build innovative projects

Intruder Detection Using Passive Infrared (PIR) Sensor and Arduino

No comments :

Intruder Detection Using Passive Infrared (PIR) Sensor and Arduino

Interfacing an Arduino with a Passive Infrared (PIR) Sensor allows for the detection of human or animal movements within the sensor range. This project is straightforward and efficient, making it ideal for detecting potential intruders in the vicinity of your home. The sensor is commonly known as PIR, representing "Passive Infrared," "Pyroelectric," or "IR motion" sensor.

Components Required:
  • Arduino Uno with USB 2.0 Cable
  • PIR Sensor
  • Jumper Wires

Arduino Uno with USB 2.0 Cable:

Arduino is a user-friendly, open-source electronics platform comprising both hardware and software components. Its design is geared towards enabling individuals involved in creating interactive projects.

Intruder Detection Using Passive Infrared Sensor and Arduino IoT Projects Interfacing Arduino and Passive Infrared (Pir) Sensor to detect human/animal movements with in the sensor range, This project is simple and perfect to detect intruders near your home. sensor referred as PIR, "Passive Infrared", "Pyroelectric", or "IR motion" sensor.

PIR Sensor:


PIR stands for Passive Infrared sensor. This sensor is designed to detect the presence of human beings or animals. Two crucial components within the sensor contribute to its functionality. The first is the pyroelectric crystal, capable of detecting heat signatures emitted by living organisms, such as humans or animals. The second component is the Fresnel lenses, which serve to broaden the range covered by the sensor.

PIR sensor stands for Passive Infrared sensor. It can detect the presence of Human beings or animals. There are two important materials present in the sensor one is the pyroelectric crystal which can detect the heat signatures from a living organism (humans/animals)   and the other is a Fresnel lenses which can widen the range of the sensor.

Specifications:

  • Power Supply :+5V DC
  • Quiescent Current : <50uA
  • Ranging Distance: <120 ° within 7 meter
  • Measuring Angle: 110 ° cone angle
  • Board Dimension: 32mm x 24mm

Jumper Wires:

A jumper wire is an electrical wire equipped with connectors or pins at each end. It is commonly employed to interconnect components without the need for soldering, providing a convenient method for establishing electrical connections between different parts of a circuit.

A jumper wire is an electrical wire with a connector or pin at each end, which is normally used to interconnect the components each other without soldering.

Connection Diagram:

Connect your components according to the provided diagram and link the USB cable from Arduino to your computer.

Connect your components using jumper wires

Arduino Code:

//the time we give the sensor to calibrate (10-60 secs according to the datasheet)

int calibrationTime = 15;
int pirPin = 2; //the digital pin connected to the PIR sensor's output

int ledPin = 13; //Built-In led

void setup()
{
Serial.begin(9600);
pinMode(pirPin, INPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(pirPin, LOW);

//give the sensor some time to calibrate

Serial.print("calibrating sensor ");
for(int i = 0; i < calibrationTime; i++){
Serial.print(".");
delay(1000);
}

Serial.println(" done");
Serial.println("SENSOR ACTIVE");
delay(2000);
}

void loop()
{
if(digitalRead(pirPin) == HIGH)
{
digitalWrite(ledPin, HIGH); //the led visualizes the sensors output pin state
Serial.println("intruder detected! ");
delay(2000);
}
else if(digitalRead(pirPin) == LOW)
{
digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
Serial.println("intruder not detected!"); //output
delay(2000);
}
else
{
Serial.println("Sensor Fault");
}
}

Upload:


Connect Arduino board to computer using USB cable and wait for few seconds then it will show you "Com port". 

Check your Com Port and Board Selection before upload Arduino code.

Connect Arduino board to computer using USB cable and wait for few seconds then it will show you "Com port".

Check output in Arduino serial monitor.



Additional Projects:

No comments :

Post a Comment

Internet of Things

What is Internet of Things?

What is IoT? The Internet of Things (IoT) is the network of physical objects/things are embedded with software, sensors, and hardw...