Level 4 · Motion · project 11 of 13 · 25 min · ●●●○○

Sun Beacon

Sunrise Fan with a second lane — a yellow LED lights and a motor spins together the moment daylight hits the sensor. One brain, two mouths.

new here? Start with First Light — one battery, one resistor, one LED. It teaches the loop, LED direction, and why the 220 Ω resistor matters.

You'll make a sunrise LED + fan combo
You'll learn one dawn sensor drives two lanes
Watch for LED lane needs its resistor — motor lane needs its flyback diode

What you need

🔧 Try before wiring →

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 spins but LED stays dark. Yellow LED is in backwards. Long leg toward + (through the 220 Ω), short leg toward the collector. A reversed LED in this lane doesn't blow at 4.5 V, it just never lights.
  • LED lights but fan doesn't spin. Motor leads not firmly seated (friction fit — wiggle to seat), OR the flyback diode is wired in series with the motor instead of across it. The diode goes in parallel with the motor, cathode toward +.
  • Neither fires even in bright light. Divider or transistor wrong. Divider: LDR on TOP (same as Sunrise Alarm/Sunrise Fan). Transistor: E-B-C, flat face toward you.
  • Both fire even in the dark. Divider is flipped. LDR must be on top; 10 kΩ on bottom. If the LDR is on the bottom, you've built the Automatic Night Light brain — dark triggers.
  • LED very dim when firing. Wrong resistor on the LED lane. 220 Ω is red-red-brown; a 1 kΩ (brown-black-red) makes it a ghost.
  • Fan stalls at start even though the LED is bright. AA cells sag under the motor's 143 mA. Fresh alkalines or NiMH; the LED alone can look fine at ~10 mA while the pack fails to deliver motor current.
  • Transistor gets warm. Base 1 kΩ missing or the transistor is wired backwards. Check E-B-C first.

What you're building

Take Sunrise Fan: LDR on top, 10 kΩ on bottom, 1 kΩ into the base, 2N2222, motor with a flyback diode across it. Now add a second lane hanging off the same collector — a 220 Ω and a yellow LED, in parallel with the motor lane.

Same sensor. Same brain. Two mouths. When the sun comes up: the LED lights and the fan spins, both at the same instant. Cover the LDR: LED dims and fan slows together. Analog sunrise simulator on your bedside table.

This project is the "one brain, many mouths" idea from Party Spinner (which had a button trigger and three mouths) applied to a sensor-triggered brain (like Sunrise Fan). The transistor doesn't know or care what's hanging off its collector — it just switches to ground on cue, and every lane hanging off the collector node gets to fire together.

Reuse from Sunrise Fan (the "brain")

  • Voltage divider: LDR on top (~1 kΩ bright, ~100 kΩ dark), 10 kΩ on bottom. Bright → middle rises → base wakes.
  • 1 kΩ base resistor between the middle node and the transistor base. Politely limits base current.
  • 2N2222: turns on when the base clamps at ~0.7 V. β ≈ 200 at these currents.

New at this project (the second "mouth")

  • Yellow LED lane hanging off the collector, in parallel with the motor lane. The LED sits behind a 220 Ω speed bump so it draws its safe ~10 mA — same lane as First Light and every LED-plus-transistor project from Level 3 on.

That's it. The wiring on the sensing side is unchanged from Sunrise Fan. Everything new is downstream of the collector node.

Do the math

Bright morning (LDR ≈ 1 kΩ):

Sensing half (from Sunrise Fan, unchanged):

  • Divider midpoint: 4.5 × (10 ÷ 11) ≈ 4.1 V with nothing loading it. In reality the base clamps the middle around 2.5 V while the base-emitter drops its ~0.7 V.
  • Base current: (2.5 − 0.7) ÷ 1 kΩ = 1.78 mA.
  • Collector drive available: β × I_base = 200 × 1.78 = ~356 mA. That's the ceiling; the transistor delivers whatever the lanes ask for up to that.

Output half (now two lanes in parallel):

  • Motor lane: (4.5 − 0.2) ÷ 30 Ω = 143 mA. Full spin.
  • LED lane: (4.5 − 2.0 − 0.2) ÷ 220 Ω = ~10.5 mA. Comfortable brightness, same as First Light.
  • Total collector current: 143 + 10.5 = ~154 mA.
  • Base drive check: 356 mA capable vs. 154 mA asked — the transistor is deep in saturation, plenty of headroom. Both lanes fire at their design currents; neither steals from the other. ✓

Night (LDR ≈ 100 kΩ):

  • Divider midpoint sits around 0.41 V — well below the 0.7 V wake-up line. Transistor off.
  • Motor: 0 mA (transistor holds the collector at ~4.5 V, no path to ground).
  • LED: 0 mA (same reason — the transistor is the switch to ground for the LED's cathode side too).
  • Battery drain: microamps of leakage. You can leave this armed on a windowsill for weeks.

Why lanes in parallel don't fight each other

You might worry that adding an LED lane "steals" current from the motor. It doesn't. Here's the invariant that saves you:

Two lanes in parallel each see the same voltage across themselves, and each pulls its own current based on its own resistance.

The motor lane sees + rail → motor → collector node and pulls 143 mA. The LED lane sees + rail → 220 Ω → LED → collector node and pulls 10.5 mA. They're not haggling over a fixed pool — each just Ohm's-laws its own current based on what's in its lane. Add up the currents at the collector and that's what the transistor has to sink. As long as the base drive is big enough, saturation holds and the collector stays at 0.2 V. That's why adding lanes is easy: no lane changes what the other lanes do, until the total collector current exceeds what the transistor can drive.

Compare to Party Spinner (a button-triggered version of this same pattern with three mouths — motor, buzzer, LED — off one collector). Same math, same idea. This is a sensor-triggered version with two mouths.

Build it

If your Sunrise Fan is still on the breadboard, this is a two-minute upgrade: add the LED lane in parallel with the motor lane, off the same collector row.

Fresh build:

  1. Power rails: battery + to a top row, battery − to a bottom row.
  2. Sensing half (from Sunrise Fan): battery + → LDR → middle row → 10 kΩ → battery −.
  3. Base link: middle row → 1 kΩ → transistor Base (middle leg, flat face toward you).
  4. Transistor: Emitter (left leg) → − rail; Collector (right leg) into a fresh row A — the collector node.
  5. Motor lane: motor between + rail and row A. Flyback diode across the motor: cathode (banded end) in the + rail row, anode in row A. Same as First Spin.
  6. Beacon LED lane in parallel: + rail → 220 Ω → yellow LED long leg → LED short leg → row A.
  7. Point the LDR at a lamp: LED lights and fan spins, together. Cover the LDR with your palm: LED fades out and fan spins down, together. Both mouths track the one brain.

Analog sunrise as a real behaviour

Because the LDR is a smooth resistor (not a snap-action switch), the transistor drifts through its in-between region as the room dims through morning into afternoon into dusk. You don't get a click; you get a fade.

  • LDR at 1 kΩ (full sun): base drive 1.78 mA → collector clamped at 0.2 V → LED at ~10.5 mA, motor at ~143 mA.
  • LDR at 3 kΩ (early morning): base drive drops as the divider mid falls; transistor still saturating but only just. LED ~9–10 mA, motor ~130 mA.
  • LDR at 10 kΩ (dim room): divider mid sits below wake-up. LED microamps, motor stopped.

Point it at an east-facing windowsill and the two mouths glide up together over the hour of dawn — a wake-up device that brightens and whispers a fan, both in analog step with the sun.

Where this pattern leads

This is the exact wiring template used by every "sensor + multiple actuators" gadget at higher levels:

  • Level 5 keeps the same sensor half and swaps the motor for a servo — a needle that moves to an angle instead of spinning. LED still lights. Now you have a bedside sunrise dial.
  • Level 7 replaces the LDR with an Arduino pin so a program decides when to fire the outputs. Same pattern, replaced brain.
  • Level 8 adds a thermistor or a soil sensor so the fan-plus- LED reacts to temperature or dry soil. Different sensor, same wiring past the base.

Every one of those upgrades starts with "keep the mouths, swap the brain".

🧠 Your challenge

No single right answer. That's the point.

  • Which lane is the safety net? If the motor fails (unplug it), does the LED still light when the sun rises? (Yes — the LED lane is independent of the motor lane, so the beacon still tells you the circuit is working. If both go dark, your bug is in the sensing half. If only the motor is quiet, your bug is in the motor lane. The LED is a free diagnostic.)
  • Two LEDs, one fan. Add a second LED lane (another 220 Ω + red LED, in parallel with the yellow one). Total collector current: motor + yellow + red ≈ 143 + 10.5 + 10.5 = 164 mA. Still deeply saturated (356 mA capable). Fresh AAs handle it. Real design lesson: adding indicator lanes is cheap — a couple mA each.
  • Flip the sensor. Swap the LDR and the 10 kΩ (LDR to bottom, 10 kΩ to top) — the Automatic Night Light brain. Do the LED and fan now fire at night instead of at sunrise? (Nearly — but the divider is now high-impedance in the dark, so the base only gets ~0.3 mA of drive. The LED fires; the motor may spin but not at full speed because the transistor drops out of saturation. Real design point: a dark-triggered sensor works fine for LEDs but often can't give a motor its full drive without a helper transistor (Level 6+). Sunrise-triggered sensors — LDR on top — are the easier direction.)
  • Sunset shutdown timing. Cover the LDR gradually (slide a sheet of paper across it). Watch: does the LED go out before, after, or at the same time as the fan? Why? (The LED needs V_mid past ~0.7 V and a saturated transistor drops V_CE = 0.2 V, leaving 4.3 V for the LED's loop. The motor also needs a saturated transistor to see ~4.3 V across 30 Ω. Both lanes drop together when the transistor comes out of saturation. So they die together — and light together. That's the point of parallel lanes off one brain.)
  • Beacon-only mode. Remove the motor lane entirely and leave just the LED + 220 Ω. You've rebuilt Sunrise Alarm (Level 3). Which of the two projects would you actually put on your windowsill? (Sunrise Alarm if you want a quiet wake-up light; Sun Beacon if you want the wake-up light plus the breeze. Same brain, one vs. two mouths — the design choice is about the use, not the electronics.)

For grown-ups: safety notes

  • Battery-safe throughout. 4.5 V and ~154 mA total won't shock you. The transistor stays cool at this load; the motor case warms slightly under sustained spinning.
  • Diode orientation matters most. Flyback diode's cathode (banded end) toward battery +. Reversed, it forward-biases whenever the motor is running and shorts the battery through itself. It heats up fast; disconnect and flip.
  • LED direction matters. Long leg toward + (through the 220 Ω), short leg toward the collector. A backwards LED doesn't blow at 4.5 V but never lights, which will look like the whole beacon lane is dead.
  • Transistor pin order. 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 warm to the touch within 30 seconds, disconnect and re-check.
  • The paper fan blade spins around 6,000 RPM unloaded. Tie hair back; keep loose sleeves clear. It can grab hair or ribbon but can't cut skin.
  • Windowsill placement: the LDR can bake in direct sun for hours without harm, but the battery pack cooking in the sun wears the AAs faster and the plastic parts age. Try to put the LDR where the light hits but the box stays in the shade.
  • The 1N4001 is rated for 1 A continuous; it will never see more than the coil-decay pulse from a 143 mA motor. It'll outlive the LED and probably the motor.
  • Never wire this to mains. Every part is 4.5 V-safe.

Checked against

Keep building