Sub topic 12
Where Dividers Are Used: Potentiometers, Sensors, ADC Inputs, and Shunts
This chapter assumes you can apply the voltage divider rule, Vout = Vin × R2 / (R1 + R2), and the current divider rule for two branches. It also assumes you know how a load changes a divider's output. Here we apply those rules to four common jobs.
Potentiometers: a divider you can turn
A potentiometer is a resistor with a third contact, the wiper, that slides along it. The two end terminals connect to the source and ground. The wiper splits the track into R1 above and R2 below, so the wiper voltage is Vin × R2 / (R1 + R2). Total resistance stays constant. Only the ratio changes as you turn the knob.
Loading matters here too. A load on the wiper sits in parallel with the lower part of the track and bends the response away from linear. Keep the load at least ten times the track resistance.
Sensors that change resistance
Thermistors, photoresistors, and flex sensors change resistance with a physical quantity. A divider converts that resistance change into a voltage change. Put the sensor on the bottom and a fixed resistor on top. The sensitivity is greatest when the fixed resistor is close to the sensor's resistance in the range you care about.
ADC inputs
An ADC (analog-to-digital converter) accepts only a limited range, often 0 to 3.3 V. To measure a 0 to 12 V signal, use a divider to scale it down. With R1 = 27 kΩ and R2 = 10 kΩ, the ratio is 10/37 ≈ 0.270, so 12 V becomes about 3.24 V.
The ADC input is the divider's load. The divider also has a source impedance of R1 ∥ R2, here about 7.3 kΩ. Many ADCs need a lower source impedance, or a small capacitor from the input to ground to supply the sampling current.
The following code reads a thermistor divider through a 12-bit ADC and recovers the resistance:
VCC = 3.3
R_FIXED = 10_000
FULL_SCALE = 4095
def code_from_resistance(rt):
vout = VCC * rt / (R_FIXED + rt)
return round(vout / VCC * FULL_SCALE)
def resistance_from_code(code):
return R_FIXED * code / (FULL_SCALE - code)
code = code_from_resistance(20_000)
print(code) # 2730
print(round(resistance_from_code(code))) # 20000The supply voltage cancels out in resistance_from_code. This works only if the ADC reference is the same supply that feeds the divider. A ratiometric setup like this is insensitive to supply drift.
Shunts: current dividers in practice
A shunt is a low-value resistor in parallel with something that can carry only a small current. The two share the total current as a current divider. An ammeter movement that deflects fully at 1 mA with a 50 Ω coil can read 100 mA full scale. The shunt must carry 99 mA at the same voltage as the coil:
def meter_shunt(i_meter, r_meter, i_full):
return i_meter * r_meter / (i_full - i_meter)
print(meter_shunt(0.001, 50.0, 0.1)) # about 0.505 ohmsA related use is the current-sense resistor, placed in series with a load. You measure the small voltage across it, and I = V / R. For 2 A through 0.1 Ω you read 0.2 V and the resistor dissipates I²R = 0.4 W.
Common errors
- Ignoring the ADC input or the next stage as a load on the divider.
- Using high-value resistors, such as 1 MΩ, with an ADC that needs a low source impedance.
- Placing the sensor on the wrong side, which inverts the voltage-versus-quantity direction.
- Choosing a shunt by resistance alone without checking
I²R.
| Application | Divider type | Key design check |
|---|---|---|
| Potentiometer | Voltage | Load much larger than track resistance |
| Resistive sensor | Voltage | Fixed resistor near sensor mid-range value |
| ADC scaling | Voltage | Source impedance and full-scale voltage |
| Meter shunt | Current | Shunt power and tolerance |
Exercise
A 0 to 24 V signal must fit an ADC with a 3.3 V full-scale input. You choose R2 = 10 kΩ. Find R1 so that 24 V maps to exactly 3.3 V, then find the source impedance the ADC sees.
Show answer
The required ratio is 3.3/24 = 0.1375 = R2/(R1 + R2). So R1 + R2 = 10 kΩ / 0.1375 ≈ 72.73 kΩ, which gives R1 ≈ 62.73 kΩ. In practice use 62 kΩ, which gives 24 × 10/72 = 3.33 V, slightly over full scale, or 68 kΩ, which gives 3.08 V. Choose 68 kΩ to stay in range. The source impedance is R1 ∥ R2 = 68 × 10 / 78 ≈ 8.7 kΩ.