SEN0395 false triggering

userHead Joe.Cloud 2023-09-08 15:49:00 981 Views1 Replies

Anyone using the SEN0395 without using the UART?  I'm trying to keep the design as simple as possible so I can use a single input pin on an ESP-01 as an intruder detector but I'm bumping into a problem.  I got the sensor to work using the GPIO2 output pin just fine using an Uno.  I'm planning to use this with Home Assistant to log when intruders are detected and to turn on lights, etc.  Arduino does not work with Home Assistant (at least as far as I can tell from searching).  I can run the Uno test code without false triggers of any kind.  It only responds when it sees me.  I was going to try the SEN0395 with the ESP-01 but I'm having a problem with Espressif devices properly doing OTA (over the air) updates so I'm testing with a Pi Pico W that DOES work with OTA updates so I can modify code on the fly.  Things seem to work OK for a bit then my log and history get spammed with the SEN0395 toggling back and forth.  Since it is set up as a presence sensor I have a lot of Home/Away messages coming in until I shut it down.  The image below shows what I'm seeing.  The long “Home” section at the end is an artifact of Home Assistant keeping the last known status until it determines a device is no longer available.

The gray areas are the “Away” periods.  I was in view of the sensor at all times so it should have triggered to “Home” and stayed there.

 

Anyone have any experience with the SEN0395 and know why this may be happening?  It makes no sense that the sensor works with the Arduino but not with the Pi Pico W.  It's just a digital pin.

2023-09-15 07:52:49

This is the same problem I face when I use PIR sensor with ESP8266. Hope somebody suggests a concrete solution here. 

userHeadPic lia.ifat