El ESP-01 alimentado desde el pin de 3,3 V del Uno se reinicia constantemente al conectar el Wi-Fi
Traducido del English por IA ·
Uno + ESP-01 como pequeño puente para un prototipo de registrador de energía en un armario de calle (el ESP tiene su propio sketch, el Uno le envía líneas por serie). VCC del ESP y CH_PD van al pin de 3,3 V del Uno, GND común.A veces se conecta y funciona durante horas. La mayoría de las veces se reinicia en bucle en cuanto empieza el 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
Cuando logra mantenerse, Hermetry muestra que se cae cada media hora más o menos, y la pestaña Log dice keepalive_timeout. ¿El pin de 3,3 V es el problema o mi código? He leído ambas opiniones.
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.
Traducido del English por IA ·
Tuve el mismo bucle de reinicios y era mi código, que llamaba a delay() durante demasiado tiempo, así que el watchdog me jugó una mala pasada. Revisa los bucles largos sin yield()
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()
Traducido del English por IA ·
Es posible, pero con el pin que estás usando apostaría primero por la alimentación. Los 3,3 V del Uno salen de un pequeño LDO (un LP2985 en la mayoría de placas) con una capacidad de unos 150 mA. Un ESP8266 consume de 70 a 80 mA en reposo con el Wi-Fi activado y sube a más de 300 mA durante la transmisión y la asociación. La línea cae, el ESP sufre un brownout en mitad de la conexión y se reinicia. Cuando logra sobrevivir, cada momento de carga corre el mismo riesgo, lo que encaja con tus caídas cada media hora.Lo que yo haría:
- Alimentar el ESP desde su propio regulador tomando los 5 V del Uno: un AP2112K-3.3 (600 mA) o un módulo AMS1117-3.3, con 10 µF más 100 nF justo en el pin VCC del ESP. Un electrolítico de 470 µF cerca ayuda con los picos de transmisión.
- Adaptar el nivel de TX del Uno a RX del ESP con un divisor 1k/2k. El ESP no tolera 5 V, digan lo que digan algunos posts del foro.
- Cuidar la fuente de 5 V del Uno. El USB de un portátil sirve para la mesa de pruebas, pero un cargador de móvil barato a menudo no.
La observación de Michael merece comprobarse después de eso. rst cause 4 es el watchdog, y un brownout que hace caer el código a medias también puede terminar en un reset del watchdog, así que arregla primero la alimentación y mira qué queda.En cuanto a Hermetry, una vez estable, mantén el keepalive de MQTT en torno a 60 s. Un keepalive corto junto con una alimentación inestable produce exactamente ese patrón de timeouts en la pestaña Log.
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.
Traducido del English por IA ·
Era eso. Módulo AP2112 con 470 µF en el ESP, sin reinicios desde el lunes, y los keepalive_timeouts han desaparecido de la pestaña Log. Ya tenía el divisor. Por curiosidad, medí con el osciloscopio la antigua línea de 3,3 V: bajaba a 2,6 V en cada conexión.
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.
Traducido del English por IA ·
Tienes razón, la próxima vez, primero la alimentación
fair enough, power first next time
- Debes estar registrado para responder a este debate.
Únete a la conversación
Inicia sesión para preguntar y responder, dar me gusta a las publicaciones útiles y marcar la respuesta que resolvió tu problema. Cada aportación suma puntos y niveles.

