Level 4 · Motion · project 4 of 8 · 20 min · ●●●○○

Panic Fan

Two buttons, either one fires the fan. Panic Doorbell wearing a motor — an OR gate that spins.

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: Circuits are loops · Switches · Series & parallel · Transistor switching · Ohm's law

Circuit map

The circuit you'll build, running on the Workbench right now — shown with the switches closed.

simulating…

If it doesn't work

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

  • Fan doesn't spin when either button is pressed. The two buttons must feed a shared merge row that runs into the 1 kΩ base resistor. If each button drops into its own row, only the one with the base link fires.
  • Only button A works, button B is dead. Button B is bridging the wrong two pins. Tactile push buttons bridge diagonally, not across. Rotate 90° or move a wire to the opposite corner.
  • Fan runs even with both buttons up. Merge row is shorted to the + rail without going through either button. Check for a stray jumper across the buttons.
  • Transistor gets hot. E-B-C pin order wrong — flat face toward you, legs left-to-right are Emitter, Base, Collector. Also confirm the flyback diode is ACROSS the motor with banded end toward +.
  • Fan spins weakly and battery gets hot. 1N4001 wired backwards — banded end must face battery +. Reversed, it shorts the battery through itself the instant the transistor turns on.
  • Fan stops the moment you release, but a soft click at the switch. Flyback diode missing or open. Reinstall it across the motor with the banded end at +.

What you're building

Handheld Fan let you spin the motor by pressing one button. This one gives you two buttons — one on each side of the workspace, or one on your desk and one across the room — and either one spins the same fan. Release both and the fan stops.

You've built this "either-one triggers it" pattern before, at Level 2, in Panic Doorbell. Same wiring trick: two buttons in parallel. The only thing that changed is the mouth on the far end of the transistor — it's a motor now instead of a buzzer + LED.

Reuse from Level 2 (the OR gate)

Two switches sitting side by side — both bridging the same two spots on the board — give the loop two ways to close. Only one needs to be closed for current to flow. Two closed doesn't help anything, but doesn't hurt either.

  • Series (AND): + → [A] → [B] → next stage → −. Break either and the loop dies. That's The Vault, Two-Hand Bell.
  • Parallel (OR, this project): + → [either A or B] → next stage → −. Either alone is enough. That's Panic Doorbell — and now this.

Reuse from Level 3 (the transistor)

  • 1 kΩ base resistor between the OR-gate output and the base keeps the button current small (~3.8 mA) even at full press.
  • 2N2222 turns on when its base sits above ~0.7 V.
  • With β ≈ 200, a 3.8 mA base drive commands up to 760 mA through the collector — vastly more than the motor needs.

Reuse from Level 4 (the motor + diode)

  • DC motor, ~30 Ω coil, ~143 mA at 4.3 V (transistor keeps V_CE at ~0.2 V).
  • 1N4001 flyback diode across the motor, banded end (cathode) toward battery +. Reverse-biased and invisible while the fan runs; catches the coil's kick the moment you release the button.

Do the math

Either button pressed:

  • The OR-gate output lifts to ~4.5 V (minus a millivolt across the closed button — negligible).
  • Base resistor sees 4.5 − 0.7 = 3.8 V, so I_base ≈ 3.8 mA.
  • β × I_base = 760 mA capable — deep saturation.
  • Motor lane: (4.5 − V_CE(sat)) ÷ 30 Ω = (4.5 − 0.2) ÷ 30 = ≈ 143 mA.
  • Battery total: motor + base + a whisker of leakage ≈ 147 mA.

Both buttons pressed at the same time:

  • Same 147 mA. The second closed button is a redundant path — current only flows through one of the two parallel closed switches (whichever has slightly lower contact resistance) or a little through each; either way, the motor draws the same 143 mA because that's what the motor asked for. Adding more parallel paths through a resistor-free rail doesn't add current.

Nobody pressing:

  • No path from the + rail to the base. I_base = 0. Transistor off.
  • Motor idle, battery draws microamps of leakage. You can leave this armed for weeks and barely dent an AA.

Compare to Panic Doorbell, where either button rings a buzzer: same brain, thirstier mouth. And compare to Handheld Fan: same mouth, wider (OR-gated) brain.

Build it

  1. Power rails: battery + to a top row, battery to a bottom row.
  2. Two buttons in parallel: the top row branches out to two nearby columns. Each column has a push button that drops from the + rail to a merge row (call it row M). Pressing either connects the + rail to row M.
  3. Base link: row M1 kΩ → transistor Base leg.
  4. The transistor: flat face toward you, legs left-to-right are Emitter, Base, Collector. Emitter → rail.
  5. Motor lane: motor between the + rail and the Collector row.
  6. Flyback diode across the motor: cathode (banded end) in the + rail row, anode in the collector row. Same placement as First Spin.
  7. Press button A. Fan spins. Release: stops. Press button B. Same thing. Press both. Same. Release both: quiet.

Both buttons wire from the same + rail to the same merge row. The mistake to avoid is running each button to a different merge row — that turns the two buttons into two separate fan circuits sharing nothing, and one of the two won't have a base link.

Where two buttons help

  • A shared "cooldown" trigger for a hot enclosure. Router in a cupboard? One button by your desk to spin the cupboard's cooling fan when it feels warm; a second button inside the cupboard for the person servicing it.
  • Two-station fan for a shared room. Sibling A's side of the room has a button; sibling B's has another; either can turn on the middle fan.
  • Redundancy. In the real world, safety-critical fans (an overheating server rack, a wood stove blower) get two independent "spin now" triggers so if one wire breaks, the other still works.

Anywhere a spinner needs to be triggerable from more than one place, OR is the pattern.

What this opens up

Add more buttons? Just wire another push button in parallel with the first two. Three buttons, five buttons — the transistor doesn't care. Every one is another way to close the same trigger loop. At Level 9 you'll wire two sensors in parallel this same way to fire a robot's motor when either sees a line.

🧠 Your challenge

No single right answer. That's the point.

  • Three buttons. Add a third push button in parallel with the first two. Predict: does the fan get faster with all three pressed? (No — the motor pulls 143 mA regardless. Parallel switches in a wire-only rail don't add current; they add redundancy.)
  • Buttons at war. Wire the two buttons in series instead of parallel — the AND pattern from The Vault. Both must be held to spin. When would you actually want that? (A "two-hand" safety trigger — like a bandsaw or a stamping press. You can't press one button and have your other hand near the blade.)
  • Add a status LED. Fan a 220 Ω + red LED lane in parallel with the motor lane, both off the collector — same trick as Dusk Chorus. Now the fan spins and a lamp glows when either button is pressed. What's the battery current now? (~143 mA motor + ~11 mA LED + 3.8 mA base ≈ 158 mA. Comfortably inside the AA pack and the transistor's ceiling.)
  • Buttons in different rooms. Run a long jumper wire from button B to a switch on the other side of the desk. How far can you go before the wire's own resistance eats into the trigger? (A 1 m jumper is maybe 0.05 Ω. Compared to the 1 kΩ base resistor's 3.8 V drop, that's a rounding error. You could run 20 metres and not notice. The trigger side sips current.)
  • Predict a failure. If someone snips button A's wire, does button B still work? (Yes — that's the whole point of parallel redundancy. Snip button B's, A still fires. Snip both, dead fan.)

For grown-ups: safety notes

  • Battery-safe throughout. 4.5 V and ~150 mA through your finger is imperceptible. The transistor dissipates ~30 mW when saturated — warm but not hot.
  • Diode polarity matters most. Cathode (banded end) toward battery +. Reversed, the diode shorts the battery through itself as soon as the transistor turns on. It'll heat up fast; disconnect and flip it.
  • Transistor pin order. Flat face toward you, legs left-to-right are Emitter, Base, Collector. Backwards is the #1 first-try bug — the fan won't spin and the transistor runs hot.
  • Fingers, hair, and paper blades don't mix well. The motor spins around 6,000 RPM unloaded. Tie hair back, keep loose sleeves clear of the shaft, don't let a wobbly blade fly off.
  • The 2N2222 is rated to about 600 mA continuous through the collector. This project asks for ~143 mA with a ~3.8 mA base drive — plenty of headroom. Don't add more motors in parallel unless you've done the current math.
  • Long-run jumpers to the second button are fine at these voltages. Don't run them across carpet where they can be tripped on, and don't staple through insulation. Same common sense as extension cords, at a much lower voltage.
  • Never wire this to mains. Every part is 4.5 V-safe. Wall power would blow the 1N4001 and 2N2222 in that order, within one cycle of the sine wave.

Checked against

Keep building