Security System Using PIR Motion Sensors - Electronic Engineering Guide
1. Introduction
A Security System Using PIR Motion Sensors is a basic yet effective method of detecting movement within a specific area. PIR (Passive Infrared) sensors detect changes in infrared radiation caused by motion, triggering alarms or other responses.
2. Objectives
• Detect unauthorized motion in a secured area.
• Trigger alarms or notifications upon detection.
• Use low-power components for energy efficiency.
• Create a compact, reliable, and responsive security system.
3. Components Required
• Arduino Uno / Nano
• PIR Motion Sensor (HC-SR501)
• Buzzer or Alarm Module
• LED (optional, for visual indicator)
• Resistors (220Ω for LED)
• Breadboard and Jumper Wires
• Power Supply (USB or 9V battery with adapter)
4. Working Principle of PIR Sensors
PIR sensors detect infrared energy emitted by warm bodies. When a person or animal moves within the sensor’s range, it creates a sudden change in infrared energy, which the sensor detects and sends as a digital signal (HIGH or LOW) to the microcontroller.
5. System Overview
The PIR sensor is connected to an Arduino, which continuously checks for digital HIGH signals indicating motion. If motion is detected, the Arduino activates a buzzer and LED to signal intrusion.
6. Circuit Design and Configuration
• PIR OUT pin to Arduino digital pin (e.g., D2)
• Buzzer positive to Arduino D3 (with GND connection)
• LED anode to D4 through a 220Ω resistor; cathode to GND
• VCC and GND of PIR connected to 5V and GND on Arduino
7. Arduino Code and Logic
Sample Code:
int pirPin = 2;
int buzzer = 3;
int led = 4;
void setup() {
pinMode(pirPin, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(led, OUTPUT);
Serial.begin(9600);
}
void loop() {
int motion = digitalRead(pirPin);
if (motion == HIGH) {
digitalWrite(buzzer, HIGH);
digitalWrite(led, HIGH);
Serial.println("Motion
detected!");
delay(2000);
} else {
digitalWrite(buzzer, LOW);
digitalWrite(led, LOW);
}
}
8. Alarm and Notification Mechanisms
• Buzzer produces an audible alert when motion is detected.
• LED lights up to provide a visual indication.
• Optionally, a GSM or Wi-Fi module can be integrated for remote alerts.
9. Power Supply Considerations
• System operates on 5V (from USB or regulated battery
supply).
• For portability, a 9V battery with voltage regulator or power bank can be
used.
• Ensure stable voltage to avoid false triggering of sensors.
10. Applications
• Home and Office Intrusion Detection
• Motion-based Lighting Systems
• Industrial Area Security
• ATM and Vault Monitoring
11. Limitations and Future Enhancements
• False alarms due to temperature fluctuations or pets.
• Limited detection range (typically 5–7 meters).
• Enhancements: camera integration, AI-based filtering, GSM/Wi-Fi alerts,
battery backup system.
12. Conclusion
This simple yet effective PIR-based security system provides a great starting point for electronic security automation. It is easily expandable and demonstrates key principles of sensor interfacing, digital logic, and alert mechanisms.