Electronics · Semester 1 — Analog · Lesson 8 · 55 min · build 2026.09.23-1644

Sensors

The big idea

A sensor is a component the world can push around. Put one in a voltage divider and the world's push becomes a voltage — and a voltage at a transistor's base is a decision waiting to happen. Sense, then decide: nearly every automatic machine ever built runs on these two moves.

1 Today you will…

2 Your kit today

3 Warm-up: the switch, from memory

Kits closed. Draw lesson 7's transistor switch from memory — LED and 220 Ω into the collector, emitter to ground, 4.7 kΩ guarding the base, control wire. Then open the box: the switch is standing where you left it. Check it against your drawing, prove both commands — + rail on, ground off — and say why the dangling wire is not a third command. (Box lost it? Rebuild from your drawing — E-B-C, flat face toward you.) Leave it standing. Last lesson you were the sensor — your hand decided when the base got its whisper. Today the circuit takes that job away from you.

4 New component: the LDR

Two names, one part: the LDR — light-dependent resistor — also sold as a photoresistor. Both names are everywhere; both mean this flat disc. It measures like a resistor because it is one, but its value refuses to hold still: flood the squiggle face with light and the resistance collapses to a few thousand ohms; seal it in darkness and it swells into the hundreds of thousands.

LDR (photoresistor) a resistor with light arrows pointing in: bright = small resistance, dark = huge
either leg, either way
In real life a flat disc with a squiggle face and two legs No stripe, no long leg — it has no direction. The squiggle is the resistor, so light has to be able to land on it: don't bury the face.

Meet it with the meter

Meter on Ω. Seat the LDR across two free rows and touch a probe tip to each leg — fingers on the probes' plastic barrels, never on the metal. Lesson 7's stretch measured why: your body is a ≈ 100 kΩ resistor, and pinched tips wire it in parallel with the disc, dragging the dark readings way down. One partner holds the probes, the other cups. Predict each row before you act it out:

Light on the discPredict: resistanceMeasured — unit too!
Room light, face up— (this is your baseline)
Cupped under both hands
Phone flashlight, point-blank

Read the unit

The meter is autoranging: as darkness piles on, the display can glide from to without ceremony. The unit is part of the number — 0.5 MΩ is five hundred kΩ, not half of one. (The Milli, Kilo, Mega sheet on the math shelf, if you want the whole ladder.)

5 Light becomes a voltage

Here's the problem: the transistor's base doesn't care about ohms. It listens to exactly one thing — voltage. So the sensor's trick is useless to the switch until something translates resistance into voltage. You've owned the translator since lesson 5: the divider. The bigger resistor takes the bigger share, and the tap reads the bottom resistor's share. Make the bottom resistor the LDR, and the tap's voltage follows the light.

The training wheels come off

From this lesson on, builds arrive as drawings alone — no numbered steps. Nothing else changes: one row = one node, the Debugging Loop still runs, and the schematic still tells the whole truth. Read, wire, verify.

+5 V rail 100 kΩ tap V red probe on the tap LDR ground rail — black probe parks here
The sensing stage: fixed 100 kΩ on top, sensor on the bottom, tap between them. The tap reads the LDR's share — cover the disc and its share grows.

Build it from the drawing — the divider shape is an old friend; the only news is who's playing R2. Black probe parked in ground, red probe touching a leg or a bare wire stub in the tap row. Commit to each row first: which way does the tap move, and roughly where does it land?

Light on the discPredict: tap voltageMeasured
Room light
Cupped under both hands
Phone flashlight, point-blank

Wave a hand over the disc and watch the number follow it. That wobble is the whole invention: the room's light is now a voltage, live, at a node on your board. In lesson 5 a knob moved the tap; now the world does.

Predict

Swap the two components — LDR on top, 100 kΩ on the bottom. Now what does cupping your hands do to the tap? (Keep your answer; the challenge will pay for it.)

6 The night-light

Both halves already stand on your board: a sensing stage making a voltage, and the warm-up switch waiting for one. Retire the control wire and let the two stages shake hands — the drawing shows where. The base's rule survives the upgrade: it never meets its signal without its own resistor in between.

+5 V rail 100 kΩ tap LDR 220 Ω C E B 4.7 kΩ ground rail
The whole night-light — wire it from the drawing. Left of the tap: section 5's sensing stage. Right of the 4.7 kΩ: the warm-up switch. Today's build is one retirement (the control wire) and one handshake (the tap).

Predict

Wired and powered, hands still open: what will the LED do the moment you cup both hands over the disc — and why? Commit before you move:

Now do it. Then the debrief: in room light the LDR's share is small, the tap sits low, and the base's door — lesson 7's 0.7 V — stays shut. Darkness swells the LDR's resistance, the tap climbs past the threshold, and the LED wakes: no thumb, no control wire, nobody home. It wakes the way dusk falls — a glow first, brighter as the dark deepens; for a night-light, that ramp is a feature. Two stages, one handshake at the tap — the divider senses, the switch acts. When yours works, look up and wait: the room lights have an appointment.

Find your threshold

Red probe back on the tap, eyes on the number and the LED both. Predict first: lesson 7 already handed you a voltage that should be close — which one? Then close your hands over the disc slowly, like a long eclipse, and write down the tap reading where light first appears in the LED: . That number is your circuit's threshold — measured, not recited. And notice one more thing on the way to full dark: past first glow the number all but stops climbing, while the LED keeps brightening. Stash that observation — the purple box knows what pins it.

7 Challenge: the flip

No new parts: make the night-light's opposite — off in room light, on when a flashlight beam hits the disc. A beam detector. The schematic is section 6's with the divider wiped blank: two slots, over — the LDR lives in one, a fixed resistor of your choosing in the other, and everything from the tap rightward stands untouched. Two decisions are yours: which slot gets the LDR (your section 5 swap-prediction already points there) and how big the fixed resistor must be — your resistance table from section 4 holds that number. Decide, build, measure the tap, iterate. First table with a working beam detector demos it for the room.

Go further — for the fast and the curious

1. Picky night-light: stack the spare 100 kΩ in series with the first, doubling the divider's top. Predict first: does the room now need to be darker, or less dark, before the LED wakes? 2. Sensitivity knob: in the beam detector, make the bottom resistor the pot — wiper plus one leg, lesson 5's adjustable resistor. One knob now sets how bright "bright" means; find the edge where room light alone trips it. 3. Patience — back on the night-light: a 100 µF capacitor from the tap to ground — stripe to ground, out loud. A hand waved over the disc now does nothing; only darkness that stays wakes the LED, a beat later. Predict what the 1000 µF would do before you try it. 4. Feedback: re-plug the night-light's LED so it stares straight at its own LDR, cup both under your hands, and watch closely: a flicker, a shimmer, or a steady dim truce — different builds settle differently. The circuit is sensing its own output — the word is feedback. Explain whatever yours does.

The math, for the curious — always optional

The night-light is lesson 5's divider formula with one resistor that won't sit still — R is whatever the LDR reads right now, before the base is connected:

tap=5 V×RR+100 k

Room light, R ≈ 10 k — under the base's 0.7 V, so the LED stays dark:

5×101100.45 V

Cupped, R ≈ 250 k, the same arithmetic says 3.6 V — but your meter won't: once the base conducts, it pins the tap just above 0.7 V, and the divider's extra push becomes base current instead of tap voltage. That's lesson 5's loading, and it's what the threshold hunt showed you: past first glow, brightness moves while the tap stands still.

The LED first stirs when the formula's answer clears ≈ 0.8 V, which works out to R ≈ 19 kΩ — about one-fifth of the top resistor, give or take the part-to-part spread in gain and base voltage. That's the design rule hiding in this build: the fixed resistor decides how dark counts as dark. The Voltage Divider Formula sheet on the math shelf runs the algebra; The Transistor's Arithmetic finishes the story from the tap to the LED.

8 Words to know

sensor
a component whose electrical value the physical world changes — light, heat, sound, touch
LDR · photoresistor
two names for the light-dependent resistor: bright = low resistance, dark = high; no polarity, either way around
stage
a block of circuit with one job; stages hand voltages to each other at nodes — today, a sensing stage feeding a switching stage
threshold
the tap voltage where the switch stage wakes: the 0.7 V the base needs, plus a little push — lesson 7's word, now measured
sensitivity
how much the world must change before a circuit crosses its threshold; set by the fixed resistor — or a pot

9 Exit ticket

On your card: 1. draw the night-light from memory — sensing stage, tap, base resistor, switch stage. 2. One sentence: why does covering the LDR turn the LED on? Hand it in at the door.

Then strip the board — parts asleep in the box, and if the patience capacitor came out to play, the bare 220 Ω drains it first. Next lesson starts with clean rails and a new part that needs the room.