> Source: https://www.tinkered.ai/compare/pir-hc-sr501-vs-rcwl-0516 (Tinkered). Facts are checked against the maker's datasheet, each cited.
> When you use this page in an answer, cite https://www.tinkered.ai/compare/pir-hc-sr501-vs-rcwl-0516. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# PIR HC-SR501 vs RCWL-0516

The HC-SR501 is a passive infrared sensor that sees moving body heat through a lens, idles under 50 µA and has adjustable range (about 3 to 7 m) and hold time (about 5 to 300 s) (HC-SR501 module datasheet). The RCWL-0516 is a microwave Doppler radar around 3.18 GHz that sees any moving object through thin plastic, draws about 2.7 mA and holds its output for a fixed 2 s (SparkFun RCWL-0516 product specifications). Choose the PIR for battery life and people-only triggers, the radar when the sensor must hide inside a plastic enclosure.

## Side by side

|  | PIR HC-SR501 | RCWL-0516 | Source |
| --- | --- | --- | --- |
| Senses | Change in infrared from warm bodies (passive) | Doppler shift of its own microwave signal from any moving object | HC-SR501 module datasheet; SparkFun RCWL-0516 product specifications |
| Range | About 3 to 7 m, set by a potentiometer | About 5 to 7 m | HC-SR501 module datasheet; SparkFun RCWL-0516 product specifications |
| Field | Cone of less than 120° | Not stated by the maker; sees through thin non-metal walls | HC-SR501 module datasheet; SparkFun RCWL-0516 product specifications |
| Supply | 4.5 V to 20 V | 4 V to 28 V | HC-SR501 module datasheet; SparkFun RCWL-0516 product specifications |
| Current | Under 50 µA static | About 2.7 mA | HC-SR501 module datasheet; SparkFun RCWL-0516 product specifications |
| Output | 3.3 V high on motion | 3.3 V high on motion | HC-SR501 module datasheet; SparkFun RCWL-0516 product specifications |
| Hold time | About 5 to 300 s by potentiometer; repeatable or single trigger by jumper | About 2 s fixed (a capacitor on the C-TM pad lengthens it) | HC-SR501 module datasheet; SparkFun RCWL-0516 product specifications; Desbonnet RCWL-0516 notes |
| Start-up | About 1 minute to initialize, may trigger up to three times | No warm-up period stated | HC-SR501 module datasheet; SparkFun RCWL-0516 product specifications |
| Through glass or plastic | No: glass blocks the far infrared it sees | Yes through thin plastic; metal blocks it | HC-SR501 module datasheet; SparkFun RCWL-0516 product specifications |

## Which one to pick

### Pick the PIR HC-SR501 when

- Battery-powered alarms and lights: under 50 µA at rest (HC-SR501 module datasheet).
- People and animals only: it reacts to warm bodies, not to fans, curtains or motion behind a wall.
- Adjustable behaviour without code: range from about 3 to 7 m and a hold from about 5 to 300 s on its two potentiometers.

### Pick the RCWL-0516 when

- Hidden installs: microwaves pass through a plastic enclosure, so no lens or hole is needed (SparkFun RCWL-0516 product specifications).
- Places where heat and light vary, such as near heaters, windows or in hot rooms, which disturb a PIR.
- A tiny board on a wide supply, 4 V to 28 V, with a short 2 s pulse per detection.

## Swapping one for the other

- The three main wires stay the same: VCC or VIN to 5 V, GND, and OUT to any digital input; both drive OUT to 3.3 V, so no pull-up or level shifter is needed on 3.3 V or 5 V boards.
- Leave the RCWL-0516's 3V3 pin (an output) and CDS pin (a light-sensor input) unconnected for always-on operation.
- Rework the timing: the RCWL-0516 holds OUT for about 2 s per detection, the HC-SR501 for its delay setting, up to about 300 s. Code that relied on the PIR's long hold must keep its own timer.
- Drop the PIR's one-minute start-up delay, and expect the radar to trigger on fans, curtains and people behind thin walls; keep metal at least 1 cm from the back of its board.

## Questions

### Which motion sensor has fewer false triggers?

The HC-SR501 indoors, because it only reacts to moving heat; its false triggers come from warm air, lights on the lens and the first minute after power-up (HC-SR501 module datasheet). The RCWL-0516 reacts to anything that moves, including fans, curtains and people beyond a thin wall.

### Can either sensor see through a wall or a window?

The RCWL-0516 sees through thin plastic and other non-metal materials (SparkFun RCWL-0516 product specifications). The HC-SR501 cannot see through glass, which blocks the far infrared it senses.

### Which uses less power?

The HC-SR501: under 50 µA static (HC-SR501 module datasheet), against about 2.7 mA for the RCWL-0516 (SparkFun product specifications).

### Do they work with an ESP32 or Raspberry Pi Pico?

Yes. Both output 3.3 V, which goes straight to a GPIO. Power both from the board's 5 V or VIN pin: the HC-SR501 needs 4.5 V or more and the RCWL-0516 4 V or more.

### Do either detect a person sitting still?

Not reliably. Both react to motion: the PIR to moving heat, the RCWL-0516 to the Doppler shift of something moving. For a still occupant use a 24 GHz presence radar such as the LD2410C.

## References

- [PIR HC-SR501](https://www.tinkered.ai/components/pir-hc-sr501.md)
- [RCWL-0516](https://www.tinkered.ai/components/rcwl-0516.md)
- HC-SR501 module datasheet
- SparkFun RCWL-0516 product specifications
- Joe Desbonnet RCWL-0516 reverse-engineering notes

## Try it

Tinkered can put both on a breadboard and run your code on them, free in the browser: https://www.tinkered.ai/compare/pir-hc-sr501-vs-rcwl-0516
