Lipo Battery monitoring Question
I have a 3.7V Lipo Battery connected to my FireBeetle 2 ESP32 C6. I am using the code sample provided in DfRobot tutorial:
https://wiki.dfrobot.com/SKU_DFR1075_FireBeetle_2_Board_ESP32_C6_Basic_Tutorial
Battery Details:
Brand:PKCELL
MPN:LP785060
Li-Ion
Voltage: 3.7 V
After reading the 12 bit analog value from the analog pin of the battery they use the following calculation:
Serial.print("BAT millivolts value = ");
Serial.print(analogVolts * 2.1218 + 1000); Serial.println("mV");
The mV output value is reporting numbers like:
BAT millivolts value = 5466.39mV
My Question: Is this calculation correct for all Lipo batteries? A measurement of 5.5V for a 3.7V battery seems quite high.
Additional Information about the issue:
I unplugged the battery and ran the code again, its outputting the same as when the battery is connected: 5466.39mV (5.5V). I have also verified that the polarity of the battery is correct.
Jim.Tallent