Level 3 · Sense · project 5 of 12 · 30 min · ●●●○○
Warm Hand Alarm
Cup your hand over the sensor and the LED lights up — a thermometer that turns into a switch.
new here? Start with First Light — one battery, one resistor, one LED. It teaches the loop, LED direction, and why the 220 Ω resistor matters.
What you need
- 1× 3×AA battery pack (4.5 V) L1
- 1× Solderless breadboard L1
- 6× Jumper wires L1
- 1× Temperature sensor (10 kΩ thermistor) 10 kΩ at room temp — drops to roughly 3–4 kΩ when your hand warms it
- 2× 1 kΩ resistor one is the divider bottom, one protects the transistor base L1
- 1× NPN transistor (2N2222) flat face toward you: legs are E-B-C
- 1× Red LED (5 mm) L1
- 1× 220 Ω resistor L1
you'll learn: Voltage dividers · Transistor switching · Ohm's law
Circuit map
The circuit you'll build, running on the Workbench right now — shown with a warm hand on the sensor.
simulating…
If it doesn't work
The boring ways this circuit actually breaks — check these first before you unwire everything.
- LED never lights, even with a warm hand. Thermistor on the wrong side of the divider. Place it on TOP with the fixed 1 kΩ on the bottom — heat drops the top resistance and lifts the midpoint.
- LED lights all the time. Divider flipped, OR the room is already warm and the thermistor sits low. Move to a cooler surface and try again.
- Nothing at all. 2N2222 pins E-B-C, flat face toward you. Then confirm the base 1 kΩ is between the divider midpoint and pin B.
- LED very dim when on. Wrong resistor in the LED lane. 220 Ω = red-red-brown.
- Trigger too twitchy. Fingers touching the leads warm the bead through the metal. Cup the palm above without touching the leads.
What you're building
A red LED that stays dark in a normal room, but glows within a few seconds of you cupping your hand over the sensor. Take your hand away and it fades back off in about a minute. Nothing to press, no code. The sensor is a thermistor — a resistor that changes with temperature — and your body heat is enough to trigger it.
Once this works, you know the same sensing pattern behind every home thermostat, every 3D-printer hot-end controller, and every car engine temperature gauge.
Meet the thermistor
A thermistor ("THUR-mistor" — thermal resistor) is a small bead of a special metal-oxide material that changes its resistance with temperature. Yours is a 10 kΩ NTC thermistor:
- NTC = Negative Temperature Coefficient. Hotter → less resistance. (There are PTC thermistors that go the other way, but the ones you get in a beginner kit are NTC.)
- 10 kΩ at 25 °C — that's its "nameplate" value at room temperature.
Rough numbers from the typical NTC datasheet curve:
| Temperature | Approx resistance |
|---|---|
| 5 °C (fridge) | ~25 kΩ |
| 25 °C (room) | 10 kΩ |
| 40 °C (warm hand) | ~3.6 kΩ |
| 60 °C (hot mug) | ~1.5 kΩ |
Your body sits at 37 °C on the inside and your fingertips are usually around 30–35 °C. So palming the sensor pushes it maybe 5–15 degrees above the room — enough to drop its resistance by roughly half. That's what we're going to detect.
The voltage divider (from Sunrise Alarm — same trick)
You already know this pattern from Automatic Night Light and Sunrise Alarm: two resistors in a series stack, and the point between them sits at a voltage decided by the ratio of the two:
V_middle = 4.5 V × R_bottom ÷ (R_top + R_bottom)
Same as before. What's new is the sensor: this time the top resistor is the thermistor, and the bottom is a small 1 kΩ (not 10 kΩ like the night light). Here's why the size matters:
- Room, thermistor ≈ 10 kΩ: V_middle = 4.5 × (1 ÷ (10 + 1)) = 4.5 × 0.091 = 0.41 V. Below the transistor's 0.7 V wake-up line. LED off. ✓
- Warm hand, thermistor ≈ 3.6 kΩ: V_middle = 4.5 × (1 ÷ (3.6 + 1)) = 4.5 × 0.217 = 0.98 V. Above the wake-up line. LED comes on. ✓
If you'd used a 10 kΩ bottom (like the night light), the room-temp middle voltage would be 4.5 × (1/2) = 2.25 V — already way past the wake-up line, so the LED would be on all the time. The whole project would fail. The bottom resistor is a threshold knob: smaller bottom = harder to trigger, needs more heat. Pick it to match the sensor's swing.
Do the transistor math
Once V_middle rises above 0.7 V, the transistor's base starts to conduct. The 1 kΩ base resistor on the way in limits the base current politely — and you can solve exactly where things settle.
With warm-hand thermistor ≈ 3.6 kΩ, the base clamps at 0.7 V and KCL at the middle node gives V_middle ≈ 0.86 V (worked out from the divider plus the base's tiny drain), so:
- I_base = (0.86 − 0.7) ÷ 1 kΩ ≈ 0.16 mA
- With β ≈ 200 (from the 2N2222 datasheet), the transistor could push up to 31 mA through the collector — plenty for our LED.
- The LED lane wants: (4.5 − 2.0 − 0.2) ÷ 220 Ω = 10.5 mA (that's battery minus LED forward drop minus the transistor's saturation drop V_CE(sat), divided by the 220 Ω safety resistor).
- 31 mA available, 10.5 mA needed → transistor saturates and the LED glows at a comfortable ~11 mA. Same brightness as First Light.
At room temperature, base current is essentially zero and the LED draws only microamps of leakage. Battery drain at rest is tiny — you can leave this armed all afternoon and barely dent an AA.
Build it
- Power rails: battery + to a top row on the breadboard, battery − to a bottom row. Same as always.
- The divider (sensing half): battery + → thermistor → middle row → 1 kΩ → battery −. The thermistor has no polarity (it's just a resistor), so either leg goes to which side. Mount it so the bead is exposed to the air, not tucked under other parts.
- The base resistor: middle row → 1 kΩ → transistor Base leg. This is the second 1 kΩ in your BOM — don't confuse it with the divider one.
- The transistor: flat face toward you, legs left to right are Emitter, Base, Collector. Emitter → − rail.
- The output lane: battery + → 220 Ω → LED long leg → LED short leg → Collector.
- Power it up in a normal room. LED off. Now cup your palm over the thermistor for 5–10 seconds. Watch — the LED fades on. Take your hand away and it fades back off over 30–60 seconds as the bead cools.
The fade is the interesting part. Because it's a slow analog signal — no snap, no click — you can see the transistor working through its in-between region as your temperature swings past the 0.7 V line. Analog sensors show the change while it happens. Digital switches only flip states.
Debug like an engineer
Same idea as Automatic Night Light: test the halves separately. Here the divider's middle row only ever reaches about 1 V, which is too little to light a test LED, so use the other half as the probe instead. Pull the thermistor out and bridge its two holes with a plain wire: the middle row jumps to nearly 4.5 V, the base gets all the push it could want, and the LED lane should fire at once. If it does, the transistor lane is fine and your bug is on the sensing side (thermistor legs, the 1 kΩ at the bottom, the 1 kΩ into the base). If it doesn't, check E-B-C order first. With a multimeter you can go further: measure the middle row — about 0.4 V at room temperature, rising toward 1 V under a warm hand. Splitting the loop in half turns "nothing works" into "this part works, that part doesn't" — which is 90% of debugging.
🧠 Your challenge
No single right answer. That's the point.
- Fever thermometer. Right now the LED just goes on/off. Add the buzzer (in parallel with the LED lane, both driven from the collector — same trick as the Panic Doorbell). Now the alarm is loud and visible. Roughly how much total current does the battery deliver when it fires? (Add both lane currents.)
- Cold alarm. Swap the thermistor and the 1 kΩ — thermistor on the bottom, 1 kΩ on top. Predict what happens before you power it up. Does the LED come on now when it's warm, or when it's cold? (You just built the same "invert the divider" trick from Sunrise Alarm.)
- Sharpen the threshold. The circuit as built triggers pretty easily — even a mild puff of warm breath sets it off. If you wanted it to only fire on proper body-heat contact (say 35 °C and above), you could shrink the bottom resistor. Work out on paper: with a 470 Ω bottom instead of 1 kΩ, what temperature makes V_middle just cross 0.7 V? (Use the divider formula and the thermistor table above.)
- Two zones, one alarm. Add a second thermistor and a second 1 kΩ divider, feeding the same base through two separate 1 kΩ base resistors. Now touching either sensor fires the LED — and you've quietly built an OR gate with a shared output. Sketch it before wiring, and think about what the base voltage does when both are warm at once.
For grown-ups: safety notes
- Battery-safe throughout — 4.5 V won't shock you, hand-warm or otherwise.
- The thermistor bead is small and glass or epoxy-coated. Don't bite it, don't scratch the coating with tweezers, and don't press on it hard — the leads are the strong part, the bead is the fragile part.
- If you want to test the "hot mug" end of the range, wrap the thermistor in a bit of masking tape and tape it to the outside of a warm mug — never dunk it in liquid. Bare thermistor + water = false readings and a rusted lead. Never touch it to the hot part of a stove, a soldering iron, or an oven.
- The transistor can warm up if it's wired backwards for a long time; if it's too hot to keep your finger on, unplug and re-check E-B-C leg order. Backwards transistors are the #1 classic bug.
- If you leave this armed overnight, keep the breadboard on a hard flat surface (not bedding, not paper piles) — good practice for any always-on project.
Checked against
Keep building
You might also like
shares ideas with this one