Level 4 · Motion · project 3 of 8 · 25 min · ●●●○○

Sunrise Fan

Sunrise Alarm with the LED swapped for a motor. The sun rises, the fan starts — an automatic wake-you-up desk breeze.

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

you'll learn: Voltage dividers · Transistor switching · Ohm's law · Series & parallel

Circuit map

The circuit you'll build, running on the Workbench right now.

simulating…

If it doesn't work

The boring ways this circuit actually breaks — check these first before you unwire everything.

  • Fan doesn't spin at sunrise. Divider wrong — LDR on TOP (same as Sunrise Alarm). Then 2N2222 pins E-B-C (flat face toward you). Then diode across the motor with the banded end toward +.
  • Fan spins in the dark, not the light. Divider flipped. Swap the LDR and the 10 kΩ so the LDR sits on top.
  • Motor stalls even when the transistor is on. Batteries can't push the motor. Fresh AAs or NiMH; the coil pulls ~150 mA at start.
  • Motor spins but not from full stop. Static friction. Give the blade a nudge; the transistor's cut-in is soft.
  • Transistor gets hot. Base 1 kΩ missing? The base needs current-limiting between the divider midpoint and pin B.
  • Diode gets hot. Diode wired in series with the motor. It goes ACROSS the motor with the banded end (cathode) toward +.

What you're building

Take everything from Sunrise Alarm (Level 3), lift out the LED and its 220 Ω safety resistor, and drop in a motor with a flyback diode in their place. That's it. The whole sensing half is unchanged — LDR on top, 10 kΩ on bottom, 1 kΩ base resistor into the 2N2222.

Cover the sensor: fan stops. Uncover it (or wait for the sun to rise on the windowsill): fan turns on. Automatic breeze the moment daylight hits.

This project is where "one brain, many mouths" earns its keep. The brain is a Level 3 pattern you already own. The mouth is a Level 4 motor + diode you learned in First Spin and Handheld Fan. Combining them takes maybe ten minutes if your Sunrise Alarm is still on the breadboard.

Reuse from Level 3 (the "brain")

  • Voltage divider: LDR on top (~1 kΩ bright, ~100 kΩ dark), 10 kΩ on bottom. Middle voltage rises with brightness.
  • Base resistor: 1 kΩ between the divider's middle node and the transistor's base. Politely limits base current.
  • 2N2222: turns on when the base sits above ~0.7 V. β ≈ 200.

New at Level 4 (the "mouth")

  • DC motor: ~30 Ω coil, spins from ~2 V up.
  • 1N4001 flyback diode: cathode toward battery +, anode to the motor's low side. Reverse-biased and invisible while the motor runs; catches the coil's inductive kick the instant the transistor turns off.

Compare to Sunrise Alarm: same left half of the circuit, but the right half went from "220 Ω → red LED" to "motor with a diode across it". No new physics — you already know both parts.

Do the math

Bright morning (LDR ≈ 1 kΩ on top, 10 kΩ on bottom):

  • If nothing were pulling current at the middle node, the divider would sit at 4.5 × (10 ÷ 11) ≈ 4.1 V — well past the 0.7 V wake-up line.
  • In reality, the base clamps that middle at whatever keeps the base at ~0.7 V. Walking the KCL at the middle node with the base junction acting as a diode:
    • Top (LDR ≈ 1 kΩ): sinks current from +.
    • Bottom (10 kΩ): drains a tiny bit to .
    • Base leg (1 kΩ base resistor + 0.7 V base): drains what's left.
    • Solving: V_middle ≈ 2.48 V, and the base resistor sees 2.48 − 0.7 = 1.78 V across itself.
  • I_base ≈ 1.78 V ÷ 1 kΩ = 1.78 mA.
  • β × I_base ≈ 200 × 1.78 = 356 mA — the transistor is deep in saturation for a 143 mA motor.
  • Motor sees 4.5 − 0.2 = 4.3 V across its 30 Ω coil. I_motor = 4.3 ÷ 30 ≈ 143 mA. Full spin.

Night (LDR ≈ 100 kΩ):

  • Divider middle: 4.5 × (10 ÷ 110) ≈ 0.41 V. Nowhere near the wake-up line. Transistor off. Motor idle.
  • Battery drain: microamps of leakage. You can leave this armed for weeks without touching the AAs.

The threshold isn't sharp — as the room dims through morning into afternoon into dusk, the transistor doesn't snap; it fades through its analog region. You'll see the motor spin up gradually as the light rises and coast down slowly as it fades. This is the same "analog mush" Automatic Night Light and Curfew Beeper showed, but this time you can feel the mush in the breeze on your palm.

Compare to Sunrise Alarm

Same left half, different right half:

Sunrise Alarm Sunrise Fan (this)
Trigger LDR + 10 kΩ divider LDR + 10 kΩ divider
Base resistor 1 kΩ 1 kΩ
Transistor 2N2222 2N2222
Output lane 220 Ω + red LED motor + 1N4001
Current when firing ~11 mA ~143 mA
Sound when firing silent soft motor whine
Breeze when firing none measurable

The current jumped 13× and the transistor still handles it comfortably. That's what β ≈ 200 buys you: one brain, many mouths, some of them thirsty.

Build it

If your Sunrise Alarm is still breadboarded, this is a one-minute upgrade: pull the 220 Ω and the LED; drop in the motor + 1N4001 diode in their place.

Fresh build:

  1. Power rails: battery + to a top row, battery to a bottom row.
  2. The sensing half (from Sunrise Alarm): battery +LDRmiddle row10 kΩ → battery .
  3. The base link: middle row → 1 kΩ → transistor Base.
  4. The transistor: flat face toward you, Emitter to rail, Collector to a fresh row A.
  5. The motor lane: motor between the + rail and row A. Its + side (arbitrary — motors don't care) at the top.
  6. Flyback diode across the motor: cathode (banded end) in the + rail row, anode in row A. Same placement as First Spin and Handheld Fan.
  7. Point the LDR at a lamp: fan spins. Cover the LDR with your palm: fan slows and stops in a second or two (the paper blade coasts).

If nothing moves in bright light, first check that the transistor saturates — swap the LDR for a plain 1 kΩ resistor in the top of the divider. That forces the "bright" case and should spin the motor flat out. If that works, your bug is on the sensor side (check LDR leads, socket the bead makes proper contact); if it doesn't, the bug is on the output side (E-B-C order, motor leads, diode direction). Same split-the-circuit debugging as Warm Hand Alarm.

Where to place it

  • East-facing windowsill: the "sunrise fan" story. The fan wakes with you as the room lightens.
  • Desk under a lamp: the fan runs whenever your reading lamp is on. Turn the lamp off and the fan spins down with it.
  • Fridge/pantry: no. Room-temperature interiors that flip from dark to blindingly bright when opened would make the fan slam on hard every time the door swings. Save the LDR for slower daylight transitions.
  • Under a bed as a "morning wakeup" fan: works, but the transition is analog — you'll get a slow speed-up as your bedroom lightens, not a startling on. Which is arguably better than the phone-alarm approach.

The pattern for every level from here on

Level 3's "sense → decide" brain plus Level 4's "spin → protect" mouth is the template for every powered movement on the site:

  • Level 5 replaces the motor with a servo that turns to a specific angle instead of just spinning.
  • Level 7 replaces the LDR with an Arduino pin so a program decides when to spin.
  • Level 9 uses two of these side by side to drive robot wheels.

Every one of those is this circuit with pieces upgraded.

🧠 Your challenge

No single right answer. That's the point.

  • Flip the trigger. Swap the LDR and the 10 kΩ (LDR to bottom, 10 kΩ to top) — the Automatic Night Light brain. What does the fan do now? (Answer: fires when it's dark, quiet when it's bright. You've built a "vampire fan" — a fan for your bedroom that only runs at night. Great for a warm sleeper.)
  • LED plus fan. Fan a second lane off the collector: a 220 Ω and a red LED, in parallel with the motor lane. Now the fan and an indicator light both come on together — same trick as Dusk Chorus but with a motor as the second mouth. What's the collector current now? (≈ 143 mA motor + ~11 mA LED = ~154 mA. Well inside the transistor's 600 mA ceiling and its saturation drive.)
  • Two fans. Wire a second motor + diode in parallel with the first. Battery pulls ~290 mA now — still fine for fresh AAs, but you might notice the middle-node voltage sag a little from the extra base current. Is the transistor still saturated? (Roughly β × 1.78 mA = 356 mA capable, motors ask for 290 mA — yes, still saturated but not as deep.)
  • Predict the fade. Cover the LDR gradually with a sheet of paper. Does the motor stop suddenly or fade out? Why? (Fade out — as the LDR climbs from 1 kΩ toward 100 kΩ, the middle-node voltage crosses 0.7 V somewhere in the middle, and the transistor drifts out of saturation into its analog amplifier region. Motor current drops smoothly with light.)
  • Add a manual override. Put your slide switch in the motor lane (between + and the motor). Now you can turn the fan off manually even in bright light — an "away" switch. Draw the schematic first.

For grown-ups: safety notes

  • Battery-safe throughout — 4.5 V and ~150 mA won't shock you. Warm-touch parts under normal use: the transistor and the motor case, both slight, both fine.
  • Diode orientation matters. Cathode (banded end) toward battery +. Reversed, the diode is forward-biased whenever the motor is running and it will heat up fast. Disconnect and flip it if you see it warming.
  • Transistor orientation matters. Flat face toward you, legs left-to-right are Emitter, Base, Collector. Wired backwards, the 2N2222 might work for a while but will run hot. If it's hot to the touch within 30 seconds of the fan starting, disconnect and re-check.
  • The paper fan blade is the fastest-moving part in this project (~6,000 RPM unloaded). Tie back long hair; keep loose sleeves clear of the shaft. It can grab hair or ribbon, though it can't cut skin.
  • Don't leave this unattended in strong sun for hours — not because the electronics are unsafe, but because a battery pack cooking on a sunny windowsill wears the AAs faster and the LDR's plastic housing ages.
  • The 1N4001 is rated for 1 A continuous; it will never see more than the coil-decay pulse from a 143 mA motor, which is measured in hundreds of microamps. It'll outlive everything else in the circuit.
  • Never wire this to mains. All parts are 4.5 V-safe.

Checked against

Keep building