This calculates the resistor values for a voltage divider with specified impedance. This makes it easier to get a target impedance when making a voltage divider for an ADC input. It also allows creation of high impedance dividers when the minimum output impedance of a device needs to be large.
Controlling the impedance allows you to change the amount of current the voltage divider draws. High currents generally allow for faster ADC sample rates, but increase quiescent current draw. For example, an Atmel microcontroller might want an input impedance of around 1k – 10k ohm for full sample rate. Really high currents could also cause the measured voltage to sag, or even damage output pins of sensitive devices.
This calculator solves for the resistances of the divider in terms of the input voltage, Vin; the output voltage, Vout; and the impedance of the divider, Zd. The calculator assumes R1 is closest to the external input, and that the load drawn from between R1 and R2 is negligible.
R1 = Z_d * Vin / Vout
R2 = Zd / (1 – Zd/R1)