PIR — Smart Doorbell / Welcome Light
A guest walks up to the door — chime + welcome LED
PIR
Buzzer
LED
Welcome
What you will learn
- How to light an LED INSTANTLY with analogWrite() the moment motion is detected (no fade-in delay)
- How to play a 7-note melodious chime by chaining tone() calls with delay() between them
- How to use millis() to fade an LED out over 3 seconds without blocking the loop
- How to prevent the welcome chime from re-triggering while the person is still standing there
What you will need
| Component |
|---|
| 1× 9V battery |
| 1× PIR motion sensor |
| 1× 220Ω resistor |
| 1× white LED |
| 1× buzzer |
| 1× slide switch (doorbell on/off) |
Step by step
Take it further
- Add a second PIR at "head height" vs "knee height" — only chime if BOTH fire (someone walked up, not a cat).
- Print "Welcome!" to the Serial Monitor only on the FIRST trigger after a 30-second quiet period.
- Make the LED color cycle (red, green, blue) on each trigger (use a small array and increment an index).
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
Police SirenAlternating red + blue LEDs with a wailing 600–1500 Hz buzzer
Ultrasonic — Reverse Parking SensorBeep faster as you get closer
DHT11 — Temperature AlarmToo hot, too cold, or just right
PIR — Intruder AlarmMotion + armed switch = loud alarm. Disarm first.
Simon Says — Memory GameRepeat the pattern, level by level
Ultrasonic — Pitch by DistanceCloser = higher pitch
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.