Battery voltage monitor and AD conversion for XIAO_ESP32-S3

Hello everyone ,

On a xiao esp32-s3, I am looking to monitor, like many others, an external battery voltage in 2S, around 8.5v at full charge to an analog port.

Someone on the forum has functional sources with integration of a plan and calculation of resistances to the Analogue port.

Thank you all

Greetings

You could test by using a potentiometer such as this… just make sure not to exceed the voltage… maybe add a led inline… set the potentiometer to 0 and connect to the 8.5v then start running the analogue to digital sketch… then slowly turn the pot till the reading max out at 1023… then STOP!.. do not turn it any higher you will burn out the pin… then measure the resistance of the pot

You might could use a setup such as this

also you need to common the ground

Hi cedric_calais,
Although not an example of -S3, an example of AD conversion of 1S battery voltage with -C3 can be found in the link below.
The input voltage to a port should be divided so that it is less than 2.2V. The function “alalogReadMilliVolts()” can be used to read the corrected voltage values without having to do anything special.

Note that 2S battery cannot be connected to the battery pad on the back of XIAO.

Battery voltage monitor and AD conversion for XIAO_ESP32C