A presence sensor that doesn't think I'm a cat
PIR sensors turn the lights off while I'm sitting still at my desk. An mmWave radar doesn't. Here is the whole build, from parts to automation.
- Build time
- 3 h
- Cost
- $14
- Filament
- 22 g PETG
- Difficulty
- Easy

Parts
Everything here is a few dollars on its own. The radar is the only part that matters, so buy a genuine LD2410 and not a lookalike.
| Part | Notes | Cost |
|---|---|---|
| ESP32 DevKit C | Any 30-pin board works | $6.00 |
| HLK-LD2410C | 24 GHz mmWave radar | $5.50 |
| Dupont wires, 4× | Female to female | $0.50 |
| USB cable and charger | From the drawer | $2.00 |
Print the case
Print the base and lid in PETG at 0.2 mm. Radar passes through plastic well, but keep the wall in front of the sensor at 1.2 mm or thinner and avoid metallic filament.

Assemble
Seat the radar, push on the four wires, then close the lid. It takes about ten minutes, and nothing is soldered.



Flash with ESPHome
Create a new device in the ESPHome dashboard and replace its config with this. The uart block matches the wiring above.
esphome:
name: desk-presence
esp32:
board: esp32dev
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
uart:
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 256000
ld2410:
binary_sensor:
- platform: ld2410
has_target:
name: Desk PresenceHome Assistant
Once the node is online, Home Assistant discovers it automatically. Add it, then use binary_sensor.desk_presence as the trigger for your lights. Set a 2 minute delay on the off side so a quick trip to the kitchen doesn’t plunge you into darkness.

That’s the whole build. Next up: adding a second sensor and averaging them, so a ceiling fan stops counting as a person.

