Maximum deep sleep

esp8266 WeMos sleep wakeup

How long can ESP8266 sleep? This firmware code will test it out.

If only ESP8266 is used, short pin D0 to pin RST to enable wakeup. Then connect the USB power to a WeMos module, open the serial monitor and wait for the console to show wakeup.

It wakes up about 3 hours, 45 minutes later.

Code

Download code
void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.begin(115200);
  Serial.println("");
  Serial.println("[INFO] Wake up!");
}

void loop() {
  blinkLED();

  Serial.println("[INFO] Going to sleep for ESP.deepSleepMax()...");
  ESP.deepSleep(ESP.deepSleepMax());
}

void blinkLED() {
  Serial.println("LED ON");
  digitalWrite(LED_BUILTIN, LOW);
  delay(2000);

  Serial.println("LED OFF");
  digitalWrite(LED_BUILTIN, HIGH);
  delay(2000);

  Serial.println("LED ON");
  digitalWrite(LED_BUILTIN, LOW);
  delay(2000);

  Serial.println("LED OFF");
  digitalWrite(LED_BUILTIN, HIGH);
  delay(2000);
}

Serial console

Serial output from the firmware.

Maximum deep sleep serial console

References