-->
Page 4 of 19

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

PostPosted: Mon Aug 24, 2015 4:37 pm
by Barnabybear
DaniloFix wrote:I read a few places that the SW18020P conductive / contact time was 2 ms, so pretty far from the needed 325 ms. So the million dollar question is, how to keep the pin high, long enough to wake up the ESP from power off state?

Perhaps one or more small capacitors in parallel could do the trick? That is, if they can charge fast enough


Try a FET as a switch, the more capacitive the gate the better. Then use the sensor to charge the gate. At the end of the day it only needs to hold for 500ms.

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

PostPosted: Mon Aug 24, 2015 5:07 pm
by DaniloFix
Barnabybear wrote:
DaniloFix wrote:I read a few places that the SW18020P conductive / contact time was 2 ms, so pretty far from the needed 325 ms. So the million dollar question is, how to keep the pin high, long enough to wake up the ESP from power off state?

Perhaps one or more small capacitors in parallel could do the trick? That is, if they can charge fast enough


Try a FET as a switch, the more capacitive the gate the better. Then use the sensor to charge the gate. At the end of the day it only needs to hold for 500ms.


Thanks for the suggestion - you think using a MOSFET as a switch will add a "delay", keeping the CH_PD high long enough? I plan driving the setup from 3.3v regulated battery source, so both gate and source will be 3.3v - you know any MOSFET's that will be useful ?

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

PostPosted: Tue Aug 25, 2015 4:44 pm
by Barnabybear
Hi, working away at the moment so I can't do any testing. I will do & update the first post as soon as I can.
DaniloFix wrote:Thanks for the suggestion - you think using a MOSFET as a switch will add a "delay", keeping the CH_PD high long enough? I plan driving the setup from 3.3v regulated battery source, so both gate and source will be 3.3v - you know any MOSFET's that will be useful ?

Hi, it depends on the MOSFET & the circuit (it could even be a problem turning it off, but easier to fix), but we only need 500ms (to be on the safe side). Only testing will tell & you may still need a capacitor on the gate.

As for the MOSFETs, using the second circuit where a switch replaces the PIR, I see two simple options:
1. Use an N channel MOSFET in place of the switch. You wil need a cell of some sort to drive the gate, a CR2032 should be fine & last for ages. Connect
gate -> cell +ve
cell -ve -> sensor
sensor -> source
2. The option I favour. Use an P channel MOSFET in place of the switch. Connect the sensor between gate & ground.

With both the above options I would start buy using a 10K resistor in series with the gate to limit possable currents & slowly reducing the value if it doesn't work.

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

PostPosted: Wed Aug 26, 2015 5:09 am
by DaniloFix
Thanks for the suggestions - I'll order some P channel mosfets... Thinking a FDN360P will do the trick
https://www.fairchildsemi.com/datasheets/FD/FDN360P.pdf

Feel free to comment on that :-)