ESP Now Deep Sleep Wakeup

amoghjain
Posts: 16
Joined: Mon Nov 30, 2020 9:04 am

ESP Now Deep Sleep Wakeup

Postby amoghjain » Mon Nov 30, 2020 9:24 am

Hello Internet Wizards and Gurus!

I am working on a IoT Project requring

- 2 Solar Charged & Battery Powered ESP's communicating via ESP NOW to
- a central ESP which is connected to Wifi and AC Power


Currently we have the Wifi Powered ESP always powered On, where as Battery powered ESP's will wake up every half hour to send data, and be in deep sleep mode otherwise.

What we would like to implement, is ability to wake up battery powered ESP's on demand, when AWS command is recieved on Wifi enabled ESP.

Upon googling, I havent been able to find, if ESP can wake up from some sort of ESP_Now interrupt as in the several other chips like NRF modules.

So our plan right now is to wake up every 300ms, check if any ESP_NOW packet is present, and if not go back to deep sleep.

I was hoping, since we havent yet tested this approach, to get confirmation and further guidance on our train of thought, ie if there is a better way to wake up an ESP32 module which is in deep sleep mode, and can only communicate via ESP_NOW.

Thanks!

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

Re: ESP Now Deep Sleep Wakeup

Postby OutOfLine » Mon Nov 30, 2020 4:44 pm

In deep sleep the radio hardware is off and cannot hear any esp-now or other rf signal. But yes, the battery powered devices could wake up from time to time and ask the central one if they should do something. I you want the "master" to be able to wake up the others at *any*time, you need a wire for a GPIO interrupt, or don't use deep sleep.

amoghjain
Posts: 16
Joined: Mon Nov 30, 2020 9:04 am

Re: ESP Now Deep Sleep Wakeup

Postby amoghjain » Tue Dec 01, 2020 12:35 am

Hello,

Thanks for getting back and bringing up my hopes!

Can you please clarify when you mean 'need a wire for a GPIO interrupt'?

In regards to ' dont use deep sleep', what I understand is : instead of putting device in deep sleep, put the device in light sleep, and wakeup every 300ms to check if esp-now recieve callback was triggered, if yes, parse and respond, and if the callback wasnt triggered, go back to sleep. Does this make sense?

Again, thanks in advance!

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

Re: ESP Now Deep Sleep Wakeup

Postby OutOfLine » Tue Dec 01, 2020 1:01 pm

amoghjain wrote:
Tue Dec 01, 2020 12:35 am
Can you please clarify when you mean 'need a wire for a GPIO interrupt'?
I mean a *physical* wire running from a GPIO pin of the 'master' to a pin of the other.
The master could trigger an interrupt in the other one and wake it up from deep-sleep.
In fact you wood need *two* wires, one for the interrupt line, one connecting grounds.
... wakeup every 300ms to check if esp-now recieve callback was triggered, if yes, parse and respond, and if the callback wasnt triggered, go back to sleep. Does this make sense?
No esp-now message will be received while in deep sleep *nor* light sleep and so no callback.
But as I wrote before: the battery powered device could wake up from time to time and actively *ask* the 'master' if there is some job to do.

Or the 'master' could start spamming the ether with endless repeating "please call me back!" messages until the sleeping peer wakes up and checks if he hears him crying for help.

There is also 'modem sleep'. As far as I know it will not do what you want, but I am not sure if
I understood that right. I have never used it.

Who is online

Users browsing this forum: Google [Bot] and 90 guests