Common ESP32 Problems and Fixes
Circuitkar Team ยท 9 May 2026
Common ESP32 Problems and Fixes
The ESP32 is a powerful chip, but it has quirks that are not obvious from the datasheet. This guide covers the problems that actually stop people's projects โ not theoretical edge cases, but the issues that appear in every forum, Discord, and Reddit thread about the ESP32.
Problem 1: Cannot Upload Sketch โ "Connecting..." Hangs
Cause: The ESP32 needs to enter bootloader mode for programming. This happens automatically on good boards (with automatic reset circuitry), but many cheaper boards require manual intervention.
Fix: Hold the BOOT button (labeled IO0 or BOOT) on the ESP32 board, click Upload in Arduino IDE, wait until "Connecting..." appears in the console output, then release the BOOT button. The upload should proceed.
If this works once but fails consistently: add a 10 ยตF capacitor between the EN pin and GND. This helps the auto-reset circuit work more reliably.
Also check: Is the correct COM port selected? Install the CH340 driver (Windows) if the port is not visible. On Mac, install the CP2102 driver if needed.
Problem 2: WiFi Keeps Disconnecting
Most common cause: Insufficient power supply. The ESP32 draws up to 500 mA in peak WiFi transmit bursts. A weak USB cable, underpowered charger, or shared 5V rail causes brownout during transmission, which triggers a WiFi reset.
Fix: Use a 5V/1A+ dedicated supply. Add a 100 ยตF electrolytic capacitor and a 100 nF ceramic capacitor across the 3.3V supply rails near the ESP32. These suppress voltage spikes during transmission.
Code fix: Add automatic reconnect logic:
WiFi.setAutoReconnect(true);
WiFi.persistent(true);
And in your loop(), check WiFi status and reconnect if needed:
if (WiFi.status() != WL_CONNECTED) {
WiFi.disconnect();
WiFi.reconnect();
delay(5000);
}
Problem 3: ADC Readings Are Wrong When WiFi Is On
Cause: The ESP32 has two ADC units. ADC2 (GPIO 0, 2, 4, 12, 13, 14, 15, 25, 26, 27) shares hardware resources with the WiFi radio. When WiFi is active, ADC2 readings become unreliable โ you may get NaN, maximum values, or noisy readings.
Fix: Only use ADC1 pins (GPIO 32, 33, 34, 35, 36, 39) for analog sensing in WiFi-enabled projects. GPIO 34, 35, 36, 39 are input-only but have no internal pull resistors โ suitable for pure analog sensing.
Problem 4: GPIO Pins Behave Strangely at Boot
Cause: Several ESP32 GPIO pins have special boot-strapping functions that set the boot mode based on their state at power-on:
- GPIO 0: Must be HIGH for normal boot. If LOW at boot, enters download mode. Avoid connecting anything that pulls this LOW at startup.
- GPIO 2: Must be LOW or floating for normal boot (on some variants). Do not connect active-HIGH devices here.
- GPIO 15: Must be HIGH at boot on some modules. Pulling LOW enables JTAG debugging mode.
- GPIO 12: Affects flash voltage selection on some modules. Leave unconnected unless you know what you are doing.
Fix: Avoid GPIO 0, 2, 12, and 15 for external peripherals if possible. Use GPIO 4, 5, 16, 17, 18, 19, 21โ23, 25โ27, 32โ39 for your sensors and outputs.
Problem 5: Brownout Detector Keeps Resetting the Board
Cause: The ESP32 has a built-in brownout detector that resets the chip when VCC drops below ~2.44 V. This happens with weak power supplies or long power cables causing voltage drop under load.
Quick software fix (not recommended for production):
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); // disable brownout
Proper fix: Improve your power supply. Use a 5V/2A adapter, shorter cables, and decoupling capacitors (100 ยตF + 100 nF near ESP32 VCC pins).
Problem 6: "Guru Meditation Error" / Watchdog Timer Reset
Cause: The ESP32 has a task watchdog timer. If your loop() function blocks for too long without yielding to the FreeRTOS scheduler, the watchdog fires and resets the chip.
Causes in Arduino code: Long blocking delays, waiting in a while() loop for a sensor response, or a tight loop that does not include delay() or yield().
Fix: Replace blocking delays with non-blocking millis() timing. If you must block, add yield() or delay(1) inside the loop to feed the watchdog. For tasks that genuinely need to run for a long time, use FreeRTOS tasks (xTaskCreate) instead of blocking loop().
Problem 7: Cannot Use Deep Sleep Wake โ Keeps Staying Awake
Cause: ESP32 deep sleep requires correct wakeup source configuration before calling esp_deep_sleep_start(). Common issues: wrong RTC GPIO used for external wakeup, GPIO not configured as input, or TOUCH wakeup not properly initialized.
Fix for timer wakeup:
esp_sleep_enable_timer_wakeup(30 * 1000000); // 30 seconds in microseconds
esp_deep_sleep_start();
For GPIO wakeup, only RTC GPIOs (0, 2, 4, 12โ15, 25โ27, 32โ39) can wake the ESP32. Standard GPIO pins cannot.
For more ESP32 troubleshooting, check our full documentation and browse replacement ESP32 development boards at Circuitkar.
Related Articles
ESP32 for Small Factory Automation: A Practical Starter Guide
How small Indian manufacturers are using ESP32 for basic factory monitoring and control โ real use cases, limitations, and what it costs to get started.
Home Automation Bill of Materials: Complete Component List with Prices
Full BOM for a 3-room smart home โ every component, quantity, price range, and total cost estimate for a DIY home automation installation.
Why Cheap Components Fail and What to Buy Instead
The real reasons why no-name ESP32s, clone sensors, and unbranded relay boards fail โ and how to identify quality components before buying.