Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By dr_ances
#36131 I am using the ESP8266 as the microcontroller in a sample project I have, and I am trying to get it to go to the lowest power mode possible. The lowest I've been able to make it go is 6mA, which is huge.

A little about the project: I have a button that I use as the main trigger. The button is tied to the RESET pin and pulled high. When the button is pressed, it pulls the pin low and triggers a reset. During the setup, the ESP8266 issues an NTP request to get the time. It then displays that time to a Nokia display, then goes to sleep. Ideally, this should be able to run on a battery and last a while.

Things I've tried, and the measured results (using uCurrent)
> normal operation, no sleep - 65-70mA
> deepSleep, tried with all 4 sleep modes - 32mA
> deepSleep, no Nokia display - 29-30mA
> no Nokia display, no power LED - 24mA
> CH_PD pulled low - 6mA
I'm not sure what I'm doing wrong, but I can't get any lower than any of my measurements. Is there something I'm missing with using the ESP.deepSleep function? Or is it something else? Any suggestions or input would be appreciated. Thanks.

Copy of my code


Code: Select allvoid setup() {
  Serial.begin(115200);
  Serial.println("Setting up");
 
  lcd.init(PIN_SCE, PIN_RESET, PIN_DC, PIN_SDIN, PIN_SCLK);
  lcd.clear();
 
  String esid = "", epass = "";
  read_eeprom(esid, epass);
  connectWiFi(esid, epass);
 

   
  Serial.println("Starting UDP");
  udp.begin(localPort);
  Serial.print("Local port: ");
  Serial.println(udp.localPort());
  lcd.clear();
  lcd.print("Setup done");
  sendNTPpacket(timeServer); // send an NTP packet to a time server
  delay(500);
  handleUDPpacket();
  delay(1000);
 
  ESP.deepSleep(2000); // Will stay asleep no matter what number I write

}