Lite / Building Machines That Respond / Week 13
Voltage dividers: turning resistance into a reading
A microcontroller cannot measure resistance, only voltage. So how does a robot know how bright the room is?
Why should I care?
Dividers are how sensors talk to computers. Light sensors, thermistors, potentiometers and battery monitors all rely on two resistors in series turning a resistance or a big voltage into a voltage a chip can safely read.
- Derive and use Vout = Vin × R2 ÷ (R1 + R2).
- Use a divider with a sensor resistor to turn a physical quantity into a voltage.
- Explain how connecting a load to the output changes Vout.
Safety: Everything here is a low-voltage simulation. Never experiment with mains electricity or high-current batteries; real circuits are built only under supervision with a small, current-limited low-voltage supply.
Predict
Two equal resistors are in series across 12 V. What is the voltage at the point between them, measured from 0 V?
- 0 V
- 6 V
- 12 V
- 24 V
Guess first, then reveal
Equal resistors in series take equal shares, so the midpoint sits at half the supply: 6 V. Change the ratio and you change the share.
Discover
Set 5 V with R1 = R2 = 10 kΩ and check Vout. Switch the bottom part to the light sensor and sweep the light from 0% to 100%: which way does Vout move? Then go back to fixed resistors and attach each load in turn. Which load barely changes Vout, and which drags it down?
What the interactive shows (text version)
The divider explorer draws R1 above R2 with Vout taken from the middle and shown on a vertical meter. With 5 volts and two 10 kΩ resistors, Vout is 2.5 volts. With the LDR as the bottom part, Vout falls from about 4 volts in the dark to under 0.3 volts in bright light. Adding a 100 kΩ load barely changes Vout; a 1 kΩ load drags it down to well under half its unloaded value.
Watch (optional)
Watch for: Watch how the loop and junction rules let you solve a circuit step by step. A divider is the simplest case.
Shows the loop and junction rules engineers use to solve circuits with more than one path.
“Circuit Analysis: Crash Course Physics #30” by CrashCourse (opens YouTube; streaming video uses a lot of data)
The video is optional. Everything you need is in this lesson's text.
Understand
Two resistors, one share
A voltage divider is two resistors in series with the output taken from the middle. The output is the bottom resistor's share of the supply: Vout = Vin × R2 ÷ (R1 + R2). 9 V across 10 kΩ (top) and 4.7 kΩ (bottom) gives 9 × 4.7 ÷ 14.7 ≈ 2.88 V.
Sensors in dividers
Replace R2 with a light sensor (LDR). In bright light its resistance falls, so its share falls and Vout drops; in the dark Vout rises. A microcontroller reads Vout and decides 'day' or 'night'. Thermistors and force sensors work the same way.
Scaling down a big voltage
A 12 V battery is too much for a 3.3 V chip's input. A divider with R1 = 27 kΩ and R2 = 10 kΩ gives 12 × 10 ÷ 37 ≈ 3.24 V, so the chip can watch the battery safely.
Loading
Anything connected to Vout draws current and sits in parallel with R2, lowering Vout. Rule of thumb: the load should be at least ten times R2. Microcontroller inputs are usually very high resistance, so they barely load a divider.
Explain it another way
Intuitive
Two people share a pizza in proportion to their size. The 'bigger' resistor gets the bigger slice of the voltage. Vout is the bottom person's slice.
Technical
An unloaded divider has transfer ratio R2/(R1 + R2) and Thevenin output resistance R1 ∥ R2. A load R_L forms a second divider with that output resistance, which is why R_L ≫ R1 ∥ R2 keeps the error small.
Mathematical
Vout = Vin·R2/(R1 + R2). For 5 V, R1 = 10 kΩ, LDR at 50 kΩ (dark): 5 × 50 ÷ 60 ≈ 4.17 V. LDR at 500 Ω (bright): 5 × 0.5 ÷ 10.5 ≈ 0.24 V. A big swing that is easy to read.
Applied
Joysticks and volume knobs are potentiometers: a divider whose ratio you set by turning a shaft. Robot battery monitors and light-following robots both start with a divider.
Derivation: The divider formula
R1 and R2 are in series across Vin, so (with nothing attached to the output) the current is I = Vin ÷ (R1 + R2).
Vout is the voltage across R2: Vout = I × R2.
Substitute: Vout = Vin × R2 ÷ (R1 + R2).
Checks: if R2 = R1, Vout = Vin/2. If R2 ≫ R1, Vout → Vin. If R2 → 0, Vout → 0. Vout is always between 0 and Vin.
With a load R_L attached, R2 is replaced by R2 ∥ R_L, which is smaller, so Vout drops. Example: 10 kΩ and 10 kΩ on 5 V give 2.5 V; add a 10 kΩ load and the bottom becomes 5 kΩ, so Vout = 5 × 5 ÷ 15 ≈ 1.67 V.
Worked example 1
R1 = 2.2 kΩ, R2 = 3.3 kΩ across 5 V. Find Vout.
Vout = 5 × 3300 ÷ 5500 = 3.0 V.
Common mix-ups
Vout depends only on R2.
✓ It depends on the ratio R2 ÷ (R1 + R2): change either resistor and Vout changes.A divider is a good way to power a motor from a lower voltage.
✓ A load like a motor draws so much current that it collapses Vout. Dividers are for signals, not for power.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Design a light sensor for a night-light robot on a 5 V supply: choose R1 so that Vout is above 2.5 V in the dark (LDR about 50 kΩ) and below 2.5 V in daylight (LDR about 2 kΩ). Test your choice in the divider explorer and record Vout at three light levels.
Reflect
Why must a sensor divider's output feed something with a very high input resistance?
Write your answer on paper or in your own notes. Lite never stores what you write.