-->
Page 1 of 34

Triggering CH_PD with GPIO2

PostPosted: Wed Jul 20, 2016 10:48 pm
by Joe Job
HI I have been attempting to replicate the following example with a moisture sensor on an ESP8266-01.

viewtopic.php?f=11&t=4458&hilit=sleep+and+wake+on+gpio2+low

I cannot get the ESP to boot up using that example. Any other ideas on using GPIO2 to trigger CH_PD to turn on and off, I do similar with an ATMEGA and this would solve quite a few issues on a number of projects if can work it out. Thanks in advance.

Re: Triggering CH_PD with GPIO2

PostPosted: Thu Jul 21, 2016 12:40 am
by schufti
its not gpio2 triggering ch_pd. The esp is woken by the motion sensor and gpio2 is used to keep ch_pd active as long as the sw runs; basics (makes me wonder about your signature).
without any info on your moisture sensor you can't expect much more helpfull comments...

Re: Triggering CH_PD with GPIO2

PostPosted: Thu Jul 21, 2016 7:05 am
by Joe Job
Whether you wonder or not makes no difference to me, I actually need to update my signature as I left Humai, probably I should update it with Semi Finalist in Global Mobile Innovators Tournament in the Smart Home Category, first phase winner in Microsoft / Arduino World Maker Challenge, Bizspark Member, I could go on and all accomplished before I had ever touched an ESP which is hardly the entire IoT, so don't start getting rude, this is actually the first forum I have encountered where the people are actually nice and it is an enjoyable experience to use it.

GPIO2 is connected to the sensor, when the sensor detects it triggers CH_PD to high which turns on the ESP and when nothing detected it is set to low as far as I could tell. On my ATMEGA version, the ATMEGA send high to CH_PD which turns on the ESP and low to turn it off, so maybe the terminology was not correct but that is what is happening I believe.

The sensor is the following and has digital output which is connected to GPIO2 in my case.

http://www.ebay.es/itm/172182751330

Re: Triggering CH_PD with GPIO2

PostPosted: Thu Jul 21, 2016 7:25 am
by Barnabybear
Hi, looking at that, personaly I would use deep sleep or you will wase your battery on powering the sensor.
Wake - power up the sensor - check soil - enable WiFi if soil is dry - report - go back to sleep.