-->
Page 19 of 19

Re: PIR sensor - wake and sleep using CH_PD & thingspeak upd

PostPosted: Fri May 24, 2019 3:30 pm
by Truglodite
First I want to use my first post to thank Barnabybear for posting his idea! :D

I've been using a similar circuit on a few li-ion powered esp8266 pir sensors for a few years, and they are working great... about 1yr life with a Vbatt divider too!

That said, I recently built a micro amp meter project and started playing around with the AM312 pir sensors. The AM312 only draws 15uA both active and inactive, compared to the usual hc-sr501 which burns 35uA inactive, and 77uA active. I'm sure I'm not the first to try to retrofit an am312 to this circuit and find out it doesn't work. I looked with my oscope and sure enough the am312 output is just too weak to drive the resistors & diode.

This can be fixed with a pfet or non-inverting buffer. I should've probably gone the pfet route to save myself from challenging solder work, but I fell in love with the small ground current of newer CMOS buffers. So I ordered some NL17SG17 schmitt buffers and dead bug soldered them to the AM312, after cutting the output trace (between the output resistor and output pin). I cut the trace so I could still use the original pins for wiring to 3v3 and the diode circuit, but there's other ways to do it I suppose. After testing, yep... 15uA idle current and the signal is a solid 0-3v3 output @5mA... now the AM312 drives the wake circuit with ease!

Here is an image I made of the wiring/soldering:
Image

Next I'll have to read up on the esp8266 a0 impedance, and see if I can tweak the Vbatt divider for minimum current... regardless, I recommend anyone who is after more battery life from an ESP/PIR node, give this AM312 mod a shot.

Cheers,
Kev