mmWave Radar vs PIR: Choosing a Presence Sensor
Published · figures computed from the dataset, last updated
"The lights went off while I was reading" is the complaint behind most presence sensor purchases, and it is not a faulty PIR. A passive infrared sensor answers did something warm just move?; a radar answers is someone there, and how far away? Those are different questions, and most rooms need one answer more than the other. This guide explains how each one works, what the ESPHome components expose, how to tune and place a radar so it lets an empty room go empty, and how to combine both in Home Assistant. It covers the 7 presence radars and 5 motion-only sensors in this index, each linked to its wiring and config page.
How a PIR sees you
The sensing element in a PIR is a pyroelectric crystal split into two halves wired against each other. Each half produces a tiny charge when the infrared falling on it changes. In a still room both halves see the same heat and the signals cancel. A warm body crossing the view reaches one half before the other, the balance tips, and the module's comparator chip (a BISS0001 on the HC-SR501) drives the output high.
The white dome is a Fresnel lens: a moulded array of small lenslets, each projecting a narrow slice of the room onto the element. The result is a fan of sensitive zones with blind gaps between them, and the sensor responds as a person moves from one zone into the next. Two consequences follow, and they explain almost every PIR complaint:
- Still people disappear. Reading, typing or watching television, you cross no zones and the element sees no change. When the hold time expires the output drops, whatever the room contains.
- Walking straight at it is the weak case. Moving along a line towards the lens keeps you inside the same zone while the heat grows gradually; crossing the view sideways trips it much sooner. Mount a PIR so people walk across its view: on the side wall of a corridor, not the end wall.
A PIR emits nothing, and it cannot see through ordinary window glass, which blocks the long-wave infrared a body gives off. A PIR behind a window is watching the window.
The HC-SR501: two pots and a jumper
The HC-SR501 has three adjustments, and they cause most of the confusion around it. One potentiometer sets sensitivity, which works as range: about 3 m to 7 m. The other sets how long the output stays high after a trigger, from a few seconds fully anticlockwise to about five minutes fully clockwise; published figures differ by a few seconds at each end. The jumper picks the trigger mode. In H (repeatable), every new movement restarts the timer, so the output stays high while someone keeps moving. In L (single), the timer runs from the first detection and the output drops when it ends, even if you are still moving. After the output falls there is a blocking period of roughly three seconds in which the module ignores everything, and for about a minute after power-on it produces false triggers while the element settles.
For Home Assistant, set the jumper to H, turn the time pot fully anticlockwise and do the hold
timing in software, where you can change it without a ladder: a delayed_off filter
on the ESPHome binary sensor, or a for: duration in the automation. The module takes
5 V on its supply pin but its output is 3.3 V, so it wires straight to an ESP32 GPIO.
The AM312: nothing to adjust
The AM312 is about 10 mm across, runs from 2.7 V to
12 V and has no pots or jumper. Its output pulse is fixed at about 2 seconds and its range is
3 to 5 metres. Someone moving in bursts produces a string of short pulses, so add a
delayed_off filter (30 seconds is a reasonable start) or let Home Assistant hold the
state. Its idle current is under 100 µA, which is the reason to choose it.
How a radar sees you
The 24GHz modules in this index come from Hi-Link (the LD24xx family), Ai-Thinker (the RD-03D) and DFRobot (the SEN0395). They transmit continuously and listen for reflections. The LD2410, LD2412, LD2450 and RD-03D sweep their frequency (FMCW), which lets them measure how long each echo took and turn that into a distance. Anything moving shifts the echo slightly, and the firmware watches for that shift. Presence firmware is sensitive enough to see the chest movement of breathing, which is why an LD2410 keeps a reader present long after a PIR has given up.
Distance is reported in gates, bands of fixed depth. The LD2410 has nine, g0 to g8, each 0.75 m deep at the default resolution, so the last one ends at about 6.75 m. Switch it to 0.2 m resolution and the same nine gates cover only 1.8 m. For each gate the module computes a moving energy and a still energy from 0 to 100 and compares them with that gate's thresholds: above the moving threshold is a moving target, above the still threshold a still one, and presence means either. When everything falls below, the module waits out a timeout (5 seconds by default in ESPHome) before reporting the room empty.
That design is why a radar needs tuning and a PIR does not. Everything that moves reflects: a ceiling fan, a curtain swinging in a draught, a plant in the air-conditioner's stream, the cat. Hi-Link's own manual lists all of these as things that spoil detection. And 24GHz passes, with some loss, through plasterboard, stud walls and plastic enclosures, so a gate that ends beyond your wall may be watching the landing.
Microwave Doppler: the RCWL-0516 is not a presence sensor
The RCWL-0516 is a radar too, but a much simpler one: a small RF circuit on the board running at around 3.2GHz (the exact frequency varies from unit to unit) and a chip that looks for Doppler shift. It has no gates, no distance and no idea of a still target. When something moves within about 7 metres, the output goes high for about 2 seconds. A capacitor on the C-TM pad lengthens that, a resistor on R-GN cuts the range to about 5 m, and a light-dependent resistor on the CDS pads disables it in daylight. The component side faces the area to watch; keep metal at least a centimetre from the back.
Its strength is that it works hidden inside a plastic enclosure or a lamp base, where a PIR lens cannot see out. Its weakness is the same property: it responds to a swinging door or a pet as readily as a person, and to movement on the far side of a thin wall. Treat it as a motion sensor with none of a PIR's selectivity, running on under 3 mA from anything between 4 V and 28 V.
The presence radars in this index
| Device | Interface | Holds a still person | What it reports | Power |
|---|---|---|---|---|
| HLK-LD2410 24GHz mmWave Radar Sensor Hi-Link · Plug-and-Play | UART Serial / 3.3V | Yes | Presence, moving and still targets with distance and energy per gate; about 5 m | 5 V, about 80 mA |
| HLK-LD2412 24GHz Presence Radar Hi-Link · Intermediate | UART Serial / 3.3V | Yes | As the LD2410, with 14 gates, a light sensor and background calibration; up to 9 m | 5 V, about 90 mA |
| HLK-LD2420 24GHz Presence Radar Hi-Link · Intermediate | UART Serial / 3.3V | Yes | Presence and moving distance, gate thresholds, a calibrate mode; up to 8 m | 3.3 V, about 50 mA |
| HLK-LD2450 24GHz Multi-Target Radar Hi-Link · Intermediate | UART Serial / 3.3V | Partly: built to track movement | Up to 3 targets with X/Y, speed and angle; 3 zones; about 6 m | 5 V, about 120 mA |
| Ai-Thinker RD-03D Multi-Target Radar Ai-Thinker · Intermediate | UART Serial / 3.3V | Poorly: ranging needs movement | Up to 3 targets with X/Y, speed and angle; no zones in ESPHome; up to 8 m | 5 V, supply rated for 200 mA peaks |
| SEN0395 24GHz mmWave Presence Radar DFRobot · Plug-and-Play | UART Serial / 3.3V | Yes | Presence on a pin; up to 4 range segments set over UART; up to 9 m | 3.6–5 V, about 90 mA |
| Presence Sensor FP2 Aqara · Intermediate | Wi-Fi (Local API) | Yes | 60 GHz; up to 30 zones and 5 people, plus light level; about 8 m wall-mounted | USB-C, 5 V 1 A adapter |
Ranges and currents are the makers' figures. The LD2410 page wires the module to a Pico W; the same ESPHome component runs on an ESP32.
The motion-only sensors
| Device | Interface | Senses by | What it reports | Power |
|---|---|---|---|---|
| RCWL-0516 Microwave Radar Motion Module RCWL · Plug-and-Play | Digital GPIO / 3.3V | Microwave Doppler, about 3.2 GHz | Motion on a pin, about 2 s per trigger; about 7 m, through plastic | 4–28 V, under 3 mA |
| HC-SR501 PIR Motion Sensor Module SparkFun · Plug-and-Play | Digital GPIO / 3.3V | PIR | Motion on a pin; range (3–7 m) and hold time on two pots, trigger mode on a jumper | 5 V supply, tens of µA idle |
| AM312 Mini PIR Motion Sensor Module Keyestudio · Plug-and-Play | Digital GPIO / 3.3V | PIR | Motion on a pin, fixed pulse of about 2 s; 3–5 m | 2.7–12 V, under 100 µA |
| ThirdReality Zigbee Motion Sensor ThirdReality · Plug-and-Play | Zigbee 3.0 | PIR | Motion and battery level over Zigbee | 2 × AAA |
| Outdoor Motion & Lux Sensor Philips Hue · Intermediate | Zigbee 3.0 | PIR | Motion, illuminance and temperature over Zigbee; about 12 m | 2 × AA |
What ESPHome gives you for each radar
Every radar module here has a component in ESPHome itself, so a current release needs no
external components. They are not interchangeable: each module speaks its own serial protocol,
and an ld2410 config decodes nothing from an LD2412.
- ld2410 (LD2410, LD2410B, LD2410C): presence, moving-target and still-target binary sensors; moving and still distance and energy; detection distance. With engineering mode on it also reports the energy of every gate and a light reading. Numbers expose the timeout, the maximum moving and still gates and each gate's thresholds; switches control engineering mode and the module's Bluetooth. 256000 baud.
- ld2412: the same model with 14 gates, a choice of 0.75, 0.5 or 0.2 m resolution, a light sensor, and a button that starts the module's own background calibration. 115200 baud; part of ESPHome since 2025.8.
- ld2420: one presence binary sensor and a moving-distance sensor, with gate thresholds as numbers. Its Calibrate mode is the easy way to tune it: empty the room, let it gather noise readings for 30 seconds or more, then press Apply Config and it writes thresholds based on what it measured. Sixteen gates of about 70 cm. Firmware 1.5.3 and later talks at 115200; older units use 256000 on a different pin.
- ld2450: up to three targets, each with X and Y in millimetres, speed, angle and distance; total, moving and still target counts; and three rectangular zones with their own counts. 256000 baud.
- rd03d: up to three targets with X/Y, speed, angle and distance, a single- or multi-target mode and a throttle to limit updates. No zones. 256000 baud; part of ESPHome since 2026.1.
- dfrobot_sen0395: presence arrives on a GPIO pin; the UART is for settings. A settings action sets up to four detection segments out to 9 m, the delay before reporting presence (2.5 s by default) and after it ends (10 s), and a sensitivity from 0 to 9. Each change is written to the module's flash, which wears, so configure it once rather than from an automation.
ESPHome's docs recommend a hardware UART for the 256000-baud modules rather than a software serial port. The ESP8266 has only one full UART, which is one more reason radar nodes are usually built on an ESP32; ESP32 vs ESP8266 covers the rest. Every serial part in the index is on the UART hub.
Tuning a radar that won't let the room go empty
- Measure before changing anything. Switch on engineering mode (LD2410, LD2412) and put the per-gate energy sensors on a dashboard. Leave the room empty for a few minutes, then sit where you normally sit. Gates that stay high while the room is empty are the problem; gates that rise when you sit down are the ones to keep.
- Shorten the range. In a room 4 m deep, a maximum gate of 8 at 0.75 m resolution watches 2.75 m past the far wall. Lower the maximum moving and still gates until detection ends at the wall (gate 5 ends at 4.5 m). This is the most effective single change, and it also stops most of the seeing through walls.
- Raise thresholds only where the noise is. If a fan lights up gate 3, raise gate 3's thresholds just above the noise you measured and leave the others alone. Hi-Link's manual notes that a threshold of 100 blinds a gate entirely.
- Keep the module's timeout short. It only needs to cover gaps between readings. Put "off after two minutes empty" in Home Assistant, where you can see and change it.
- Turn engineering mode off again. The ESPHome docs note it uses more resources, and the 18 per-gate energy sensors, if you added them, fill your history with a reading every second.
The LD2410B and LD2410C also have Bluetooth, and Hi-Link's HLKRadarTool phone app changes the same settings. Anything written there persists in the module, including the baud rate, so if a node stops decoding after someone used the app, check the baud rate first. Once the module is tuned, the ESPHome Bluetooth switch turns the radio off.
Placement
- Height. Hi-Link's range diagrams for the LD2410 assume 1.5–2 m on a wall or 2.6–3 m on a ceiling. A wall mount looking across the room gives the most useful distances; a ceiling mount covers a circle underneath. Aqara gives the FP2 about 8 m across 120° on a wall, and a circle about 2 m in radius on a 2.8 m ceiling.
- Fix it solidly. A radar that sways sees the whole room move. Both Hi-Link and DFRobot warn about this, and a module hanging on its jumper wires counts.
- Mind the back and the box. The antenna radiates a little behind the board, so movement behind the wall it is mounted on can register; a metal plate behind the module blocks that. The front must look out through plastic, never metal.
- Keep moving things out of the field. Fans, curtains and plants in an air-conditioner's draught, and pets. A single-point radar cannot tell a dog from a person; the zones on an LD2450 or FP2 can at least exclude its bed.
- PIRs want the opposite. Mount them where people cross the view, and away from heaters and direct sun, which change the infrared scene enough to cause false triggers.
Zones and counting people
A single-point radar says someone is between 1.5 m and 2.25 m away. If the desk and the sofa are both that far from it, it cannot say which. Three parts in this index say where someone is instead.
The LD2450 and RD-03D report X and Y for up to three targets across about ±60°. ESPHome's LD2450 component adds three rectangular zones, each set by two corners in millimetres, and each either a detection area with its own target counts or a filter area that is ignored, which suits a doorway or a fan. The RD-03D component reports positions but has no zones; you would build them from its coordinates with template sensors. Both are trackers first. Hi-Link describes the LD2450 in terms of moving targets, and the ESPHome RD-03D docs say its ranging relies on Doppler shift and cannot place a target that is not moving. For a bedroom, where the job is holding a sleeping person, an LD2410-class module is the safer choice, or pair one with the tracker.
The Aqara FP2 is the finished version: a 60GHz radar with up to 30 zones and up to five people over roughly 40 m², drawn in the Aqara Home app. It joins Home Assistant through the HomeKit Device integration, which exposes occupancy per zone and its light sensor. A HomeKit accessory pairs with one controller at a time, so remove it from Apple Home first if it is there. Fall detection works only when it is mounted on the ceiling.
Power, heat and batteries
This is where the PIR wins outright. An HC-SR501 idles at tens of microamps and an AM312 at under 100 µA. The radars draw 50 to 120 mA all the time: about 80 mA for an LD2410, 90 mA for an LD2412 or SEN0395, 50 mA for the 3.3 V LD2420 and 120 mA for an LD2450, and Hi-Link specifies a 5 V supply good for more than 200 mA. With an ESP32 on Wi-Fi alongside, the node is a mains device; a 2,000 mAh battery pack would be flat within a day. That current is also heat: 80 mA at 5 V is 0.4 W in a small box, on top of the ESP32's own, so a temperature sensor in the same enclosure will read high.
Battery motion sensing is PIR territory. The ThirdReality motion sensor runs on two AAA cells and the Hue outdoor sensor on two AA, both over Zigbee, and the AM312's tiny idle current is the reason it turns up in battery-powered ESPHome builds.
Speed
A PIR changes state the moment someone crosses a zone boundary, and the ESPHome GPIO binary sensor passes the change straight on. A radar needs a little longer: in practice an LD2410 reports presence within about a second of someone walking in, and the ESPHome component limits its sensors to one update a second. The SEN0395 waits 2.5 seconds by default before raising its pin, though that delay is configurable. A second is fine in a living room and noticeable at the top of a staircase. The bigger difference is at the other end: how long each one keeps the lights on once you stop moving.
Combining a PIR and a radar in Home Assistant
For a room people walk into and then sit in, such as a study, living room or bathroom, the dependable answer is both: the PIR for an instant on, the radar to hold presence while you are still. A template binary sensor combines them with an OR and a delay before it turns off:
template:
- binary_sensor:
- name: "Study occupied"
unique_id: study_occupied
device_class: occupancy
state: >
{{ is_state('binary_sensor.study_pir_motion', 'on')
or is_state('binary_sensor.study_radar_presence', 'on') }}
delay_off:
minutes: 2
Replace the two entity IDs with your own. There is no delay_on, so the combined
sensor turns on as soon as either input does, usually the PIR. delay_off means the
template must stay false for the full two minutes before the sensor reports off, so a single
radar reading in that time keeps it on. Point your lighting automations at
binary_sensor.study_occupied rather than at either sensor. The OR also keeps every
false positive: if the radar sees the corridor, the lights stay on for the corridor, so tune the
radar first.
Privacy
Neither sensor is a camera. A PIR outputs a single on or off. The LD24xx modules report distances and energies, and the trackers report at most three pairs of coordinates; there is no image to leak. The ESPHome parts here report to Home Assistant over your own network with no cloud in the path. The FP2 needs an Aqara account and app to set up, which is the one place a vendor account comes in. A radar can see through a partition wall, though, so whether a neighbour's movements end up in your history depends on how carefully you set its range.
Which one, room by room
- Hallways, stairs and landings: PIR. Motion is the whole event, the reaction is instant, and a battery Zigbee PIR needs no wiring.
- Studies, living rooms and bedrooms: radar, or PIR plus radar. Long stillness is normal. An LD2410 or LD2412 for one area; an LD2450 or FP2 if the desk and the sofa should behave differently.
- Bathrooms: radar, with the range ending at the door and the extractor fan's gate damped. A PIR cannot see through a glass shower screen.
- Outdoors: PIR. A weatherproof unit with a light sensor avoids daytime triggers; a radar sees branches moving in the wind.
- Hidden inside a lamp or enclosure: the RCWL-0516, accepting that it reports motion, not presence.
All of these, and every other part with a motion or presence entity, are in the Presence & Motion Sensors category; the ESPHome builds among them are also on the ESPHome platform hub.
Frequently Asked Questions
Why does my PIR turn the lights off while I am sitting still?
Does mmWave radar work through walls?
Why does my LD2410 in ESPHome show presence in an empty room?
Can I run an mmWave presence sensor on batteries?
LD2410, LD2412 or LD2450: which should I use with ESPHome?
Does the Aqara FP2 work with Home Assistant without the cloud?
More guides
Zigbee vs Z-Wave vs Matter: Choosing a Protocol
How the three main smart home radio protocols differ in range, hub requirements and ecosystem size — and how to choose between them for a new setup.
Do You Need a Thread Border Router?
What a Thread border router actually does, which devices count as one, and how to tell whether the Matter device in your basket needs one before it will pair.
I²C Address Conflicts, Explained
Why an I²C sensor goes missing in ESPHome, how to read the boot scan, and four ways past an address clash: re-strap, second bus, TCA9548A or software.
ESP32 vs ESP8266 for ESPHome: Which Board?
Choosing between the ESP8266 and the ESP32, C3, S3 and C6 for an ESPHome node: memory, serial ports, ADC and strapping pins, Bluetooth, Thread and Zigbee.
Natively Supported vs Bridge Needed: What Our Verdicts Mean
The three compatibility verdicts this site assigns, what each one commits you to in hardware and maintenance, and why "works with" on a box rarely tells you which you are getting.