HC-SR501 Pyroelectric Infrared Motion Sensor modules are electronic sensors that is used to detect motion. These modules are based on passive infrared technology with a high sensitivity and reliability.
What is a HC-SR501 Pyroelectric Infrared Motion Sensor module?
The HC-SR501 Pyroelectric Infrared Motion Sensor module is a passive infrared sensor which functions as an adjustable automatic motion detector. They are referred to as PIR, ‘Passive Infrared’, ‘Pyroelectric’ or ‘IR motion’ sensors. IR uses heat to detect motion. The output is given digitally as a difference in voltage (HIGH vs. LOW – sensing on HIGH) where the change in voltage can then be used by a microcontroller (e.g. Arduinos, ESP8266s and ESP32s) using a digital read pin.
Depending on the variation of the module, some is purely triggered (as a short burst – e.g. some normal versions and the ‘mini’ version), while others have an adjustable time delay, trigger delays (i.e. time the voltage stays high), motion sensitivity and repeatability (non vs. repeatable) jumpers.
Sample uses & alternatives
These modules are probably mostly used in security projects for motion detection. Other motion detection modules includes Laser Transmitter Receiver modules.
HC-SR501 Pyroelectric Infrared Motion Sensor module specifications
Pins: 3. Pwr, Out, Gnd (some modules are marked) – some modules might have wires pre-attached. Middle pin is usually Out. When holding upside down with pins towards you – Gnd is right, Pwr is left.
Trigger mode (digital read): HIGH w/ movement, LOW w/o movement
Input voltage: 3.3 ~ 20 V DC
Quiescent current: < 65 μA
Working current: 65 mA
Level output: 3.3 V DC high, 0V low
Time delay: 0.3 s to 300 s (adjustable)* **
Sensing block time: 0.2 s**
Trigger: L can not be duplicated, H can be repeated (usually default)**
Sensing range: 3 – 7 m & 100° – 120° angle* **
Working temperature: -15 to +70 °
PCB dimensions: 32 x 24 mm or 32 x 26 mm*, screw pitch 28 mm, screw aperture 2 mm
Sensor lens dimensions: 23 x 23 x 15 mm (removable)
Breadboard friendly: na
*Range and/or ** ability depends on model
Even in their working state, HC-SR501 Pyroelectric Infrared Motion Sensor modules are ultra-low power consumers. At rest, currents below 65 μA are consumed and when working, 65 mA is consumed.
Voltage requirements are reported to be between 4.5 – 20 V AC (module dependent), making it perfect for, for example, Arduino microcontrollers. By looking at the datasheet, internally the HC-SR501 Pyroelectric Infrared Motion Sensor module uses 3.3 V AC, meaning these modules can also be powered from microcontrollers such as ESP8266s and ESP32s.
Ability dependent on variation of the module and is controlled either by a PCB jumper or by connecting soldier pads. When holding upside down with pins towards you, the mode pins are situated in the top right corner. Default mode (usually) is the repeatable trigger mode (H-mode) where after motion is sensed, the voltage will only drop after movement has stopped. The non-repeatable mode (L-mode or auto reset mode) does not allow a repeat trigger and the voltage is dropped as soon as the delay time is over.
Motion sensitivity or adjustable sensing range is available on some HC-SR501 Pyroelectric Infrared Motion Sensor modules. If present, it is controlled by one of, or an adjustable variable resister (orange/yellow) and is indicated by Sx. Looking at the back, resisters facing towards you, the sensitivity is increased by turning it clockwise and vice versa.
The time delay function also seems not to be available on all variations. As with the sensing range, the time delay is also controlled by one of, or an orange/yellow resister (indicated by Tx). Looking again at the back, resisters facing towards you, the time delay is increased by turning it clockwise and vice versa. The time delay range is variation specific and ranges from 0.3 s to 16 s whereas others are for example 3 to 300 seconds.
Sensing block time
This is the time the module, after being triggered will not be open for another induction. In other words, the time the voltage will stay high. The default sensing block time is 0.2 s.
An additional photosensitive control (chip/jumper/module?) can be asked for, and soldiered on manually (CDS) to some HC-SR501 Pyroelectric Infrared Motion Sensor modules, where the amount of light (i.e. day vs. night) entering an eye can be used as part of the logic to reserve/prevent or trigger a voltage position.
To get started you will need
These were the parts that were used. Most are available from BangGood, eBay and RS Components. Direct links to some of the parts are supplied lower down.
- HC-SR501 Pyroelectric Infrared Motion Sensor module
- Breadboard and Solderless breadboard jumper cable set
- 10, 20 or 30 cm female to female jumper wire set (optional)
- 10, 20 or 30 cm male to female jumper wire set (optional)