HC-SR501 no good for ESPhome... change the docs?

20cm? A guess off the top of my head I’d say it will probably work. The only way to know for sure is to test. Usually folks who have issues with wifi and sr501’s are attempting to locate them much closer to the esp device… like within 1". The energy contained in a radiated beam of energy (wifi included) follows the inverse square law. So the noise at 8" distance is going to be ~1/64 what it would be at 1". If it still falses at 8" away, that is a lot less noise to have to filter out. So then things like ferrites, pi filters, etc will be that much more effective than they would be at 1" away.

In general, I’d say start with designing as much distance as possible with the application… then if there are problems either use a filter, or if the application allows use a pir that has better filtering (like am312). In your case, 312 is a no go, so start with as much distance as possible then add filtering if needed. For filtering, start simple then go up… ferrite first, then lowesr C, then add a C+L for a pi… in that order.

1 Like

this is the solution for me too, works great at the moment. thanks

1 Like

Hi, what’s the range for the rcwl-0516?
Could it cover a small room for presence detection or depends on the angle where you’re pointing the radar sensor?

No, it detects only motion :bulb:

1 Like

I just wanted to point out that the RCWL-0516 sensor is not really directional, and can even detect motion through walls or doors, so it may not be suitable for presence detection in a specific room.

This resource here may give you some ideas of the sensor’s capabilities, including how to tweak range and signal length: RCWL-0516 microwave radar motion detector • Wolles Elektronikkiste

Just went with a regular full size ceramic capacitor as I had no surface mounted, works great and saved my project. Thanks for sharing this valuable info. I also sent a mail to the guys from ESPHome so eventually they will add this info to Passive Infrared Sensor — ESPHome !

Saved the day !

2 Likes

You can click the Edit this page on GitHub llink at the bottom of any documentation page to make changes to submit a PR :smiley:

I have to retract my recommendation here. I had two sensors that I did all the mods (capacitor, distant from esp, ferrite cores on each line) on and they still were noisy. I switched to AM312 sensors and they have been flawless so far, and seem to work just as good.

1 Like

This is a really interesting discussion. I am < 24hrs into my first PIR build with a HC-SR501 and all the false positives brought me here.

Since I am using POE I had no wifi definition and the PIR was still flapping. Even after Dremeling off the PCB antenna. Disabling wifi on_boot has made the flapping completely stop.

1 Like

Great wording. :smiley:

My case was just a liiiiitle too short and who needs that pesky antenna anyways :wink:

Interesting development worth sharing.

I added a second mmWave sensor to my POE mmWave+hc-sr501 deployment and the PIR really didn’t like that. Probably because the PIR was right beside the mmwave sensor.

This video had an interesting solution by bypassing the voltage regulator and powering it from 3.3V.

This worked really well for me.

When using 5V the PIR would phantom trigger in sync with the second mmWave. Powered by 3.3V it no longer does that.

1 Like

Plus 1 for the idea of bypassing the voltage regulator and going straight to 3.3v. I have 3 of these sensors 2 running on 5v volt and 1 on 3.3v. The 5v sensors give false positives at least twice per day whereas the 3.3v has now gone days without a false positive.

2 Likes

AM612

seems to run pretty darn good

AM612 is a naked sensor.
Do you use it without any facetted IR lense cap?

IR lens cap is on it , pretty sure the Fresnel lens is a 8002-2 legs are 17.5mm x 21.85mm

boards worked out 0.20 AUD ea to be manufactured and delivered as well
as usual, shipping is the most expensive process
with 18650 cells and a solar charger works a treat
indoor lighting is enough to keep it topped up

the next step up is EKMC1603111 but that’s a huge price jump I rather have 3x separate devices verifying each other

1 Like

I will soon start to experiment with radar sensors. Have them lying around already. They are very cheap too and seem to be able to really detect presence (i.e. watching TV, sleeping). But they definitely consume more energy. Not a problem though in my case as I have a 5V bus in all rooms.

Here you have the definitive solution. It is not true that the HC-SR501 cannot be used with ESP.
I use 8 pieces, all of them are placed directly next to the ESP8266 or ESP32.
You need to look into datasheet: http://www.ladyada.net/media/sensors/BISS0001.pdf
The circuit is wired differently compared to the datasheet.
The first thing to do is replace the resistor in the picture. It’s supposed to be 10k, the manufacturer has 6k8 on the board.
If you do this - and add the capacitor as per the post above, you won’t have any false alarms!!!

My HC-SR501 is powered by a 12V switching power supply, ESP32 or ESP8266 is powered via a step-down from 12V to 3.3V.
The problem with the HC-SR501 board is not that it is unsuitable or bad for ESP.
The problem is that it completely ignores the recommended BISS0001 wiring.

Finally, excuse my English, I’m from the Czech Republic. I hope you understand my post.

5 Likes

And finally a picture of my PIRs HC-SR501 in Domoticz:

I got excited after reading this. I went ahead and modified a few of my extra hc-sr501 sensors using parts I had on hand; 10k resistors and 1uF caps. I figured if it didn’t originally have a cap, then adding a 100nF would provide 90% of the benefit of 220nF. I’m not sure if it’s from me using the smaller cap, but this mod did not work for me at all. My modified sensors both started false triggering with wifi after a couple minutes of warming up.

Do you think ordering some 220nF caps to swap in would be worth it?