Deep Sleep or other power saving functions?

E-M-Dev
Posts: 10
Joined: Sun Apr 02, 2017 3:57 pm

Deep Sleep or other power saving functions?

Postby E-M-Dev » Wed May 31, 2017 10:06 pm

Hello,

Are there any working power saving functions right now?
For silicon Rev 0 or 1.

Does somebody have got some measured data (with setup)?

Regards,
Rick

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Deep Sleep or other power saving functions?

Postby ESP_Sprite » Thu Jun 01, 2017 1:54 am

Deep sleep is pretty well supported, including using the ULP to still do some work. http://esp-idf.readthedocs.io/en/latest ... sleep.html

onehorse
Posts: 70
Joined: Mon Feb 15, 2016 1:35 am

Re: Deep Sleep or other power saving functions?

Postby onehorse » Sun Jun 04, 2017 6:21 pm

Is there an example using deep sleep with the Arduino IDE?

And I have an external 32.768 kHz LSE on my ESP32 dev board. How is this used in the RTC domain?

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: Deep Sleep or other power saving functions?

Postby martinayotte » Tue Jun 06, 2017 2:34 pm

You can use those functions in an Arduino sketch, by adding proper include, of course :

Code: Select all

extern "C" {
	#include "esp_deep_sleep.h"
}

...

    esp_deep_sleep_enable_timer_wakeup(10000000);
    esp_deep_sleep_start();

E-M-Dev
Posts: 10
Joined: Sun Apr 02, 2017 3:57 pm

Re: Deep Sleep or other power saving functions?

Postby E-M-Dev » Tue Jun 06, 2017 7:10 pm

@martinayotte How much current do You need with this code (on which board)?

Regards,
Rick

onehorse
Posts: 70
Joined: Mon Feb 15, 2016 1:35 am

Re: Deep Sleep or other power saving functions?

Postby onehorse » Wed Jun 07, 2017 3:39 am

@Martin Excellent, thank you!

I tried it but it didn't compile for me, probably because I am using an old Ardino core.I'll update and try again.

Now can we use some similar simple incantation to enable light sleep?

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: Deep Sleep or other power saving functions?

Postby martinayotte » Wed Jun 07, 2017 1:11 pm

@E-M-Dev, I didn't measure the deepSleep() current.

@onehorse, I've not looked yet about lightSleep ...

kostyan5
Posts: 50
Joined: Mon Mar 06, 2017 3:16 pm

Re: Deep Sleep or other power saving functions?

Postby kostyan5 » Wed Jun 07, 2017 1:33 pm

Just a heads up, many boards (including ESP32 WROOM, at least from the schematics available) do not have a pull-up on flash /CS line. This means that when the ESP32 goes to sleep and GPIO is turned off, the /CS line is floating. This prevents the flash from going to standby mode. For my custom board, the deep sleep power consumption dropped from 900uA to 65uA after adding a 100kOhm pullup on the /CS line.

E-M-Dev
Posts: 10
Joined: Sun Apr 02, 2017 3:57 pm

Re: Deep Sleep or other power saving functions?

Postby E-M-Dev » Wed Jun 07, 2017 7:30 pm

@kostyan5 which board exactly are You using?

AFAIK there is no difference if You pull up that pin to high.
My board needs ~90µA with ULDO and Li Ion charger hooked up.

kostyan5
Posts: 50
Joined: Mon Mar 06, 2017 3:16 pm

Re: Deep Sleep or other power saving functions?

Postby kostyan5 » Wed Jun 07, 2017 7:33 pm

ESP32 Thing by Sparkfun. Which board are you using?

Who is online

Users browsing this forum: No registered users and 42 guests