Presence sensor using ESP32-C3-DevKitM-1 and LD2410c - unknown sensors

Hi there, as the title says, I’m trying to get this to work w/o success. I’m using slightly modified yaml from https://github.com/loopDelicious/home-automation/tree/main/mmwave.

Here is my yaml

esphome:
  name: mmwave
  friendly_name: mmwave

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

# Enable logging
logger:

# Randomly-generated 32-byte base64 encoded string
# https://esphome.io/components/api.html#configuration-variables
api:
  encryption:
    key: "yW2/5uiLiFZV9o2HM3PJapQRyw80FiuJsy4LkczA"

ota:
  - platform: esphome
    password: "e8534e369064b85574cf714aa8da7"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

captive_portal:

# https://esphome.io/components/sensor/ld2410.html
ld2410:

uart:
  tx_pin: GPIO21
  rx_pin: GPIO20
  baud_rate: 256000
  parity: NONE
  stop_bits: 1

binary_sensor:
  - platform: ld2410
    has_target:
      name: Presence
    has_moving_target:
      name: Moving Target
    has_still_target:
      name: Still Target
    out_pin_presence_status:
      name: Out pin presence status

The log file shows it is connected and running

INFO ESPHome 2025.4.2
INFO Reading configuration /config/esphome/mwave.yaml...
INFO Starting log output from 192.168.1.207 using esphome API
INFO Successfully connected to mmwave @ 192.168.1.207 in 0.096s
INFO Successful handshake with mmwave @ 192.168.1.207 in 0.079s
[03:37:12][I][app:100]: ESPHome version 2025.4.2 compiled on May 18 2025, 03:29:15
[03:37:12][C][wifi:600]: WiFi:
[03:37:12][C][wifi:428]:   Local MAC: D8:3B:DA:12:72:15
[03:37:12][C][wifi:433]:   SSID: [redacted]
[03:37:12][C][wifi:436]:   IP Address: 192.168.1.207
[03:37:12][C][wifi:440]:   BSSID: [redacted]
[03:37:12][C][wifi:441]:   Hostname: 'mmwave'
[03:37:12][C][wifi:443]:   Signal strength: -39 dB ▂▄▆█
[03:37:12][C][wifi:447]:   Channel: 7
[03:37:12][C][wifi:448]:   Subnet: 255.255.255.0
[03:37:12][C][wifi:449]:   Gateway: 192.168.1.1
[03:37:12][C][wifi:450]:   DNS1: 192.168.1.1
[03:37:12][C][wifi:451]:   DNS2: 0.0.0.0
[03:37:12][C][logger:177]: Logger:
[03:37:12][C][logger:178]:   Max Level: DEBUG
[03:37:12][C][logger:179]:   Initial Level: DEBUG
[03:37:12][C][logger:181]:   Log Baud Rate: 115200
[03:37:12][C][logger:182]:   Hardware UART: USB_CDC
[03:37:12][C][uart.arduino_esp32:151]: UART Bus 0:
[03:37:12][C][uart.arduino_esp32:152]:   TX Pin: GPIO21
[03:37:12][C][uart.arduino_esp32:153]:   RX Pin: GPIO20
[03:37:12][C][uart.arduino_esp32:155]:   RX Buffer Size: 256
[03:37:12][C][uart.arduino_esp32:157]:   Baud Rate: 115200 baud
[03:37:12][C][uart.arduino_esp32:158]:   Data Bits: 8
[03:37:12][C][uart.arduino_esp32:159]:   Parity: NONE
[03:37:12][C][uart.arduino_esp32:160]:   Stop bits: 1
[03:37:12][C][ld2410:022]: LD2410:
[03:37:12][C][ld2410:024]:   TargetBinarySensor 'Presence'
[03:37:12][C][ld2410:024]:     Device Class: 'occupancy'
[03:37:12][C][ld2410:025]:   MovingTargetBinarySensor 'Moving Target'
[03:37:12][C][ld2410:025]:     Device Class: 'motion'
[03:37:12][C][ld2410:026]:   StillTargetBinarySensor 'Still Target'
[03:37:12][C][ld2410:026]:     Device Class: 'occupancy'
[03:37:12][C][ld2410:027]:   OutPinPresenceStatusBinarySensor 'Out pin presence status'
[03:37:12][C][ld2410:027]:     Device Class: 'presence'
[03:37:12][C][ld2410:075]:   Throttle_ : 1000ms
[03:37:12][C][ld2410:076]:   MAC Address : 
[03:37:12][C][ld2410:077]:   Firmware Version : 
[03:37:12][C][captive_portal:089]: Captive Portal:
[03:37:12][C][mdns:116]: mDNS:
[03:37:12][C][mdns:117]:   Hostname: mmwave
[03:37:12][C][esphome.ota:073]: Over-The-Air updates:
[03:37:12][C][esphome.ota:074]:   Address: mmwave.local:3232
[03:37:12][C][esphome.ota:075]:   Version: 2
[03:37:12][C][esphome.ota:078]:   Password configured
[03:37:12][C][safe_mode:018]: Safe Mode:
[03:37:12][C][safe_mode:020]:   Boot considered successful after 60 seconds
[03:37:12][C][safe_mode:021]:   Invoke after 10 boot attempts
[03:37:12][C][safe_mode:023]:   Remain in safe mode for 300 seconds
[03:37:13][C][api:140]: API Server:
[03:37:13][C][api:141]:   Address: mmwave.local:6053
[03:37:13][C][api:143]:   Using noise encryption: YES

But still showing as

So far I’ve played with different

uart:
tx_pin: GPIO21, GPIO20, GPIO4, GPIO2
rx_pin: GPIO20, GPIO21, GPIO5, GPIO3

The results are the same!

Thank you

Did you cross TX and RX between the ESP and LD?

Yes I did… Is there a way to test the LD board? I’m thinking that there is something wrong with it? Or the ESP32 C3 maybe?

Also from ESPHome Visit in the device

the 3 sensors are OFF?

I think I’ve got a lemon LD2410C :rage:. I tested the TX-GND and RX-GND with a multimeter and the voltage doesn’t change at all during TX/RX (it should fluctuate)… it also shows OL on ohm testing on the same.

How are you powering the LD2410C board? It should be using the 5V pin from the ESP32 board and not the 3.3V pin.
Also since you have the LD2410C, it has bluetooth so you can test the board using the HLK Radar Tool app on your phone. If it doesn’t appear in the app, then the board is either not getting enough power or is defective.

I power it by the 5V esp32 pin. I measured both 5V pins on the ESP32 and I got 4.9V on both, so it is not tha ESP32. I also tried the app but LD was not even showing.

I’m returning the LD and getting a new one as well as few new ESP32

UPDATE: I just got a new LD2410C and it worked like a charm… so the conclusion is that the old LD241C was bad.

I also tried it with a new ESP32C3 from XIAO and it also worked!

Here is the yaml I use for reference (with XIAO ESP32C3)

esphome:
  name: presence-sensor
  friendly_name: Presence Sensor

esp32:
  board: seeed_xiao_esp32c3
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "My Key"

ota:
  - platform: esphome
    password: "My Password"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Presence-Sensor Fallback Hotspot"
    password: "XcXL9F4qZVT5"

captive_portal:

uart:
  id: uart_bus
  tx_pin: GPIO21
  rx_pin: GPIO20
  baud_rate: 256000

ld2410:
  uart_id: uart_bus
  id: ld2410_radar

binary_sensor:
  - platform: ld2410
    has_target:
      name: "Presence Detected"
    has_moving_target:
      name: "Moving Target Detected"
    has_still_target:
      name: "Still Target Detected"

sensor:
  - platform: ld2410
    moving_distance:
      name: "Moving Distance"
    still_distance:
      name: "Still Distance"
    moving_energy:
      name: "Moving Energy"
    still_energy:
      name: "Still Energy"
    detection_distance:
      name: "Detection Distance"

text_sensor:
  - platform: ld2410
    version:
      name: "LD2410 Firmware Version"
    mac_address:
      name: "LD2410 MAC Address"

button:
  - platform: restart
    icon: mdi:power-cycle
    name: "ESP Reboot"

Thank you all for chiming in!