Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

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.

GPIO

Community draft — report a mistake

CategorySensor
InterfaceGPIO
Voltage4.5–20 V (5 V typical)
Typical price₹90

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

PinWhat it does
VCC4.5–20 V supply — use 5 V
OUTHIGH (3.3 V) while motion is detected
GNDGround

Use it with

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.

↑↓ to move · Enter to open