Hi,
I've a problem, caused by a bad design (not mine). Now I'm looking for a solution that does not involve HW redesign.
I'm using one channel of the QG8 ADC module to read the voltage from a temperature sensor (a LM20 from National). The problem is that the QG8 Vdd is connected directly to a 3V battery. So when the battery voltage drops, it drops the Vdd, the Vddad and of course the Vhref. So the range of the AD shrinks and I read different values even if the temperature does not change.
The question is: there is a (sw) way to solve this? I think that the internal bandgap reference can have a major role in this, but I don't see how...
Thanks for any hint.
Bye Jack
Solved! Go to Solution.
Hello Jack,
You are correct about needing to use the bandgap reference to compensate for Vdd differences. I would suggest that you immediately follow each measurement of the temperature sensor with a measurement of the bandgap channel. To reduce the effects of any hum/noise on the Vdd line, you might also consider taking multiple pairs of readings, and then averaging the results prior to any calculations using the results.
Now consider the following formulas, where N represents the (10-bit) ADC reading -
Vt = Vdd * Nt / 1024
Vr = Vdd * Nr / 1024
Combining these -
Vt = Vr * Nt / Nr
You can see that the result is no longer dependent on Vdd (provided it is the same for each pair of data).
Regards,
Mac
Hello Jack,
You are correct about needing to use the bandgap reference to compensate for Vdd differences. I would suggest that you immediately follow each measurement of the temperature sensor with a measurement of the bandgap channel. To reduce the effects of any hum/noise on the Vdd line, you might also consider taking multiple pairs of readings, and then averaging the results prior to any calculations using the results.
Now consider the following formulas, where N represents the (10-bit) ADC reading -
Vt = Vdd * Nt / 1024
Vr = Vdd * Nr / 1024
Combining these -
Vt = Vr * Nt / Nr
You can see that the result is no longer dependent on Vdd (provided it is the same for each pair of data).
Regards,
Mac
mmhh, thanks!
I feel a little stupid, I should have known something like this.
Thanks again
Bye Jack