Schwayla / Environmental-Presence-Detection-Sensor

This is a sensor that uses the DFRobot mmWave Sensor, Panasonic PIR Sensor, and BME280 for motion detection and environmental data for use on ESPHome. As you may have guessed this was a project inspired by Everything Smart Home's video and subsequent sensor as well as his inspiration igiannakas who made a similar sensor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

  • This is a sensor that uses the DFRobot mmWave Sensor, Panasonic PIR Sensor, and BME280 for motion detection and environmental data for use on ESPHome. As you may have guessed this was a project inspired by Everything Smart Home's video and subsequent sensor as well as his inspiration igiannakas who made a similar sensor.
  • I am new to coding so this is probably not the best way to code this but it works.
  • I also used PowerPoint to make the diagrams.

sensor_full

Bill of Materials

  • D1 Mini 8266, Type-C (Aliexpress)
  • USB-C to USB-C Cable (Aliexpress)
  • USB-C Charger (I use an ANKER PowerPort III buts that's overkill)
  • DFRobot mmWave Sensor (SEN0395) (I get from DFRobot Store)
  • Panasonic EKMC1603111 (Digi-Key: 255-3086-ND)
  • BME280 (Aliexpress / Amazon)
  • Solid-Core 22AWG wire - 63.5cm / 25in (Aliexpress)
  • 10K Ohm Resistor (Aliexpress / Amazon)
  • ElecrtoCookie Prototyping PCB Board (Amazon)

BOM Reference

Tools Needed

  • Safety Glasses
  • Soldering Iron (I like the TS100)
    • Solder
    • Iron Cleaner
    • Brush-on or Liquid Flux
    • Smoke/Fume Filter
  • Hot Glue Gun (I use a Gorilla Glue Hi/Low)
  • Wire strippers
  • Flush-Cut Wire Cutters (Aliexpress or Knipex)
  • Permanent Marker (I use silver)
  • (OPT) Soldering mat or holder
  • (OPT) Breadboard (To test everything first)

Tools Reference

Software/Programs

Not Included in this project...

  • The Skills to do the things in this project. YouTube is my best friend when it comes to learning how to do something and it can do a much better job of teaching you the skills needed to make this than I can.
  • I had to look up how to make a README on here so...

Skills Needed

How-To Guide

Setup/Prep

  1. Setup ESPHome Instance on Home Assistant (Just grab it from Add-Ons)
  2. Load initial software on to the ESP8266 from ESPHome - MUST BE DONE BEFORE INSTALLING THE 8266 BOARD ONTO THE PCB/BREADBOARD!
  3. Cut and strip wires - Wire List | Pre-Cut Wires

ElectroCookie_MD_WireList

Fabrication

  1. Solder pins to components.

IMG_7322

  • I like to stick the pins into a breadboard to hold them in place while soldering.

IMG_7323

  • After soldering the pins to the components, slide the pin retainer strips 3mm down away from the component boards. This will help in the installation of the components in the future and allow for clearance over the wires on the board.

IMG_7325

  1. solder wires in-place on ElectroCookie Board. Reference Diagram (Path: Documents/Diagrams/esp8266_env_sensor_pcb_va.pdf) - Verify all wires are correctly soldered to the specified spot. - Visually inspect all solder points and repair as needed.

IMG_7319

! -- ! -- ! - Make sure you have loaded the initial software onto the ESP8266 from step 2 of setup / prep - ! -- ! -- !

  1. Solder components to board. Reference Diagram (Path: Documents/Diagrams/esp8266_env_sensor_pcb_va.pdf)

sensor_full - Visually inspect all solder points and repair as needed.

  1. Connect board to power (Connect the ESP8266 to the power brick via USB-C cable). - Allow around 2 minutes for the board to boot and connect to wifi.

  2. Edit the device in ESPHome and add the code from this project to your device UNDER the existing code that was loaded to the ESP8266 in step 2 of setup / prep. Code Example

  3. Install the code Wirelessly and wait for the board to connect (You can watch the progress of the load and the connection via the Logs)

code_install_wireless

  • This will take a few minutes...
  1. Home Assistant will automatically recognize the device under Devices & Services. You can now configure it and add it to automations and what not.

Adding Sensor to Automations (I'm only including this because I was confused)

  • When searching for a Device Trigger, search the name of the device ie. Environmental-Sensor (or whatever you named yours) THEN select the sensor as an entity from that device.

HA_Sensor_Add_Trigger

Using a BMP280 instead of BME280

Replace the BME280 code with the following under #sensor

#Sensor BMP280
- platform: bmp280
 temperature:
    name: "BMP280 Temperature"
   oversampling: 16x
   id: bmp280_temperature
 pressure:
   name: "BMP280 Pressure"
   id: bmp280_pressure
 i2c_id: bus_a  
 address: 0x76
  update_interval: 15s

References, Guides, & Resources

Look at you! Makin' some cool stuff...You're AWESOME!!

About

This is a sensor that uses the DFRobot mmWave Sensor, Panasonic PIR Sensor, and BME280 for motion detection and environmental data for use on ESPHome. As you may have guessed this was a project inspired by Everything Smart Home's video and subsequent sensor as well as his inspiration igiannakas who made a similar sensor.