Hi all,
I’m experimenting with the HC-SR505 PIR motion sensor in a low-power project using an STM32 board with Mbed OS. The sensor is attractive because of its small size and supposedly low power draw, but I’m having some issues getting it to behave consistently.
The problem is that sometimes it detects motion as expected, but other times it either doesn’t trigger at all or it keeps outputting a high signal even when there’s no movement. I’ve tested it both indoors and outdoors. Indoors, it seems overly sensitive to small changes like a fan running, while outdoors it sometimes misses motion altogether.
I’ve tried powering it from both 3.3V and 5V rails, with proper decoupling capacitors, but the results don’t change much. I’m just using a simple digital input pin to read the output. Do I need to add some signal conditioning or extra filtering for this sensor to work reliably with Mbed, or is this just the nature of the HC-SR505 being a cheaper PIR module?
Has anyone here integrated this sensor with an STM32 or similar board in an Mbed project? Would love to know if there are any tricks (software or hardware) to stabilize detection.
Thanks!