ESPHome/Home Assistant Compatible Human Presence/Motion Detector (HCMODU0241)

Post Reply
admin
Site Admin
Posts: 879
Joined: Sun Aug 05, 2012 4:02 pm

ESPHome/Home Assistant Compatible Human Presence/Motion Detector (HCMODU0241)

Post by admin » Wed Apr 03, 2024 10:47 am

Image


Image

The ESP Presence detector is an ESP8266 WiFi module with a built-in human presence detector. The module combines a 2.4GHz Wifi compatible ESP8266 (ESP-07) module together with a Hi-Link LD2410C radar sensor which is capable of sensing both human presence and motion.

Home Assistant Compatible -
Although ESP presence detector is fully programmable via its serial interface (requires additional USB adaptor) it comes pre-flashed with custom ESPHome firmware. This means that out-of-the box it is compatible with the home automation system Home Assistant. Simply connect power to the module via its microUSB socket and use a mobile phone to connect it to your WiFi network via its captive portal page - no programming required.

For a step by step guide please see our blog post here: [https://blog.hobbycomponents.com/?p=1248]

Home assistant example control panel:

Image





Image

Image

Product code: 								HCMODU0241
Supply voltage:								5V
Current consumption (connected to WiFi network):	150mA
Interfaces:								5V microUSB (power), serial programming interface (5V tolerant), program mode button
ESP8266 type: 								ESP-07 
ESP8266 clock: 								80MHz
ESP8266 Flash: 								8Mbit
ESP8266 Transmit power: 						802.11b: 16±2 dBm (11Mbps)
										802.11g: 14±2 dBm (54Mbps)
										802.11n: 13±2 dBm (HT20, MCS7)
Sensing type: 								Motion & human presence detection
Sensor distance: 							6 metres with 8 adjustable sensitivity zones (gates)
Sensor detection angle: 						±60 degrees
Sensor frequency: 							24GHz - 24.25GHz
Mounting options: 							Wall or ceiling
Dimensions: 								37.5mm x 22mm x 17.5mm





Image

Programming:

PLEASE NOTE - reprogramming this device will overwrite the existing firmware

The module contains an ESP8266 (ESP-07) WiFi compatible microcontroller which is compatible with the Arduino IDE. It also includes a serial interface for programming and therefore its firmware can be replaced with your own sketches or other compatible firmware in the same way as any generic ESP development board. To reprogram the module follow these steps:

1) Connect the serial header to a compatible USB to serial (FTDI) adapter as shown:

Image


2) Remove the presence detection sensor.

3) Hold down the programming button whilst connecting the serial adapter into your computer

4) The device is now in programming mode and can be programmed via your programming software or Arduino IDE.

5) After flashing, disconnect and reconnect the power to run the new firmware.


Arduino IDE setup guide:

The module is compatible with the Arduino IDE via the board manager feature. The latest version of the Arduino IDE can be downloaded from the official Arduino website here:

https://www.arduino.cc/en/software

Once installed you will need to add board support for ESP8266 devices. To do this just follow steps 1 & 2 in our blog post here:

https://blog.hobbycomponents.com/?p=937


Arduino IDE board settings:

Board: Generic ESP8266 Module
Port: The COM port of your USB interface module.
Crystal Frequency: 26MHz
Flash Frequency: 40MHz
Flash mode: DIO
Reset Method: dtr
Upload Speed: 115200
Flash Size: 1MB (FS64KB OTA:~470KB)
CPU Frequency: 80MHz

You can leave any additional settings to their defaults.


Schematic:
ESP8266_Presence_Detector_HCMODU0241_Schematic.png


3D Printed Case:

ImageImageImage


For owners of a 3D printer we have created a simple 'pill box' style case to house the module. This is a screwless design that does not require any additional fixings to construct and hold the module in place. There is a single access hole for connecting a microUSB power cable and two screw holes on the rear should you wish to mount the case to a wall using screws rather that adhesive pads.

This STL files for this case are available in Thingyverse at the link below:

https://www.thingiverse.com/thing:6574142


Please note that this case is supplied freely as an additional service to our customers. It is not sold as part of the ESP presence detector module and we do not make any promises as to its suitability or fitness for purpose.



Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.
You do not have the required permissions to view the files attached to this post.

Radian
Posts: 3
Joined: Sat Aug 17, 2024 9:21 pm

Re: HLK-LD2410C Human Motion/Presence Detection Radar Sensor (HCSENS0051)

Post by Radian » Sun Aug 18, 2024 8:49 pm

[MOVED FROM HCSENS0051 PRODUCT THREAD]

Many thanks for your reply.
andrew wrote:
Sun Aug 18, 2024 8:18 am
My understanding of the light sensor is that under normal operation it is used to control the output pin on the module.
Is there a schematic for the ESP8266 & daughter board you supplied? I'm guessing that "out_pin_presence_status" in engineering mode is echoing the state of the pin you describe. But is this signal also supposed to light the "sensor LED" when enabled?

When I enable it on the HA card, it always seems to be on - even if I move 10m+ away - so I can't tell if it's also subject to the light threshold or not.

I have to admit that this is my first experience with ESP Home so I haven't poked around with this side of the equation. My intention is to write my own application but I bough the pre-flashed ESP module to get a feel for the capabilities. A schematic of the complete module would still be useful.

andrew
Site Admin
Posts: 1422
Joined: Sun Aug 05, 2012 4:15 pm

Re: HLK-LD2410C Human Motion/Presence Detection Radar Sensor (HCSENS0051)

Post by andrew » Mon Aug 19, 2024 9:00 am

Is there a schematic for the ESP8266 & daughter board you supplied?

I’ve added it to the ESP8266s product thread here:
viewtopic.php?f=135&t=3117&p=8770#p8770

But is this signal also supposed to light the "sensor LED" when enabled?
When I enable it on the HA card, it always seems to be on - even if I move 10m+ away - so I can't tell if it's also subject to the light threshold or not.

Assuming you're referring to the LED on the main PCB, the one in the centre of the board next to the presence detector header, this is controlled directly from home assistant so by default it will not mimic the state of the sensor.

If you toggle the sensor LED switch in the HA card you’ll notice that the LED on the board simply mimics this state. If you want it to indicate the presence or motion state you can link it to the appropriate entity from within HA.
By controlling its state from HA it means the LED can be used for other purposes as well such as a notification alert.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Radian
Posts: 3
Joined: Sat Aug 17, 2024 9:21 pm

Re: HLK-LD2410C Human Motion/Presence Detection Radar Sensor (HCSENS0051)

Post by Radian » Mon Aug 19, 2024 9:09 pm

andrew wrote:
Mon Aug 19, 2024 9:00 am
Assuming you're referring to the LED on the main PCB, the one in the centre of the board next to the presence detector header, this is controlled directly from home assistant so by default it will not mimic the state of the sensor.
OK yes, that makes sense. Thanks for adding the schematic. Trying to trace tracks with black resist isn't much fun :lol:

andrew
Site Admin
Posts: 1422
Joined: Sun Aug 05, 2012 4:15 pm

Re: HLK-LD2410C Human Motion/Presence Detection Radar Sensor (HCSENS0051)

Post by andrew » Tue Aug 20, 2024 8:00 am

No problem. I'm going to move these last few posts to the ESP8266 presence sensor thread as they are specifically discussing that product.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “Expressive (ESP8266)”