ESP8266 Wemos D1 mini DeepSleep issue

OP #7757202

Hello,

I have some issue with my Wemos D1 Mini going to deep sleep.

Here is my code

1
void setup() {
2
  Serial.begin(115200);
3
  delay(100);
4
    pinMode(LED_BUILTIN, OUTPUT);  // Initialize the LED pin as an output
5

6
   unsigned long startTime = millis();  // Record the start time
7
  while (millis() - startTime < 30000) {  // 30,000 milliseconds = 30 seconds
8
    Serial.println("Loop is running...");
9
    digitalWrite(LED_BUILTIN, LOW);   // Turn the LED on (LOW is the voltage level because the LED is active LOW)
10
  delay(1000);                      // Wait for 1 second
11
  digitalWrite(LED_BUILTIN, HIGH);  // Turn the LED off (HIGH voltage level turns it off)
12
  delay(1000);
13
    
14
  }
15
 digitalWrite(LED_BUILTIN, HIGH);
16
  
17
  Serial.print("Sleep");
18
 
19

20
  // Send data over WiFi or to the cloud here (e.g., MQTT or HTTP request)
21

22
  // Sleep for 1 hour (1 hour = 3600e6 microseconds)
23
  ESP.deepSleep(10e6);
24
}
25

26
void loop() {
27
  // Will not run in deep sleep mode
28
}

I connected D0 with RST with a wire but there is no wake up of the board

here is the output on serial

1
{$$��|�l�|�d�c|����s�c�b��gg�$og���cx��dsl{d8�o��l��bg�|�l��c��gn�l��d`�gd`'{���gcl {ۓ'bd`�b��d{�`�g�Loop is running...
2
Loop is running...
3
Loop is running...
4
Loop is running...
5
Loop is running...
6
Loop is running...
7
Loop is running...
8
Loop is running...
9
Loop is running...
10
Loop is running...
11
Loop is running...
12
Loop is running...
13
Loop is running...
14
Loop is running...
15
Loop is running...
16
Sleep{dd��|�l�|�l�c|����s�c�c��og�doo���cx��dsd{$

Whe is my code fault? or iss the wemos d1 minir faulty?

Gast #7757208

Try a delay after deepSleep:

ESP.deepSleep(10e6); delay(100);

This is a workaround for a known bug in some firmware revisions.

If that does not help, check/replace the flash memory chip. Fake "D1 mini" boards (not from Wemos) are often equipped with cheaper components. One of them might be a wrong flash chip (e.g. CT 580A-UGLI is known to be incompatible to the deep sleep mode).

Gast #7757452

Alexander schrieb:

Ist das so ein urban myth? was soll ein delay bewirken das nie angesprungen wird?

Wie gesagt ist das Workaround. Problem war (soweit ich mich erinnere), dass der Chip ohne das Delay manchmal nicht in den DeepSleep Modus geht. Es gab dazu mal ein Statement von Espressif, das ich leider nicht wieder finden konnte.

https://www.esp8266.com/viewtopic.php?p=58665#p58665 https://forum.arduino.cc/t/esp-8266-deep-sleep-reset-problem/975963 https://werner.rothschopf.net/microcontroller/202311_esp8266_deepsleep_en.htm https://forum.arduino.cc/t/esp-deep-sleep-mode-on-wemos-d1-not-wake-up/1213624/5 https://www.esp8266.com/viewtopic.php?p=84925

Antwort schreiben

Eine eigene Frage? Dieser Thread ist über 2 Jahre alt. Stell sie in einem eigenen Thread – dort lesen mehr Leute mit, und sie wird öfter und schneller beantwortet.

Neuen Thread starten

Eine Lösung, Ergänzung oder Rückmeldung zu diesem Thread? Dann antworte hier.

Formatierung
  • [c]C-Code[/c]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] – Link zu einem Artikel
  • Verweis auf einen anderen Beitrag: Rechtsklick auf dessen Beitrags-ID (#8078628), „Adresse kopieren“, in den Text einfügen

Mehr zur Formatierung

Längeren Sourcecode als Anhang, nicht in den Text. JPG nur für Fotos und Scans; Zeichnungen und Screenshots als PNG oder GIF. Siehe Bildformate.

Schon registriert? Anmelden

Wird nicht angezeigt. Wir schicken dir einen Link; sobald du damit bestätigst, erscheint dein Beitrag.

Mit dem Abschicken legst du einen kostenlosen Account an und erkennst die Nutzungsbedingungen und die Datenschutzerklärung an.