Hi,
I'm using a Atmel32u4 / 8Mhz / 3.3v
Atmel powered through a dc-dc buck/boost circuit.
whole project is powered with a single li-ion cell.
I'm trying to measure the battery voltage,
but the first read (4.19) is very accurate and there after all measurements are wrong (3.81).
You are charging a capacitor trough a 50kOhm resistor. @ 100nF the time constant tau is about 5ms. You are sampling every 10ms so, your capacitor is charged to 2 x tau which is not enough for an accurate result. You need about 7 x tau to get within 1LSB for a 10-bit ADC.
I don't think you are going to get any closer.
4.19 - 4.184 = 0.006V
0.006/4.19 = 0.0014 error or 0.14%.
That is better than the 0.5% accuracy that is quoted for the 15B+.
I do calibrate certifications and Fluke 15B+ as with most Fluke will take literally 10s of years to go out of calibration.
Calculate what resolution you are getting from the ADC.
If you are using 1024 ADC and 5V ref.
1 count = 5/1024 = 0.00488Volts
That is the resolution of your ADC.
So 4.19 to 4.184 which is 0.006 is just ONE count out.
Of course I'm happy with 4.19v reading.
But the issue is, there after every consecutive reading gives a 3.81v, even though DMM reads @ 4.184v.
4.19v output come only once when I power up the chip.
I'm using the internal voltage reference of 2.56v and should be 2.56/1024 = 0.0025v
Thanks!
Hi,
What voltage do you read with the Fluke at the Volt_Sen point then at the battery.
Does it agree with the 5.992 divisor that your potential divider exhibits?
Also can you try with lower value potential divider resistors.
Try 4k9 or two 10K in parallel to get 5K,and 1K, just to see if the ADC and circuit impedance is the problem.
Tom...
PS. I'm off to bed, 12:44am here and I very badly need my beauty sleep.