# Does the value of a resistor matter when doing voltage division to cut it into a half?

I have a 7.4V (8.4V when fully charged) battery that is connected to an Arduino and I need to monitor the battery. To do so, I need to plug the battery into an analog pin. However, that pin only accepts voltages from 0-5V, and returns a value from 0-1023. Therefore I want to cut that 8.4V when fully charged into 4.2V. I understand I need to use voltage division where the resistors are both equal, does it matter which resistors? $10\text{k}\Omega-10\text{k}\Omega$ vs $1\text{k}\Omega-1\text{k}\Omega$?

• Well you certainly wouldn't want to use 1Ω-1Ω because you'd be dissipating watts of power. You wanna size it small enough that you're not wasting power but large enough that it can drive the output.
– ACD
Commented Sep 18, 2014 at 15:41
• Roughly speaking the tradeoff in this case is the power consumed by the divider vs. the delay in charging the sample & hold in the Arduino. Commented Sep 18, 2014 at 16:04
• As @copper.hat says, also consider the effect of I/O pin leakage. If the maximum leakage is +/-1uA (full temperature range) then 10K source impedance will affect the result by only +/-0.2%, which is pretty much negligible but significantly higher values of source resistance may be cause for concern. Commented Sep 18, 2014 at 17:15
• See electronics.stackexchange.com/q/107741/11869 as well. Commented Sep 19, 2014 at 6:29

The Atmel data sheet says "The ADC is optimized for analog signals with an output impedance of approximately 10KΩ or less. If such a source is used, the sampling time will be negligible".

To have an impedance of 10K$\Omega$ or less, the resistors in the divider should be 20K or less. As others have pointed out, lowering the resistors consumes more power, so using 20K resistors makes sense to me.

simulate this circuit – Schematic created using CircuitLab

Edit: To explain the source impedance looking into the "middle" of the divider and the top:

If the top of the divider goes to a 'stiff' voltage (a battery in this case), the impedance looking into the center point is 20K||20K. You can think of it as 20K||(20K+Rs) where Rs is the source resistance of the battery (or whatever the top of the divider is connected to). Since Rs << 20K, it's very close to 20K||20K = 10K. If you were to disconnect the battery, (Rs $\rightarrow\infty$) it would be 20K.

The impedance from the point of view of the battery (looking down into the divider) is about 20+20 = 40K, so the drain is only a couple hundred uA. That is because the input impedance of the ADC is very high and is in parallel with 20K, so it's about equal to 20K, and it's in series with another 20K.

• In a voltage divider circuit with two 20K resistors in series, won't your impedance at the center point be 20K, not 10K? Commented Sep 18, 2014 at 18:16
• @RobertHarvey If the top of the divider goes to a 'stiff' voltage (a battery in this case), the impedance looking into the center point is 20K||20K. You can think of it as 20K||(20K+Rs) where Rs is the source resistance of the battery (or whatever the top of the divider is connected to). Since Rs << 20K, it's very close to 20K||20K = 10K. The impedance from the battery pov is about 20+20 = 40K, so the drain is only a couple hundred uA. Commented Sep 18, 2014 at 18:35
• @gbulmer ... done. Commented Sep 18, 2014 at 19:54
• Another thing to consider is adding a capacitor to ground right at the ADC input pin. The ADC input is usually a switched capacitor input - a small sampling capacitor gets connected to the pin for some period of time, then disconnected and the charge measured. The bigger the source impedance, the more droop that sampling cap will cause. If you put a 'large' cap in parallel, the charge will come out of that cap instead of being pulled through the resistor, causing less droop. This allows you to use larger resistors, limiting the current draw from the source, at the expense of bandwith. Commented Sep 19, 2014 at 4:31

It doesn't fundamentally matter - you'll get half the input voltage regardless of resistor value. However, it should be obvious that if you use extremely large values, the amount of current the voltage divider will be able to source/sink will not suffice for the analog in pin, as it does have some, if very little, capacitance and leakage current.

So the goal is to find the maximum resistor value that will reliably interface to the arduino pin.

From my own experience I guess 10k resistors will do fine without wasting too much power.

The rule of thumb to size the resistors is to make sure the bias current of the unloaded divider is about $10\times$ the load current to make sure the divider isn't loaded down too much (but the resistors are still as large as possible). This gives you two equations and two unknowns:

$$\frac{R_2}{R_1 + R_2}V_{\text{IN}} = V_{\text{OUT}}$$

$$I(R_1 + R_2) = V_{\text{IN}}$$

where $R_{2}$ is the lower divider resistor and $I$ is the bias current of the unloaded divider (which you set to $10\times$ the load current using the rule of thumb).

An improvement to the divider would be to add an op amp buffer to the output of the voltage divider:

simulate this circuit – Schematic created using CircuitLab

The op amp non-inverting input at the output of the voltage divider has a very low bias current so you can use very large resistors in the divider. If you choose an op amp with a very low supply current you can actually use even less power than you would need with the divider by itself. The trade-off is, of course, the added complexity of the op amp.

• The value of adding the op-amp is so you can use much larger resistors for R1 and R2, which reduces the "wasted" current through the divider. Commented Sep 18, 2014 at 17:00
• the wasted current for dividing 8V by 2x20k is ~200uA, which is less than most low-power op-amps use. Do you know of a sub-100uA op-amp which would give a significant improvement? Also having an op-amp makes it harder to turn it off - without the op-amp you can easily either tie the high side to a gpio output or add a fet so the current is zero unless you are measuring the voltage. Commented Sep 18, 2014 at 22:25
• @PeteKirkham A few minutes searching yields the LPV511: $1.75\mu$A max supply current at 12V supply, and it's unity gain stable. In any case, the question did not specify a load current so I included the op amp buffer tip.
– Null
Commented Sep 19, 2014 at 0:05
• @copper.hat No, it is a switched capacitor input, not a high impedance input. A small sampling capacitor is connected and charged up. This capacitance will cause voltage droop if the source impedance is too high. Commented Sep 19, 2014 at 4:35
• @alex.forencich: I hadn't considered that. The atmega docs. list the analog input resistance for the ADC as (typ.) 100 MOhm, so I just assumed they had some internal buffering on the s/h... (However, it shows the 'analog input circuitry' as a switch in series with a '1...100 kOhm' resistor and a 14pf cap., so I'm now more confused that ever.) Commented Sep 19, 2014 at 6:19

Mathematically, it doesn't matter. Two 1 kΩ resistors or two 10 kΩ resistors will both divide the voltage in half.

Practically, you should use the higher values, maybe going to 33 kΩ or 47 kΩ. The two 1 kΩ resistors will draw around 4 mA. Two 47 kΩ resistors bring that down to less than 0.1 mA.

If run time is important, use the higher values, else use what you like or have handy.

I would put a 100 nF capacitor (maybe 10 nF for the larger resisitors) from the middle point to ground to filter out noise.

To determine the optimal value, you must know the input impedance of the A / D converter. Suppose that it has a value of 10k. If you make the voltage divider with two resistors 10k, it will work fine ... until you connect the A / D converter. Why? Because the input impedance of the A / D is comparable with the resistance of the divider. Then, following the example, if your A / D converter has 10k input impedance, the voltage divider in question, should be implemented with resistors 1k or even lower, so that when you connect in parallel the converter impedance of 10k, this value not appreciably affect the value of the divisor resistance.

simulate this circuit – Schematic created using CircuitLab

As schematics show, without the A/D connected

$$V_O = \dfrac{V_{in}}{2}$$

but if $$\R_{AD}\$$ is comparable with $$\R\$$

$$V_O = \dfrac{V_{in}\cdot (R \vert\vert R_{AD})}{R + R\vert\vert R_{AD}}$$

In short, the value of the divider resistors, should be as high as possible, but which is not affected by the value of the input impedance of the converter. A rule of thumb is that the divider resistor would be 10 times lower than the impedance of the converter.

• In this case you are charging a cap., so the issue is not that the ADC input resistance distorts the reading, but that it takes longer to charge. You are correct that it is the impedance, but here this is 10-20pf. Commented Sep 18, 2014 at 16:22

Also, in addition to using resistors that won't load the battery too much, also consider the tolerance of the resistors in the voltage divider which influence the accuracy of the measured voltage. Tighter tolerance resistors will permit a more accurate measurement.