The LD2410 human presence sensor is a remarkable device that offers exceptional sensitivity, capable of detecting even the slightest human movement. It works natively with Home Assistant over Bluetooth, but connected that way it have some drawbacks.

LD2410 Human Presence Sensor Bluetooth Limitations

The LD2410 is affordable, priced at under $4 dollars, and its user-friendly nature make it an ideal choice for creating effective presence-based home automation setups.

This is LD2410C with Bluetooth, but the other models will work fine as well. LD2410 Human Presence Sensor Bluetooth Limitations
This is LD2410C with Bluetooth, but the other models will work fine as well

In this guide, we will explore a clever solution to overcome potential Bluetooth coverage limitations using an ESP32 board as an intermediary. By utilizing the ESP32’s WiFi capabilities, we can extend the wireless coverage while preserving the benefits of the LD2410 sensor.

Hardware Requirements:

To embark on this DIY project, gather the following hardware components:

  • At least one LD2410 sensor (Bluetooth is not a must)
  • An ESP32 or ESP8266 board, such as the D1 Mini ESP32 or similar
  • A data Micro USB cable for powering the D1 Mini and uploading ESPHome software
  • Jumper / Dupont wires for connections (optionally a breadboard)
  • Soldering iron and tin wire (if needed)

Here are some affiliate links from where you can buy everything that is needed for this DIY project:

Software Requirements:

Ensure you have the following software tools:

  • Home Assistant with Add-on store. That is our central home automation hub
  • ESPHome Dashboard for installing and managing ESPHome devices

What if you don’t have Add-on store or Home Assistant?

To learn more about Home Assistant official installation types, add-on store, their pros & cons + 1 super simple way to get started on a PC -feel free to join my Webinar where I’ll talk exactly about that.

The Webinar is free and you can reserve your seat right now from my other website https://automatelike.pro/webinar

Wiring Setup:

Here’s how to connect the components:

  • Connect LD2410 VCC pin to D1 Mini ESP32 VCC pin
  • Connect LD2410 GND pin to D1 Mini ESP32 GND pin
  • Connect LD2410 RX pin to D1 Mini ESP32 TX pin
  • Connect LD2410 TX pin to D1 Mini ESP32 RX pin

Below you can find the same thing, but in more visual way

ESP32                 LD2410
5V ------------------ VCC
GND ----------------- GND
RX ------------------- Uart-Tx
TX ------------------- Uart-Rx

Even more visual here is the final result. The resulting connection looks like this:

Extending LD2410 Human Presence Sensor Range with ESP32 for Home Automation 1

Initial Configuration:

  1. Connect the D1 Mini using a Micro USB cable to your Home Assistant and ESPHome setup for initial ESPHome installation.
  2. Create a new ESPHome device in ESPHome Dashboard.
  3. Paste the provided ESPHome configuration YAML code into the device configuration – LINK
  4. Save and install the configuration to the device.
Extending LD2410 Human Presence Sensor Range with ESP32 for Home Automation 2

LD2410 & ESP32 Home Assistant Setup:

  • Once the device is installed and operational, you can move the D1 Mini 32 and LD2410 sensor to your desired locations, as long as they have USB power and WiFi coverage – they will work!
  • In Home Assistant Integrations section, the LD2410 sensor should be auto-discovered and ready for use.
Extending LD2410 Human Presence Sensor Range with ESP32 for Home Automation 3
  • You cn create custom home automations based on presence detection. For example, you can automatically turn on lights when human presence is detected.
Extending LD2410 Human Presence Sensor Range with ESP32 for Home Automation 4

What if you want to try LD2410 over Bluetooth?

If you want to ditch the ESP32 board and to use only the LD2410 over Bluetooth in your Home Assistant – no worries. Just check any of my previous articles:

Conclusion:

By leveraging the LD2410 human presence sensor’s sensitivity and combining it with the ESP32’s WiFi capabilities, you can create powerful and flexible home automation solutions. This DIY project offers an affordable way to overcome Bluetooth coverage limitations, extending your home automation possibilities.

Feel free to share your ideas and experiences in the comments section, contributing to a vibrant community of creative home automation enthusiasts.

For simple, but useful explanations of the most common Smart Home words and Acronym download this free Smart Home Glossary available as a PDF file – https://automatelike.pro/glossary

Stay tuned for more exciting projects!

I’m Kiril, and I look forward to seeing you in the next one. Goodbye!


21 Comments

ismail · 21/08/2023 at 10:26 pm

hi.
i m getting that error while compiling

The ‘timeout’ option has been moved to the ‘timeout’ number component

    KIril Peyanski · 23/08/2023 at 12:49 pm

    You can get the new ESPHome code from the same link in the article. Can you please try again now and let me know what is the result?

      ismail · 26/08/2023 at 2:26 pm

      new code works great. thx a lot.

      Marc · 17/11/2023 at 4:23 am

      Hi Kiril,

      I have been trying this code for two days now, i tried pasting the code, i noticed that your code is for a d1 mini. So i pasted from logger and kept my initial lines for the esp8266 and board esp01_1m. I get an error after install saying:

      Failed config

      i2c: [source /config/esphome/ld.yaml:42]

      ESP8266: Invalid pin number: 21.
      sda: 21

      ESP8266: Invalid pin number: 22.
      scl: 22
      scan: True
      id: bus_a

John · 23/08/2023 at 11:01 am

Me too..

    KIril Peyanski · 23/08/2023 at 11:12 am

    I will try to update the code later today!

    KIril Peyanski · 23/08/2023 at 12:50 pm

    You can get the new ESPHome code from the same link in the article. Can you please try again now and let me know what is the result?

      John · 23/08/2023 at 3:10 pm

      Getting this error now:

      Remote branch ld2410 not found in upstream origin. source: github://regevbr/esphome@ld2410 components: – ld2410

        Sumya · 24/08/2023 at 11:57 pm

        I tried the latest code (Aug 24) and it doesnt work.

          KIril Peyanski · 25/08/2023 at 9:12 am

          I will fix the code these days, sorry for that but I’m preparing new videos & articles and I’m super busy ATM

Gabor · 24/08/2023 at 10:51 pm

Hi Kiril,

The LD2410 boards have arrived, I tried to build one with an ESP8266/ESP32 board. Is it normal that the LD2410 board becomes really hot?

Also, the config YAML does not work! The “api:” is present twice in the config. If I fixed it I got the same error as John. Could you please try and fix it!

Thanks a lot!

    KIril Peyanski · 25/08/2023 at 9:12 am

    I will fix the code these days, sorry for that but I’m preparing new videos & articles and I’m super busy ATM

    KIril Peyanski · 25/08/2023 at 9:39 pm

    The code should be fixed now. I tested it and it worked fine 🙂

Robbert · 30/08/2023 at 9:42 pm

Hi Kiril,

I’ve installed the ESP like the manual above but for some reason my sensors all display unknown. Tried to do the install all over but it will not show any data. All installation went well but I can;t figure out the problem

    yousaf · 04/11/2023 at 3:00 pm

    same issue here tried d1mini, esps3 and two different LD210B sensors but still no data.

jOEL · 02/09/2023 at 12:48 am

Any chance someone can provide the proper yaml file for an ESP32C3? scl pin number is too high – only 21 pins and I’m not sure what the i2c section represents. Also should note that the yaml file needs modified to match your installation’s parameters (secret/OTA update password/SSID/etc).

Dominicd · 12/09/2023 at 2:42 pm

Works flawlessly ! amazing actually. Thank you very much for these clear explanations. Any chance to propose or recommend a suitable enclosure for such two boards ? or even a 3-D printer file ?

    Wilfred · 02/11/2023 at 8:16 am

    try an ikea pm2.5 dust sensor as enclosure. It all will fit perfectly and you get the sensor extra. there Kiril has an excellent video about that. https://www.youtube.com/watch?v=BQ222qzYUqw&t=1s

      KIril Peyanski · 04/11/2023 at 4:00 pm

      Thanks for the reply and link @Wilfred 🙂

dimitris · 18/10/2023 at 6:40 pm

very nice but my sensors all display unknown. Any healp please

Marco · 13/01/2024 at 4:06 pm

hi Kiril,
great project! I follow your guide and i made the sensor and it work great!! I have a question: if i want to install a Light sensor like BH1750 ( it’s some lines in the yaml) how i need to wiring it? thanks

Leave a Reply

Avatar placeholder

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