LessonThe voltage divider · 17 min
Sensors and knobs: dividers that change
Many sensors are simply resistors whose value changes with the world: light, temperature, moisture, pressure, position. A microcontroller cannot read a resistance - but it can read a voltage. Put the sensor in a divider and its resistance becomes a voltage.
| Sensor | Its resistance | Used in |
|---|---|---|
| LDR (light-dependent resistor) | about 100 Ω in bright light, 10 kΩ indoors, 1 MΩ dark | street lights, night lights, automatic phone-screen brightness (similar sensors) |
| NTC thermistor 10 k (B = 3950) | 33.6 kΩ at 0 °C, 10 kΩ at 25 °C, 3.6 kΩ at 50 °C, 0.7 kΩ at 100 °C | battery packs, chargers, incubators, 3D printers, fridges |
| Soil moisture probe | high when dry, low when wet | irrigation controllers |
| Force-sensitive resistor | falls as you press harder | touch pads, scales |
| Potentiometer | the wiper moves between the two ends | volume knobs, joysticks, settings |

Which way round?
- Sensor at the bottom (from the output to 0 V): Vout rises as the sensor's resistance rises.
- Sensor at the top: Vout falls as its resistance rises.
- Either works: choose whichever makes your program read naturally ("bigger number = darker").

The NTC (10 kΩ at 25 °C) sits on top of a 10 kΩ resistor on 5 V. What is Vout at 0 °C, 25 °C and 50 °C?
- 0 °C (33.6 kΩ): 5 × 10 / (33.6 + 10) = 1.15 V.
- 25 °C (10 kΩ): 5 × 10 / 20 = 2.50 V.
- 50 °C (3.59 kΩ): 5 × 10 / 13.59 = 3.68 V.
Answer: 1.15 V, 2.50 V and 3.68 V. Not a straight line - a program converts the voltage back to °C with a formula or a table.
Choosing the fixed resistor
To get the biggest change of Vout over the range you care about, make the fixed resistor the geometric mean of the sensor's two extremes:
- Rmin, Rmax
- the sensor's resistance at the two ends of the range you want to measure
With 1 kΩ and 100 kΩ the best fixed resistor is √(1 k × 100 k) = 10 kΩ: a 4.1 V swing. Try 1 kΩ or 100 kΩ instead and it shrinks to 2.45 V.
The potentiometer: an adjustable divider

A potentiometer ("pot") is one resistor track with a sliding contact, the wiper. The track above the wiper is R1, the track below is R2, and turning the knob moves resistance from one to the other. Volume knobs, light dimmers' control knobs, joysticks (one pot per axis) and the small screwdriver-adjusted "trimmers" used to calibrate a circuit are all potentiometers.
Where you meet it
An LDR divider (often with a comparator) switches the lamp at dusk.
A 10 k NTC in a divider tells the charger the cells are too hot to charge.
A thermistor divider feeds the controller that switches the heater.
Volume, tone, fan speed, joystick axes: pots as adjustable dividers.
Practice 1A 10 kΩ fixed resistor (top) and an LDR (bottom) are across 5 V. The LDR is 40 kΩ. Vout?
Show the answer
Answer: 4 V
5 × 40 / 50 = 4 V.
Practice 2A pot's wiper is 30 % of the way up from the 0 V end of a 10 kΩ track across 5 V. What is Vout?
Hint
R2 (below the wiper) = 3 kΩ, R1 = 7 kΩ.
Show the answer
Answer: 1.5 V
5 × 3 / 10 = 1.5 V.
Practice 3With the sensor at the TOP of the divider, as its resistance rises Vout:
- rises
- falls
- stays the same
- becomes negative
Show the answer
Answer: B. falls
The sensor takes a bigger share, leaving less across the bottom resistor.
Challenge 4A soil probe reads 50 kΩ dry and 2 kΩ wet. What fixed resistor gives the biggest swing?
Hint
√(Rmin × Rmax).
Show the answer
Answer: 10000 Ω
√(2 k × 50 k) = √(100 × 106) = 10 kΩ.
Challenge 5The thermometer above (NTC on top of 10 kΩ, 5 V) feeds a 10-bit Arduino ADC (0 - 1023 for 0 - 5 V). What number does it read at 50 °C (NTC 3.59 kΩ)?
Hint
First Vout, then N = Vout / 5 × 1023.
Show the answer
Answer: 753
Vout = 5 × 10 / 13.59 = 3.68 V. N = 3.68 / 5 × 1023 = 753.