Creating a Low-Cost POE MM-Wave Motion Detector

11/6/2023- I have included additional information at the bottom of this post to update the build with BME280 sensors for temperature, humidity, and pressure.

I hate batteries in my IOT devices. Depending on when they were made and who/where you purchase through, the battery life can be between two years and three months. That’s why I decided to make my own instead using ESPHome!

Parts:

I chose the LILLYGO over the Olimex option due to peers stating that the other option for makers seem to love to burn out after 3-months. In addition, I preferred the form factor of LillyGo’s product.

Pinouts:

One thing you may notice is the HLK-LD24LKL10 is a 5V board, with the LillyGo only having Native 3.3V Ports. Due to a very helpful comment by one Allen Belletti, I was able to find a 5V port off of one of the Mosfet’s on the unit. Picture below with a bodge wire off the 2nd pin of the WPM2015.

Once you have your 5V Bodge wire, it’s a relatively easy task of hooking up your high/low pin from the HLK-LD2410 to one of the GPIO’s on the LillyGo. I used GPIO032.

esphome:
  name: garage-motion
  friendly_name: Garage Motion

#enable project name
  project:
    name: "gote.poe_esp32"
    version: "1.2.0"


#enable ethernet
ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "<insert encryption key here>"

ota:
  password: "<insert ota password here>"

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO32
      mode: INPUT_PULLUP
    name: "Motion"

Once you add in your own naming, API, and encryption key, you can compile the bat file, hold the “BOT” button on the board and flash the unit. Once Flashed, feel free to plug it in to your POE enabled Ethernet port, and check the logs in ESPhome to verify everythings working.

Case:

I took the fantastic LILYGO® TTGO T-Internet-POE ESP32-WROOM Case by Rob Ardill and added a hole cutout “seat” for the MMWave Sensor. You can remix the case yourself by following the link here, or download from the github project here..

Update: Adding Temperature and Humidity to the POE-Motion Sensor

So, I couldn’t just let things lie, could I? After speaking with a peer, (and also noticing my Zigbee temperature sensor in the garage had a bad battery)  I decided to add a BME280 as it is so much more accurate over the DHT options I would use in the past. Adding it to the original sensor was quite easy, as all it took was Ground, 5V, and two IO ports.

I ended up utilizing GPIO14 and GPIO15, as well as splitting my previous 5V bodge wire to allow both sensors to have power, while it’s not the most pretty, it works.

One thing to note, is the placement of the BME280 sensor. If placed inside the enclosure, the POE circuits will add +10 to the temperature reading. Because of this, I ended up moving the BME280 outside the enclosure as below. This solved my reading issues immediately.

Updated Example code:

esphome:
  name: garage-motion
  friendly_name: Garage Motion

#enable project name
  project:
    name: "gote.poe_esp32"
    version: "1.3.0"


#enable ethernet
ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: ""

ota:
  password: ""

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO32
      mode: INPUT_PULLUP
    name: "Motion"
i2c:
  sda: GPIO14
  scl: GPIO15
  scan: True

sensor:
  - platform: bme280
    temperature:
      name: "${name} Temperature"
      id: temperature
      oversampling: 16x
    pressure:
      name: "${name} Pressure"
      id: pressure
    humidity:
      name: "${name} Humidity"
      id: humidity
    address: 0x76
    update_interval: 60s

Posted

in

by

Tags:

Comments

Leave a Reply

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

WordPress Appliance - Powered by TurnKey Linux