Beginner DIY ESPHome mmWave Presence Sensor | HLK-LD2450 + ESP32
Vložit
- čas přidán 22. 06. 2024
- For this tutorial, no tools or soldering skills are required 🛠️ at all! 😄 You can simply snap together the ESP32 board with the HLK-LD2450 sensor to create the base for your smart sensor. It's as easy as that! 👌
FixtSE Web: fixtse.com/blog/esphome-mmwav...
PCBWay Project: www.pcbway.com/project/sharep...
Save $5 on your first order using our link: pcbway.com/g/lHR6if
Affiliate Links:
ESP32 30 PIN Development Board
- Amazon: (3 pack) amzn.to/3V4J5Q2
- Aliexpress: (USB C / Micro USB) s.click.aliexpress.com/e/_DBI...
HLK-LD2450 mmWave Radar Sensor
- Amazon: (HLK-LD2450 Kit) amzn.to/4c9Oawp
- Aliexpress: (HLK-LD2450 Kit): s.click.aliexpress.com/e/_Dnl...
s.click.aliexpress.com/e/_DdP...
Optional
Dupont Cable
- Amazon: (Dupont Cable Female to female) amzn.to/49VSQEr
- Aliexpress: (Dupont Cable Female to female) s.click.aliexpress.com/e/_Ddv...
USB C Cable
- Amazon: (2 Pack) amzn.to/3To9Nll
- Aliexpress: (USB C Cable) s.click.aliexpress.com/e/_DB7...
5v charger
- Amazon: (2 Pack) amzn.to/432N2Xi
- Aliexpress: (5v charger) s.click.aliexpress.com/e/_Ddc...
00:00 Prerequisites
00:51 fixtSE DIY Sensor Case
01:50 How to wire it up
04:47 Using Dupond Cables
06:10 How to secure it with a Hot Glue Gun
06:24 ESPHome Firmware
08:46 What to do if something goes wrong
09:43 How to create zones
10:55 How to use it on your dashboard
12:44 Adjust Zones in Home Assistant
13:12 How to automate with it
If you like my work, please consider supporting me on Ko-fi! ☕🎉: ko-fi.com/fixtse
Patreon: / fixtse
or Join this channel to get access to perks:
/ @fixtse.
You can find me on:
Web: fixtse.com/
Instagram: / fixtse
Hope this was useful and if you have any questions, write me a comment below
Thank you for watching (~ ̄▽ ̄)~ - Věda a technologie
Well. Bought the stuff in your links. Put together. Works with the apps from the write up. Home assistant see's and adds the sensors. Home Assistant doesn't see anything but the app sure does. Granted the esp32's linked in the amazon link are not the same as on the write up. Didn't notice until already ordered and putting together. Where the rx2 and tx2 is suppose to be are D16 & D17. Going to bet thats my issue....
Hi, yes RX2 is D16 and TX2 is D17, I'll pin this so if anyone else gets a board without the RX2, TX2 labels, know to look for D16 and D17 instead (GPIO16 and GPIO17).
Brilliant, looking in detail tomorrow. Subscribed
Love your videos, you make it all so easy. Many thanks.
Your videos are so great. You do a great job explaining everything and your site is so awesome to have as a reference. Keep up the great work!!
You are always do very clear and easy to follow videos. Keep it up.
Thank you very much! 😁 Glad to help
Thank you Very Much. It works great!
You deserve so much more subscribers & views!
Nice structured video
Really glad to be a part of this GREAT work!! 😁
Thank you Daisy 😁🙌 hope to bring more cool projects to life in the future.
Excellent, succinctly explained. Great tutorial.
Great!!!!!!!
really great - keep doing what you are doing. Some people are upset about "paywall" but that is not right. They can still use the precompiled images
Hey thank you for all your videos, your projects are really awesome. For the firmware do you plan to release yaml? I want to use my other esp32 boards, the esp32 c3 super mini.
Hi, the yaml for the firmware it's available for free for the patreons/members of the channel: ko-fi.com/s/2478914b94
@@fixtse. great, I´m a member now thanks, I didn't knew you had one.
@@trenxnet Welcome aboard 😁, thanks for the heads up, I only mention it at the end of the videos, but I guess that's not the best place to put it if I want people to actually see it😅😅
Thanks for an inspirational video! Do you know if it's possible to use the HLK-LD2410B instead?
Hi, thank you 😁🙌, Unfortunately no, the LD2410 it's a whole different sensor, most of the features are built into the sensors firmware, like the zone feature, so it won't work like the LD2450 can.
Grazie.
Thank you !
Hi grate video my device is up and running. I was trying to use the blueprint that you supplied but i cant get it to work with the zones so its all or nothing. is there a way to use it with the 3 zones set up?
Let me check
Ok, I updated the firmware to include a binary sensors for every zone, so you could easily use it with the blueprint, thank you for letting me know 😁🙌.
Great video, everything is clear and easy to understand - great work. I ordered the case from PCBWay made from resin and unfortunately some of the pieces do not fit properly, i.e. the ESP32 board is loose inside the case.
Oh no, so sorry to hear that, I reworked every piece and test it on my 3D printer so this do not happen 😔, they should all just fit. If you have a caliper, Could you measure the exact size of the pieces you've got, I could adjust based on the differences between the parts you received and the ones I printed, to try to fix the problem for the model on the pcbway project. I tested it on PLA and ABS (i don't think the material should affect the size of the final model, but I'll google it just in case).
Hey, I reached out to the PCBWay Team about your case, they told me that you can contact their after sales team to help you solve the problem with the pieces that doesn't fit, just go to the PCBWay delivery page and use the Open Dispute Link under your order. Hope they can help you with this issue.
Is it possible to get this to show up in the ESPHome addon in Home Assistant? I can see it from Devices but not in the ESPHome Addon.
Yes, i'll give you some instructions as soon a I get some free time, some minor changes to the yaml file are required, mainly related to the mac address being added to the name of the device
I noticed this as well it lets me add to home assistant but not to esp home dashboard. How can you add this if we can't edit the yaml file with out having to pay for the yaml code ?
Did you get a solution for this ?
Hi, @@shannonbreaux8442, yes, he is a member of the channel, he has access to the yaml file that is needed for the device to appear on the esphome dashboard.
Hey, great video and amazing explanation.
Does it work with ESP32 C6 Board. I want zigbee connectivity instead of WIFI. Also, ESP32 C6 board doesn't have RX2 and TX2 pins, so what are the alternatives?
Thanks in advance and keep up the good work!
As far as I know, almost any pin on the ESP32 could be configured as RX-TX (unlike on the esp8266), so that shouldn't be a problem. For the zigbee connectivity part, that needs more work on the ESPHome side (currently the firmware doesn't support to create custom zigbee sensors), not sure if adding support for creating zigbee devices is on their roadmap (zigbee devices are supposed to need a certification from the zigbee aliance, still I just transformed an Aqara Temperature Sensor from Bluetooth to Zigbee with some special firmware, so I'm not really sure anymore)
You video's are pretty clear, not too slow and not too fast. And when it's a bit too fast than it's less annoying to scrol a fragment back. But hihi... it must be your Italian vibe and accent.... I can't resist the urge to imitate your .... ' and.., that's it'. Funny repeating soundbite, I mean this in positive sense :D. Unfortunately I fail in my imitation, lol.
Maybe you need to create your own home assistant audio notifications. :D :D
and that's it.
jajaja you just made my day 😂😂
Hello,
Very informative video.
does it work with HLK-LD2410 sensor?
thanks
No, sorry, but the HLK-LD2410 it's officially supported by ESPHome esphome.io/components/sensor/ld2410.html so you should have no problem making it work.
I purchased the YAML, and while it works OK I get the following error on HA startup, do you have a fix for this? Entity sensor is using native unit of measurement 'mm/s' which is not a valid unit for the device class ('speed') it is using; expected one of ['in/h', 'Beaufort', 'in/d', 'kn', 'mph', 'mm/h', 'mm/d', 'ft/s', 'm/s', 'km/h']
Great video! Works very well with the exception of the HLKradar app. It wont open at all and I tried to install it on 3 phones. Is there another way to set zones?
you can set them from Home Assistant, I think I show that at some point in the video, just add the plot card to your dashboard and start playing with the coordinates for each zone, and you will see it appear on the graph
@@fixtse. got it. Thank you for the help!
@@fixtse. after a few days, the app worked? I am not sure of why. Your video is very literally the complete package. I have printed up the case as well on my bambu printer and this is a solid solution for mmwave human presence in home assistant! I have 2 other tries that are not as fruitful lol. The only thing I noticed is the ball and socket are loose. a piece of tape fixes that though. Printing my second case now. Thank you for what you do! I will be donating for sure!
Very nice video and presentation. I had my mmWave Sensor up and running in less than 20 minutes. Couple of questions. 1) HA plotly card: Is it supposed to show when a person is detected? (mine doesnt). 2) can you please do a tutorial to add a good Lux sensor and temp/humidity? I will have a perfect sensor to deploy all over my house :) Thanks in advance
Hi, yes, check if they appear on the HLK app on your phone, if they do, something is wrong with the code you are using on the card. If not, try using the factory reset of the sensor (this will wipe any zone you configured, so copy the values first).
Also, check my last video, I did just that.
Are you able to add additional sensor like temp, humidity, lux and so forth to the same board and update the files right read all?
yes
Hiya Fixt - just a quikc question - how impt is having a case for this setup ? I mean as long as i have the antennas facing the right way it shou ld be fine? Thanks for your kind advice.
Yes, the case is just for easier positioning and protecting the electronics from dust, etc. But it should work without it.
YAML behind paywall... 👎
yep all the stuff he used is from open source so should give back
At least the stl files are there and free.
That’s wrong on so many levels. I willing to help someone on Patreon or buy them a beer, coffee, etc. But paying for a YAML file to me is fundamentally wrong.
buzerant !
The video is clear and concise, but my experience isn't matching. I bought the 3 pack Amazon boards for this project. After getting the board into ESPhome, I show the device with only one entity. I access ESPHome and the device shows offline. It's taken me countless times starting from scratch to get to this point. I have the HLKRadar tool installed on my android device so I am sure it works, but I can't seem to get Home Assistant to recognize more than 1 entity, and that's the firmware. I'm sure the wiring is correct, but i am at wit's end.
The issue was resolved by adding via HA on my Raspberry Pi 400 instead of HA on my Windows box. For whatever reason, that fixed everything.
Hi another great video. A couple of questions on the HLK Radar app, the device is found and I connect but I and get an error “AA55 setting failed!” any idea what this is, I get no results on google? Slight difference I have the ESP32-WROOM-32D there is no TX2/RX2 so as pinned message im using D16 & D17. Am I missing something? Appreciate advice.
Hi, sorry haven't gotten that error myself.
Yes RX is D16 and TX is D17.
For the HLK App, the device uses only it own firmware, so if the error is displayed in the app, it's something regarding the LD-2450 you are using. Try reseting it to fabric and see if that makes the error go away.
Good Day Fixtse, my order finally came and i got 2 sets of the HLK2450 + ESP32 Dev Board + the Case from PCBWay =)
Managed to install everything and it works! Only issue though - its not very accrurate. (tried both with bluetooth proxy and without) I tried using it to set up zones and automations via the zones (detected or cleared) but there were alot of false detections or not clearing or not detecting accrurately (off by 1m). The scope of the radius also seems to work in a straight line, the radar does not capture my movement 2-3 metres away from its line of sight. Am I missing something? I got it to work just like how it was demostrated in the video. Is there an update to the firmware perhaps? Not sure what i'm doing wrong. Thanks for your advice.
Hi, mmm unless you are pointing it towards some kind of interfierence object (like glass or fans) I can't think of anything that could make it behave like you describe (and that woudln't explaing all the things you are mentioning). I tested 3 units for the video. So it probably has something to do with the sensor you received. Try restore it to factory, if that doesn't help consider asking for a new one or a refund. If you need to show evidence, use the HL App as source to show the behavior.
Last firmware available is V2.04.23101915.
Hi, I have a quick question why there is 2.4GHz PCB antenna connected to the mmWave sensor? Does mmWave connects to the wifi or something?
Hi, no, the PCB antenna is used to extend the bluetooth capabilities of the sensor (The bluetooth is only used to connect to the sensor using the HLK App). The wifi is managed using the ESP32 board alone.
Is the sensor placement directional? as it looks to be mounted at the back of the unit ? Is there any logic around this ?
Hi, yes, it's directional.
Yes, that is actually the front (that's why I put the logo on it, I know that seems like a weird placement). There are three main reasons for this:
- Since this is intended to be just a pressure-fit case, and PLA pieces tend to loosen over time, I prioritized having the base attached to the bigger part of the case to put less stress on the smaller parts.
- I considered moving the ESP32 board inside the case to get around the first limitation, but it made the installation and handling of the sensors more complicated, so I scratched that idea. I also considered moving the base to the bottom of the case, but that messed up with the stability (I could rework the joint in the future to get around it)
- One of the main limitations of mmWave sensors in general, is that they can't easily distinguish persons from pets, so a way to work around this is to mount the sensor at an elevated position, looking a little bit down. And in that case, the placement of the base attached "to the back" helps us to achieve that.
I hope this provides more clarity regarding the thought process behind the design! 🤓
Hi.
Can you add a luminance sensor to the project?
Thanks,
Best regards.
Yes, of course! I’ve planned to incorporate additional sensors down the line, including temperature, luminance, air quality, etc.
When do you plan to do that?
You will make another video explained how to add luminance and temperature sensors?
Best regards,
Marcos Cardoso
Esp32 is for bluetooth ?
Is this built on esphome or is it a custom firmware? Because As I understand the base esphome does not support HLK2450 right now.
The reason I ask is can we add additional sensors to this?
Yes, it's ESPHome, using a custom component to make the HLK2450 work. Yes I have a follow up for this video where I added a light sensor and a temperature/humidity/pressure sensor to the project
@@fixtse. you are awesome :)
Which board are supported? Esp32c3 super mini? Esp32 mini wroom 32?
So far I tried it only on the ESP32 Wroom 30 pin board, but it is still ESPHome firmware, there is no reason for it to not work on thoose boards (the suppor for the minis is still experimental, but it mostly works).
Hi Fixt, everything installed fine, but, I don't get any info on Target 2 or 3, Target 1 has data, same on HLK app or in HA
mmmm try restore the sensor to factory using the HLK-app (it has happen to me before and that fixed it, it will erase all your zones, so copy the values before). If that doesn't work, it might be something with your sensor.
What is the coverage of this sensor? How far away can it detect presence?
It can detect up to 3 persons within 8 meters (around 26 feet). I totally forgot about specs, i'll update my website later to add more info.
@@fixtse. Ty, great video!
The plot graph flickers in and out i hit the edit button on my dash board it never stays stable.
The sensor also works some times as it freezes up then I have to reset the sensor or factory reset any thing I can do to fix this or making it run smoother? And more stable?
Hi Shannon, that's weird, about the plot graph, I'm not able to reproduce this on my setup.
Do you have a second esp32 device you can try? I had to use the factory reset trick to get mine working, but it only happened to me when I was in the middle of testing, so constantly changing the settings for the device, but after I set my stable setup, I haven't had problems with any of my sensors.
Looks like the Aliexpress link for the sensor doesn’t work. Found a different one with the kit option and order the one from Amazon but wanted to let you know.
Hi, thank you, let me take a look.
I fixed it, and also found a better link for amazon, that includes the kit for the same price. Thank you so much for the heads up 😁🙌
I've tried this project with two different D1 Mini ESP8266 NodeMCU ESP32 ESP-WROOM-32 I had here, but neither of them worked with the custom flashed firmware: all devices were "unknown". Is this for just the specific device you linked or will it work with any generic ESP32 device?
Hi, it should work with any ESP32 device, if for some weird reason ESPHome doesn't detect your specific board variant (some new esp32s variants need this) you need to add specify it on the yaml file.
Try swapping the RX and TX pins
My esp32 board is not supported can you share the esphome config?
Hi, the yaml for the firmware it's available for free for the patreons/members of the channel: ko-fi.com/s/2478914b94
its Not free then. Home assistant is so good because people share. just saying like🙁@@fixtse.
tried it with esp32 d1 mini, didn't work, sensors are unknown. Can i change the gpio pins somehow? Guessing thats the problem
Hi, Yes, you can get access to the yaml file to use the device with your own configuration becomming a member of the channel on Ko-Fi or Patreon.
👍👍👍
This might be a dumb question, but why does the sensor need an Antennae? The ESP has its own right? I noticed you didnt use it when you only used Dupont female cables.
Yes, it's not mandatory, it extends the sensor's Bluetooth range, which is only used to connect to it using the Hilink App.
@fixtse. oh right Bluetooth. Thanks.
Can it also work with ESP32 S2 board?
The board has experimental support on ESPHome, so it could work (it won't break the board, you can safetly try), acording to the documentation (esphome.io/components/esp32.html#configuration-variables ), it might need an extra flag in the yaml file, to specify the exact variant, if for some reason ESPHome doesn't detect it automatically.
I can't seem to get past the "Preparing Installation" step. I've downloaded about every recommended firmware possible, tried every combination of boot and en button, and I cannot get it working.
Edit: Disconnecting the sensor allowed me to install.
Hi. Can this work whit HLK-LD2461?
I doesn't have bluetooth support, so it won't work with the HLK app, but, seems like a promising sensor, surely in the future it can be supported on ESPHome.
Compatible with LD2410 ?
Nop, I can built a firmware for the LD2410, but it won't have the same features as this one.
Please can you build and share for LD2410B and LD2410C?
What is the angle of the sensor?
Horizontal ± 60° / Tilt ± 35°
Thanks!@@fixtse.
Hmm did never start to install ..
Check the drivers for you esp32 board. I have had problems with that before.
Este canal no era en español
Thanks!
Do you have a forum? I can't comment here, my links a being deleted and i want to share what I've made.
Hi Keviin, not yet, but I will at some point. I got your email, I'll get back to you shortly
@@fixtse. Thanks mate 👍😊
Amazing videos as always.
Did you just assume the gender of those cables? Also blink faster
😅😅 I know right? hardware manufacturers need to step up their naming game, like what github did when they changed their default branch configuration from master to main.
Wtf is that thing.