# ESP32 - Determining LiPo Battery Voltage

**URL:** <https://forum.core-electronics.com.au/t/esp32-determining-lipo-battery-voltage/23811>\
**Category:** Uncategorized\
**Created:** [12 January 2026 01:51 UTC](https://forum.core-electronics.com.au/t/esp32-determining-lipo-battery-voltage/23811 "2026-01-12T01:51:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon13024](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jon13024/32/810_2.png) [@Jon13024](https://forum.core-electronics.com.au/u/Jon13024)\
**Post date:** [12 January 2026 01:51 UTC](https://forum.core-electronics.com.au/t/esp32-determining-lipo-battery-voltage/23811/1 "2026-01-12T01:51:58Z")

</div>

Hi guys,

I have just ordered these products with the intention of connecting the units together along with an ESP32.

Whilst Im comfortable with the physical connections and charging, I juist realised that I also want to be able to interrogate and determine the battery voltage.

Any ideas or suggestions as to how I would go about this?

Thanks

Jon

> **[Adafruit Mini Lipo w/Mini-B USB Jack - USB LiIon/LiPoly charger - v1](https://core-electronics.com.au/adafruit-mini-lipo-w-mini-b-usb-jack-usb-liion-lipoly-charger-v1.html)**
>
> Oh so handy, this little lipo charger is so small and easy to use you can keep it on your desk or mount it easily into any project! Simply plug it via any MiniUSB...

> **[Polymer Lithium Ion Battery (LiPo) 3.7V 1100mAh](https://core-electronics.com.au/polymer-lithium-ion-battery-1000mah-38458.html)**
>
> Rely on the superior chemistry and energy density of Lithium Ion batteries for your next portable project. This battery has a capacity of 1100mAh and connects to your circuit by the attached JST connector.

> **[Universal Qi Wireless Receiver Module](https://core-electronics.com.au/universal-qi-wireless-receiver-module.html)**
>
> If you have a modern smart phone you may have noticed that it comes with built in wireless charging capability called 'Qi charging.' Qi is a trademark name for a...

---

<div class="post-metadata">

**Author:** ![Pixmusix](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/pixmusix/32/9719_2.png) [@Pixmusix](https://forum.core-electronics.com.au/u/Pixmusix)\
**Post date:** [12 January 2026 02:08 UTC](https://forum.core-electronics.com.au/t/esp32-determining-lipo-battery-voltage/23811/2 "2026-01-12T02:08:13Z")

</div>

A voltage divider and a PWM pin is often used.  
I was looking for a schematic for you and found this thread which looks promising.

> <https://electronics.stackexchange.com/questions/431647/how-do-i-implement-a-simple-and-efficient-voltage-divider-for-battery-level-read>

---

<div class="post-metadata">

**Author:** ![Jon13024](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jon13024/32/810_2.png) [@Jon13024](https://forum.core-electronics.com.au/u/Jon13024)\
**Post date:** [12 January 2026 02:38 UTC](https://forum.core-electronics.com.au/t/esp32-determining-lipo-battery-voltage/23811/3 "2026-01-12T02:38:01Z")

</div>

Thanks for this.

> [@Pixmusix](#):
>
> [https://electronics.stackexchange.com/questions/431647/how-do-i-implement-a-simple-and-efficient-voltage-divider-for-battery-level-read](https://electronics.stackexchange.com/questions/431647/how-do-i-implement-a-simple-and-efficient-voltage-divider-for-battery-level-read)

Looks like this is the most important bit:

V(out) = V(in)\*(R2/(R1+R2))

(R2 corresponding to the blue resistor in your schematic and R1 the red resistor)

In regards to the capacitor, it would reduce noise at the pin by adding a small (100nF) capacitor from the GPIO pin to ground. Below is a schematic of these suggestions, you may even consider higher resistor values.

Am I correct in thinking that 4.2V is my maximum (Vin) and 3.3V is my V(out)? If thats the case, Im thinking I need a 3.3k and 1.8k ohm resistors. Does that sound correct?

Also, in terms of where I physically connect the voltage divider to, do I parallel the connections where the battery connects to the charger and then connect the +ve side to the ESP GPIO?

Ultimately I am designing a function that needs to go into deep sleep, wake up every hour, obtain a battery voltgage and read a temperature value from a DS18b20, write these into a database and then go back to deep sleep for the next hour. The aim is to minimise charging requirements, so I dont want something that will constantly be sucking up juice!

Thanks

Jon

---

<div class="post-metadata">

**Author:** ![Blayden](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/blayden/32/7535_2.png) [@Blayden](https://forum.core-electronics.com.au/u/Blayden)\
**Post date:** [12 January 2026 02:58 UTC](https://forum.core-electronics.com.au/t/esp32-determining-lipo-battery-voltage/23811/4 "2026-01-12T02:58:38Z")

</div>

Hey Jon,

Typically, most projects use the addition of an [INA219](https://core-electronics.com.au/ina219-high-side-dc-current-sensor-breakout-26v-3-2a-max.html) or equivalent board to do voltage reading. This can then be read via I2C to get an approximate voltage of the battery, easily allowing sensing in most circumstances for portable projects.

This is super handy when working with something like a [Xiao ESP32](https://core-electronics.com.au/seeed-studio-xiao-esp32s3.html), which has a charging IC built in, but does not have the ability to measure battery charge. I have recently started a project using this exact setup and it seems to be the best way of integrating this into a project.

For your use case, this may not be the best use case. You could maybe use a basic MOSFET to allow sensing and a reading on wake to minimise power draw. Just wire it in parallel so that the MOSFET controls the line to the voltage reader and switches it until it gets a reading, then turns off when going into deep sleep.

Cheers,

Blayden

---

<div class="post-metadata">

**Author:** ![Pixmusix](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/pixmusix/32/9719_2.png) [@Pixmusix](https://forum.core-electronics.com.au/u/Pixmusix)\
**Post date:** [12 January 2026 06:06 UTC](https://forum.core-electronics.com.au/t/esp32-determining-lipo-battery-voltage/23811/5 "2026-01-12T06:06:48Z")

</div>

> [@Blayden](#):
>
> Typically, most projects use the addition of an [INA219](https://core-electronics.com.au/ina219-high-side-dc-current-sensor-breakout-26v-3-2a-max.html)

This is cool. Feels like the right choice for this project.
