PIR Motion Sensor Alarm System
Introduction
PIR sensors detect infrared radiation from warm bodies, making them perfect for motion detection applications.
How PIR Works
The sensor contains two pyroelectric elements. Motion causes differential heating, generating a signal.
Wiring the Circuit
PIR sensors have three pins: VCC, GND, and OUT. The output goes HIGH when motion is detected.
Basic Alarm Code
Read the sensor state and trigger a buzzer when motion is detected. Add a delay to prevent continuous triggering.
Adding Notifications
With a WiFi module like the ESP8266, you can send push notifications or emails when the alarm triggers.
Next Steps
Add multiple zones, entry/exit delays, or integrate with a home automation system.