

A Passive Infrared (PIR) Sensor detects motion by measuring changes in infrared radiation, typically emitted by warm bodies. It is a widely used component in motion detection systems due to its low cost, low power consumption, and ease of integration. PIR sensors are commonly found in security systems, automatic lighting, and home automation projects.








Below are the key technical details of a standard PIR sensor module:
| Parameter | Value |
|---|---|
| Operating Voltage | 4.5V to 20V DC |
| Current Consumption | < 50 µA (standby), ~65 mA (active) |
| Detection Range | 3 to 7 meters (adjustable) |
| Detection Angle | ~120° (varies by model) |
| Output Signal | Digital (High: 3.3V or 5V, Low: 0V) |
| Warm-up Time | ~30 seconds |
| Operating Temperature | -20°C to 50°C |
The PIR sensor module typically has three pins:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (4.5V to 20V DC) |
| 2 | OUT | Digital output pin (High when motion is detected) |
| 3 | GND | Ground connection |
Some PIR modules may also include adjustable potentiometers for:
Below is an example of how to connect and use a PIR sensor with an Arduino UNO to control an LED:
// PIR Sensor and LED Example with Arduino UNO
// Connect PIR sensor OUT pin to Arduino Digital Pin 2
// Connect an LED to Digital Pin 13 (with a 220Ω resistor)
#define PIR_PIN 2 // Define the PIR sensor output pin
#define LED_PIN 13 // Define the LED pin
void setup() {
pinMode(PIR_PIN, INPUT); // Set PIR sensor pin as input
pinMode(LED_PIN, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
Serial.println("PIR Sensor Test Initialized");
}
void loop() {
int motionDetected = digitalRead(PIR_PIN); // Read PIR sensor output
if (motionDetected == HIGH) {
// Motion detected
digitalWrite(LED_PIN, HIGH); // Turn on LED
Serial.println("Motion Detected!");
} else {
// No motion detected
digitalWrite(LED_PIN, LOW); // Turn off LED
}
delay(100); // Small delay to stabilize readings
}
False Triggers:
No Detection:
Output Stays HIGH:
Output Stays LOW:
Q1: Can the PIR sensor detect motion through glass?
A1: No, PIR sensors cannot detect motion through glass as infrared radiation does not pass through it effectively.
Q2: How do I increase the detection range?
A2: Adjust the sensitivity potentiometer on the sensor module. Note that increasing sensitivity may also increase false triggers.
Q3: Can I use the PIR sensor with a 3.3V microcontroller?
A3: Yes, but ensure the sensor's output voltage is compatible with the microcontroller's input voltage levels.
Q4: Why does the sensor take time to stabilize after powering on?
A4: The sensor requires a warm-up period to calibrate its internal circuitry and avoid false triggers.
By following this documentation, you can effectively integrate a PIR sensor into your projects for reliable motion detection.