PIR Theft Alert
System
Build a real motion-detection security alarm with Arduino UNO — step by step, with a live simulator included.
A PIR-based Theft Detection System using an Arduino UNO. When someone moves into the sensor's field, the system instantly triggers a buzzer (audio alert) and an LED (visual alert) — just like a real security alarm.
Perfect for school science exhibitions and beginners. You can simulate it entirely in Tinkercad — no hardware required to start!
Gather these 7 items — or just open the free Tinkercad simulation in Step 5.
A PIR (Passive Infrared) Sensor detects infrared radiation (body heat) from warm objects. It contains two IR-sensitive slots. When both see equal radiation — nothing happens. When a person walks by, one slot picks up more IR than the other, creating a differential signal that triggers a HIGH output.
Both IR slots detect equal radiation → No difference → OUT stays LOW
One slot detects more IR → Differential signal → OUT goes HIGH
Click the button to simulate a person walking past the sensor.
| Component | Terminal | Connects To | Notes |
|---|---|---|---|
| PIR Sensor | VCC | Arduino 5V | Power supply |
| GND | Arduino GND | Common ground | |
| OUT | Digital Pin 2 | Motion signal input | |
| LED | Anode (+) | Pin 8 via 220Ω | Resistor protects LED |
| Cathode (–) | GND | – | |
| Buzzer | Positive (+) | Digital Pin 9 | Alarm output |
| Negative (–) | GND | – |
// ────────────────────────────────────────── // PIR Theft Alert System // MakeMindz makemindz.com // ────────────────────────────────────────── int pirPin = 2; // PIR sensor OUT → Digital Pin 2 int ledPin = 8; // LED → Digital Pin 8 int buzzerPin = 9; // Buzzer → Digital Pin 9 void setup() { pinMode(pirPin, INPUT); // PIR sends data IN to Arduino pinMode(ledPin, OUTPUT); // LED is controlled by Arduino pinMode(buzzerPin, OUTPUT); // Buzzer is controlled by Arduino } void loop() { int motion = digitalRead(pirPin); // Read the PIR sensor if (motion == HIGH) { // 🚨 Motion detected — sound the alarm! digitalWrite(ledPin, HIGH); // LED ON digitalWrite(buzzerPin, HIGH); // Buzzer ON } else { // ✅ No motion — stay quiet digitalWrite(ledPin, LOW); // LED OFF digitalWrite(buzzerPin, LOW); // Buzzer OFF } }
We store pin numbers in named variables like pirPin so the code is readable and easy to update.
Tells Arduino which pins receive data (INPUT) and which send power (OUTPUT). Runs once on startup.
digitalRead checks the PIR every millisecond. HIGH = alarm on, LOW = alarm off.
Module Complete!
You've finished the PIR Theft Alert System module. You know the theory, the wiring, the code — now go build it!
Comments
Post a Comment