Power consumption spikes in light sleep mode

User avatar
crasu
Posts: 6
Joined: Sat Dec 10, 2016 7:30 am

Power consumption spikes in light sleep mode

Postby crasu » Sat Dec 10, 2016 7:39 am

Hi

I am trying to get light sleep to work and come close to the advertised power consumption of 1-2mA.

I am seeing spikes in power consumption every 1.5s which last about 150 ms and draw about 70mA current. They cause about 50-70% of the general power consumption.
figure_7.png

On average the power consumption is about 15-18 mA.

My setup:
- SDK 1.5.4.1 NONOS/1.5.4 for Arduino
- Auto light sleep as described here http://www.espressif.com/sites/default/ ... s_en_0.pdf
- Used linux hostap and to make sure there are no frames on the wirless except for beacons
- ESP-201 or Esp8266 thing from sparkfun
- The esp8266 is in station mode

I tried:
- Using forced light sleep the power consumption goes down to 1-2 mA as expected (no spikes)
- Changing dtim values and/or beacons frequency of the AP
- Put the entire setup inside of a microwave to make sure no other 2.4 Ghz devices are interfering ;-)

Did anyone achive the advertised values for power consumption in auto light sleep? And does anyone have any idea what is causing these spikes?

Thank you in advance,
Christian
Last edited by crasu on Tue Dec 13, 2016 6:27 pm, edited 2 times in total.

pratik

Re: Power consumption spikes in light sleep mode

Postby pratik » Mon Dec 12, 2016 12:51 pm

Okay, so if this happens inside a microwave oven as well, then you have definitely got a code/system issue here. :D
By the way, can you disable all interrupts using the relevant APIc calls and let me know if that made any difference?

User avatar
crasu
Posts: 6
Joined: Sat Dec 10, 2016 7:30 am

Re: Power consumption spikes in light sleep mode

Postby crasu » Tue Dec 13, 2016 6:26 pm

Sorry I am fairly new to esp8266. Which apis are the relevant ones? ets_intr_lock()? I have not defined any interrupts in my code.

User avatar
crasu
Posts: 6
Joined: Sat Dec 10, 2016 7:30 am

Re: Power consumption spikes in light sleep mode

Postby crasu » Wed Dec 14, 2016 6:24 am

I tried something like this. The power consumption stays the same as before.

Code: Select all

...
    os_printf("Wifi configured\n\r");
    wifi_set_sleep_type(LIGHT_SLEEP_T);

    ets_intr_lock( );
    //Start os task
    system_os_task( ... );
...

User avatar
crasu
Posts: 6
Joined: Sat Dec 10, 2016 7:30 am

Re: Power consumption spikes in light sleep mode

Postby crasu » Sun Apr 02, 2017 8:46 pm

The issue has improved a lot/gone away with firmware 2.0.0

compass
Posts: 1
Joined: Thu Apr 20, 2017 3:00 pm

Re: Power consumption spikes in light sleep mode

Postby compass » Thu Apr 20, 2017 3:48 pm

I assume you were using auto light sleep. I'm trying to get it working right now on esp-12s module. The current is always around 70mA. I'm using their official demo and sdk 2.0.0 for testing: https://github.com/espressif/esp8266-no ... Sleep_Demo. If I use force light sleep, I can get the current down to <1mA. But I would prefer to use auto light sleep because force light sleep seems to disconnect wifi connection. How did you get it working? Any tips? Thanks.

User avatar
crasu
Posts: 6
Joined: Sat Dec 10, 2016 7:30 am

Re: Power consumption spikes in light sleep mode

Postby crasu » Sun Jul 09, 2017 3:20 pm

The demo worked for me just fine. The only thing that is not obvious is that you need to be connected to an ap.

gerdiman1
Posts: 4
Joined: Mon Nov 20, 2017 2:03 pm

Re: Power consumption spikes in light sleep mode

Postby gerdiman1 » Fri Nov 24, 2017 9:25 am

crasu wrote:The issue has improved a lot/gone away with firmware 2.0.0

I'm seeing the same issue with SDK 1.5.4.1.

With 2.0.0 SDK, did you manage to get a clean power consumption where ESP8266 only wakes up during DTIM? Also, is the periodic 1.5s gone?

I just tried and got a very erratic result. It seems to sleep properly for a period of time and then starts behaving erratically, waking up randomly for no obvious reason.
SDK-2.0.0-light-sleep.JPG


Did you observe a similar result?

SDK 2.1.0 is worse. ESP8266 doesn't even wake up to listen to DTIM.
SDK-2.1.0-light-sleep.JPG

User avatar
crasu
Posts: 6
Joined: Sat Dec 10, 2016 7:30 am

Re: Power consumption spikes in light sleep mode

Postby crasu » Mon Dec 04, 2017 7:00 pm

Yes with SDK 2.0 I get an average power consumption of about 5-8 mA. I am running the entire circuit including LDO, couple of leds, motor driver and charger with voltage monitoring for about 2 month out of a 6600 mAh 3,7V lipo. Wifi is active and getting moderate usage, without any tweaking for beacon freq or dtim on the ap side.

Did you monitor your wifi during doing your tests? The esp8266 wakes when it has to process wifi frames? For the measurements I did put the esp8266 on a seperate ap.

I have not tried sdk 2.1 yet.

Who is online

Users browsing this forum: No registered users and 292 guests