Page 1 of 1

Is deactivating WLAN equivalent to depowering wifi?

Posted: Sat May 16, 2020 7:45 am
by kwiley
I have noticed that WLAN state changes are persistent across resets. This is as expected, as the ESP8266 is documented to automatically reconnect upon power-up. Correspondingly, I have noticed that deactivating the WLAN before reseting is also persistent: the WLAN is not reactivated or connected upon reset. Good. What I want to be sure of, from a power management perspective, is that these high level MicroPython function calls and object states have the expected behavior at the hardware level. Is the fact that MicroPython WLAN reports not being activated or not being connected or not having a configured IP address a solid confirmation that the wifi radio/modem is not drawing power? That's what I want to be sure about.

I don't want to power the wifi every time the board powers up. I want to deep sleep for a long time, wake up, take some sensor readings, store them, and go back to sleep. Only on less frequent power-ups do I want to connect over wifi to a server and transmit the recorded data from the last few sessions.

Although, I admit, this would require storing data from session to session in EEPROM, unless I can figure out how to use the RTC memory, which I haven't found any MicroPython hooks into yet.

Thanks.

Re: Is deactivating WLAN equivalent to depowering wifi?

Posted: Sat May 16, 2020 9:27 am
by jomas
kwiley wrote:
Sat May 16, 2020 7:45 am
I have noticed that WLAN state changes are persistent across resets. This is as expected, as the ESP8266 is documented to automatically reconnect upon power-up. Correspondingly, I have noticed that deactivating the WLAN before reseting is also persistent: the WLAN is not reactivated or connected upon reset. Good. What I want to be sure of, from a power management perspective, is that these high level MicroPython function calls and object states have the expected behavior at the hardware level. Is the fact that MicroPython WLAN reports not being activated or not being connected or not having a configured IP address a solid confirmation that the wifi radio/modem is not drawing power? That's what I want to be sure about.

I don't want to power the wifi every time the board powers up. I want to deep sleep for a long time, wake up, take some sensor readings, store them, and go back to sleep. Only on less frequent power-ups do I want to connect over wifi to a server and transmit the recorded data from the last few sessions.

Although, I admit, this would require storing data from session to session in EEPROM, unless I can figure out how to use the RTC memory, which I haven't found any MicroPython hooks into yet.

Thanks.
If you disable both STA and AP, then the radio circuit is disable and the esp will draw about 20 mA when running. (deepsleep is 20uA)

Re: Is deactivating WLAN equivalent to depowering wifi?

Posted: Sat May 16, 2020 2:55 pm
by kwiley
Thanks. I expected as much, but I just wanted to confirm it.