qg with unregulated supply, keeping the a/d accurate

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

qg with unregulated supply, keeping the a/d accurate

1,857 Views
steve_fae
Senior Contributor I
can I compare the external voltage to lets say the internal bandgap reference in order to keep the a/d accurate as VDD drops since it runs off of the same batteries that the a/d is measuring?  Should I be doing this a different way?
 
sc
Labels (1)
0 Kudos
3 Replies

271 Views
bigmac
Specialist III
Hello,
 
Yes, if Vdd can vary (slowly), you need to calibrate the A/D using either the internal,  or an external reference.
 
The ratio of the unknown reading to the reference reading will be the same as the ratio of the two voltages, and independent of Vdd.  If Vdd changes very slowly (as for a battery supply), the calibration reading need not occur very often, and perhaps it should be the average of a number of readings, so as to minimise random fluctuation of the value.
 
Since the internal resistance of the battery will increase as it becomes flat, all the A/D readings should be done with similar load conditions, especially if heavier loads are present, such as LEDs, etc.
 
Regards,
Mac
 
0 Kudos

271 Views
steve_fae
Senior Contributor I
Any chance that within PE I can read the internal reference?  I looked at the ADC bean, and there was no method for that.
0 Kudos

271 Views
peg
Senior Contributor IV
Hi,
Reading the internal bandgap reference is as easy as just selecting the correct channel (27).
As the device power supply is also the A2D converters reference achieving the desired result should just be a matter of reading this value. As the battery goes flat the value returned will increase in inverse proportion to the battery's voltage. A lookup table perhaps?
 
0 Kudos