[NOOB] No clue how to read voltage level of connected lipo battery (ESP32-ST)

Torsten
Posts: 1
Joined: Wed Apr 04, 2018 10:34 am

[NOOB] No clue how to read voltage level of connected lipo battery (ESP32-ST)

Postby Torsten » Wed Apr 04, 2018 10:45 am

Hi there,

sorry if this is a stupid question, but how do I read the voltage level of a connected lipo battery?

I'm using a esp32 version that has a build in lipo battery charger (ESP32-ST) and all I could find was this pin list:
http://esp32.net/images/eBox/ESP32-ST/e ... Pinout.pdf

Since I have no idea where or if the batter is connected to an ADC pin and I also don't know what SenseVP / SenseVN / VDET1 ect means, I'm currently a bit lost.

I'm using this battery: https://eckstein-shop.de/LiPo-Akku-Lith ... -Connector


Some additional questions in relation to that are:
* Can I read the battery voltage when the USB is plugged in?
* Can I detect if the battery is charging via USB?


I would appreciate any help.

Thanks in advance

don_iguano
Posts: 4
Joined: Wed Apr 04, 2018 12:32 pm

Re: [NOOB] No clue how to read voltage level of connected lipo battery (ESP32-ST)

Postby don_iguano » Wed Apr 04, 2018 3:06 pm

Hi! I don't think a board like this would have battery connected to any ADC pin, that would mean one pin permanently allocated. But you can modify it easily, just use a voltage divider to stay within allowed voltage ranges (e.g. to get it to one half, using two 47k resistors, that will draw 50uA max from the battery so is negligible).

SENSOR_VP etc. - these are for ADC pre-amp, you probably don't need that here.

* Can I read the battery voltage when the USB is plugged in?
You will see the voltage of battery as it is being charged.

* Can I detect if the battery is charging via USB?
Try to find a schematics / find out what controller is used, most of them have a status indicator output, it might be there even if it is not connected to any LED on the board. You could read it via any digital pin (again, a resistor to protect GPIO input might be a good idea).

Who is online

Users browsing this forum: No registered users and 50 guests