Back to Troubleshooting

ESP32 Battery Charging Issues

Diagnose and fix problems related to charging batteries on ESP32 boards with built-in Li-Ion/LiPo charge controllers, including overheating, slow charge, or no charge behavior.

Common Causes

  • 🔌

    Incorrect USB or VIN Power Supply

    Using low-current USB chargers, unstable VIN input, or data-only USB cables can prevent the onboard battery charger from functioning properly.

  • 🔋

    Faulty or Overdischarged Battery

    Batteries discharged below their protection threshold (~2.5V) may appear “dead” and prevent charging circuits from activating.

  • 🔧

    Improper Charging Circuit Design

    Some ESP32 dev boards have poor or incomplete charging circuit layouts, leading to unreliable or dangerous charging behavior.

  • 🌡

    Overheating During Charging

    Linear chargers (like TP4056) dissipate heat when charging, especially with large current or low battery voltage, potentially triggering thermal protection.

Symptoms

Battery Doesn’t Charge When USB is Connected

No increase in battery voltage or charge LED remains off despite USB power being present.

Battery Charging Extremely Slowly

Full charge takes over 10–12 hours, or the current stays extremely low due to undervoltage lockout or thermal throttling.

ESP32 Shuts Down as Soon as USB is Removed

Battery is connected but provides no power, indicating it’s not charging or is deeply discharged.

Charger or ESP32 Board Gets Hot

The charging IC or ESP32 heats up excessively during charging, possibly reducing efficiency or halting charge.

Solutions

Use a Verified USB Power Source and Data Cable

Make sure the USB cable supports power and the charger delivers at least 500mA. See USB cable guide.

Replace or Revive Dead Batteries

Batteries that fall below protection threshold may need external charging to reset protection. Use caution and test voltage manually.

Improve Heat Dissipation or Limit Charge Current

If using TP4056 or similar, reduce the charge current by increasing the PROG resistor, or add heat sinking for better thermal performance.

Verify Charging Circuit Configuration

Check your board’s schematic or datasheet for correct diode placement, charge IC selection, and safe current limits. Some modules need manual modifications to function correctly.

More Details

ESP32 Battery Charging Issues #

Many ESP32 boards today come with integrated battery charging circuits - usually designed for Li-Ion or LiPo cells. While this adds convenience for portable projects, it also introduces a new set of challenges. Charging may not begin, may proceed extremely slowly, or may cause overheating that leads to early failures or shutdowns.

This guide helps you identify and resolve the most common issues related to charging batteries on ESP32 boards.

How Onboard Charging Typically Works #

Most ESP32 development boards with battery support use a linear charging IC like the TP4056 or IP5306. These chips are designed to charge single-cell Li-Ion/LiPo batteries from USB or VIN input, with fixed charge current (often 500–1000mA) and optional battery protection.

Some modules have a dedicated charge LED that turns on when charging and off when complete, while others require manual monitoring of the battery voltage.

The typical charge path is:

  1. USB power enters through the 5V or VIN rail
  2. It powers the ESP32 and flows through the charge IC
  3. The charge IC regulates current into the Li-Ion/LiPo battery

When things go wrong, the issue usually lies with one of these components.

Symptoms of Charging Problems #

🚫 Battery Doesn’t Charge When USB is Connected #

You plug in your board via USB, but the battery voltage doesn’t rise - and the charge LED stays off. This could indicate:

  • A data-only USB cable (no power delivery)
  • USB source doesn’t supply enough current
  • Battery is too deeply discharged to activate charge
  • Faulty soldering or missing protection diodes

🐢 Battery Charging Extremely Slowly #

If a charge takes more than 10–12 hours, it’s likely the charger has entered thermal throttling or undervoltage protection mode. Some ESP32 boards hardwire the TP4056 to 1A current, which causes the IC to overheat - especially with low input voltage.

🔌 ESP32 Shuts Down as Soon as USB is Removed #

If the ESP32 dies immediately when USB is unplugged, the battery is not providing backup power. Either:

  • The battery is completely discharged
  • The charging circuit is one-way only
  • A diode or MOSFET is missing between battery and 3.3V rail

🌡 Board or Battery Gets Hot #

While some warmth is normal during charging, excessive heat suggests a problem. The TP4056 dissipates heat proportional to (VUSB - VBAT) * Icharge. If you're charging a 3.0V battery from a 5V source at 1A, that’s 2W of heat - enough to throttle or halt charging.

How to Troubleshoot ESP32 Charging Circuits #

✅ Use a Proper USB Power Source #

Don’t use random wall adapters or cheap USB hubs. Use a dedicated USB power adapter that provides 5V at at least 1A. And always verify your cable isn’t charge-only - see our USB cable troubleshooting guide.

✅ Measure Battery Voltage Directly #

Use a multimeter to check battery voltage across the terminals. If it’s below 2.5V, the battery protection circuit may have cut it off. Some chargers won’t start charging unless the cell is above this threshold.

You may need to use a lab power supply or an external TP4056 module to gently revive such batteries - always with caution.

✅ Modify or Replace Charge Resistor #

On the TP4056, the charge current is set by the resistor on the PROG pin:

Resistor (kΩ)Charge Current
1.2kΩ~1000mA
2kΩ~580mA
3.3kΩ~350mA

For safer thermal behavior, consider replacing the resistor with 2k–3.3kΩ, especially if your battery is small or your board lacks cooling.

✅ Check Your Board’s Schematic #

Not all ESP32 modules implement charging correctly. Some lack essential protection diodes, FET switches, or feedback mechanisms. If your board shuts off when USB is removed or gets hot too fast, study the schematic (if available) or switch to a more reliable module with verified charging design.

Conclusion #

Battery charging is often an afterthought in ESP32 designs, but it shouldn't be. A bad cable, wrong resistor, or flawed charging path can result in hours of confusing behavior - or even a dead board.

Start by verifying your power source and battery state. Use a proper USB cable, monitor voltage levels, and consider modifying the charge circuit if you run into thermal or performance issues. For critical applications, use dedicated battery charger ICs and power management chips designed for reliable embedded deployment.

Still Stuck with an ESP32 Issue? Let's solve it together.

Our interactive troubleshooting wizard will guide you through common ESP32 problems and their solutions, step by step.

No registration required. Start solving issues right away!