Hi everyone,
I am facing issues with my HC-SR501 sensor connected to an ESP8266 using WLED. I hope to find help in this community.
The setup is simple: Two 5-meter strips are connected to my ESP installed at the ceiling of my hallway. Strip one is connected to GPIO5 (D1), strip two is connected to GPIO4 (D2), and the HC-SR501 sensor is connected to GPIO2 (D4).
WLED works fine without issues, but the PIR sensor does have the following problem: The first time it detects my motion and everything seems to be fine. The signal is supposed to change to low again after approximately 15s. For the first time of each cycle, it works, and the LED strips turn off again. As soon as it detects my motion for the second time, the timer doesn’t work anymore. Either it immediately turns off the strips after a few single seconds, or it won’t turn off the strips at all. It is very frustrating as it doesn’t seem like there’s a mistake in the wiring. To be honest, you can’t do much wrong here.
I measured the voltage arriving at the sensor, which is 4.97 V. Also, I have replaced the sensor with another HC-SR501, but without any change. Afterwards, I tried to use the other channel of the PIR by switching the jumper. The result was the same. Still facing issues with the timer.
Attached you will find a picture of where the sensor is installed. Could this be a problem? I’d be happy for any recommendations to solve this problem. May there also be another PIR sensor that might work better than the one I’m using?