cancel
Showing results for 
Search instead for 
Did you mean: 

Using ADC to monitor supply voltage down to 1.8 Volts

AMurp.1
Associate II

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

13 REPLIES 13
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".
AMurp.1
Associate II

Ahh .. Now we are getting there ... give me 5 mins to note the results

AMurp.1
Associate II

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..

Glad it worked.
To mark a post as answered, select a reply to the post and click "Select as Best" right next to the "Reply" and "Like" option. Only the OP can do that.
If you feel a post has answered your question, please click "Accept as Solution".