Series, parallel and the voltage divider
The divider, which splits a voltage with two resistors, keeps turning up: ADC inputs, battery voltage measurement, regulator feedback.
Series and parallel
- Series: R = R1 + R2. The current is the same and the voltage divides.
- Parallel: R = R1·R2 / (R1 + R2). The voltage is the same and the current divides. The combined parallel resistance is always smaller than the smallest resistor.
Voltage divider
Vout = Vin × R2 / (R1 + R2)
To measure a 12 V battery with a 3.3 V ADC, set the maximum near 3.0 V.
- R1 = 30 kΩ, R2 = 10 kΩ → 12 V × 10/40 = 3.0 V
- If the battery rises to 14.4 V this becomes 3.6 V, beyond the ADC range. Set the ratio for the maximum voltage.
Criteria for the size of the resistors
| Too small | Too large |
|---|---|
| Current leaks through the divider all the time and drains the battery | The ADC sampling capacitor cannot be filled quickly and the reading is low |
| Resistors heat up | Sensitive to noise |
10 kΩ to 100 kΩ is usual. With large values, put a 100 nF capacitor on the ADC input to supply the charge at the sampling instant.
Other uses
A regulator's output-voltage setting resistors (the FB pin), a comparator reference and level shifting are all voltage dividers.
The divider in one line
Connect two resistors in series and take the voltage from the middle:
Vout = Vin × R2 / (R1 + R2) (R1: upper, R2: lower)
To measure a 12 V battery with a 3.3 V ADC, R1 = 30 kΩ, R2 = 10 kΩ gives 12 × 10 / 40 = 3.0 V. That sits inside the ADC input range with margin.
Adding a load changes the value
The formula only holds on the assumption that no current is taken from the middle. With a load resistance RL on the output, R2 and RL are in parallel and the voltage drops.
| Condition | Equivalent lower resistance | Vout |
|---|---|---|
| No load | 10 kΩ | 3.00 V |
| RL = 100 kΩ | 9.09 kΩ | 2.79 V |
| RL = 10 kΩ | 5 kΩ | 1.71 V |
So a divider output is connected only to places with a very high input resistance (an ADC, an op-amp buffer, a MOSFET gate). This is why trying to make a 3.3 V supply for a chip with a divider fails.
3D labRun what you have read so far→Choosing values when connecting to an ADC
- Too small: 1 kΩ + 330 Ω on 12 V draws 9 mA all the time. A waste in a battery device.
- Too large: the sampling capacitor inside the ADC cannot be charged in the given time and the reading is low. Check the "maximum source impedance" in the datasheet. To go beyond tens of kΩ, put a 100 nF capacitor on the output to supply the momentary current.
- Tolerance: two 5% resistors can throw the ratio off by nearly 10%. Use 1% resistors for voltage measurement.
Quick estimates for parallel resistors
- Two equal values in parallel give half.
- If one is 10 times larger or more, the result is close to the smaller one (10 kΩ ∥ 100 kΩ ≈ 9.1 kΩ).
- The combined parallel resistance is always smaller than the smallest resistor. If your result is larger, it is wrong.
A pull-up resistor is a divider too
On a button input, a 10 kΩ pull-up and the pressed button (nearly 0 Ω) form a divider. If worn contacts reach about 1 kΩ, you get 3.3 × 1 / 11 = 0.3 V, and this has to be below the input LOW threshold (usually 0.3 × VDD ≈ 1.0 V) for correct operation.
Check yourself
- To bring 5 V down to a 3.3 V logic input, what should the ratio of R1 to R2 be?
- In the table above, roughly what is Vout if RL is 1 MΩ?