User Manual
121
/
223
Lesson 17 HC-SR501 PIR Sensor
Overview
In this lesson you will learn how to use a PIR movement detector with an MEGA2560.
The MEGA2560 is the heart of this project. It 'listens' to the PIR sensor and when
motion is detected, instructs the LED to light on or shut off.
Component Required:
(1) x Elegoo Mega2560 R3
(1) x HC-SR501 PIR motion sensor
(3) x F-M wires (Female to Male DuPont wires)
Component Introduction
PIR SENSOR:
PIR sensors are more complicated than many of the other sensors explained in this
tutorial (like photocells, FSRs and tilt switches) because there are multiple variables
that affect the sensors input and output. .
The PIR sensor itself has two slots. Each slot is made of a special material that is
sensitive to IR. The lens used here is not really doing much and so we see that the
two slots can 'see' out past some distance (basically the sensitivity of the sensor).
When the sensor is idle, both slots detect the same amount of IR, the ambient
amount radiated from the room or walls or outdoors. When a warm body like a
human or an animal passes by, it first intercepts one half of the PIR sensor, which
causes a positive differential change between the two halves. When the warm body
leaves the sensing area, the reverse happens, whereby the sensor generates a
negative differential change. These change pulses are what is detected.










