Arduino UNO Home Security System
A home security system is essential to protect property and ensure safety. Using Arduino UNO and sensors, you can build a simple intruder detection system that alerts you when motion is detected.
This project uses a PIR (Passive Infrared) motion sensor to detect movement in a room. When motion is detected, an alarm is triggered using a buzzer or LED.
It is beginner-friendly, low-cost, and forms the foundation for more advanced security and smart home projects.
Why Build a Home Security System?
Home security is important for safety and monitoring. Automated systems reduce the need for constant human attention.
This project teaches sensor integration, digital input/output handling, alarm logic, and basic security automation with Arduino.
Required Components
Arduino UNO board
PIR motion sensor
Buzzer or piezo speaker
LED (optional for visual alert)
Jumper wires and breadboard
Power supply (USB or 5V adapter)
About PIR Motion Sensor
A PIR sensor detects infrared radiation emitted by moving objects such as humans and animals.
The sensor outputs a digital HIGH signal when motion is detected and LOW when the area is clear.
Circuit Connections
PIR Sensor:
VCC → 5V, GND → GND, OUT → Arduino digital pin 2
Buzzer:
Positive → Arduino digital pin 8, Negative → GND
Optional LED:
Anode → Arduino pin 9, Cathode → GND with 220Ω resistor
Ensure stable connections to avoid false alarms.
Arduino Code
int pirPin = 2;
int buzzerPin = 8;
int ledPin = 9;
int pirState = LOW;
void setup() {
pinMode(pirPin, INPUT);
pinMode(buzzerPin, OUTPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
int motion = digitalRead(pirPin);
if(motion == HIGH && pirState == LOW){
Serial.println("Motion Detected!");
digitalWrite(buzzerPin, HIGH);
digitalWrite(ledPin, HIGH);
pirState = HIGH;
} else if(motion == LOW && pirState == HIGH){
digitalWrite(buzzerPin, LOW);
digitalWrite(ledPin, LOW);
pirState = LOW;
}
delay(100);
}
The code reads the PIR sensor. When motion is detected, the buzzer and LED are activated, providing both audio and visual alerts.
Working Principle
PIR sensor detects infrared radiation from moving objects. Arduino reads the digital output and triggers connected output devices (buzzer/LED) accordingly.
The system continuously monitors the area and provides real-time alerts, ensuring timely response to intrusions.
Key Features
Detects human movement in the monitored area
Audio and visual alerts using buzzer and LED
Low-cost and beginner-friendly
Expandable with IoT modules for remote alerts
Energy-efficient and simple to implement
Applications
Home security and room monitoring
Office or warehouse monitoring
Smart home intrusion detection
Educational projects for sensor-based automation
Integration with IoT for remote notifications
Common Mistakes
False alarms due to unstable power or loose wiring
Placing PIR sensor in direct sunlight or near heat sources
Incorrect PIR sensor angle or placement
Using the sensor without a warm-up time (PIR sensors need 30–60 seconds to stabilize)
Connecting buzzer without current-limiting or using high-power buzzer exceeding Arduino pin rating
Frequently Asked Questions
Q1: Can I add multiple PIR sensors? A: Yes, connect each sensor to separate digital pins and modify code to monitor multiple inputs.
Q2: Can this system send remote alerts? A: Yes, integrating with ESP8266 WiFi module or GSM module can send notifications.
Q3: How far can PIR detect motion? A: Typical range is 5–7 meters; check sensor specifications.
Q4: Can I use a relay to trigger high-power alarms? A: Yes, use relay modules to safely switch higher voltage devices.
Conclusion
The Arduino UNO home security system is a simple, effective, and educational project for monitoring motion and protecting your space.
It introduces beginners to sensor interfacing, digital input/output, and alarm logic.
The project can be expanded with IoT, multiple sensors, cameras, or smart home integration for enhanced security.