-->
Page 13 of 19

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

PostPosted: Thu Dec 01, 2016 3:04 pm
by Craig54321
It works... mostly. Once the button is pushed, I get stuck in the while(digitalRead(pirPin) == 1 loop. Even when the button is released. I've peppered print functions into the program to see this in action. Oddly, when I place a DMM on the GPIO2 line, the behavior stops and the program functions normally. Hmmm... Ideas anyone? The diode is in place so I don't think there is any feedback from CHPD or GPIO0. I also have TX/RX lines connected to the ESP01 as I am trying to debug but I don't think they are interfering... maybe.

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

PostPosted: Thu Dec 01, 2016 4:42 pm
by Craig54321
Perhaps related to my other problems found & discussed, the current draw is 2.6 mA after shutdown. All the voltages at the 3 pins are zero, so that is not it. On the first power-up current draw is 0.4 mA - perhaps good enough for battery operation and that is with the power LED on. But 2.6mA won't do. Must be some current flowing through the RST pin, though detaching it does not show a power reduction. The LED, I've read is worth 0.3 to 0.4 mA, so that cant be it. Detaching VCC is my only last connection and that would be pointless. I'm stumped. So many problems, so little time.

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

PostPosted: Fri Dec 02, 2016 7:11 am
by schufti
if you post your *real* schematic and *real* code someone might be able to reproduce your problem...

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

PostPosted: Fri Dec 02, 2016 7:47 am
by Barnabybear
Hi, are you using an ESP8266-01 or one or the breakout boards like the Wemos? Some of the breakouts have pullups on GPIOs 0, 2 & CH_PD.