Page 1 of 1

Lightsleep mode 16 mA any advice

Posted: Mon Nov 08, 2021 6:03 pm
by moetaz
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

Re: Lightsleep mode 16 mA any advice

Posted: Mon Nov 08, 2021 6:10 pm
by Roberthh
AFAIK, lightsleep shuts only WiFi off. The core itself consumes according to the datasheet 12 mA. The flash consumes current as well.

Re: Lightsleep mode 16 mA any advice

Posted: Mon Nov 08, 2021 6:12 pm
by davef
Is there a USB to serial chip on that board? LED still running? How are you measuring current?

Re: Lightsleep mode 16 mA any advice

Posted: Mon Nov 08, 2021 6:31 pm
by moetaz
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

Re: Lightsleep mode 16 mA any advice

Posted: Mon Nov 08, 2021 7:40 pm
by Roberthh
I see the same reduction of current when going into lightsleep.

Re: Lightsleep mode 16 mA any advice

Posted: Mon Nov 08, 2021 7:48 pm
by moetaz
so any suggestion for deepsleep

how can wake up the device

Re: Lightsleep mode 16 mA any advice

Posted: Mon Nov 08, 2021 11:00 pm
by moetaz
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

Re: Lightsleep mode 16 mA any advice

Posted: Tue Nov 09, 2021 7:33 am
by Roberthh
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.