DIY Presence Sensor with Hi-Link LD2410 and ESP32 for Home Assistant


With the current smart presence sensors available in the home automation market, comes the inevitable challenge of actually picking the right presence sensor for your smart home. There are so many models and variants to choose from, many of which are total trash, despite their attractive price tags. I will leave a full list at the bottom of this post of devices I’ve reviewed so far.

Recently, I tested the Apollo MSR-1 Prescence Multi-Sensor with CO2 monitoring and a bunch of other interesting features/sensors. The MSR-1 turned out to be highly capable, highly customizable and a dream for any true home automation enthusiast. I highly suggest you check out what the MSR-1 has to offer in my review.

The Apollo MSR-1 is based on the 24GHz Hi-Link HLK-LD2410b mmWave radar sensor, which is also used in many other devices of the same type (e.g. Moes ZSS-LP-HP02). If coded correctly, you can turn it into a reliable presence detection device without false positive or negative triggers.

DIY Presence Sensor with ESPHome and HLK-LD2410C - Featured Image

In this article, I am sharing a DIY guide for creating a simple presence sensor based on the HLK-LD2410 sensor and an ESP32 board, all coded through ESPHome and Home Assistant.

Different LD2410 Sensor Versions

The Hi-Link LD2410 Presence Sensor actually has three available versions released, although the core functionality is the same. This guide uses the LD2410 model, without B or C, but the examples and wiring diagram bellow can be used for any of the LD2410 models. Here’s the main differences between:

DIY Presence Sensor with ESPHome and HLK-2410 - Different Versions

The LD2410B can be used as a Bluetooth presence sensor instead of Wi-Fi, if that’s what you prefer. The LD2410C has a different form factor and standard connection pins, so might be the better choice. Their capability in terms of radar detection is identical, whichever you choose it will perform the same.

Requirements

To create your own presence sensor based on the Hi-Link LD2410, you are going to need a couple of things. First, you need to decide on the LD2410 model and form factor, which will impact how you approach attaching the sensor to an ESP32 Board.

If you go for the LD2410/LD2410B, you are better off using a 1.25mm to 2.54mm connector instead of soldering the wires. I highly recommend not soldering, since the pins on the LD2410 are very small its almost impossible to properly solder a wire without short-circuiting the adjacent one. If you get the LD2410C, you can use standard 2.54mm Dupont connectors instead.

Here is a full requirements/shopping list of items used in this project:

🛒 Without Soldering

🛒 With Soldering

Wiring the LD2410 Presence Sensor

Once you have all the components and tools ready, you can start to assemble this DIY presence sensor. Basically, all we need to do is connect a few wires from the ESP32 board to the Hi-Link LD2410 presence sensor and code it in ESPHome.

In my example, I am using a generic ESP32-WROOM-32 board from AliExpress. Depending on your ESP32 board type, you might have a slightly different pinout number. You can google the correct layout for your particular model if you need too. In total, 4 wires need to be connected in the following order:

ESP32 BoardHLK-LD2410
5VVCC
GNDGND
RX (eg. GPIO17)TX
TX (eg. GPIO16)RX

ESP32 Boards usually have two sets of RX & TX terminals, so you use can whichever is more convenient, just make sure you change the pinout in the .yaml file I’m sharing bellow. I drew a wiring diagram for my particular ESP32 board and LD2410 wiring diagram:

DIY Presence Sensor with ESPHome and HLK-2410 - Wiring Diagram and Board Pinout
ESP32 WROOM-32 to HLK-LD2410/LD2410b Wiring Diagram

I did not have a 5-pin connector on hand to attach the LD2410, I managed to recycle only a 3-pin from an old laptop. I had to solder the last wire until the 5-pin arrives (the last terminal [OUT] is unused). This build is good enough for testing, but not usable as a presence detection sensor in a final mounting position. A better and more secure connection is definitely needed, using the 5-pin connector. Here’s how it looks after I was done:

DIY Presence Sensor with ESPHome and HLK-2410 - Assembled and Wired

Like I mentioned above, you do not need a 5-pin connector for the LD2410C. You can simply attach the standard Dupont connectors from the ESP32 Board to the sensor and you are done. PRO Tip: These 2.54mm connectors are standard in any old PC, so they can be recycled.

DIY Presence Sensor with ESPHome and HLK-LD2410C - Assembled and Wired

Flashing the ESP32 Board

Once I connected the HLK-LD2410 to my ESP32 dev board, it was ready for ESPHome and Home Assistant. This particular model is natively supported in ESPHome, you can go over all available options on this page. I connected the board with an USB cable to my PC and used the ESPHome Web Flasher to initialize the device.

The web-flasher will ask you for your Wi-Fi info and automatically generate the OTA password and API encryption key. In the ESPHome Home Assistant Add-on, create a new device and add the following code to your existing configuration, without replacing the already generated info:

esphome:
  name: ld2410
  friendly_name: LD2410

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "gkROOOAh0xAjCVobOvDVZfPfezQvMEaK9FT1UJEshVU="

ota:
  password: "3e17e1c064adcb643234d5a49982329c"

captive_portal:

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ld2410 Fallback Hotspot"
    password: "YHPbLCbJsHZ9"

  power_save_mode: none

ld2410:
  id: ld2410_radar
  
uart:
  tx_pin: GPIO16
  rx_pin: GPIO17
  baud_rate: 256000
  parity: NONE
  stop_bits: 1

number:
  - platform: ld2410
    timeout:
      name: Radar Timeout
    max_move_distance_gate:
      name: Radar Max Move Distance
    max_still_distance_gate:
      name: Radar Max Still Distance
    g0:
      move_threshold:
        name: g0 move threshold
      still_threshold:
        name: g0 still threshold
    g1:
      move_threshold:
        name: g1 move threshold
      still_threshold:
        name: g1 still threshold
    g2:
      move_threshold:
        name: g2 move threshold
      still_threshold:
        name: g2 still threshold
    g3:
      move_threshold:
        name: g3 move threshold
      still_threshold:
        name: g3 still threshold
    g4:
      move_threshold:
        name: g4 move threshold
      still_threshold:
        name: g4 still threshold
    g5:
      move_threshold:
        name: g5 move threshold
      still_threshold:
        name: g5 still threshold
    g6:
      move_threshold:
        name: g6 move threshold
      still_threshold:
        name: g6 still threshold
    g7:
      move_threshold:
        name: g7 move threshold
      still_threshold:
        name: g7 still threshold
    g8:
      move_threshold:
        name: g8 move threshold
      still_threshold:
        name: g8 still threshold

binary_sensor:
  - platform: ld2410
    has_target:
      name: Radar Target
      id: radar_has_target
    has_moving_target:
      name: Radar Moving Target
    has_still_target:
      name: Radar Still Target


sensor:
  - platform: ld2410
    moving_distance:
      name: Radar Moving Distance
      id: moving_distance
    still_distance:
      name: Radar Still Distance
      id: still_distance
    moving_energy:
      name: Radar Move Energy
    still_energy:
      name: Radar Still Energy
    detection_distance:
      name: Radar Detection Distance
      id: radar_detection_distance
    g0:
      move_energy:
        name: g0 move energy
      still_energy:
        name: g0 still energy
    g1:
      move_energy:
        name: g1 move energy
      still_energy:
        name: g1 still energy
    g2:
      move_energy:
        name: g2 move energy
      still_energy:
        name: g2 still energy
    g3:
      move_energy:
        name: g3 move energy
      still_energy:
        name: g3 still energy
    g4:
      move_energy:
        name: g4 move energy
      still_energy:
        name: g4 still energy
    g5:
      move_energy:
        name: g5 move energy
      still_energy:
        name: g5 still energy
    g6:
      move_energy:
        name: g6 move energy
      still_energy:
        name: g6 still energy
    g7:
      move_energy:
        name: g7 move energy
      still_energy:
        name: g7 still energy
    g8:
      move_energy:
        name: g8 move energy
      still_energy:
        name: g8 still energy
Code language: YAML (yaml)

Adding the LD2410 in Home Assistant

Save the .yaml file and re-flash the ESP32 Board. Once it boots backup, it will be discovered in Home Assistant automatically. If it isn’t, you can navigate to Settings > Devices & Services > Add Integration > Add ESPHome device and input the IP address of the ESP32 board along with the encryption key. Once added, it will generate a bunch of entities in Home Assistant.

DIY Presence Sensor with ESPHome and HLK-2410 - Created Entities

Most of these are pretty self explanatory, although some differentiation is needed between the radar entities. The radar distinguishes between still and moving targets, and their statuses are mutually exclusive. They change states whenever either a stationary or moving target is identified. The radar target entity consolidates both states, requiring both to be clear for the overall presence to be considered clear, and vice versa.

The entities “radar detection distance” and “radar moving distance” provide the target distance in centimeters. Meanwhile, “radar moving energy” and “radar still energy” gauge the energy and speed of the target at that distance. A higher percentage reading indicates increased speed; the faster the movement, the higher the percentage displayed.

Optimizing LD2410 Presence Detection

With native ESPHome support, the LD2410 can be fine-tuned to eliminate false triggers and optimize the sensor for your space. This is done through a featured called Gates which are just energy thresholds for different distances of detection from the sensor. You can tweak the move and still energy settings within this range to avoid false alarms. Make sure to enable Radar Engineering Mode in the configuration before adjusting the gate and toggle it off once you are done.

The LD2410 has the following gates thresholds by default:

Hi-Link LD2410 Gates Threshold

For instance, if I want to fine-tune the second gate, covering movement from 0.75 to 1.5 meters, I need to tweak the thresholds for motion and stillness in gate 2 (g2). One easy method is to start with the maximum values and then gradually reduce them until it accurately detects a person without setting off false alarms. To fully optimize, you’ll need to adjust the thresholds for each gate.

Adding LD2410 Detection Zones

Incremental detection zones can be added to the configuration of the LD2410 sensor, which can be used for pinpoint accuracy in detecting presence. These need to be defined in the ESPHome configuration yaml file before they are exposed, so edit the file and add the following under the number and binary_sensors domains, leaving the rest as is:

number:
# Setting ending of zone 1 occupancy
  - platform: template
    name: "Radar End Zone 1"
    id: radar_z1_end
    device_class: distance
    min_value: 0
    max_value: 600
    step: 1
    mode: box
    update_interval: never
    optimistic: true
    restore_value: true
    initial_value: 10
    icon: "mdi:arrow-collapse-right"
    entity_category: CONFIG

  # Setting ending of zone 2 occupancy
  - platform: template
    name: "Radar End Zone 2"
    id: radar_z2_end
    device_class: distance
    min_value: 0
    max_value: 600
    step: 1
    mode: box
    update_interval: never
    optimistic: true
    restore_value: true
    initial_value: 36
    icon: "mdi:arrow-collapse-right"
    entity_category: CONFIG

  # Setting ending of zone 3 occupancy
  - platform: template
    name: "Radar End Zone 3"
    id: radar_z3_end
    device_class: distance
    min_value: 0
    max_value: 600
    step: 1
    mode: box
    update_interval: never
    optimistic: true
    restore_value: true
    initial_value: 100
    icon: "mdi:arrow-collapse-right"
    entity_category: CONFIG

binary_sensor:
  ## Set Up Radar Zones Based On Distance
  - platform: template
    name: "Radar Zone 1 Occupancy"
    device_class: occupancy
    icon: mdi:motion-sensor
    lambda: |-
      if ((id(radar_has_target).state) && (id(radar_detection_distance).state < id(radar_z1_end).state)) {
        return true;
      } else {
        return false;
      }
  - platform: template
    name: "Radar Zone 2 Occupancy"
    device_class: occupancy
    icon: mdi:motion-sensor
    lambda: |-
      if ((id(radar_has_target).state) && ((id(radar_z1_end).state < id(radar_detection_distance).state) && (id(radar_detection_distance).state < id(radar_z2_end).state))) {
        return true;
      } else {
        return false;
      }
  - platform: template
    name: "Radar Zone 3 Occupancy"
    device_class: occupancy
    icon: mdi:motion-sensor
    lambda: |-
      if ((id(radar_has_target).state) && ((id(radar_z2_end).state < id(radar_detection_distance).state) && (id(radar_detection_distance).state < id(radar_z3_end).state))) {
        return true;
      } else {
        return false;
      }
Code language: YAML (yaml)

You can create three zones by specifying the distance in centimeters, indicating the maximum range the sensor should detect for each zone. For instance, if Zone 1 is set to 50cm, it senses presence from 0 to 50cm. Zone 2 starts where Zone 1 ends, so if Zone 2 is set to 300cm, it detects presence from 50 to 300cm measured from the sensor. Each zone has its own sensor entity that changes states accordingly. Here’s a simple chart for better visualization:

LD2410 Detection Zones

Full Configuration Example

The following code is a full configuration example for the LD2410/LD2410B/LD2410C presence sensor attached to an ESP32 Board. It includes some added things like control buttons, ESP board information (CPU, Memory), uptime sensor, firmware sensor and factory reset buttons.

#Define Project
substitutions:
  name: diy-ld2410
  device_description: ${name} guide by SmartHomeScene.com
  
esphome:
  name: "${name}"
  friendly_name: LD2410 Presence Sensor
  comment: DIY LD2410 Presence Sensor with ESPHome by www.smarthomescene.com
  on_boot:
  - priority: 900.0
    then:
      - lambda: |-
          id(cpu_speed) = ESP.getCpuFreqMHz();

#Define Board Type
esp32:
  board: esp32dev
  framework:
    type: arduino
  

# Enable Home Assistant API
api:

logger:

ota:
  password: "3e17e1c064adcb643234d5a49982329c"

captive_portal:

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

  #Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "DIY LD2410"

 #Open web port for browser access
web_server:
  port: 80

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

globals:
  - id: cpu_speed
    type: int
    restore_value: no
    initial_value: "0"
ld2410:
  id: ld2410_radar
  
#Configuration entities
number:
  - platform: ld2410
    timeout:
      name: Radar Timeout
    max_move_distance_gate:
      name: Radar Max Move Distance
    max_still_distance_gate:
      name: Radar Max Still Distance
    g0:
      move_threshold:
        name: g0 move threshold
      still_threshold:
        name: g0 still threshold
    g1:
      move_threshold:
        name: g1 move threshold
      still_threshold:
        name: g1 still threshold
    g2:
      move_threshold:
        name: g2 move threshold
      still_threshold:
        name: g2 still threshold
    g3:
      move_threshold:
        name: g3 move threshold
      still_threshold:
        name: g3 still threshold
    g4:
      move_threshold:
        name: g4 move threshold
      still_threshold:
        name: g4 still threshold
    g5:
      move_threshold:
        name: g5 move threshold
      still_threshold:
        name: g5 still threshold
    g6:
      move_threshold:
        name: g6 move threshold
      still_threshold:
        name: g6 still threshold
    g7:
      move_threshold:
        name: g7 move threshold
      still_threshold:
        name: g7 still threshold
    g8:
      move_threshold:
        name: g8 move threshold
      still_threshold:
        name: g8 still threshold
  # Setting ending of zone 1 occupancy
  - platform: template
    name: "Radar End Zone 1"
    id: radar_z1_end
    device_class: distance
    min_value: 0
    max_value: 600
    step: 1
    mode: box
    update_interval: never
    optimistic: true
    restore_value: true
    initial_value: 10
    icon: "mdi:arrow-collapse-right"
    entity_category: CONFIG

  # Setting ending of zone 2 occupancy
  - platform: template
    name: "Radar End Zone 2"
    id: radar_z2_end
    device_class: distance
    min_value: 0
    max_value: 600
    step: 1
    mode: box
    update_interval: never
    optimistic: true
    restore_value: true
    initial_value: 36
    icon: "mdi:arrow-collapse-right"
    entity_category: CONFIG

  # Setting ending of zone 3 occupancy
  - platform: template
    name: "Radar End Zone 3"
    id: radar_z3_end
    device_class: distance
    min_value: 0
    max_value: 600
    step: 1
    mode: box
    update_interval: never
    optimistic: true
    restore_value: true
    initial_value: 100
    icon: "mdi:arrow-collapse-right"
    entity_category: CONFIG

#Occupancy sensor
binary_sensor:
  - platform: ld2410
    has_target:
      name: Radar Target
      id: radar_has_target
    has_moving_target:
      name: Radar Moving Target
    has_still_target:
      name: Radar Still Target
  ## Set Up Radar Zones Based On Distance
  - platform: template
    name: "Radar Zone 1 Occupancy"
    device_class: occupancy
    icon: mdi:motion-sensor
    lambda: |-
      if ((id(radar_has_target).state) && (id(radar_detection_distance).state < id(radar_z1_end).state)) {
        return true;
      } else {
        return false;
      }
  - platform: template
    name: "Radar Zone 2 Occupancy"
    device_class: occupancy
    icon: mdi:motion-sensor
    lambda: |-
      if ((id(radar_has_target).state) && ((id(radar_z1_end).state < id(radar_detection_distance).state) && (id(radar_detection_distance).state < id(radar_z2_end).state))) {
        return true;
      } else {
        return false;
      }
  - platform: template
    name: "Radar Zone 3 Occupancy"
    device_class: occupancy
    icon: mdi:motion-sensor
    lambda: |-
      if ((id(radar_has_target).state) && ((id(radar_z2_end).state < id(radar_detection_distance).state) && (id(radar_detection_distance).state < id(radar_z3_end).state))) {
        return true;
      } else {
        return false;
      }

#Exposes configuration and status sensors
sensor:
    #Device UPTIME
  - platform: uptime
    name: Uptime
    id: sys_uptime
    update_interval: 60s
    #Device CPU Speed
  - platform: template
    name: "ESP Cpu Speed"
    accuracy_decimals: 0
    unit_of_measurement: Mhz
    lambda: |-
      return (id(cpu_speed));
    entity_category: "diagnostic"
    #Device Memory
  - platform: template
    id: esp_memory
    icon: mdi:memory
    name: ESP Free Memory
    lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL) / 1024;
    unit_of_measurement: "kB"
    state_class: measurement
    entity_category: "diagnostic"
    #Device Temperature
  - platform: template
    id: sys_esp_temperature
    name: ESP Temperature
    lambda: return temperatureRead();
    unit_of_measurement: °C
    device_class: TEMPERATURE
    update_interval: 60s
    #Device RSSI
  - platform: wifi_signal
    name: RSSI
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"
  - platform: ld2410
    moving_distance:
      name: Radar Moving Distance
      id: moving_distance
    still_distance:
      name: Radar Still Distance
      id: still_distance
    moving_energy:
      name: Radar Move Energy
    still_energy:
      name: Radar Still Energy
    detection_distance:
      name: Radar Detection Distance
      id: radar_detection_distance
    g0:
      move_energy:
        name: g0 move energy
      still_energy:
        name: g0 still energy
    g1:
      move_energy:
        name: g1 move energy
      still_energy:
        name: g1 still energy
    g2:
      move_energy:
        name: g2 move energy
      still_energy:
        name: g2 still energy
    g3:
      move_energy:
        name: g3 move energy
      still_energy:
        name: g3 still energy
    g4:
      move_energy:
        name: g4 move energy
      still_energy:
        name: g4 still energy
    g5:
      move_energy:
        name: g5 move energy
      still_energy:
        name: g5 still energy
    g6:
      move_energy:
        name: g6 move energy
      still_energy:
        name: g6 still energy
    g7:
      move_energy:
        name: g7 move energy
      still_energy:
        name: g7 still energy
    g8:
      move_energy:
        name: g8 move energy
      still_energy:
        name: g8 still energy

#Exposes control buttons
button:
  - platform: restart
    icon: mdi:power-cycle
    name: "ESP Reboot"

  - platform: factory_reset
    disabled_by_default: True
    name: "Factory Reset ESP"
    id: factory_reset_all

  - platform: ld2410
    factory_reset:
      name: "Factory Reset Radar"
    restart:
      name: "Restart Radar"
    query_params:
      name: query params

#Exposes control switches
switch:
  - platform: ld2410
    bluetooth:
      name: "Radar Control Bluetooth"
      id: radar_bluetooth
    engineering_mode:
      name: "Radar Engineering Mode"
time:
  - platform: sntp
    id: time_sntp

#Radar firmware version
text_sensor:
  - platform: ld2410
    version:
      name: "Radar Firmware Version"
#Set distance resolution - 0.75m or 0.2m
select:
  - platform: ld2410
    distance_resolution:
      name: "Radar Distance Resolution"
Code language: YAML (yaml)

Summary

Reliable presence detection for less than $10? Well why not. The 24GHz Hi-Link LD2410 is a great way to detect presence around your home once properly tuned. With the full example from above, this DIY presence sensor becomes very flexible, customizable and adjustable to your space.

I must have spent around 2-3 hours tuning the Gates and Zones for the LD2410. Once I was done, there were absolutely no false triggers and it was able to reliable detect presence in my living room. Because of this, It’s fair to note that I consider this approach a highly DIY solution for true Home Automation enthusiasts, it’s definitely not for everyone.

If you want a ready-made product operating in the same way, the Apollo MSR-1 is your device. I honestly don’t think there’s a better multi-sensor out there, highly considering price, features and size as a factor. You can get the Apollo MSR-1 on their Official Webstore from $34.99.

Once again, here’s a list of things needed for this project:

SmartHomeScene.com is a participant in the Amazon Services LLC Associates Program & AliExpress Portals Affiliate Program.
We may earn a small commission on qualifying purchases from these websites, which incurs no additional cost to you.
SmartHomeScene © 2023 All rights reserved
Ko-Fi SmartHomeScene.com

30 thoughts on “DIY Presence Sensor with Hi-Link LD2410 and ESP32 for Home Assistant”

  1. you recommend not to solder, but what is so difficult to solder those few wires, in my case they are all soldered and I have had no problems with it. There are SMD components that are smaller.

    But other than that it is a very clear article, I had not yet come across defining zones and I will certainly incorporate them into my config.

    1. My personal choice is to always solder, but over time I realized most people are going to defer from a project if it involves soldering.
      So this is why I always provide a non-soldering route, if possible.
      Thanks for the feedback.

  2. Thanks for this tutorial. I bought all the parts but have this when trying to flash esp32 with your code :

    Failed config
    number.ld2410: [source /config/esphome/esphome-web-d04e44.yaml:45]
    Platform not found: ‘number.ld2410’.

    Anyone have the same issue ?

      1. Hi, indeed code is 100% correct. Issue was on the ESP Home version which had to be updated. Now it’s working well 🙂

        As entities like Radar Movie Target can be verbose when a target is moving, I think this can impact HA database. Do you have any recommabndation to optimize this ?

  3. Hi,

    thanks for sharing. Unfortunately I still get all sensors reporting “unknown” in HA. I have tried multiple ESP32’s and LD2410b’s and get the same result, which in fairness is the same result I get when trying other ESPhome/LD2410 write-up’s.

    That said I’ve a couple of 2410’s running as standalone BLE devices and they have been very stable, so its not a huge problem, but I would be good to have the choice of WiFi or BLE.

    More trawling the net I guess.

  4. update: out of shear frustration I swapped the RX and TX connections around, so its now

    RX (LD2410 pin 3 from the left, after VCC and Gnd) RX (ESP32 30pin dev board – pin 21 – GPIO16)

    TX(LD2410 pin 4 from the left) TX (ESP32 30pin dev board – pin 22 – GPIO17)

    and its working!

  5. Great tutorial, works perfectly!
    I just wonder how to set the three zones. Are the initial_values in your example measured in cm? Like so: zone1=[0..10]cm zone2=[10..36]cm and zone3=[36..100]cm

    1. Yes, each zone is measured in centimeters.
      For instance, if Zone 1 is set to 50cm, it senses presence from 0 to 50cm. Zone 2 starts where Zone 1 ends, so if Zone 2 is set to 300cm, it detects presence from 50 to 300cm measured from the sensor etc.

  6. Does it has to be ESP32? I did a device with ESP8285, uploaded software, connected wit API to HASS, I can see all defined entities but no one of them is accessible except entities linked with ESP like CPU speed, Uptimre and RSSI

      1. It`s not this problem, I have made a pcb and soldered everything, so can`t swap the pins, anyway device works with another software uploaded inside. I tried to flash it with your yaml and does not work with this particular yaml. However thanks for your opinion. When I use ESP32 yaml works like a charm.

  7. Great tutorial; thank you SHS! When the LD2410 I ordered w/the 1.25mm->2.54 DuPont cable came I thought at first they forgot the LD2410. I was shocked how TINY it is! It was very difficult to connect the 1.25mm end of the cable to the LD2410 pin header, but I did.

    I used this with an ESP32 and works great in my office for presence detection. I tried to use in a larger room (dining room & kitchen combination) and no matter how I adjusted the gate settings, it would still fail to detect a person in some parts of the kitchen (furthest from the sensor).

    Nevertheless I am a tinkerer and I really enjoyed this project. I am not sure if I will build another one, but it is fun to experiment and I am pleased I was able to get a successful outcome. I don’t have a case for it yet as I’m going to let it “burn in” for a few days to verify it stays functional/WiFi stays connected. At that point I’ll probably order a project box for it. Thanks!

    1. Hey man,

      Glad you had fun with this sensor.
      For the next one, you might go for the LD2410C, which has the standard 2.54 connectors but is a bit larger.
      OR even the LD2411S, which has better antennas, accuracy and precision.

      Cheers

      1. Thanks SHS! I think if I do another one I will surely use the LD2410C. I was concerned when connecting to the pins on the LD2410 that I may snap them off, as the connector did not want to easily slide onto the pins. It was a struggle!
        By the way do you have any recommendations for how I should package up this project? I was looking at project boxes like this on Amazon: https://amzn.to/3OPynsR I’m wondering I need to do anything special to protect the ESP32/exposed pins, or if I could just carefully place the ESP32 (I used one like you have listed in the article) and the LD2410 in the project box and voila, it’s done! Thanks for any tips and your website has been a fantastic resource – thanks for all the great info. 🙂

        1. You can use any box you like, the ESP32s are very resilient – they don’t need any protection whatsoever.
          I have a bunch connected and scattered around my work area/testing bench, no issues whatsoever.
          Just make sure you don’t short-circuit anything and you’re good 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *