I am currently designing a PCB based on the ESP32-C3, and I need help integrating a LiPo battery for power management and controlling the Vext pin for switching between external and battery power. I am a bit unsure how to properly design the circuitry for:
Safely charging the LiPo battery while using the ESP32-C3.
Managing power switching between the battery and an external power source (Vext control).
Monitoring battery level to ensure proper power management.
Could anyone provide some guidance or examples on how to integrate the LiPo charging circuit with the ESP32-C3 and manage the Vext control? Any help or references to similar designs would be much appreciated!
If Vext means USB, then you already have everything but the monitor. Your U5 mosfet will automatically switch the ESP32 to USB power when it's present, and charge the battery if needed. I'm not sure why you would want to monitor battery voltage since everything switches as needed.
Thank you for the clarification! What I'm specifically looking for is a way to monitor the battery voltage directly to ensure proper battery management, such as checking the charge level or determining when the battery is running low.
I'm considering adding a voltage divider circuit between the battery and an ADC pin on the ESP32-C3 to read the battery voltage. Do you have any suggestions or recommended circuits for this purpose?
Also, any advice on best practices for safely monitoring the battery voltage without significantly draining the battery would be really helpful!
LiPo batteries have a nominal voltage of 3.7V per cell. Here is a general guide to LiPo charge levels based on voltage:
4.20V per cell – 100% (fully charged)
4.00V per cell – ~85%
3.85V per cell – ~60% (storage charge level)
3.70V per cell – ~20%
3.50V per cell – ~5%
Below 3.3V per cell – Battery is at risk of being over-discharged (avoid discharging below 3.3V to prevent damage).
Note**:**
Do not overcharge: Charging above 4.2V per cell can damage the battery and is dangerous.
Avoid over-discharging: Discharging below 3.3V per cell can cause permanent damage and reduce the lifespan of the battery.
Storage: For long-term storage, keep the battery at about 3.8V per cell.
Best solutionCoulomb counter (often referred to as a battery fuel gauge or battery monitoring IC) is a device used to measure the charge or energy flowing in and out of a battery. It keeps track of the current flowing through the battery over time to estimate the remaining charge and provide an accurate reading of the battery's state of charge (SoC).
These values may change by manufacturer check the data sheet.
Well, opinions differ on how to do the voltage divider. One school says to just use very high value resistors, with a capacitor on the analog input, and it will work fine for this purpose without drawing enough power to make much of a difference.
The other school says to put in a mosfet that can be switched on only when you need to take a battery reading, but which draws zero current otherwise.
For something like this, you can probably select the internal 1.1V bandgap voltage as the reference, and divide down the maximum battery voltage to 1.1V. Then as the battery discharges, the ADC reading would decline from there. You would need to calibrate it though since the 1.1V actually varies from chip to chip.
In that setup, you could insert an N-channel mosfet between the two divider resistors, with its gate powered from an ESP GPIO, and its source being the tap for the ADC input. Like this:
The Seeed ESP32C3 has a LiPo battery connection and built-in (370mA) charger.
Two resistors can be added to measure battery voltage (example in the provided link).
Higher build quality than an ESP32-C3 SuperMini, and the (included) external aerial has a much better range.
Leo..