Nouveau : le pare-feu IA surveille toute la plateforme et explique chaque incident en termes simples. Découvrez comment ça marche

ESP-01 powered from the Uno’s 3.3 V pin keeps rebooting during Wi-Fi connect

ESP-01 powered from the Uno’s 3.3 V pin keeps rebooting during Wi-Fi connect

Résolu 4 3

Uno + ESP-01 as a small bridge for a street-cabinet energy logger prototype (the ESP has its own sketch, Uno sends it lines over serial). ESP VCC and CH_PD go to the Uno’s 3.3 V pin, GND common.

Sometimes it connects and runs for hours. Most times it reboots in a loop the moment it starts Wi-Fi:

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3460, room 16
...
 ets Jan  8 2013,rst cause:4, boot mode:(3,6)
wdt reset

When it does stay up, Hermetry shows it dropping off every half hour or so, Log tab says keepalive_timeout. Is the 3.3 V pin the problem or my code? I’ve read both opinions.

♥ 0

I had the same reboot loop and it was my code calling delay() too long, so the watchdog bit me. Check for long loops without yield()

Ask me about 4–20 mA.
♥ 0

Possible, but with the pin you’re using I’d bet on power first. The Uno’s 3.3 V comes from a small LDO (an LP2985 on most boards) rated about 150 mA. An ESP8266 pulls 70-80 mA idle with Wi-Fi on and spikes to 300+ mA during transmit and association. The rail sags, the ESP browns out mid-connect and resets. When it does survive, every busy moment risks the same, which fits your half-hourly drop-offs.

What I’d do:

  • Feed the ESP from its own regulator off the Uno’s 5 V: an AP2112K-3.3 (600 mA) or an AMS1117-3.3 module, with 10 µF plus 100 nF right at the ESP’s VCC pin. A 470 µF electrolytic nearby helps with the transmit spikes.
  • Level-shift Uno TX to ESP RX with a 1k/2k divider. The ESP isn’t 5 V tolerant, whatever forum posts claim.
  • Keep the Uno’s 5 V source decent. USB from a laptop is fine for the bench, a cheap phone charger often isn’t.

Michael’s point is worth checking after that. rst cause 4 is the watchdog, and a brownout that half-crashes the code can also end in a watchdog reset, so fix power and see what’s left.

For the Hermetry side, once it’s stable, keep the MQTT keepalive around 60 s. A short keepalive plus a flaky supply gives you exactly that pattern of timeouts in the Log tab.

Measure twice, poll once.
Solution acceptée♥ 7

That was it. AP2112 module with 470 µF on the ESP, no reboots since Monday, and the keepalive_timeouts are gone from the Log tab. I had the divider already. Scoped the old 3.3 V rail out of curiosity: it dipped to 2.6 V on every connect.

♥ 0

fair enough, power first next time

Ask me about 4–20 mA.
♥ 0
5 sujets de 1 à 5 (sur un total de 5)
  • Vous devez être connecté pour répondre à ce sujet.

Rejoignez la discussion

Connectez-vous pour poser et répondre à des questions, aimer les messages utiles et marquer la réponse qui a résolu votre problème. Chaque contribution rapporte des points et des niveaux.

Partager