ESP32 Firebettle - deepsleep current

userHead Account cancelled 2018-11-14 21:10:30 1646 Views2 Replies
Hi,

How can I get Firebeetle ESP32 to consume ~10uA current in deep sleep? I seem to not be able to get it below 800 uA. Thanks.
2023-07-18 09:20:44

I am having difficulty getting the Firebeetle ESP32 to consume less than 1.7 mA in deep sleep mode, even though nothing is connected to the ESP32. The sketch I am using simply puts the ESP32 into deep sleep mode with no other functions running. I would like to achieve a current consumption of around 10uA. Any suggestions or guidance would be greatly appreciated. Thank you.

userHeadPic Ferdost.Assa
2018-11-23 19:48:01 I've got the same problem. But maybe I can help you anyway. Until now I managed to get it down to 65µA.

My Setup:
Power supply with 3,3V by the VCC Pin (Using USB would increase the power consumption)

The Programm:
Code: Select all
void setup() {
  ESP.deepSleep(20e8);
}

void loop() {

}
I even have tried reducing the consumption my programming the ESP directly using the ESP-IDF but it did not help.

By studying the schema (https://github.com/Robert-MARKII/Docume ... (V1.0).pdf) i figured out the consumption could be caused by the builtin LED. I measured 1V on D9 in sleep Mode. When I added a 1k resistor between D9 and GND the power consumption increased to 1mA. One solution could be to remove the LED. Another could be to use the ESP32 RTC IO to set the pin to low or not-connected during sleep. But i had no success until now. Here is my code anyway (for ESP-IDF):
Code: Select all
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "sys/time.h"

#include "sdkconfig.h"

#include "esp_sleep.h"

#include "soc/rtc_io_reg.h"
#include "driver/gpio.h"
#include "driver/rtc_io.h"

#define GPIO_DEEP_SLEEP_DURATION     1000  // sleep 10 seconds and then wake up
RTC_DATA_ATTR static time_t last;        // remember last boot in RTC Memory

void app_main() {
	struct timeval now;

	printf("start ESP32\n");

	gettimeofday(&now, NULL);

	printf("deep sleep (%lds since last reset, %lds since last boot)\n",now.tv_sec,now.tv_sec-last);

	last = now.tv_sec;
    
    gpio_num_t pin = (gpio_num_t) GPIO_NUM_2;
    rtc_gpio_set_direction(pin, RTC_GPIO_MODE_INPUT_OUTPUT);
    rtc_gpio_pulldown_en(pin);
    rtc_gpio_pullup_dis(pin);                     // set the pin as pull-up
    esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, 
                        ESP_PD_OPTION_ON);       // keep the RTC IO domain powered
    
	esp_deep_sleep(1000000LL * GPIO_DEEP_SLEEP_DURATION);

}
Let me know if youf find something out.
userHeadPic jakob.braun