-->
Page 1 of 9

GPIO Pin Interrupt Wake up for deep sleep

PostPosted: Fri Feb 20, 2015 10:24 am
by cendev
" revised system_deep_sleep,system_deep_sleep(0),set no wake up timer,connect a GPIO to pin RST, the chip will wake up by a falling-edge on pin RST "

Is there a plan for waking up from deep sleep via pin interrupt ? That would be great for sensor modules. Most sensors keeps pulling the output pin when triggered and it's not possible for me to wake the module until the event finishes. :/ I don't want to add an Atmega mcu only to read the pin and reset the module :/

Btw have no idea about if pin interrupt & sleep for x seconds can be used together for 0.9.5 but it would be awesome :)

Re: GPIO Pin Interrupt Wake up for deep sleep

PostPosted: Fri Feb 20, 2015 12:01 pm
by jankop
You can easily esp8266 wake from a deep sleep. Just bring on to the RST short negative pulse. I use it.

Re: GPIO Pin Interrupt Wake up for deep sleep

PostPosted: Fri Feb 20, 2015 12:42 pm
by cendev
jankop wrote:You can easily esp8266 wake from a deep sleep. Just bring on to the RST short negative pulse. I use it.


Let me explain it a bit more :)

ex :I won't be using a button, I'm planning to make a flood sensor module, which will inform the server if it detects any liquid. Just like the most of sensors, the sensor will give 3.3v until the state changes (liquid is not there/sensed anymore). I can use a bc542 to pull the rst pin to LOW but it will stay low until the liquid is gone and sensor won't give 3.3v anymore.

The result ? Sensor module will inform the server after the liquid is not there anymore (I want it to transmit as soon as it detects the liquid) :)

This scene is also same for the gas sensors, reed switch sensors, liquid sensors, PIR sensors.. All these things send the 3.3v until the gas, liquid, movement or magnetic field disappears.

So pulling rst to low for a sec is not an option for me without an another mcu :/ Is there a component that will pull the RST pin to LOW or HIGH (as i can convert them to each other) only for a sec?

Also, if the state of the sensor changes while the module is awake it will still reboot the module :)

AFAIK 0.9.5 has this option available on
esp_iot_sdk_v0.9.5_15_01_22

9、revised system_deep_sleep,system_deep_sleep(0),set no wake up timer,connect a GPIO to pin RST, the chip will wake up by a falling-edge on pin RST

Also i saw this on bbs :

gpio_pin_wakeup_enable(GPIO_ID_PIN(4), GPIO_PIN_INTR_HILEVEL);

I guess this time it's more clear :)

Re: GPIO Pin Interrupt Wake up for deep sleep

PostPosted: Fri Feb 20, 2015 4:07 pm
by alonewolfx2
where did you saw this function? if it exist i want to try but i have esp-01 and direnc.net esp-07 modules out of the stock :D if it is working i can implement in to the lua :)
Also i saw this on bbs :

gpio_pin_wakeup_enable(GPIO_ID_PIN(4), GPIO_PIN_INTR_HILEVEL);

I guess this time it's more clear :)