In order to measure a signal which varies over a range greater than the input range of an analog or digital input of a measuring device, a voltage divider can drop the voltage of the input signal to the level the analog or digital input can measure.
A voltage divider takes advantage of Ohm's law, which states,
VOLTAGE = CURRENT * RESISTANCE
And Kirkoff's voltage law which states,
The sum of the voltage drops around a circuit wil be equial to the voltage drop for the entire circuit.
Any variation in the voltage drop for the circuit as a whole will have a proportional variation in all the voltage drops in the circuit.
A voltage divider takes advantage of the fact that the voltage across one of the resistors in a circuit is proportional to the voltage across the total resistance in the circuit.
The trick to using a voltage divider is to choose two resistors with the proper proportions relative to the full scale of the analog or digital input and the maximum signal voltage. The phenomena of dropping the voltage proportionally is often called attenuation. The formula for attenuation is:
A = R1 + R2/ R2
The variable A is the proportional difference between the signal voltage max and the full scale of the analog input.
Therefore, R1 and R2 are both 10K resistors. See the connection diagram below for wiring information.
IMPORTANT NOTE: The resistors R1 and R2 are going to dissipate all the power in the divider circuit according to the equation Current = Voltage / Resistance. The higher the value of the resistance (R1 + R2) the less power dissipated by the divider circuit.