πHome Security System
π― Objective of This Lesson
Students will learn:
-
What is motion detection
-
What is a PIR sensor
-
How PIR detects human movement
-
Internal working principle
-
Types of PIR sensors
-
Applications in real world
π What is Motion Detection?
Motion detection means:
Detecting movement of a person or object in a specific area.
In home security systems, motion detection is used to:
-
Detect intruders
-
Trigger alarms
-
Turn ON lights automatically
-
Send security alerts
π‘ What is PIR Sensor?
PIR stands for:
Passive Infrared Sensor
It is called passive because:
-
It does NOT emit energy
-
It only detects infrared radiation from objects
Every human body emits infrared radiation (heat).
PIR sensor detects change in infrared levels.
π§ Working Principle of PIR Sensor
The PIR sensor works based on:
π Infrared radiation detection
Step-by-step working:
1οΈβ£ Human body emits infrared radiation
2οΈβ£ PIR sensor detects heat energy
3οΈβ£ When a person moves, infrared level changes
4οΈβ£ Sensor detects this change
5οΈβ£ Output pin becomes HIGH
6οΈβ£ ESP32 reads motion detected
Important:
PIR detects motion, not presence.
If a person stands still β sometimes no detection.
π¬ Internal Structure of PIR Sensor
Inside PIR module:
-
Pyroelectric sensor element
-
Fresnel lens (white dome)
-
Amplifier circuit
-
Comparator circuit
-
Output stage
πΉ Pyroelectric Sensor
This is the core sensing element.
It detects change in infrared radiation.
When IR radiation changes β small voltage is generated.
πΉ Fresnel Lens
The white dome cover:
-
Focuses infrared signals
-
Increases detection range
-
Divides detection area into zones
π‘ How PIR Detects Movement
The sensor has two sensing slots.
When a person moves:
-
First slot detects heat
-
Then second slot detects heat
-
This difference creates signal
-
Motion is detected
No movement β no change β no output.
π PIR Sensor Pin Description
Most common PIR module (HC-SR501 type) has 3 pins:
| Pin | Function |
|---|---|
| VCC | 5V power |
| GND | Ground |
| OUT | Digital Output |
Output:
LOW β No motion
HIGH β Motion detected
β Adjustable Settings on PIR
Most PIR modules have two potentiometers:
1οΈβ£ Sensitivity Adjustment
-
Adjust detection range
2οΈβ£ Time Delay Adjustment
-
Adjust how long output stays HIGH
There is also a trigger mode jumper:
-
H mode (Retriggerable)
-
L mode (Non-Retriggerable)
π PIR Detection Range
Typical values:
-
Range: 5 to 7 meters
-
Angle: 110Β° to 120Β°
Depends on module and adjustment.
π Power Requirements
-
Operating Voltage: 5V
-
Output Signal: 3.3V β 5V compatible
-
Safe for ESP32 digital input
π Real-World Applications
PIR sensors are used in:
-
Home security systems
-
Automatic lights
-
Motion cameras
-
Smart door alarms
-
Energy saving systems
-
Smart classrooms
β Important Limitations
Students must understand:
-
Cannot detect through walls
-
Sensitive to temperature changes
-
Can be triggered by pets
-
Needs warm-up time (30β60 seconds)
β³ Warm-Up Time
After power ON:
-
Wait 30β60 seconds
-
Sensor stabilizes
-
During this time output may fluctuate
π Learning Outcomes
After this lesson, students understand:
-
What is infrared radiation
-
What is passive sensor
-
How PIR detects motion
-
Difference between motion & presence
-
Practical security sensor basics