HC-SR501 pir sensor gives false triggers

I have buy some HC-SR501 pir sensors. But i’m getting a lot of false triggers.

When searching the internet there are some workarounds given. But there are also people who say that it doesn’t solve it.

Does anybody here solves it permanently?

So yes how do you fix it?

Second question: could this sensor also placed outside and in sunlight?

You should ask yourself what causes these false triggerings? IR sensor can trigger when any movement occurs (curtains moving, windows opening, animals?…etc…). I have a copule of those installed and i have no falses so far. Did you try to decrease sensitivity?
Placing ouside is possible, but you must make a suitable enclosure. Also, if you don’t want triggering at daylight there’s a place for photoresistor on the PCB, it’s just not soldered. But, sadly, there’s no trimmer, for setting light sensitivity.

1 Like

it has been a while, but I think that adding a capacitor worked for one that I set up

edit: IIRC the AM312 type are less affected

See here: Capacitor fix

There were no movements at all. I have also tried to increase/decrease the sensitivity.

@AP05TLE @space_r

Do you have never a false trigger anymore since the fix?

I have 2 that have been rock solid - I think I tried another one at one point with less luck though, so reverted to the AM312 sensor

But do you have no false triggers with the AM312?

no the AM312 was fine out of the box

Same here. No more false triggers since the fix. Some of the are tightly packed with unshielded ESP8266 but still going strong. Even with these noisy rcwl-0516 “Radar” in close proximity.


I have also some AM312 running and i can confirm they work out of the box.


Okay then I have to try it, because I have a few HC-SR501 sensors here available. But it will be difficult to solder I think on the chip.

With my next order I will also buy the AM312 and check this sensor.

@space_r What do you have in this box? And is there also a Wemos D1 mini inside (or other board with 2.4 Ghz wifi)?

Agree, soldering is a bit tricky :upside_down_face:

In the Box: ESP8266 (upper right corner, no D1 mini), StepDown DC/DC Converter, Temp/Humidity Sensor DHT22, Radar RCWL-0516 and HC-SR501.

I have a similar tight packed Box with these Components (exept the DHT22) running with Wemos D1 mini, also working without false triggers.

1 Like

Okay looks very nice the casing with all the components!

1 Like

Did you draw this box by youself or found on internet? It’s printed on 3D printer, as i see…
very nice design!

1 Like


Yes, it‘s designed and 3D printed by myself. Esphome is awesome!