-->
Page 1 of 1

ESP-01 Deep Sleep not waking properly

PostPosted: Wed Jan 22, 2020 2:06 pm
by bwood
I am trying to get my ESP-01 to go into deep sleep and wake up properly. From tutorials elsewhere I have soldered a 10k resistor from GPIO16 to RST.

Code:
Code: Select all#include <ESP8266WiFi.h>

void setup() {
  Serial.begin(74880);
  Serial.setTimeout(2000);

  delay(2000);
  Serial.println("I'm awake.");

  Serial.println("Going into deep sleep for 20 seconds");
  ESP.deepSleep(20e6); // 20e6 is 20 microseconds
}

void loop() {
}


Output:
Code: Select allI'm awake.
Going into deep sleep for 20 seconds

 ets Jan  8 2013,rst cause:5, boot mode:(3,4)

ets_main.c


There is a 20s pause after the 'Going to deep sleep for 20 seconds' line before printing the boot mode, but then nothing happens after that. Here is my flashing config: https://i.imgur.com/TdovAtD.png

What am I doing wrong?

Re: ESP-01 Deep Sleep not waking properly

PostPosted: Thu Feb 13, 2020 11:05 pm
by StanJ
10K for that GPIO16 > RESET connection is too high a resistance, and your reset pulse may be erratic. You're creating a voltage divider with the RESET pull-up resistor and it's only going down to 1.5V or so at the RESET pin. Try either a Schottky diode with the cathode (the band) connected to GPIO16 and the anode on RESET, or something around 300-500 ohms resistor. Optionally try a short wire, but be careful and don't hit the RESET line with a pushbutton during Deep Sleep as GPIO16 goes into active drive if you've configured a timed Deep Sleep. If you short it to ground when it's driving high you could potentially damage the chip.

Don't always trust people's tutorials, as there's a lot of crazy stuff out there that they say 'works'. Sometimes, yeah, maybe it does. Sometimes *not*.