HC-SR501 PIR motion sensor
HC-SR501 PIR pinout, the 3.3 V output that suits every board, single vs repeat trigger, the two adjustment pots and the warm-up time.
Community draft — report a mistake
3.3 V or 5 V? Power it from 5 V (VIN/5V pin). Its output is a 3.3 V logic signal, so it connects directly to ESP32, Pico and Uno GPIOs.
The HC-SR501 detects moving warm bodies (people, animals) with a pyroelectric sensor behind a Fresnel dome, out to about 3–7 m in a ~110° cone. It doesn’t measure distance or see still objects.
Two orange pots set sensitivity (range) and how long OUT stays HIGH (about 3 s to 5 min). The jumper picks L (single trigger) — one pulse, then a short dead time — or H (repeat trigger), which keeps OUT HIGH as long as there’s movement. H is what you want for lights.
Pin labels hide under the dome. Pop it off gently to read VCC, OUT and GND printed next to the header — the order isn’t the same on every clone.
Prices are indicative (Oct 2026) and vary by seller.
Pinout
| Pin | What it does |
|---|---|
VCC | 4.5–20 V supply — use 5 V |
OUT | HIGH (3.3 V) while motion is detected |
GND | Ground |
Use it with
- HC-SR501 PIR motion sensor with Arduino Nano Arduino C++
- HC-SR501 PIR motion sensor with Arduino Pro Mini (5 V) Arduino C++
- HC-SR501 PIR motion sensor with Arduino Uno R3 Arduino C++
- HC-SR501 PIR motion sensor with ESP32-C3 SuperMini Arduino C++
- HC-SR501 PIR motion sensor with ESP32 DevKit V1 Arduino C++
- HC-SR501 PIR motion sensor with NodeMCU ESP8266 Arduino C++
- HC-SR501 PIR motion sensor with Raspberry Pi Pico W MicroPython
- HC-SR501 PIR motion sensor with Wemos D1 mini Arduino C++
- HC-SR501 PIR motion sensor with XIAO ESP32C3 Arduino C++
Common errors
Triggers by itself every few minutes
Normal for the first 30–60 seconds after power-up while it calibrates. After that, check for heat sources (sunlight, heaters, fans) and Wi-Fi interference — keep it 10+ cm from an ESP32 antenna.
Output stays HIGH for a long time
The time-delay pot is turned up (up to about 5 minutes). Turn it fully anticlockwise for about 3 seconds.
Doesn't trigger on a 3.3 V supply
The on-board regulator needs about 4.5 V. Feed VCC from 5 V; the output is still 3.3 V.