Hello.
I'm currently using the ESP32 Lora LilyGo board (ESP32-LILYGOT31.6.1) and I want to reduce the energy as much as possible.
I'm trying to put the board into Hibernation (Deep Sleep mode) for 20mn before waking up the board for a transmission that is around 15s long.
I'm able to do so, but it still consume around 6mA. Is there a way to reduce this energy usage ?
Could you tell me what are the best settings for putting all the board (OLED, Lora; etc...) in deep sleep mode ? I couldn't fined any reference on Gibbus.
Thanks.
The code I'm using right now is :
LoRa.sleep();
SPI.end();
pinMode(RADIO_CS_PIN, INPUT);
pinMode(RADIO_RST_PIN, INPUT);
pinMode(RADIO_DIO0_PIN, INPUT);
pinMode(RADIO_CS_PIN, INPUT);
pinMode(OLED_SDA, INPUT);
pinMode(OLED_SCL, INPUT);
pinMode(OLED_RST, INPUT);
pinMode(RADIO_SCLK_PIN, INPUT);
pinMode(RADIO_MISO_PIN, INPUT);
pinMode(RADIO_MOSI_PIN, INPUT);
pinMode(SDCARD_MOSI, INPUT);
pinMode(SDCARD_MISO, INPUT);
pinMode(SDCARD_SCLK, INPUT);
pinMode(SDCARD_CS, INPUT);
pinMode(BOARD_LED, INPUT);
pinMode(ADC_PIN, INPUT);
// Specifique au mode hibernation / C'est un paramétrage du DeepSleep pour désactiver la mémoire
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_OFF);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_OFF);
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_OFF);
// Passage en deep_sleep - Set up timer as the wake up source and set sleep duration
esp_sleep_enable_timer_wakeup(duree_entre_envoi_secondes * uS_TO_S_FACTOR);
Serial.flush(); // Wait for the transmission of outgoing serial data to complete.
esp_deep_sleep_start();