ADC for battery voltage monitor
Hi,
I am using a STM32L4ZIT6 MCU. I want to monitor 4.2V Lipo battery voltage on an ADC pin.
I have experimented two approaches:
First:
I used a 332k - 820k divider in order to drain low queiescent current. This is an high impendance measurement, where RIN = 236k (equal to the parallel of the resistors). According to AN2834, I increased the sample time (640 cycles) and I added by software 50ms of delay between measurements.
However, I always get about +50mV offset compared to real value.
Second:
I used a 100k - 100k divider for a lower impedance with switch mosfet closed only at measurement time, where RIN = 50k. In this case I always get lower values than real values. In this case I reduced sample time.
In both case, a calibration is run at MCU startup. Reference voltage is 3,24V.
How can I improve accuracy? which is the better strategy?
