Search models, users, collections, and posts

LD2450-ESP32 Case

Print Profile(2)

All
P1S
P1P
X1
X1 Carbon
X1E
A1
H2D
A1 mini
H2D Pro
H2S
P2S
H2C
X2D
A2L

0.2mm layer, 2 walls, 15% infill
0.2mm layer, 2 walls, 15% infill
Designer
52 min
1 plate
5.0(1)

0.2mm layer, 2 walls, 15% infill
0.2mm layer, 2 walls, 15% infill
Designer
55 min
1 plate

Open in Bambu Studio
Boost
13
43
3
4
96
59
Released 

Description

A case to house your LD2450 and an ESP32, plus a mount to put it in the corner. Everything snap fits together and the wires should hold the board to the offset pins, however they are threaded so if you want you can use M2.5 screws to screw it down.

 

I used an inexpensive ESP32 WROOM-32 (30pin) from Aliexpress:

https://www.aliexpress.com/item/1005005953505528.html?spm=a2g0o.order_list.order_list_main.10.7dd71802Eydi7X

 

And an LD2450 unit (recommend getting the one with an antenna and cable for ease of installation):

https://www.aliexpress.com/item/1005006121923099.html?spm=a2g0o.order_list.order_list_main.11.64841802Jr5eZn

 

I use the TX0 and RX0 pins on the board. They correspond to GPIO1 and GPIO3 respectively. Make sure you reverse the TX and RX from the LD2450 and the ESP32 so the TX from one goes to the RX of the other.

 

To find the zones you can use the app “HLKRadarTool” on your mobile phone and connect to the LD2450 via bluetooth (hence the usefulness of the antenna). This will allow you to get the coordinates to set your zones in the ESPHOME dashboard.

 

To program in ESPHOME I use the following code:

 

esphome:

 name: mmwave-sensor-1

 friendly_name: mmWave Sensor 1

 


esp32:

 board: esp32dev

 framework:

   type: arduino

 


# Enable logging

logger:

 


# Enable Home Assistant API

api:

 encryption:

   key: "QdCXScyzviOKGOQ3UB7uKbb/oSZA6eMXNvAXA4MQoag="

 


ota:

 - platform: esphome

   password: "6138d2dea8952fa0a73b4469ed3f7a0a"

 


wifi:

 ssid: !secret wifi_ssid

 password: !secret wifi_password

 


 # Enable fallback hotspot (captive portal) in case wifi connection fails

 ap:

   ssid: "Mmwave-Sensor-1 Fallback Hotspot"

   password: "SuperJiggly"

 


uart:

 id: uart_ld2450

 tx_pin: GPIO1

 rx_pin: GPIO3

 baud_rate: 256000

 parity: NONE

 stop_bits: 1

 


ld2450:

 id: ld2450_radar

 uart_id: uart_ld2450

 throttle: 1000ms

 


binary_sensor:

 - platform: ld2450

   ld2450_id: ld2450_radar

   has_target:

     name: Presence

   has_moving_target:

     name: Moving Target

   has_still_target:

     name: Still Target

 


number:

 - platform: ld2450

   ld2450_id: ld2450_radar

   presence_timeout:

     name: "Timeout"

   zone_1:

     x1:

       name: Zone-1 X1

     y1:

       name: Zone-1 Y1

     x2:

       name: Zone-1 X2

     y2:

       name: Zone-1 Y2

   zone_2:

     x1:

       name: Zone-2 X1

     y1:

       name: Zone-2 Y1

     x2:

       name: Zone-2 X2

     y2:

       name: Zone-2 Y2

   zone_3:

     x1:

       name: Zone-3 X1

     y1:

       name: Zone-3 Y1

     x2:

       name: Zone-3 X2

     y2:

       name: Zone-3 Y2

 


switch:

 - platform: ld2450

   ld2450_id: ld2450_radar

   bluetooth:

     name: "Bluetooth"

   multi_target:

     name: Multi Target Tracking"

 


select:

 - platform: ld2450

   ld2450_id: ld2450_radar

   baud_rate:

     name: "Baud rate"

   zone_type:

     name: "Zone Type"

 


button:

 - platform: ld2450

   ld2450_id: ld2450_radar

   factory_reset:

     name: "LD2450 Factory Reset"

     entity_category: "config"

   restart:

     name: "LD2450 Restart"

     entity_category: "config"

 


text_sensor:

 - platform: ld2450

   ld2450_id: ld2450_radar

   version:

     name: "LD2450 Firmware"

   mac_address:

     name: "LD2450 BT MAC"

   target_1:

     direction:

       name: "Target-1 Direction"

   target_2:

     direction:

       name: "Target-2 Direction"

   target_3:

     direction:

       name: "Target-3 Direction"

 


sensor:

 - platform: ld2450

   ld2450_id: ld2450_radar

   target_count:

     name: Presence Target Count

 - platform: ld2450

   ld2450_id: ld2450_radar

   still_target_count:

     name: Still Target Count

 - platform: ld2450

   ld2450_id: ld2450_radar

   moving_target_count:

     name: Moving Target Count

 - platform: ld2450

   ld2450_id: ld2450_radar

   target_1:

     x:

       name: Target-1 X

     y:

       name: Target-1 Y

     speed:

       name: Target-1 Speed

     angle:

       name: Target-1 Angle

     distance:

       name: Target-1 Distance

     resolution:

       name: Target-1 Resolution

   target_2:

     x:

       name: Target-2 X

     y:

       name: Target-2 Y

     speed:

       name: Target-2 Speed

     angle:

       name: Target-2 Angle

     distance:

       name: Target-2 Distance

     resolution:

       name: Target-2 Resolution

   target_3:

     x:

       name: Target-3 X

     y:

       name: Target-3 Y

     speed:

       name: Target-3 Speed

     angle:

       name: Target-3 Angle

     distance:

       name: Target-3 Distance

     resolution:

       name: Target-3 Resolution

   zone_1:

     target_count:

       name: Zone-1 All Target Count

     still_target_count:

       name: Zone-1 Still Target Count

     moving_target_count:

       name: Zone-1 Moving Target Count

   zone_2:

     target_count:

       name: Zone-2 All Target Count

     still_target_count:

       name: Zone-2 Still Target Count

     moving_target_count:

       name: Zone-2 Moving Target Count

   zone_3:

     target_count:

       name: Zone-3 All Target Count

     still_target_count:

       name: Zone-3 Still Target Count

     moving_target_count:

       name: Zone-3 Moving Target Count

 

Comment & Rating (3)

(0/1000)