Is deactivating WLAN equivalent to depowering wifi?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
kwiley
Posts: 140
Joined: Wed May 16, 2018 5:53 pm
Contact:

Is deactivating WLAN equivalent to depowering wifi?

Post by kwiley » 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.

jomas
Posts: 59
Joined: Mon Dec 25, 2017 1:48 pm
Location: Netherlands

Re: Is deactivating WLAN equivalent to depowering wifi?

Post by jomas » Sat May 16, 2020 9:27 am

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)

kwiley
Posts: 140
Joined: Wed May 16, 2018 5:53 pm
Contact:

Re: Is deactivating WLAN equivalent to depowering wifi?

Post by kwiley » Sat May 16, 2020 2:55 pm

Thanks. I expected as much, but I just wanted to confirm it.

Post Reply