2020-03-23 05:28 PM
Hi,
Is it possible to use the ADC to monitor the battery supply voltage down to 1.8V just before the micro stops working.
Due to the reference (2.048) I can only correctly read down to 2.4V
Thanks am
Solved! Go to Solution.
2020-03-24 04:23 PM
Actually, even your readings above 2.0V aren't correct.
VDDA: 3.3V, VREFINT: 1393 --> VDDA = 1.21V * 4095/1393 = 3.56V
VDDA: 3.0V, VREFINT: 1512 --> VDDA = 1.21V * 4095/1512 = 3.28V
VDDA: 2.5V, VREFINT: 1900 --> VDDA = 1.21V * 4095/1900 = 2.61V
Also, your VBAT measurements should always be 4095/4 if VDDA=VBAT=VDD, which they aren't.
Is your sample time sufficient? Make it the longest possible.
2020-03-24 04:35 PM
Ahh .. Now we are getting there ... give me 5 mins to note the results
2020-03-24 05:08 PM
Hi TDK,
Changed sample time from ADC_SAMPLETIME_2CYCLES_5 to ADC_SAMPLETIME_640CYCLES_5
With VREFBUF set to external voltage ref and final calculation vdda = (1.21 * VBAT * 3) / VREFINT
Drum roll ......
VDDA: 3.3V, VREFINT: 1443, VBAT: 1309, vdda: 3.290
VDDA: 3.0V, VREFINT: 1592, VBAT: 1309, vdda: 2.986
VDDA: 2.5V, VREFINT: 1924, VBAT: 1310, vdda: 2.472
VDDA: 2.0V, VREFINT: 2424, VBAT: 1313, vdda: 1.964
VDDA: 1.9V, VREFINT: 2559, VBAT: 1314, vdda: 1.861
VDDA: 1.8V, VREFINT: 2704, VBAT: 1314, vdda: 1.763
VDDA: 1.7V, VREFINT: 2867, VBAT: 1314, vdda: 1.664
B.T.W It also seems to work in VREF BUF OFF mode, just the current goes to 110mA !!
This look really good for our application, I will figure out the minimum sample time and then increase it by about 50%
TDK - Excellent job, I was going to give this up much earlier, I really hope I can return the help someday...
If you know how to mark Answered - please do it.
Just gone midnight in the UK, sleep well, stay safe
Alan..
2020-03-24 06:09 PM