SECURITY ALARM PROJECT USING PIR SENSOR AND ARDUINO UNO

 

Home Security Alarm Using PIR Sensor & Arduino

 Project Overview

This project is a Dark-Activated Home Security Alarm System built using the Arduino Uno and a HC-SR501.

The system activates only at night (low light condition) using an LDR sensor. When motion is detected in the dark, the system triggers an alarm (LED + buzzer) and displays a warning message on the LCD.

This makes the system energy-efficient and suitable for real-world home security applications.


 Working of PIR Sensor

The HC-SR501 detects motion based on infrared radiation (heat energy).

🔹 How PIR Works:

  • The PIR sensor has two IR-sensitive slots.

  • When idle, both slots detect equal ambient infrared radiation.

  • When a warm body (human/animal) passes:

    • One slot detects more IR than the other.

    • This creates a positive differential signal.

  • When the body leaves:

    • A negative differential signal is produced.

  • These changes generate a digital HIGH output, indicating motion detection.


 Working of the Project

This system works as a dark-activated intrusion alarm.

🔹 Step 1: Light Detection (LDR)

  • LDR measures ambient light.

  • If light level is below threshold (dark condition) → System activates.

  • If daylight → System remains OFF.

🔹 Step 2: Motion Detection (PIR)

  • When motion is detected:

    • PIR outputs Logic HIGH.

    • Arduino triggers alarm.

🔹 Step 3: Alert System

  • LED turns ON.

  • Buzzer sounds.

  • LCD displays:

    • “Motion Detected!”

    • “Intruder Alert!”


 Components Required

  • 1 × Arduino Uno

  • 1 × HC-SR501

  • 1 × LDR (Light Dependent Resistor)

  • 2 × 1kΩ Resistors

  • 1 × LED

  • 1 × Buzzer

  • 1 × Potentiometer (for LCD contrast)

  • 1 × 16x2 LCD Display

  • 1 × 9V Battery

  • Jumper wires

  • Arduino USB Cable


 Basic Circuit Concept

 PIR Sensor

PIR PinConnect To
VCC5V
GNDGND
OUTDigital Pin 2

 LDR (Voltage Divider)

  • One end → 5V

  • Other end → Resistor → GND

  • Junction → Analog Pin A0


 Buzzer & LED

  • Buzzer → Digital Pin 8

  • LED → Digital Pin 7 (with resistor)


 LCD

  • RS, E, D4–D7 → Arduino digital pins

  • VSS → GND

  • VDD → 5V

  • VO → Potentiometer middle pin


 Basic Logic (Concept Code)

int pir = digitalRead(2);
int lightLevel = analogRead(A0);

if(lightLevel < 400) { // Dark condition
if(pir == HIGH) {
digitalWrite(8, HIGH); // Buzzer ON
digitalWrite(7, HIGH); // LED ON
lcd.print("Motion Detected!");
}
}

 Key Features

✅ Dark-activated system (saves power)
✅ Human motion detection
✅ Audible and visual alert
✅ LCD status display
✅ Adjustable sensitivity (PIR + LDR threshold)
✅ Low-cost home security solution


 Applications

  • Home security systems

  • Office intrusion detection

  • Warehouse protection

  • ATM security monitoring

  • Smart building automation


 Possible Upgrades

 GSM module to send SMS alerts
 IoT notification via WiFi
 Add camera module
 Password-based arming system
 Emergency siren
 Event logging with SD card
 Auto night mode indicator


 Educational Value

Students learn:

  • PIR motion sensing principle

  • IR radiation detection

  • Analog vs Digital signals

  • Voltage divider concept

  • Embedded security systems

  • Sensor-based automation


 Conclusion

The Home Security Alarm using Arduino and PIR sensor is a practical and real-world security solution. It intelligently activates only in dark conditions and detects human motion accurately, making it ideal for residential and commercial use.


Comments