Arduino — PIR Motion Burglar Alarm
Detect motion with the PIR sensor and sound the buzzer
Arduino
PIR
Buzzer
Motion
Security
What you will learn
- How a PIR sensor detects motion (it senses heat / IR radiation)
- Why the PIR needs a 2-3 second "warm-up" after power-on before it reads accurately
- How to debounce the alarm so it does not keep retriggering on the same motion event
What you will need
| Component |
|---|
| 1× Arduino Uno R3 |
| 1× PIR motion sensor (HC-SR501) |
| 1× buzzer |
| 1× LED (red) |
| 1× 220Ω resistor |
| 1× breadboard |
| 5× jumper wires |
Step by step
Take it further
- Add a 3-second "exit delay" — when you press a button, the alarm arms after 3 seconds so you can leave the room.
- Print a count of how many times the alarm has triggered to the Serial Monitor.
- Use the serial output to log motion events to a computer for security logging.
Practise it before you build it
Wire this circuit in the ThinkEdge Learn simulator first. The simulator runs a real Arduino sketch against a modified-nodal-analysis solver, so the LED on screen actually lights when the current is right — no hardware, no burnt components, and a class can try it in a browser.
Related projects
PIR — Motion-Activated LEDWalk past, the light turns on. Stand still, it goes off.
Arduino Nano — Parking Sensor4 distance zones — 1 slow low beep far, 2 fast high-pitch beeps close (like a real car reversing buzzer)
Arduino — Two-Player Reaction BattleTwo players, two buttons — fastest finger wins
PIR — Intruder AlarmMotion + armed switch = loud alarm. Disarm first.
Arduino — Servo SweepMake a servo motor wave back and forth
Arduino Nano — Reaction Timer GameHow fast can you press the button? Built in a tiny form factor.
Guides that use this project
One guide on the site build this project as part of a longer explanation. The guide says why the circuit works; this page says how to wire it.
Where this project sits
It is also part of these lists, which is how a class usually finds it.
Arduino LED projects for beginners36 projects in this list
Arduino PIR motion sensor projects4 projects in this list
Arduino buzzer and tone projects19 projects in this list
Try the full simulator with your class
103 guided circuit projects, 21 lessons and an in-browser Arduino simulator. The first 15 projects are free, no account needed. One licence covers a whole school.