View previous topic :: View next topic |
Author |
Message |
krolikbest
Joined: 02 Jan 2017 Posts: 112
|
Posted: Sun Dec 27, 2020 10:11 pm Post subject: How set esp8266 in light sleep mode? |
|
|
Hi,
perhaps a little off-topic, so then I'm sorry. Now I'm working on communicating PC-esp8266-uC. All commands between uC and esp8266 are as AT commands included in Bascom code on uC side. There is no issues. But lately I came to idea of using battery instead of regular power. The problem is now that esp8266 has a reall big power's consumption. Ok, I've found one of three sleep modes- Light Sleep mode. The advantage of this mode is that I can wake esp8266 up from one of his GPIO's - lets say one of uC's pin set to high for a while then low and should work:) Unfortunately it is not so simply to set it in sleep mode. So far I did:
-in Bascom code I send to esp8266 some config and in the 6th line I define which gpio's pint is to wake esp8266 up and then in last line I expected that esp8266 should go into light sleep mode. But nothing like that happens.
Code: |
Wait 1
Print "AT+CIPMUX=1"
Wait 1
Print "AT+CIPSERVER=1,80"
Wait 1
Print "AT+WAKEUPGPIO=1,0,1"
Wait 1
Print "AT+SLEEP=1"
|
Form the espressif api I got procedures but they don't correspond to using AT commands. So maybe someone has an idea how with AT commands set esp8266 in light sleep mode?
Regards,
(BASCOM-AVR version : 2.0.8.2 , Latest : 2.0.8.3 ) |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Mon Dec 28, 2020 10:47 am Post subject: |
|
|
this chip is not suited for very low power. for a design i used a fet switch to turn the esp on/off. but of course it depends on your design if that will work or not. _________________ Mark |
|
Back to top |
|
|
krolikbest
Joined: 02 Jan 2017 Posts: 112
|
Posted: Mon Dec 28, 2020 4:07 pm Post subject: |
|
|
Thank you for the response. I considered something similar but having so much ahead to write on RaspPi and uC I gave this idea up (I consider myself more a programmer than electronic engineer). But checked light-sleep mode once again and it seems to work - at beginning I send the previous code form uC and then esp8266 goes into sleep mode if GPIO0 pin is low and wakes up if this pin goes high and then as long as this pin is high esp8266 works. GPIO0 is controlled from one of uC's pins.
Regards, |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Tue Dec 29, 2020 1:43 pm Post subject: |
|
|
all depends on what you find acceptable for the power consumption. for the application i had the esp was off most of the time and every uA counted. _________________ Mark |
|
Back to top |
|
|
krolikbest
Joined: 02 Jan 2017 Posts: 112
|
Posted: Wed Dec 30, 2020 2:54 pm Post subject: |
|
|
What i've noticed that not always it works (my previous description light-sleep). Don't know why. Anyhow yesterday I've bought esp8266-12 and it has reset pin set out on pcb. Tested At command "AT+GSLP=<time>" and after this time connected for short time RST to GND in order to wake it up. Works well so far. |
|
Back to top |
|
|
|