PIR Motion Alarm: Buzzer, LCD, ESP32 or ESP-NOW?
Quick answer
- Choose PIR and buzzer if it's your first alarm.
- Choose PIR and door sensor if you want to guard a door too.
- Choose PIR, buzzer and LCD if you want something to show.
- Choose PIR and lamp relay if you want an automatic light.
- Choose ESP32 with interrupts if you want to learn interrupts.
- Choose Two ESP32s (ESP-NOW) if the display must be in another room.
Start with PIR and buzzer and get it calm (wait a minute after power-on). Then add the LCD. Move to ESP32 when you want no delay() or another room.
Side by side
PIR and buzzer
- Who it's for
- Beginners
- Level
- intermediate
- Cost
- Low
- Main parts
- Uno, HC-SR501, buzzer
- Wiring
- Easy
- Code
- About 23 lines
- It can
- Beep when someone moves
- It can't
- Tell you where or when
PIR and door sensor
- Who it's for
- Beginners, next step
- Level
- intermediate
- Cost
- Low
- Main parts
- Uno, PIR, magnetic door sensor, buzzer, LED
- Wiring
- Medium
- Code
- About 33 lines
- It can
- Watch a room and a door
- It can't
- Show a message
PIR, buzzer and LCD
- Who it's for
- School project makers
- Level
- intermediate
- Cost
- Medium
- Main parts
- Uno, PIR, buzzer, 16x2 LCD
- Wiring
- Medium
- Code
- About 30 to 35 lines
- It can
- Show a warning on a screen
- It can't
- Send it to a phone
PIR and lamp relay
- Who it's for
- Intermediate
- Level
- intermediate
- Cost
- Medium
- Main parts
- Uno, PIR, relay, lamp, 16x2 LCD
- Wiring
- Hard
- Code
- About 36 lines
- It can
- Switch a light on when someone comes
- It can't
- Sound an alarm
ESP32 with interrupts
- Who it's for
- Intermediate coders
- Level
- intermediate
- Cost
- Medium
- Main parts
- ESP32, PIR, LED, 330 Ω resistor
- Wiring
- Easy
- Code
- About 44 lines
- It can
- React at once without delay(), using an interrupt and a timer
- It can't
- Send a message: no Wi-Fi in this one
Two ESP32s (ESP-NOW)
- Who it's for
- Intermediate
- Level
- intermediate
- Cost
- High
- Main parts
- Two ESP32s, PIR, OLED
- Wiring
- Medium
- Code
- About 110 lines
- It can
- Show motion in another room with no router
- It can't
- Reach your phone
Written from the parts lists and code in these tutorials. Cost is a rough guide to the parts they list, compared with each other; line counts are of the main program.

