LW IT Solutions logo LW IT Solutions logo LW IT Solutions
« Blog Overview /Smart Home / Presence Detection 2.0: mmWave Radars (LD2410/LD2450) in...
Read this article in other languages:

Presence Detection 2.0: mmWave Radars (LD2410/LD2450) in Lighting Automation

Part 3 of 6 in the series Home Assistant without the cloud

Presence Detection 2.0: mmWave Radars (LD2410/LD2450) in Lighting Automation
Contents
  1. Presence Detection 2.0: mmWave Radars (LD2410/LD2450) in Lighting Automation
  2. PIR: movement and thermal contrast
  3. LD2410 and LD2450: different detection tasks
  4. An ESPHome example with the missing connections included
  5. Questions and answers
  6. Sources

Presence Detection 2.0: mmWave Radars (LD2410/LD2450) in Lighting Automation

A light that switches off during reading usually exposes a mismatch between motion detection and occupancy detection. PIR sensors respond to changing infrared patterns; radar can detect smaller movements. Combining both can improve lighting control, but neither technology guarantees complete coverage. The LD2410 and LD2450 also serve different purposes.

PIR: movement and thermal contrast

A PIR sensor detects changes in infrared radiation across its optical detection pattern. Walking across that pattern is often easier to detect than sitting still or approaching directly. Lens design, mounting height, movement and the temperature difference between visible surfaces and the background affect detection.

The relevant contrast is not simply room temperature versus a universal body-core temperature of 36–37 °C. Clothing and exposed skin have different surface temperatures. Reduced contrast can reduce sensitivity; no universal “thermal blindness” temperature follows. A PIR output also has sensor-specific timing, so immediate or zero-latency switching is not guaranteed.

PIR, LD2410 and LD2450 have different detection limits. Combined occupancy needs timing, calibration and a failure policy.
PIR, LD2410 and LD2450 have different detection limits. Combined occupancy needs timing, calibration and a failure policy.

LD2410 and LD2450: different detection tasks

Both families use 24 GHz radar, often marketed as mmWave. At 24 GHz the wavelength is about 12.5 mm; strictly, the conventional millimeter-wave band starts at 30 GHz. The practical choice depends more on the sensor’s processing and firmware than on that label.

LD2410: the presence sensor distinguishes moving and still targets using distance gates. Separate thresholds can reduce unwanted detections in particular distance ranges. The advertised range of up to roughly six metres does not guarantee detection of a nearly motionless person at every distance or angle. Still-target output is a presence classification, not a medical breathing measurement.

LD2450: the tracking module reports estimated coordinates and speeds for up to three targets. Coordinates support zones, but are neither exact positions nor persistent personal identities. The module is primarily designed for moving-target tracking. ESPHome exposes still-target counts too; that label does not establish reliable detection of breathing or complete immobility. Firmware and actual seating positions need testing before choosing the module to keep desk lighting on.

An ESPHome example with the missing connections included

This fragment is for an ESP32 board with GPIO16/17 available for UART and GPIO14 available for PIR. Board selection, network/API configuration and the light automation belong in the surrounding ESPHome configuration. Radar TX connects to ESP RX, radar RX to ESP TX, with a common ground. Supply voltage, current capacity and logic levels must match the exact module; a 5 V output must not connect directly to a 3.3 V GPIO.

YAML
uart:
  id: radar_uart
  tx_pin: GPIO17
  rx_pin: GPIO16
  baud_rate: 256000
  parity: NONE
  stop_bits: 1

ld2410:
  id: room_radar
  uart_id: radar_uart

binary_sensor:
  - platform: gpio
    pin: GPIO14
    name: "Room PIR Motion"
    id: pir_motion

  - platform: ld2410
    ld2410_id: room_radar
    has_target:
      name: "Room Radar Presence"
      id: radar_presence

  - platform: template
    name: "Room Unified Occupancy"
    device_class: occupancy
    lambda: |-
      if (id(pir_motion).has_state() && id(pir_motion).state)
        return true;
      if (id(radar_presence).has_state() && id(radar_presence).state)
        return true;
      if (!id(pir_motion).has_state() || !id(radar_presence).has_state())
        return {};
      return false;
    filters:
      - delayed_off: 30s

The LD2410’s standard UART setting is 256000 baud, no parity and one stop bit. A previously changed module baud rate must match the configuration. The two inputs are combined with OR; either positive reading maintains occupancy. Before both inputs have a known state, an absent reading does not automatically become “empty”. The lambda’s empty return retains the last state; it is not a communication watchdog.

The illustrative 30-second off delay begins when both known inputs are false. Radar timeout, PIR hold time, this filter and any Home Assistant delay can accumulate. The example creates an occupancy sensor only; brightness thresholds, manual override and the actual light action remain separate.

Questions and answers

Does an off delay solve a moving curtain?

No. A continuously positive radar keeps OR true, so the off-delay countdown never completes. Placement, maximum detection distance, gate thresholds or coordinate zones must address the unwanted target. A distance gate cannot distinguish a curtain from a chair at the same range.

Can radar miss occupants or detect through walls?

Both are possible. Orientation, shielding, reflections and motion influence detection. Some materials allow signals to reach adjacent areas; wall penetration is not guaranteed. Fans, plants, pets and moving fabric may produce unwanted returns, without the sensor necessarily identifying the source as breathing.

How does commissioning work?

Tests should include an empty room with ventilation running, entry from several directions, prolonged quiet sitting, neighboring-room movement and sensor or network failure. A stale UART value can remain available despite has_state(); production automation therefore needs a separately tested freshness/availability policy. Manual lighting control remains useful. Neither the fragment nor the modules constitute a safety or medical monitoring system.

Home Assistant without the cloud

  1. Zigbee2MQTT and ZHA: Planning a Reliable Zigbee Network
  2. ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors
  3. Presence Detection 2.0: mmWave Radars (LD2410/LD2450) in Lighting Automation
  4. Local Voice Control in Home Assistant with Whisper & Piper
  5. WireGuard & Tailscale DMZ: Secure External Access to Home Assistant and Self-Hosted Servers
  6. Local Energy Management: Integrating PV Inverters and Battery Storage via Modbus TCP
Lukas Wojcik

Lukas Wojcik

Systems architect and technology enthusiast specializing in scalable tracking solutions, GMP Stack (GA4 & GTM), and robust backend architectures. Advocate for clean code and privacy-first design.

Get in touch

A question or an idea for a web project? Tell me a little about it. This form uses reCAPTCHA to protect against spam.

Write a comment

Experience with other devices or integrations and questions about the setup are welcome here.

The email address is not published. Required fields are marked with an asterisk.