PIR — Motion-Activated LED
Walk past, the light turns on. Stand still, it goes off.
PIR
Motion
Sensor
digitalRead
What you will learn
- What "passive infrared" means (it just listens, no laser / no radiation)
- How a digital input from a sensor differs from a button press
- Why we still need a resistor in series with the LED even when the sensor drives it
What you will need
| Component |
|---|
| 1× Arduino Uno R3 |
| 1× PIR motion sensor |
| 1× 220Ω resistor (for the LED) |
| 1× red LED |
| 1× breadboard |
| 5× jumper wires |
Step by step
Take it further
- Add a buzzer that beeps once whenever motion is detected (using millis() to avoid double-triggers).
- Add a 5-second "off" delay so the LED stays on for 5 seconds after motion stops (so it does not flicker).
- Print to Serial Monitor how many times motion has been detected since boot.
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
Arduino — PIR Motion Burglar AlarmDetect motion with the PIR sensor and sound the buzzer
LDR — Automatic Night LightThe room gets dark, the LED turns on
DHT11 — Digital ThermometerRead the room temperature on your laptop
Ultrasonic — Distance SensorMeasure how far away an object is
Sound Sensor — Loud Sound LightLED brightness follows the sound · quiet keeps it off
Servo — The Hello World of MotorsSweep back and forth forever
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
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.