Low-latency presence sensor: mmWave + PIR using ESPHome

Go with XxY
image

Depends on the situation. It isn’t due to speed of trigger but non-heat-based object movement that you want to “filter out”.

Don’t use a PiR when it isn’t needed. I used it on a single mmWave deployment out of 5.

No (Post must be at least 10 characters)

Yeah, makes sense. Thanks!

You mean false positives? Maybe caused by moving leaves of a plant or slight movement of the pendulum light? So the usage of the PIR is just for the initial trigger of “presence”? So: PIR triggers light on and “no presence” of mmWave triggers light of?

Nice. So i have a chance, to not need a PIR :smiley:
Do you have some time to describe your setups? Or giving some useful tips? Positioning? Tuning? My sensor is currently on the top of a cabinet, facing diagonal to the other corner (where the door is). Presence detection works well (tuning of distance made). But unfortunately the “no presence” detection is slow as ****, but when i decrease the sensitivity, the static detection is not good anymore.
It is a livingroom with dining area and of course a couch. My aim is a fast presence detection and a solid static detection. Currently i am not sure whether i want a short “no presence” detection too - obviously yes, but i think here lies the compromise, right?

I am curious too, whether it makes a difference to increase the delay time on the sensor itself vs. a software timeout configured in ioBroker (or other IoT Broker).

OP has the code with the logic, it is a combination of sensor input.

Tuning tips can be found in the other posts. I’ve never experienced slow response which likely indicates an issue somewhere else; the mmWave responds in ms.

Here is my version. I added a bme280 and bh1750 as well.


1 Like

Nice build!

I haven’t done anything properly with esphome or Arduino before. Is this project a bit too advanced to sink my teeth into?

I’d like to do something like just above, with a multi sensor. Mmwave, pir, bme680 & bh1750 with either Poe or Ethernet + a splitter for power supply.

What would be the best way to wade through and work out the pinouts / wiring? I couldn’t see a wiring diagram in the thread that anyone shared (I feel like I’m just blind though. I’ve looked at this before and thought I saw one?)

This is how I wired mine.

Remember to reverse tx and rx on the mmWave board.
uart_tx_pin: GPIO4
uart_rx_pin: GPIO36
I2C sda: GPIO13
I2C scl: GPIO16
PIR: GPIO33 (pulldown)

bme280 & bh1750 run off I2C.

1 Like

Hoping someone might be able to explain how the upper and lower detection pins operate?
I can see that from the SEN0395 wiki:
GPIO1 Universal Input and Output
GPIO2 Universal Input and Output(By default, it outputs high when people presence detected, otherwise, output low)

I’ve got my setup using only GPIO2, with GPIO1 floating.

How does connecting GPIO1 benefit the results (if at all)?

Cheers!

Two mmWave sensors on a single ESP32.

GPIO1 is unused on these sensors.

Oh hahah makes sense!
Thanks

can i use this sensor with OP’s yml code?
https://www.aliexpress.us/item/3256803374930067.html

Hey guys,

Been playing with this for a while and have been getting so many false positives. Even after upgrading to the Panasonic EKMB1393111K. In another post someone mentioned a pull down resistor, but I cant seem to find anything like that on the wiring diagrams Ive seen around.

Are people having issues with false positives and how did youi deal with them?

Thanks

I fixed this by printing a bigger project box where I moved the PIR over to the side and away from the ESP32 antenna.

Now working perfectly :slight_smile:

It seems a that ESPHome has been updated with things like distance and movement intensity.

Does anyone have this updated config that works with the DFrobots?

Thanks :slight_smile:

with the tracking radar project

The code is ready to work with two mmWave sensors conected on a single ESP32?

I would like to find a solution for an “L” shape hallway where I need to put one mmWave on each beginning of the hallway. I can have two occupancy sensors and make the automation do the rest but the ideal for me is to have one ESP32 with POE connected to the network and this unit connected to both sensors. Any ideas how to make the communiction from the sensors for the ESP32?

I have a POE ESP32 with PiR and 2xmmWave running 1+ yr no issues in the same enclosure.

Can you share your code, I would like to utilize 2 sensors on one ESP as well to extend the angle.

That’s just how PIRs work. Move slow enough and they all, no exceptions, will not register. It’s a limitation of the technology. But yeah, I think people have been regurgitating that PIRs outperform mmwave in any way based on a few YT vids from folks who don’t know how to separate the sensor package’s limitations from the overall product, and some who have simply neglected to rtfm or tune things in any meaningful way. If you implement mmwave properly, a pir doesn’t add any value imho