ESP8266 How to wake up from deep sleep?

Hello, I have a chip esp-12f,

I am testing deep sleep and wake up,

This is the circuit:
未标题-1

This is the code:

esphome:
  name: test
  friendly_name: test

esp8266:
  board: esp12e

# Enable logging
logger:

ota:
  password: "xxxxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  ap:
    ssid: "test Fallback Hotspot"
    password: ""

deep_sleep:
  id: deep_sleep_1
  run_duration: 20s
  sleep_duration: 10s

After power on, It can automatically enter deep sleep mode, but cannot wake up automatically.

Please tell me if I did something wrong? Thanks.

you need a connection between gpio16 and RST. Have a read of the Deep Sleep Component in esphome.

If you look at the circuit, it seems like there is a connection between GPIO16 and RST.

Some say it’s because GPIO0 left floating and thus low at boot, causing it to start up in flashing mode.

I had a batch of ESP-01 boards. About half of them wouldn’t wake up after deep sleep - no matter what I tried. I’m afraid it could be a hardware issue with these cheap knock-offs.


I use these boards to mount my ESP12F on. They pull GPIO0 high with a built in resistor(not so hard you can’t get in to flashing mode with an external resistor). Have worked very well. For deep sleep to work only need the RST-GPIO16 connection added.


Other pins need to be pulled high or low as well if not using this board.

Please look at my circuit, I have connected gpio16 to rst.

Sorry, yes Zenzay42 was quick to point that out. How have you physically connected it all together? What is the nature of the 3.3V power supply? What it the output of the logger? If you aren’t getting any logs over wifi try a serial connection.
Set the IP manually and allow fast connect. It can easily take 10s for wifi to connect with a good signal.
Your circuit picture doesn’t show many of the necessary pins being pulled high or low. In the bare esp12f there is a 12K resistor between RST and VCC pulling RST high. Measure that resistance if you can. Can you manually wake it if you connect a wire momentarily between RST and GND? It might be better to disconnect the RST to GPIO16 connection first to try this.
Does the LED flash on at all?

1 Like

I hope this doesn’t seem unhelpful, but I notice a lot of people having difficulties with esp8266 deep sleep (even after covering off on the basics).

I had similar experiences a while back and go for good quality esp32’s for deep sleep projects now, and rarely have dramas.

Hopefully you’ll solve this, but I thought it’s worth noting this. There was another not dissimilar thread recently.

There certainly do seem to be a lot of people with problems. I buy my esp8266 from the cheapest sellers on Aliexpress and have never had any problems but that’s just anecdotal evidence.

https://github.com/esp8266/Arduino/issues/6007
Some novel approaches to differences in chips

1 Like

I’ve seen the topic you’re referring to before posting this topic.
I want to make a thermometer with battery supply, esp8266 can easily measure the supply voltage, but esp32 cannot, so I chose esp8266.
I have made another post about this issue How to measure voltage the chip is getting on esp32?

1 Like

I added a 6.8 KOhm resistor connecting GPIO0 and VCC but the problem was not solved.

I added a 6.8 KOhm resistor connecting GPIO0 and VCC but the problem was not solved.

Both can measure the voltage across the cell using adc pins and voltage divider depending on the voltage of the cell. Your code didn’t have sensors in it. What sort of batteries are you using?
Oh, I wasn’t suggesting you to solder on the resistor. That was just for Mahko_Mahko as there was some interesting pictures in there that we had seen before.

Have you left it this way or pulled it high?

esp8266 can measure supply voltage without using adc pins and voltage divider,no need to add any external circuit hardware,Just add the following code:

sensor:
  - platform: adc
    pin: VCC
    name: "VCC Voltage"
    update_interval: xxx

esp32 has no such capability.

At first, I left the GPIO0 pin floating. Later, after listening to everyone’s opinions, I added a 6.8K resistor between GPIO0 and VCC, but it still didn’t work.

For testing, I use a 3.3V regulated power supply to the chip.

1 Like

I recall seeing this which I believe is what @beginer1 is referring to.

On the ESP8266 you can even measure the voltage the chip is getting

1 Like

PullUp 10k to MISO, it works!

solution: ESP.deepSleep hangs after wakeup - ESP12F (Working on older chips) · Issue #6007 · esp8266/Arduino · GitHub

Thank you and thanks to @GeoX234

1 Like