Hello,
I have a voltage divider, 68K/1M so I can read close to 80 volts on a 5 volt analog pin.
But something is wrong.
I thought I should get a reading (in my case it's 12 bit) and measure the volt with my volt meter.
If I divide the (milli) volts shown on the volt meter by the analog read result I should get how many milli volt 1 unit represents.
This value should than be (more or less) constant over the whole range right?
Well my readings change too much.
At 1.5 volts I read 86 which that should be about 18,10465 milivolt per digit.
At 15.01 volt I read 860. So 860 * 18,10465 = 15,569. This half a volt different.
At 19.889 volt I read 1144 . 1144*18,10465 = 20.712.
At 19889 mv it actually is 17,385489 mv per point and this get more when the voltage gets less.
I read on an old thread that haveing a voltage divider with Mega ohm resisters kan be problematic but they do not say what the symptoms are.
Can it be that the high value resistors are the cause of my drift?
Here a list I made to check.
//31 = 607 mv 19,5806451
//57 = 1050 mv 18,4210526
//86 = 1557 mv 18,10465116
//112 = 2000 mv 17,8571428
//115 = 2050 mv 17,8260869
//170 = 3030 mv 17,8235294
//230 = 4050 mv 17,608695
//288 = 5070 mv 17,60416666
//289 = 5090 mv 17,612456
//319= 5590 mv 17,5235109
//348 = 6100 mv 17,528735632
//407 = 7130 mv 17,51842751
//462 = 8007 mv 17,331168831
//520 = 9009 mv 17,325
//576 = 10040 mv 17,430555555
//721 = 12560 mv 17,42024965
//860 = 15010 mv 17,4534883
//1144= 19889 mv 17,3854895
//1442= 25000 mv 17,3370319