@truglodite wrote:
I am proposing a change to the esphome pir documentations…
The docs indirectly suggest that the HC-SR501 pir sensor is well suited for use with esphome. The page doesn’t explicitly state this by containing links to purchase or otherwise mentioning the part #, however common sense says most folks finding that tutorial will end up with HC-SR501’s wired to their esp8266 devices. Why is that a problem?
The 501 is a good module for non-wifi stuff, because it is cheap, adjustable, and has fairly low idle current. However, if you have ever tried to pair one of those with an esp8266 module, there’s a 80% chance you gave up after dealing with false triggers (that’s my statistic anyways, 2 of 10 wifi+501 projects actually worked). Why? The HC-SR501, which uses the biss0001 sensor, is very susceptible to wifi rfi!
So what?
I found another much better sensor for esphome pir use… the AM312:
This sensor does not have the adjustable on time and sensitivity of the 501, however it is pretty much immune to wifi noise and as such works well with esphome (I have no false triggers on any devices that use it). It works fine for most situations… triggering reliably inside my home from up to 40’ away. It’s also a lot smaller, and it only draws 15uA both active and inactive, compared to the usual 501 which burns 35uA inactive, and 77uA active. Since it’s not adjustable, you are stuck with a trigger reset time of 2.5sec (stays on for only 2.5sec unless it sees continuous motion… it toggling every 2.5sec is possible so HA would have to be able to handle that). That said, most folks can find an easy way to use that in automations… much better than false triggering for sure!
There is one potential caveat for advanced users though. Unfortunately due to hardware details, the am312 is not able to properly wake an esp through ch_pd, which is a common hardware design method to make battery esp devices last longer. I solved this problem by adding a buffer chip a while back, and wrote up some detailed info on how do this modification for ch_pd wake circuits (soldering not for the faint of heart):
https://www.esp8266.com/viewtopic.php?f=11&t=4458&start=72With that mod, I’ve got an 18650 powered 8266 pir sensor that lasts years on a charge, triggered a few times a day. Even without the ch_pd mod (which is something 99% of folks reading that page would never need), the am312 is a better suited sensor though, where as the 501 is a bad choice for use near wifi antennae.
So I think the docs should be updated at least to show images/pinouts on an am312 instead of a 501.
Thoughts?
Posts: 1
Participants: 1