HC-SR501 PIR Motion Sensor
Passive infrared motion sensor with adjustable sensitivity and time delay — ideal for security projects.
The HC-SR501 is a passive infrared (PIR) motion sensor that detects the change in infrared radiation as a warm body moves across its Fresnel-lensed sensing cone. It outputs a simple digital HIGH when motion is detected and LOW otherwise — no library, no bus protocol, just a digital read.
It's the standard part for motion-activated lighting, security alarms, and occupancy sensing. The catch that trips people up is the two onboard trim pots and one jumper: the sensitivity pot sets detection range (up to ~7m), the delay pot sets how long the output stays HIGH after triggering (5s to 300s, defaulting to a very long ~5min-ish setting out of the box that makes the sensor look "stuck" on first test), and the jumper selects single-trigger (L, output resets during the delay window) vs repeatable-trigger (H, output stays high as long as motion continues). It also needs a 30–60 second warm-up period after power-on to stabilize — false or missed triggers in that window are normal.
Specifications
| Operating voltage | 4.5–20V DC (onboard regulator, commonly powered at 5V) |
| Output | Digital HIGH/LOW, 3.3V logic level |
| Sensing range | Up to 7m, adjustable via sensitivity trim pot |
| Sensing angle | <100° detection cone (Fresnel lens) |
| Delay time | 5s–300s, adjustable via delay trim pot |
| Trigger mode | Jumper-selectable: L (single trigger) / H (repeatable trigger) |
| Warm-up time | 30–60s after power-on before stable operation |
| Current draw | <60µA standby |
Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power, 4.5–20V DC (typically 5V) |
| 2 | OUT | Digital output — HIGH when motion detected, LOW otherwise |
| 3 | GND | Ground |
Three pins only — no library or bus needed, just a digitalRead() on OUT. The two trim pots (sensitivity, delay) and trigger-mode jumper (H/L) are set by hand on the board, not via code.
Variants
| Variant | Temp range | Hum range | Accuracy | Protocol | Price |
|---|---|---|---|---|---|
| HC-SR501 | ~$1–2 | ||||
| AM312 (mini PIR) | ~$1–2 | ||||
| RCWL-0516 (microwave radar) | ~$1–2 |