Lightsleep mode 16 mA any advice

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
moetaz
Posts: 39
Joined: Sun Oct 31, 2021 11:33 am

Lightsleep mode 16 mA any advice

Post by moetaz » Mon Nov 08, 2021 6:03 pm

hello
ESP8266 12E
sta_if = network.WLAN(network.STA_IF)
sta_if.active(False)
ap_if = network.WLAN(network.AP_IF)
ap_if.active(False)

and with
machine.lightsleep()

power consumption is 16 mA

any advice

User avatar
Roberthh
Posts: 3668
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Lightsleep mode 16 mA any advice

Post by Roberthh » Mon Nov 08, 2021 6:10 pm

AFAIK, lightsleep shuts only WiFi off. The core itself consumes according to the datasheet 12 mA. The flash consumes current as well.

davef
Posts: 813
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Lightsleep mode 16 mA any advice

Post by davef » Mon Nov 08, 2021 6:12 pm

Is there a USB to serial chip on that board? LED still running? How are you measuring current?

moetaz
Posts: 39
Joined: Sun Oct 31, 2021 11:33 am

Re: Lightsleep mode 16 mA any advice

Post by moetaz » Mon Nov 08, 2021 6:31 pm

measure current with millimeter
with usb stick or without
powered with battery or by usb

all the reading the same

lightsleep must consume around 950 uA

when close the wifi
power down from 70 mA to 19 mA
when enter to lightsleep the consumption go from 19 mA to 15-16 mA

and deepsleep consume around 18 uA but always have problem when walk up

device freeze at 32 mA if rest connect to GPIO16 and if not connect device freeze at 12 mA

and advice suggestion

User avatar
Roberthh
Posts: 3668
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Lightsleep mode 16 mA any advice

Post by Roberthh » Mon Nov 08, 2021 7:40 pm

I see the same reduction of current when going into lightsleep.

moetaz
Posts: 39
Joined: Sun Oct 31, 2021 11:33 am

Re: Lightsleep mode 16 mA any advice

Post by moetaz » Mon Nov 08, 2021 7:48 pm

so any suggestion for deepsleep

how can wake up the device

moetaz
Posts: 39
Joined: Sun Oct 31, 2021 11:33 am

Re: Lightsleep mode 16 mA any advice

Post by moetaz » Mon Nov 08, 2021 11:00 pm

what the possibility to add to power supply battery circle
ic timer 555 or similar with very low power consumption

so can cut power for esp8266 and supply it again on timing

this can reduce power consumption

User avatar
Roberthh
Posts: 3668
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Lightsleep mode 16 mA any advice

Post by Roberthh » Tue Nov 09, 2021 7:33 am

I have used an ATTiny for e.g. a Watchdog. At 1 MHz clock and internal sleep, the power consumption is <10 µA. The NE555 consumes more, like 3 mA, and the lowest Vcc is 5V.
The code for the Watchdog is here: https://github.com/robert-hh/ATTiny-Wat ... icroPython You may also look at https://github.com/robert-hh/Candle It should be easy to change it such it uses a periodic power control. The heart of low power is the system_sleep() function, which uses the internal watchdog. The longest sleep period is 8 Seconds, after which the device wake up shortly, check whether to stay awake or go to sleep again. During the awake phase, power consumption is < 1mA at 1 MHz and 3V. The chip runs from an internal oscillator and does not need any external circuitry for operation.
Nevertheless, the deep-sleep option of the ESP8266 works. People have implemented it successfully.

Post Reply