I can not read the Chinese documents - but I spot the 115200 there. May be we a re lucky, can you change the baud_rate
which defaults to unusual 256000 on the 2410 to 115200 and give it a try?
I contacted the HLK and received the datasheet for LD2420. Uploaded all the files and the tool here for the community. I havn’t had the time to look into these yet, but hopefully it will be helpful for the folks interested in this sensor.
Please report your findings if you are able to wire this guy up and make it running
Thanks for the good work!
HiLink still hasn’t update their programming tool unfortunately.
This one is for the V1 version of the 2420. When connecting the sensor with a ch340 serial ttl converter it gives a connection error (also tried 115200 as Amandel suggested)
I can however read the output values of the 2420 with the ch340 from a “standard” serial debugger app (using the 256000 rate). It shows occupancy and distance values. So the ch340 is working and the wiring and rate is correct…
But trying to program the sensor with the provided tool from HiLink is still a no go…
The communication protocol is somewhere buried in that Excel sheet. Let’s hope that someone understands that data and makes the 2420 shine
When restock is happening?
Mosher, one “mistake” i see on that board you ask for restock is that temperature/humidity sensor is too close to esp chip. Esp heats up during work (especially esp32), so temperature sensor should be well away from it, unless the goal is to measure temperature of module, not room temp… so, bear that in mind.
thats a nice finding, thanks for pointing that out.
I noticed because i did such a mistake…
it took me a while to figure it out why it’s “so darn hot” in my workshop
esp32 can be “cooled down” a bit with power save mode, though, but it’s still warm.
Hi Mosher,
Thanks for your interest! Sales will reopen soon. This time an enclosure and stand will be available as interest were very high for them.
Regarding the temperature sensor being close to the ESP, the internal temperature readings of the ESP are included in the calculations to work out the temperature of the room. It’s not a mistake, think of it more of a trade off. It was always a factor during the design as the end goal was to make this board as small as possible.
If you would like to improve on the calculations then you can easily change the config. The config is freely available and I would love some feedback
Additionally a temperature offset is already available in Home Assist if you’re happy with the calculations but would like to simply add/subtract a fixed value.
Here’s a comparison of the Unity temperature sensor with another off-the-shelf sensor:
Hope this helps.
Thanks!
The ESP has an internal temperature sensor that you can read. Try to incorporate that in to your calculations to get a more accurate ambient reading. Hope this helps!
Yeah, well… it would be pretty hard to calibrate whole thing to get accurate room temperature. No matter what you do is this sensor closed in a box together with esp. So, best option is to have sensor well away from esp. That’s main reason why i replaced all my esp temp sensors with xiaomi’s. No need for wire (power supply) and no worries about heating…
@Protoncek -
The graph / plot from @LoopOn looks convincing, though - you don’t see that being consistently higher or lower… Different vendors has different designs, after all.
= = = =
@LoopOn -
Maybe, just maybe, you could help provide the same graph but with more temperature curves from with enclosure, without enclosure, and maybe readings from 2 other non-Unity sensors…? It would help address the concerns.
And do you have any similar graph for humidity readings from various sensors in the same room?
And, when you said “enclosure”… what does it look like? Maybe a couple of photos (with a rular for size comparison) would help. Would it be USB powered or battery powered or both? I suppose the form factor matters also.
Hi @k8gg,
I ran a primitive experiment with an Aeotec sensor along side 2 Unity boards (with/without a case).
I attempted to show extreme variations in temperature by placing the sensors in cold water (in a bag), and then in front of a fan heater.
The different rates at which the sensors change is caused by the devices having different/no enclosures.
The Unity board on its own is 40mmx20mm. With the case it is 45mmx25mm.
Hope this helps!
You have to change the phone language to english
I have to be very stupid but i need your help with programming an ESP32 with the LD2410B.
I have formated and prepared for first use my esp32 which is the one in the pinout picture below.
I have connected the LD2410B it as follows:
Sensor’s TX - to RX of ESP32 - GPIO3
Sensor’s RX - to TX of ESP32 - GPIO1
Sensor’s 5v to ESP32 VCC
Sensor’s GRD to GRD of ESP32
Here is my board:
I am trying to use the code from the second post so i created a file called " uart_read_line_sensor_ld2410v3.h" and placed it inside the esphome folder. Then i adopted the existing esp32 and replaced the yaml code with the one from the second post of course setting the correct pins for RX and TX.
I am facing compiling errors as follows:
INFO Reading configuration /config/esphome/esphome-web-f53f20.yaml...
INFO Generating C++ source...
INFO Core config or version changed, cleaning build files...
INFO Compiling app...
Processing ld2410 (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 5.3.0)
--------------------------------------------------------------------------------
Library Manager: Installing esphome/AsyncTCP-esphome @ 1.2.2
INFO Installing esphome/AsyncTCP-esphome @ 1.2.2
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
INFO Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing bblanchon/ArduinoJson @ 6.18.5
INFO Installing bblanchon/ArduinoJson @ 6.18.5
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
warning: Calling missing SConscript without error is deprecated.
Transition by adding must_exist=False to SConscript calls.
Missing SConscript '/data/cache/platformio/packages/framework-arduinoespressif32/tools/platformio-build.py'
File "/data/cache/platformio/platforms/espressif32/builder/frameworks/arduino.py", line 41, in <module>
Library Manager: Installing WiFi
Library Manager: Warning! More than one package has been found by WiFi requirements:
Library Manager: - arduino-libraries/[email protected]
Library Manager: - mbed-zrem/[email protected]+sha.a446a6e2d3ce
Library Manager: Please specify detailed REQUIREMENTS using package owner and version (shown above) to avoid name conflicts
Unpacking [------------------------------------] 0%
Unpacking [#-----------------------------------] 3%
Unpacking [##----------------------------------] 6%
Unpacking [###---------------------------------] 9%
Unpacking [####--------------------------------] 12%
Unpacking [#####-------------------------------] 15%
Unpacking [######------------------------------] 18%
Unpacking [#######-----------------------------] 21%
Unpacking [#########---------------------------] 25%
Unpacking [##########--------------------------] 28%
Unpacking [###########-------------------------] 31%
Unpacking [############------------------------] 34%
Unpacking [#############-----------------------] 37%
Unpacking [##############----------------------] 40%
Unpacking [###############---------------------] 43%
Unpacking [################--------------------] 46%
Unpacking [##################------------------] 50%
Unpacking [###################-----------------] 53%
Unpacking [####################----------------] 56%
Unpacking [#####################---------------] 59%
Unpacking [######################--------------] 62%
Unpacking [#######################-------------] 65%
Unpacking [########################------------] 68%
Unpacking [#########################-----------] 71%
Unpacking [###########################---------] 75%
Unpacking [############################--------] 78%
Unpacking [#############################-------] 81%
Unpacking [##############################------] 84%
Unpacking [###############################-----] 87%
Unpacking [################################----] 90%
Unpacking [#################################---] 93%
Unpacking [##################################--] 96%
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing FS
Warning! Could not find the package with 'FS' requirements for your system 'linux_x86_64'
Library Manager: Installing Update
Warning! Could not find the package with 'Update' requirements for your system 'linux_x86_64'
Library Manager: Installing DNSServer
Unpacking [------------------------------------] 0%
Unpacking [###---------------------------------] 8%
Unpacking [######------------------------------] 16%
Unpacking [#########---------------------------] 25%
Unpacking [############------------------------] 33%
Unpacking [###############---------------------] 41%
Unpacking [##################------------------] 50%
Unpacking [#####################---------------] 58%
Unpacking [########################------------] 66%
Unpacking [###########################---------] 75%
Unpacking [##############################------] 83%
Unpacking [#################################---] 91%
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing ESPmDNS
Warning! Could not find the package with 'ESPmDNS' requirements for your system 'linux_x86_64'
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 1.2.7
|-- ESPAsyncWebServer-esphome @ 2.1.0
| |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 1.1.0
|-- ArduinoJson @ 6.18.5
Compiling /data/ld2410/.pioenvs/ld2410/src/esphome/components/api/api_connection.cpp.o
Compiling /data/ld2410/.pioenvs/ld2410/src/esphome/components/api/api_frame_helper.cpp.o
In file included from src/esphome/components/socket/socket.h:6,
from src/esphome/components/api/api_frame_helper.h:14,
from src/esphome/components/api/api_connection.h:3,
from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/socket/headers.h:127:10: fatal error: sys/ioctl.h: No such file or directory
#include <sys/ioctl.h>
^~~~~~~~~~~~~
compilation terminated.
In file included from src/esphome/components/socket/socket.h:6,
from src/esphome/components/api/api_frame_helper.h:14,
from src/esphome/components/api/api_frame_helper.cpp:1:
src/esphome/components/socket/headers.h:127:10: fatal error: sys/ioctl.h: No such file or directory
#include <sys/ioctl.h>
^~~~~~~~~~~~~
compilation terminated.
*** [/data/ld2410/.pioenvs/ld2410/src/esphome/components/api/api_frame_helper.cpp.o] Error 1
*** [/data/ld2410/.pioenvs/ld2410/src/esphome/components/api/api_connection.cpp.o] Error 1
========================= [FAILED] Took 17.60 seconds =========================
I tried also code from others i found on github but i still get the same errors.
Not sure what am i doing wrong… Anyone can help?
I managed to solve it with this configuration and no .h file: How to work with HLK-LD1115H and Wemos D1 Mini for Human Presence Detection - #137 by burg93
Thank you very much
M
Hi, I was inspired by your post here and got something in my bathroom setup similar using the same parts. I’m also experiencing BT drops and the LD2410B going ‘Unavailable’ until I reload the integration. Have you figured out a more stable setup?
The only thing I was able to do was move my BT proxy closer (like less than 5’ away from the LD2410B). Then the drops were drastically reduced. To fix the device itself I downloaded the HLKRadarTool and then restarted the LD2410B.
All - As an FYI, if you wish to bypass the linear regulator on these and run directly @ nominal 3.3v, I’ve done some probing and noted that the pads at the other end of the board have continuity with the regulator outputs - and have been running these boards directly with 3.3v now for a few weeks - convenient for me as I run the 2410 off the same lm2596 buck converter board I’m using to power the esp32 (and the uart on the 2410 is native 3.3v too). Added benefit is much. much easier to solder to those pads than the tiny pins.
The two central pads don’t, unfortunately, seem to have continuity back to the TX and RX pins (damn!!), but they do have continuity back to the IC that I’ve circled in red. Unfortunately on my board, I can’t quite read the code on the IC so I’m still not sure what those middle pins do.
Just a few steps away from an official integration…
Thank you Soubhik for bringing this sensor to the attention and of course thank you Descipher for writing the component, its working like a charm!
Thanks, I didn’t see your response until now. I had my proxy in the same room as the sensor probably 2 feet away but it kept dropping and I also used the app, restarted multiple times but just could not get it stable. I’m now moving on to ESPHome configuration; hopefully it’s better.