Resistors and Dividers

Basic Electronics

Course 1 · Chapter 3 · Resistors and Voltage Dividers

The resistor is the most common part in any circuit, and the voltage divider (two resistors in series, read from the middle) is the most useful thing you can build with it. Almost every sensor on a robot, from a light sensor to a button to a battery-level monitor, is read through a divider of some kind. This chapter covers how to read and choose resistors (colour codes, standard values, tolerance, power rating), then derives the divider formula, shows what happens when you connect a load to it, and uses it for pull-up and pull-down resistors, potentiometers and a light-sensitive circuit. It builds directly on Ohm's law from Basic Electronics 1 and the series, parallel and meter rules from Basic Electronics 2.

1. Choosing and reading resistors

Types

TypeTypical toleranceTypical powerWhere you meet it
Carbon film±5 %1/8 W, 1/4 W, 1/2 WCheap hobby kits; fine for LEDs, pull-ups, general use
Metal film±1 % (or better)1/4 W, 1/2 WDividers, sensor circuits, anywhere the value matters
Wirewound / power±1 to 5 %1 W to 100 WMotor, heater and load circuits; they run hot
Surface mount (SMD)±1 to 5 %1/16 W to 1/2 WEvery circuit board; value printed as digits (472 = 47 × 102 = 4.7 kΩ)
Variable (pot, trimmer)±20 %0.1 to 0.5 WSection 5

The colour code

Through-hole resistors are too small to print numbers on, so the value is a set of coloured bands. Hold the resistor with the tolerance band (gold or brown, set slightly apart) on the right and read from the left. In a 4-band resistor the first two bands are digits, the third is the multiplier (a power of ten) and the fourth is the tolerance. A 5-band resistor (usual for 1 % metal film) has three digit bands, then the multiplier, then the tolerance.

ColourDigitMultiplierTolerance
Black0× 1
Brown1× 10±1 %
Red2× 100±2 %
Orange3× 1 k
Yellow4× 10 k
Green5× 100 k±0.5 %
Blue6× 1 M±0.25 %
Violet7× 10 M±0.1 %
Grey8
White9
Gold× 0.1±5 %
Silver× 0.01±10 %
4-band examples (digit, digit, multiplier, tolerance) brown black red gold = 1 0 x 100 = 1,000 ohm = 1 k +/-5 % yellow violet red gold = 4 7 x 100 = 4,700 ohm = 4.7 k +/-5 % brown black orange gold = 1 0 x 1000 = 10,000 ohm = 10 k +/-5 % orange orange brown gold = 3 3 x 10 = 330 ohm +/-5 % 5-band example (digit, digit, digit, multiplier, tolerance) yellow white white brown brown = 4 9 9 x 10 = 4,990 ohm = 4.99 k +/-1 % Tolerance turns one value into a range 4.7 k +/-5 % : 4,700 x 0.95 = 4,465 ohm to 4,700 x 1.05 = 4,935 ohm
Reading tip
If you cannot tell which end is which, find the end whose band is nearest the edge: that is the first digit. When in doubt, measure it with the multimeter (Basic Electronics 2), with the resistor out of the circuit. The code tells you what the maker intended; the meter tells you what you have.

Why 4.7 k and not 4.5 k? The E-series

Resistors are made in a fixed set of preferred values, called the E-series, spaced so that each value is a fixed ratio above the last. The E12 series has 12 values per decade, so the ratio is 101/12 = 1.212. Rounded to two digits it gives:

E12 (+/-10 %): 12 values per decade, ratio 1.212 between neighbours 10 12 15 18 22 27 33 39 47 56 68 82 (then 100, 120, 150 ...) Calculated: 10 x 1.212^n = 10, 12.1, 14.7, 17.8, 21.5, 26.1, 31.6, 38.3, 46.4, 56.2, 68.1, 82.5 --> rounded to the table above E24 (+/-5 %): adds 11 13 16 20 24 30 36 43 51 62 75 91 E96 (+/-1 %): 96 values per decade (e.g. 10.0, 10.2, 10.5, 10.7 ... 4.99, 5.11) Why this spacing: with +/-10 % tolerance, 10 spans 9 to 11 and 12 spans 10.8 to 13.2. The ranges just overlap, so any wanted value is within about 10 % of something you can buy, and no value is made that another already covers.

In practice a hobby kit holds E12 or E24 values (1 k, 2.2 k, 4.7 k, 10 k, 22 k ...). When your calculation gives an awkward value, pick the nearest standard value and recalculate what the circuit does with it, as the divider design in section 3 shows.

2. Power rating and heat

A resistor turns all of the electrical power it receives into heat. The power is found from Ohm's law three equivalent ways:

P = V x I (definition: volts x amps = watts) Substitute I = V/R: P = V^2 / R Substitute V = I x R: P = I^2 x R Worked example 1: 5 V across 100 ohm I = 5 / 100 = 50 mA P = V x I = 5 x 0.050 = 0.25 W (or 5^2/100 = 0.25 W, or 0.05^2 x 100 = 0.25 W) A 1/4 W resistor is exactly at its limit: too hot to touch, with a short life. Worked example 2: 12 V across 470 ohm P = 12^2 / 470 = 144 / 470 = 0.306 W This exceeds a 1/4 W (0.25 W) rating, so the resistor would burn out.

Safety margin and derating

The rated power is what the part can dissipate at a stated ambient temperature (usually 70 °C) and still last. The manufacturer's derating curve is a straight line falling to zero power at the maximum temperature (typically 155 °C). So the hotter the surroundings, the less the resistor may dissipate:

Allowed power at ambient T (for T between 70 C and 155 C): P_allowed = P_rated x (155 - T) / (155 - 70) = P_rated x (155 - T) / 85 1/4 W resistor in a warm enclosure at 100 C: P_allowed = 0.25 x (155 - 100) / 85 = 0.25 x 55 / 85 = 0.162 W Rule of thumb: choose a rating of at least 2 x the actual power. Example 2 again: need P_rating >= 2 x 0.306 = 0.613 W --> choose a 1 W resistor (a 1/2 W part would run at 61 % of its rating, which is too hot to be comfortable).
Hot resistors
A resistor running at its full rating has a surface temperature that can exceed 100 °C, enough to burn skin and to melt the plastic of a breadboard or wire insulation. If a resistor is hot enough that you notice, it is under-rated. Switch off and recalculate.

3. The voltage divider

Two resistors in series across a supply share its voltage in proportion to their sizes. Take the voltage from the junction between them, and you have a lower voltage than the supply. This is a voltage divider.

Vin o----+ | [ R1 ] (upper resistor) | +-------o Vout | [ R2 ] (lower resistor) | 0 V o---+---------o 0 V (ground)

Derivation

The two resistors are in series (Basic Electronics 1), so one current flows: I = Vin / (R1 + R2) Vout is the voltage across R2 alone (Ohm's law): Vout = I x R2 = Vin x R2 / (R1 + R2) So the output is the fraction R2/(R1+R2) of the input, always between 0 and Vin.

Worked example 1: 5 V down to 3.3 V

This is a real task: a 5 V sensor output going to a 3.3 V logic pin. Try R1 = 1 kΩ and R2 = 2 kΩ.

Vout, using the formula Vout = 5 x 2000 / (1000 + 2000) = 5 x 0.6667 = 3.333 V Divider current and power (the price of a divider is that it wastes current) I = 5 / 3000 = 1.667 mA P1 = I^2 R1 = 0.001667^2 x 1000 = 2.78 mW P2 = I^2 R2 = 0.001667^2 x 2000 = 5.56 mW (total 8.33 mW = 5 V x 1.667 mA) Design in reverse: wanted 3.3 V from 5 V. Choose R2 = 10 k, solve for R1: Vout/Vin = R2/(R1+R2) --> R1 = R2 x (Vin/Vout - 1) = 10 k x (5/3.3 - 1) = 5.15 k Nearest E24 value is 5.1 k: Vout = 5 x 10 / (5.1 + 10) = 50 / 15.1 = 3.311 V (0.3 % from target: good)

Tolerance: how accurate is a divider?

Take the 1 k / 2 k divider above. The worst high output comes when R2 is 5 % high and R1 5 % low, the worst low output the other way round:

5 % resistors High: R1 = 950, R2 = 2100: Vout = 5 x 2100 / 3050 = 3.443 V Low: R1 = 1050, R2 = 1900: Vout = 5 x 1900 / 2950 = 3.220 V Output is 3.33 V +3.3 % / -3.4 % 1 % resistors High: R1 = 990, R2 = 2020: Vout = 5 x 2020 / 3010 = 3.356 V Low: R1 = 1010, R2 = 1980: Vout = 5 x 1980 / 2990 = 3.311 V Output is 3.33 V +0.7 % / -0.7 %

The divider ratio is a little better than the resistors alone suggest, because errors in the two resistors partly cancel, but 1 % metal-film resistors are well worth the extra pennies when the voltage matters (a battery monitor, a reference level).

Loading: what happens when you connect something

The formula assumes nothing is connected to Vout. A load (an input pin, another circuit) of resistance RL connects in parallel with R2, which makes the lower leg smaller and the output lower. This is exactly the meter-loading effect of Basic Electronics 2.

Same divider (5 V, R1 = 1 k, R2 = 2 k), now with a load RL across R2 Lower leg = R2 || RL = (R2 x RL) / (R2 + RL) RL = 2 k: 2k || 2k = 1.000 k Vout = 5 x 1.000 / (1 + 1.000) = 2.500 V RL = 10 k: 2k || 10k = 1.667 k Vout = 5 x 1.667 / (1 + 1.667) = 3.125 V RL = 20 k: 2k || 20k = 1.818 k Vout = 5 x 1.818 / (1 + 1.818) = 3.226 V (-3.2 %) RL = 1 M: 2k || 1M = 1.996 k Vout = 5 x 1.996 / (1 + 1.996) = 3.331 V (no visible error) Rule of thumb: the load should be at least 10 x R2 (3 % error or less here; 100 x R2 for under 0.5 %). Or make R1 and R2 smaller, at the cost of more divider current.

The Thevenin view of a loaded divider

There is a tidy way to see this. From the output terminal, a divider looks like one source in series with one resistor (Thevenin's theorem, 1883). The source voltage Vth is what the output reads with nothing connected. The resistor Rth is what you measure between the output and ground with the supply replaced by a wire (so R1 and R2 are in parallel). Then the load simply forms a second divider with Rth:

Vth = Vin x R2 / (R1 + R2) (unloaded output) Rth = R1 || R2 = R1 x R2 / (R1 + R2) (output resistance) Vout(loaded) = Vth x RL / (Rth + RL) Check with R1 = 1 k, R2 = 2 k, RL = 10 k, Vin = 5 V: Vth = 3.333 V Rth = 1000 x 2000 / 3000 = 666.7 ohm Vout = 3.333 x 10000 / (666.7 + 10000) = 33,333 / 10,666.7 = 3.125 V (matches the direct calculation) Load error is small when Rth is much less than RL. Use this to ask "how stiff is my divider?": a low Rth (small resistors) is stiff, a high Rth is weak.

4. Pull-up and pull-down resistors

A digital input pin reads 1 if it sees a high voltage and 0 if it sees a low one. If nothing is connected to the pin (it floats), it picks up stray electric fields from your hand, the mains wiring and neighbouring wires, and reads randomly. A button that only connects the pin to one rail leaves it floating whenever it is not pressed. The fix is a resistor that gently holds the pin to the other rail until something stronger takes over.

PULL-UP: reads 1 normally, 0 when the button is pressed +3.3 V o----+ | [ 10 k ] (pull-up) | +-------o to input pin | o--/ o-- (button) | 0 V o-----+ PULL-DOWN: reads 0 normally, 1 when the button is pressed +3.3 V o---------+ | o--/ o-- (button) | +-------o to input pin | [ 10 k ] (pull-down) | 0 V o----------+

Each is a voltage divider where one leg is the button (0 Ω closed, infinite open) and the other is the pull resistor:

  • Button open: the input pin draws almost no current (a CMOS input leaks about 1 µA at most). The resistor carries that tiny current, so the voltage across it is I × R = 1 µA × 10 kΩ = 10 mV. The pin sits within 10 mV of the rail it is tied to: a clean logic level.
  • Button pressed: the button shorts the pin to the opposite rail, and the resistor now carries a current of V/R from supply to ground: 3.3 / 10 kΩ = 0.33 mA, which is small and only flows while the button is held.

Choosing the value

Lower limit: pressed-button current and wasted power I_pressed = Vcc / R Want I_pressed to be at most about 0.2 mA R >= 3.3 V / 0.2 mA = 16.5 k (10 k = 0.33 mA is common and acceptable) Upper limit 1: leakage must not drag the level out of range A logic high must be at least about 0.7 x Vcc = 2.31 V on a 3.3 V part, so the resistor may drop at most 3.3 - 2.31 = 0.99 V. With 1 uA leakage: R <= 0.99 V / 1 uA = 990 k (never the real limit) Upper limit 2: speed and noise. The pin and wiring have capacitance C (say 20 pF). Rising edge takes about 3 time constants: tau = R x C 10 k x 20 pF = 0.2 us (fast) 100 k x 20 pF = 2 us (still fine for a button) A high resistance also makes the pin easier for noise to disturb. Typical choice: 4.7 k to 47 k; 10 k is the default for a button.
Internal pull-ups
Most microcontrollers have optional internal pull-up resistors (tens of kilo-ohms, for example 20 to 50 kΩ on an Arduino Uno) that you switch on in software. That saves a part for a simple button, but an external resistor gives a known value, which matters for long wires or noisy places. Basic Electronics 8 returns to pull-ups for open-drain buses, and Basic Electronics 10 shows the code. Pull-up or pull-down is a design choice; with a pull-up the button reads inverted (0 means pressed), which is the common convention.

5. The potentiometer: a divider you can turn

A potentiometer (pot) is a resistive track with a sliding contact called the wiper. It has three terminals: the two ends of the track, and the wiper. The resistance between the ends is fixed (say 10 kΩ). The wiper splits the track into two parts, which makes a voltage divider whose ratio you set with the knob.

Vin o----+ | [ track upper part ] resistance (1 - x) x R | +--------- wiper ---o Vout | [ track lower part ] resistance x R | 0 V o---+ x = fraction of the way from the ground end to the supply end (0 to 1) Unloaded: Vout = Vin x (x R) / R = x x Vin (the output is simply a fraction of the supply)
10 k pot on 5 V, no load: x = 0.25: Vout = 1.25 V x = 0.5: Vout = 2.50 V x = 1.0: Vout = 5.00 V Loaded with RL = 10 k at the wiper (x = 0.5): Lower leg = 5 k || 10 k = 3.333 k; upper leg = 5 k Vout = 5 x 3.333 / (5 + 3.333) = 16.667 / 8.333 = 2.00 V (not 2.50 V: a 10 k load on a 10 k pot is too heavy) Rule of thumb: the load should be at least 10 x the pot value. 10 k pot with a 100 k load, x = 0.5: 5 k || 100 k = 4.762 k; Vout = 5 x 4.762 / 9.762 = 2.44 V (-2.4 %).
  • Linear (B) and logarithmic (A) taper. A linear pot's resistance changes evenly with angle, which is what you want for position and sensor inputs. A logarithmic pot is for audio volume controls, matching the ear's sense of loudness. For robotics use linear.
  • As a variable resistor (rheostat): use only the wiper and one end; the resistance between them goes from 0 to R. Tie the unused end to the wiper to stop the track going open-circuit if the wiper lifts.
  • Trimmers are small pots for one-off adjustment with a screwdriver. Servo and joystick position sensors are often pots too.
  • A pot on an ADC input (Basic Electronics 10) reads a number from 0 to 1023 on a 10-bit converter: at 2.50 V on a 5 V reference the reading is about 2.50 / 5 × 1023 = 512.

6. A light sensor from a divider

A light-dependent resistor (LDR, or photoresistor) is a resistor whose value falls as light on it increases. It is a perfect partner for the divider because a microcontroller reads voltage, not resistance, and the divider turns resistance into voltage.

Typical figures for a small cadmium-sulphide cell (they vary a lot between parts, so measure yours with the meter):

LightLDR resistance (illustrative)
Darknessabout 1 MΩ or more
Dim roomabout 20 kΩ
Bright roomabout 5 kΩ
Bright sunlightabout 500 Ω

Place the LDR as the upper resistor (R1) and a fixed 10 kΩ resistor as the lower one (R2), so the output rises with light:

+5 V o----+ | [ LDR ] (R1: falls with light) | +--------o Vout (to an ADC or comparator) | [ 10 k ] (R2) | 0 V o---+ Vout = 5 x 10 k / (R_LDR + 10 k) Dark R = 1 M: Vout = 5 x 10 / 1010 = 0.050 V Dim room R = 20 k: Vout = 5 x 10 / 30 = 1.667 V Bright room R = 5 k: Vout = 5 x 10 / 15 = 3.333 V Bright sun R = 500: Vout = 5 x 10 / 10.5 = 4.762 V Swap the two parts (LDR at the bottom) and the output FALLS as it gets brighter.

Choosing the fixed resistor. At Vout = half supply, a given change in the LDR resistance gives the biggest change in output. The divider is at half supply when R2 equals the LDR resistance, so choose R2 equal to the LDR resistance at the brightness you most care about: about 20 kΩ for a dim-room detector, 5 kΩ for a daylight detector, 10 kΩ if you want a good compromise over the whole range. Because the LDR changes over several decades, the output is naturally compressed, which is good for an ADC: it gets a useful signal from a vast range of light.

What next?
The divider's output is an analogue voltage. To decide "is it dark?" you compare it with a threshold using a comparator or a microcontroller input; Basic Electronics 7 builds the comparator, and Basic Electronics 10 reads the same divider with an ADC. LDRs are also slow (tens of milliseconds), which is fine for ambient light but useless for detecting flicker or fast pulses; a phototransistor is the answer there.

7. Build it: three dividers

Build the three circuits one at a time, taking each apart before the next. All use the same supply: 5 V from a USB power adapter, a breadboard power module, or the 5 V pin of an Arduino or similar board (use the board only as a power supply for now). If you use 3 AA cells (4.5 V), multiply every voltage reading below by 0.9.

Parts list

PartValueColour code (4-band)
R1 (stage A)1 kΩ, 1/4 Wbrown-black-red
R2 (stage A)2 kΩ (or 2.2 kΩ, with new readings), 1/4 Wred-black-red
RL (load)10 kΩ, 1/4 Wbrown-black-orange
Potentiometer (stage B)10 kΩ linear
LDR (stage C)Small CdS photoresistor
R (stage C)10 kΩ, 1/4 Wbrown-black-orange
Supply5 V (see above)
Breadboard, 4 jumper wires, multimeter

Measure each resistor with the meter and write the value down before you fit it: you will use the measured values to check your calculations.

Stage A: fixed divider and loading

Hole list (one column per connection): J1: + rail -> column 5, row b R1: column 5 row a -> column 10 row a (1 k, upper) R2: column 10 row b -> column 20 row b (2 k, lower) J2: column 20 row c -> - rail RL: column 10 row c -> - rail (10 k load; fit last, remove to compare) Supply + to + rail, supply - to - rail (connect LAST) Measure: red probe on column 10 row e, black probe on the - rail
  1. Wire with the supply disconnected. Check with the meter on Ω between the rails: with RL not yet fitted you should read about 3 kΩ.
  2. Connect the supply and read the supply voltage first (it is rarely exactly 5.00 V).
  3. Read Vout without RL (about 3.33 V), then fit RL and read again (about 3.13 V). Then swap RL for a 2 kΩ resistor (about 2.50 V).

Stage B: potentiometer

Pot legs in columns 25, 26, 27 (row a), left to right, wiper = middle leg J1: column 25 row b -> + rail J2: column 27 row b -> - rail Measure: red probe on column 26 row c (wiper), black probe on the - rail Load test: 10 k resistor from column 26 row d -> - rail

Turn the knob from one end to the other, watching the reading sweep from 0 V to 5 V. Set it to about half way (read 2.50 V) and add the 10 kΩ load: the reading should fall to about 2.00 V.

Stage C: light sensor

Use the stage A layout with R1 = LDR and R2 = 10 k: J1: + rail -> column 5 row b LDR: column 5 row a -> column 10 row a R2: column 10 row b -> column 20 row b (10 k) J2: column 20 row c -> - rail Measure: column 10 row e to the - rail

Before applying power, measure the LDR's resistance in room light, in the shade of your hand, and with a torch on it, and compare your Vout readings against 5 × 10 k / (RLDR + 10 k) using those resistances. Cover the sensor and the output should fall towards 0 V; shine a torch on it and it should rise.

Simulator version

Falstad Circuit Simulator (falstad.com/circuit): add a DC voltage source and set it to 5 V, resistors set to 1 k, 2 k and 10 k (double-click a part to edit its value), and a ground symbol. Hover over the middle node or use the right-click Scope option to see the voltage. For stage B use the Potentiometer from the Passive Components menu (its slider sets the wiper position). If your version has no photoresistor, a second potentiometer or a resistor you edit by hand stands in for the LDR.

Tinkercad Circuits (tinkercad.com): place a breadboard, resistors (their value is set in the panel that opens when you click a part), a Potentiometer and a Photoresistor (click it to move the light slider), a 5 V Power Supply and a Multimeter. Wire per the hole lists above, set the multimeter to volts, and press Start Simulation. To compare against the formula, set the multimeter to Ω, with the supply disconnected, to read the photoresistor's resistance at the slider's current position, then calculate the expected voltage.

Expected readings

MeasurementCalculatedReal (typical)Simulator
A: rail to rail resistance (supply off, no load)3.00 kΩ2.8 to 3.2 kΩ3.00 kΩ
A: Vout, no load3.33 V3.2 to 3.45 V (scales with supply)3.33 V
A: Vout, RL = 10 k3.13 V3.0 to 3.25 V3.13 V
A: Vout, RL = 2 k2.50 V2.4 to 2.6 V2.50 V
B: wiper at half, no load2.50 Vdepends on the knob position2.50 V
B: wiper at half, RL = 10 k2.00 V1.9 to 2.1 V2.00 V
C: LDR 20 k (dim)1.67 Vuse your measured resistanceformula with the shown resistance
C: LDR 5 k (bright)3.33 Vuse your measured resistanceformula with the shown resistance

The real readings scale with the real supply voltage (a supply reading 5.10 V gives 5.10 × 2/3 = 3.40 V in stage A), and resistor tolerance adds a few percent. The result that holds whatever the part tolerances is the ratio: Vout divided by the supply voltage should be 0.667 in stage A before loading, and 0.50 in stage B at half travel.

8. Challenges

Challenge 1: Decode, encode and power
(a) Give the value and the tolerance range of four resistors: brown-black-orange-gold; yellow-violet-red-gold; green-blue-brown-brown; and 5-band red-red-black-red-brown. (b) Write the colour bands for 330 Ω 5 %, 6.8 kΩ 5 % and 100 kΩ 1 % (5-band). (c) A 1/4 W resistor (rated at 70 °C, zero at 155 °C) carries 0.15 W in a box at 100 °C: is that within its derated limit? (d) 12 V is applied across 470 Ω: find the power and the smallest standard rating (1/4, 1/2, 1 or 2 W) that keeps it at or below 50 % of the rating.
View solution
Challenge 2: Design and load a divider
Design a divider from 9 V that gives about 2.5 V with about 1 mA flowing in it, choosing two E24 values. Find the actual Vout, then the Vout when a 10 kΩ load is connected (use the Thevenin method and check it directly). By what percentage does loading change the output? What load resistance keeps the error under 2 %? Finally, rescale both resistors to a tenth of their value and say what you gain and what you pay.
View solution
Challenge 3: Light sensor and pull-up
An LDR measures 500 kΩ in the dark, 15 kΩ in room light and 2 kΩ in bright light, and is the upper resistor of a divider on 5 V. (a) Find Vout for each light level with a 10 kΩ lower resistor. (b) Choose the lower resistor so that Vout is 2.5 V in room light, and find the other two outputs. (c) Choose a pull-up resistor for a push button on a 3.3 V logic input, requiring a pressed current under 0.2 mA, and give the pressed current, the power in the resistor, and the rise time constant with 20 pF on the pin. If you have the parts or a simulator, build (a) and record the readings.
View solution

Quick reference

  • Colour code: digits 0 to 9 = black, brown, red, orange, yellow, green, blue, violet, grey, white; multiplier is the power of ten; gold = 5 %, brown = 1 %
  • E12: 10 12 15 18 22 27 33 39 47 56 68 82 (× powers of ten); E24 and E96 for 5 % and 1 %
  • Power: P = VI = V²/R = I²R; choose a rating of at least 2 × P; derate above 70 °C: P × (155 − T)/85
  • Divider: Vout = Vin × R2 / (R1 + R2); R1 = R2 × (Vin/Vout − 1)
  • Loading: replace R2 by R2 || RL, or use Vth = Vin × R2/(R1+R2), Rth = R1 || R2, Vout = Vth × RL/(Rth + RL); keep RL ≥ 10 × R2
  • Pull-up / pull-down: 4.7 k to 47 k, 10 k typical; pull-up button reads 0 when pressed
  • Pot: Vout = x × Vin unloaded; load at least 10 × the pot value; linear taper for sensors
  • LDR divider: LDR on top, Vout rises with light; make the fixed resistor equal to the LDR at the light level that matters

Next, Basic Electronics 4 moves from parts that only resist to parts that store energy: capacitors and inductors, the RC time constant, and a simple filter and button-debounce circuit.