Hi,
Please let me know, how to set the ESP8266 to SLEEP mode (normal sleep). I tried disconnecting the AP and STATION and I still see a 70mA constant current draw. I tried system_deep_sleep(all options) but it still wakes up into normal operation mode. I also tried options wifi_sleep_type(1,2 and 4), but to no effect.
In SLEEP mode I expect to be interrupted by a UART or a GPIO interrupt, wake up and do some calculations, connect to WiFi, submit data and go back to sleep.
Right now my choices are limited,
Also can you let me know the max sampling rate of the ADC (TOUT) of ESP8266? And if I can use TIMER INTERRUPT based sampling?
Regards
DKD
How to make ESP8266 to sleep and not deep sleep
Re: How to make ESP8266 to sleep and not deep sleep
Postby costaud » Tue Jul 07, 2015 5:23 pm
dkdileep wrote:Hi,
Please let me know, how to set the ESP8266 to SLEEP mode (normal sleep). I tried disconnecting the AP and STATION and I still see a 70mA constant current draw. I tried system_deep_sleep(all options) but it still wakes up into normal operation mode. I also tried options wifi_sleep_type(1,2 and 4), but to no effect.
In SLEEP mode I expect to be interrupted by a UART or a GPIO interrupt, wake up and do some calculations, connect to WiFi, submit data and go back to sleep.
Right now my choices are limited,
Also can you let me know the max sampling rate of the ADC (TOUT) of ESP8266? And if I can use TIMER INTERRUPT based sampling?
Regards
DKD
1. 70mA seems Softap mode is still on, the sleep is based on WiFi beacon, please set the chip to STATION_MODE and connect to a router.
2. The default setting is modem-sleep, call wifi_set_sleep_type() to enable light-sleep.
3. What is your SDK version, we have fixed some errors in sleep in SDK v1.2
4. In modem-sleep , CPU still works , do not need to wakeup the chip.
5. In light-sleep , CPU pauses , need to WAKE UP the chip by GPIO before sending ,for example, uart data, but do not need to do anything to receive the data from WiFi.
6. If there is still problems in your test, please send your test code to support@espressif.com and tell us your SDK version. We would like to help.
Re: How to make ESP8266 to sleep and not deep sleep
Postby dkdileep » Wed Jul 08, 2015 8:06 pm
Thanks costaud for the pointers.
I am using NodeMCU firmware built on 1.1.2-15-06-12 SDK. I have attached an oscilloscope plot of current draw from the board.
Even when I am not connected to a router or operating as an AP, I think the receiver is still on. There is a constant current draw and no spikes for as long as I leave it on.
Internally the NodeMCU calls deep_sleep_set_option(n), before it goes to system_deep_sleep(us) but this has no effect on waking up.
I set Wifi to STATION mode and did not connect to Router, and then did wifi_set_sleep_type(MODEM_SLEEPT) (Called internally by NodeMCU). There is no change in the current draw ~70mA constant. On the diagram the extreme left side shows constant draw. I have included the signature pattern for all other modes
Regards
Dileep
I am using NodeMCU firmware built on 1.1.2-15-06-12 SDK. I have attached an oscilloscope plot of current draw from the board.
Even when I am not connected to a router or operating as an AP, I think the receiver is still on. There is a constant current draw and no spikes for as long as I leave it on.
Internally the NodeMCU calls deep_sleep_set_option(n), before it goes to system_deep_sleep(us) but this has no effect on waking up.
I set Wifi to STATION mode and did not connect to Router, and then did wifi_set_sleep_type(MODEM_SLEEPT) (Called internally by NodeMCU). There is no change in the current draw ~70mA constant. On the diagram the extreme left side shows constant draw. I have included the signature pattern for all other modes
Regards
Dileep
- Attachments
-
- apdisconnect.png (24.41 KiB) Viewed 21223 times
Who is online
Users browsing this forum: No registered users and 30 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.