ESP8266 Deep Sleep Cycle Times and Power Consumption With WiFi Off

Now testing the Wemos D1 mini using arduino. Initially the timing.

ch4(blue) is the reset pin, so where the wakeup starts.
ch3(pink) is GPIO13 which the program blinks once, then leaves is LOW. When the ESP enters sleep if goes high, probably due to a default pullup.

So the timing is


  wakeup to program start   136ms
  program                     2ms
  program end to deep sleep 103ms
  total                     241ms

The timing is faster than the lua example which was 210ms to program start and 130ms to enter sleep.

ch4(sky blue) is the reset pin
ch3(pink) as before
ch2(navy blue) is the current

Here is a later trace with power measurement included

The sleep time is now 50ms but it is not essential. It is difficult to see the power usage as more than one cycle is included, here is a faster trace (and a cleaner (‘average’ capture) too)

Under 5mAs, which is very nice compared to 8mAs of lua. Reading the sensors and storing in RTC should be only a little extra.

Almost forgot, here is the sketch

/*
 * This sketch used to measure sleep/wakeup times
 */
#include <ESP8266WiFi.h>

void setup() {
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
  delay(1);
  digitalWrite(13, HIGH);
  delay(1);
  digitalWrite(13, LOW);
  ESP.deepSleep(50*1000,WAKE_RF_DISABLED); // 50ms sleep
}

void loop() {
  // sleeping so wont get here
}