OK , i think that if i use two 100kohm resistors everything is going to be fine.. The current draw is really small, less than an Amp(0.045mA) , so it wont cause any trouble at all.. What i need to know more about is the use of capacitor, is that really necessary ? If i understood correctly it should be wired in parallel with R2, right ? like this : http://www.re-innovation.co.uk/web12/images/stories/reimages/blog/solarregulator/Voltage_divider.png
Yes, the capacitor will connect to your ADC pin to gnd. Or like you stated, in parallel with R2, even though its not really the fact that its in parallel with R2 that makes it important.
Also someone else here might be able to answer this but I know with some voltmeters if you measure across a large resistor, say a Meg Ohm or higher depending on the voltmeter you can actually change the circuit enough where what your voltmeter reads is not the voltage at that node when the voltmeter is not connected.
Say your volt meter internal resistance is 1Meg Ohm and you are measuring the voltage across a voltage divider circuit with two 1Meg Ohm resistors. If the source is 10V you would expect to measure 5V correct? Well you would measure closer to 3.333V because the voltmeter added a essentially a 1Meg Ohm resistor in parallel with your second resistor causing the circuit to essentially be a voltage divider between a 1Meg Ohm resistor and a .5Meg Ohm resistor.
This may not apply especially with only a 100K Ohm resistor and I honestly have no idea but perhaps someone else could chime in on this.
edit: I just measured the resistance between one of my analog pins to ground and I got 2.5Meg Ohms. Still unsure if it matters.
Sure, it will affect it, but it is a constant effect. So you take care of this by calibrating it.
100k//2.5M = 96.15k
100k/(100k + 96.15k) = 0.5098
So instead of 1/2 of the battery voltage, it is 0.5098
100*(0.5098 - 0.5)/0.5 = 1.96 or 2%
But I'll bet you are only using 2% resistors to start with, and Vcc is probably further off from 5V than 2%.
This can be compensated for in software, by simply measuring the battery voltage with a decent DMM and seeing what numbers the Arduino gives you, and changing the values in the equation.
To be fair, most good DMMs are only good for 2 or 3% at full scale, plus or minus one count.
That is what I thought, wouldn't really matter for this case. However it is something good to keep in mind when using high resistances.
Good DMM's are way better than 2%, as they use 0.1% resistors throughout,
but back to the plot.
The 100k divider will be accurate, since the ADC takes no current at all (DC), having
an input impedance of at least 10^10 ohms.
The capacitor is needed to charge the sample/hold capacitor in the several microseconds
available when the analog multiplexer is switched at the start of a conversion. Or put
another way the divider has a source resistance of 50k but a source impedance (at
10us timescales) of only around 100 ohms.
The capacitor will also suppress any high frequency noise-pickup.
Wow, you've got me there! Shows how long it has been since I looked at DMM specs. DCV ratings on the Fluke 179 True RMS meter is 0.09% + 2, and for a Mastech MS8268 ($25) is 0.7% + 2.
Thanks for the replies. I will let you know if i try to make that divider ...