2

I'm using an ESP8266-01S for a battery-powered project. The ESP is in DeepSleep, a doorbell relay pulls RST to GND, bringing the ESP to life to do some stuff, before going back to DeepSleep.

My problem is that once the program ran successfully and the ESP is in DeepSleep, the next RST will not bring it up properly. Instead, it will linger in some undefined state, eating around 33.7mA constantly (I went through that battery quite quickly without realizing it).

With serial output enabled, I reliably get something like this when entering those undefined states:

rll�r$�n�l�b|���rb�b�nnlnnbbp�$blrl

Edit: setting the Baud rate to 74880 revealed the above to be the following:

11:58:17.042 -> �
11:58:17.042 -> ets Jan 8 2013,rst cause:2, boot mode:(3,6)
11:58:17.042 -> 

The next RST will then perform successfully, i.e. the ESP comes up, does its thing and goes into DeepSleep. My multi meter shows a power consumption of roughly 15uA, which looks like proper DeepSleep to me.

Another RST would then bring the ESP back into the undefined state, and so on.

Cutting power provokes the same behaviour, so it feels like it could be a hardware thing, some lingering current or something.

I created a minimal version of my program that shows the behaviour on the ESP:

int Led = LED_BUILTIN;
void setup() {
 pinMode(Led, OUTPUT);
}
void loop() {
 digitalWrite(Led, false);
 delay(4000);// Delay 4 seconds
 digitalWrite(Led, true);
 delay(1000);// Delay 1 second
 ESP.deepSleep(0);
}

Is there anything I'm missing or doing wrong, maybe something on the hardware side, to make DeepSleep work on an ESP8266-01S? Do the pins have to be initialized or brought in a defined state somehow? Also, is there a better way than Serial Output to figure out what's going on?

I believe I don't have to connect GPIO16 to RST, since I don't want to wake the ESP by software, but through hardware events only.

Edit: I left the device in DeepSleep over night and RSTed it in the morning, and this time it recovered fine for once.

asked May 6, 2023 at 19:30
4
  • 1
    that is exactly what should be in the included in the question Commented May 6, 2023 at 23:18
  • 1
    I reliably get something like this when entering those undefined states perhaps if you set the baud rate of the terminal software to match what the esp is using, the text will provide some insight into the problem - 74880 I believe is the default for ESP's Commented May 8, 2023 at 13:17
  • thanks again, I got some new information and edited my question accordingly Commented May 17, 2023 at 10:49
  • Hello, i have the same issue and asked for help in esp32.com/viewtopic.php?f=50&t=39737 but sofar didnt come to any resolution. Did you find a solution @Jan ? Commented May 29, 2024 at 21:09

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.