Some hardware links on this page are affiliate links. As an Amazon Associate I earn from qualifying purchases. We may earn a commission if you buy through them, at no extra cost to you. See the affiliate disclosure.
A PIR sensor tells you something warm moved. An mmWave sensor tells you something is still there. Most “the lights turned off while I was reading” complaints come from using the first when you wanted the second.
PIR vs mmWave in one table
| PIR (HC-SR501) | mmWave (LD2410C) | |
|---|---|---|
| Sees | Heat moving across its zones | Movement and micro-movement (breathing, typing) |
| Someone sitting still | Drops to clear after its hold time | Stays occupied |
| Reaction to walking in | Fast | Fast |
| Through walls and thin doors | No | Yes, sometimes. Plan for it |
| Common false triggers | Sun on the floor, heater vents, pets | Fans, moving curtains, HVAC, a washer through the wall |
| Tuning | Two potentiometers and a jumper | Per-distance gates in software |
| Power | 5 V, output is 3.3 V logic | 5 V supply, 3.3 V UART |
The short version: PIR is a good trigger, mmWave is a good hold. Use both and you get fast on, and no off while someone is still in the room.
Wiring the LD2410C to an ESP32
The LD2410C has five pins: VCC, GND, TX, RX and OUT.
| LD2410C | ESP32-C6 Super Mini |
|---|---|
| VCC | 5V |
| GND | GND |
| TX | A free GPIO set as UART rx_pin |
| RX | A free GPIO set as UART tx_pin |
| OUT | Optional. A GPIO, if you want a plain presence pin |
TX goes to RX and RX goes to TX. Swapped UART pins are the number-one reason an LD2410 shows nothing in ESPHome. Keep away from the strap and USB pins on your board (see the ESP32 boards we use).
ESPHome config
Pins are substitutions so you can match your board:
substitutions:
radar_rx: GPIO4
radar_tx: GPIO5
pir_pin: GPIO6
uart:
rx_pin: ${radar_rx}
tx_pin: ${radar_tx}
baud_rate: 256000
parity: NONE
stop_bits: 1
ld2410:
binary_sensor:
- platform: ld2410
has_target:
name: Radar presence
has_moving_target:
name: Radar moving
has_still_target:
name: Radar still
- platform: gpio
pin: ${pir_pin}
name: PIR motion
device_class: motion
sensor:
- platform: ld2410
detection_distance:
name: Radar distance
The LD2410C ships at 256000 baud. If you changed it in the HLKRadarTool phone app, match it here.
Tuning the gates
The LD2410 splits its range into gates of about 0.75 m each. Every gate has its own move and still threshold. The ESPHome component can expose those thresholds as number entities, so you tune them from Home Assistant without reflashing.
- Mount the sensor where it will live. Moving it later undoes the tuning.
- Turn on engineering mode (the component’s
switch), leave the room empty for a few minutes, and watch the per-gate energy. Anything high with nobody there is a fan, a vent or a neighbour through the wall. - Raise the threshold on those gates, or lower the max gate so it stops before the wall.
- Sit still at your desk or on the couch and make sure the still energy at that distance stays above its threshold.
Point it away from ceiling fans and HVAC vents. Keep it off metal. It sees through drywall, so a sensor on a shared wall will see the next room.
Tuning the PIR
The HC-SR501 has two potentiometers (sensitivity and hold time) and a jumper for repeat trigger. Turn the hold time to minimum and set the jumper to repeat. Let Home Assistant do the timing. The module also needs about a minute after power-up before its output means anything.
Combine them
A simple pattern that works in most rooms:
- On: PIR motion, or radar moving target.
- Stay on: radar presence.
- Off: radar presence clear for 2–5 minutes.
For a room you want to know is truly empty, add a door contact and use the “wasp in a box” rule: if the door has not opened since someone was seen, they are still inside. That is the wasp-in-a-box occupancy workflow.
When to add a camera
mmWave cannot tell a person from a dog or a swinging jacket. If a false alarm costs you something (a push notification at 2 a.m., an alarm, a recorded clip), make a camera person sensor the second vote. The room entry alert only fires when the door, the radar and the camera agree.
Keep camera placement and room layouts out of anything you share.