Level 4 · Motion · project 2 of 8 · 20 min · ●●●○○
Handheld Fan
Press the button, the fan spins. A tiny finger current commands a hundred-milliamp motor through a transistor.
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× Push button (tactile) momentary — fan spins only while you hold it L1
- 1× 1 kΩ resistor base resistor — politely limits current into the transistor L1
- 1× NPN transistor (2N2222) flat face toward you: legs are E-B-C L3
- 1× DC motor (3 V) same little hobby motor from First Spin — paper fan blade optional
- 1× Diode (1N4001) flyback protection — cathode toward battery +, same as First Spin
you'll learn: Circuits are loops · Switches · Transistor switching · Ohm's law
Circuit map
The circuit you'll build, running on the Workbench right now — shown with the switch closed.
simulating…
If it doesn't work
The boring ways this circuit actually breaks — check these first before you unwire everything.
- Fan spins without pressing the button. The base 1 kΩ isn't in the button lane. Wire: + → button → 1 kΩ → transistor pin B. If + reaches B without a button in between, the fan runs constantly.
- Button pressed, fan does nothing. 2N2222 pins with the flat face toward you: E-B-C, left to right. Then confirm the flyback diode is ACROSS the motor with the banded end toward +.
- Fan spins weakly. AA cells low, or the transistor is a lower-current part in place of the 2N2222. This design needs the 2N2222's ~200 mA collector budget.
- Button feels dead. Push buttons bridge diagonally, not across. Move one wire to the opposite corner.
- Fan runs for a second and stops. The motor's inrush drops the AAs. Fresh alkalines or NiMH; skip zinc-carbon cells here.
- Motor stalls under the paper blade. Blade too big or off-centre. Trim it smaller and balance it — a 3 V motor has tiny torque.
What you're building
First Spin had a switch you flipped by hand and the motor came on. That works — but a switch that has to carry 150 mA is a switch that has to be built for it. Here you swap the "switch" for a transistor, and the "flipping" for a tiny button current that the transistor amplifies into a big motor current.
Press and hold the button: fan spins. Let go: fan stops. The button itself carries less than 4 mA — a mosquito of a current — but through the transistor's β amplification, that mosquito commands ~140 mA of motor. Same physics as Panic Doorbell and Warm Hand Alarm; the difference here is the mouth: this time the transistor is driving a motor.
Once you own this, you own the pattern for every driven-motor project on the site: sensor decides, transistor amplifies, motor spins. Level 4 uses buttons and light sensors; Level 7 uses code from an Arduino; Level 9 uses two of them side by side to drive robot wheels.
Reuse from Level 3
You already learned the "brain" side at Level 3:
- The 2N2222 transistor turns on when its base sits above about 0.7 V relative to its emitter (the "wake-up line").
- A 1 kΩ base resistor between the trigger and the base politely limits the base current so the trigger source (button, sensor, chip) never has to deliver more than a couple of milliamps.
- When on hard, the transistor's collector-to-emitter link becomes a near-short — the classic V_CE(sat) ≈ 0.2 V drop.
Everything on the "brain" side is exactly what Panic Doorbell did with a button. Only the mouth side is new — a motor + flyback diode instead of a buzzer + LED.
Do the math
Button pressed:
- The button drops the battery's 4.5 V directly onto the top of the 1 kΩ base resistor. The base clamps at ~0.7 V, so the base resistor sees 4.5 − 0.7 = 3.8 V across itself.
- I_base = 3.8 V ÷ 1 kΩ ≈ 3.8 mA. That's the little current the finger and the button and the base resistor pass around together. The button barely notices.
- The transistor's β is around 200, so it could pass up to 200 × 3.8 mA = 760 mA through the collector — vastly more than the motor wants.
- The motor sees 4.5 V − V_CE(sat) = 4.3 V across its 30 Ω coil. I_motor = 4.3 ÷ 30 ≈ 143 mA. That's slightly less than First Spin's 150 mA because the transistor stole 0.2 V — but the paper fan blade won't notice.
- The transistor is deep in saturation (760 mA capable, 143 mA asked-for). It runs cool.
Button released:
- I_base drops to zero. The transistor snaps off.
- The motor's coil, still spinning, would try to keep pushing current — its magnetic field collapsing generates a voltage spike aimed at the transistor's collector.
- The 1N4001 flyback diode across the motor catches that spike, recirculates the coil current back into the coil, and the field dumps as heat in the coil's own resistance. The transistor's collector never sees more than ~0.7 V above the +4.5 V rail. It survives.
Without that diode, the flyback spike can reach tens of volts — the 2N2222 is rated for a maximum V_CEO of about 40 V, and one bad spike over that number opens the transistor's collector-emitter junction like a fuse. The diode is not optional.
Build it
If your First Spin is still on the board, you're inserting a transistor between the switch-side of the motor and the − rail, and moving the switch to the base side. It's a small remodel.
Fresh build:
- Power rails: battery + to a top row, battery − to a bottom row.
- Button lane (the trigger): battery + → one leg of the push button → out its other leg → 1 kΩ → into a fresh row (call it B). Row B is going to be the transistor's base.
- Transistor: flat face toward you, legs are Emitter
(left), Base (middle), Collector (right).
- B in row B (from the button's 1 kΩ).
- E to the − rail.
- C into a fresh row A.
- Motor: one lead to the + rail; the other lead into row A (the collector).
- Flyback diode across the motor: cathode (banded end) in the + rail row, anode in row A. Exactly the same placement as First Spin, because the motor and diode haven't moved — only their partner on the low side has changed from a switch to a transistor.
- Press and hold the button. The fan spins. Release: fan stops, quickly and cleanly, with no click.
The most common first-try mistakes:
- Button and base resistor swapped. If the 1 kΩ is on the battery-plus side and the button is between it and the base, the circuit still works — but any voltage spike on the button side hits the base directly. The base resistor should sit right next to the base, always.
- Motor and diode on the wrong side of the transistor. Motor + diode go between + and collector, not between collector and −. If yours is reversed, the transistor is on the "wrong side" of the load — technically called "low-side switching" and legitimate, but the flyback path needs to change too. Stick to high-side motor, low-side transistor for now.
- Diode backwards. Banded end must face +. Reversed, it shorts the battery through itself as soon as you turn on.
Try it with your paper fan blade
Push the paper fan onto the shaft (same one from First Spin). Press the button and — this is the fun part — you can feel the breeze on the back of your hand. It's small, but it's real air being moved, by a circuit you built.
Notice the release: unlike First Spin, there's no click even without the diode explicitly in view. That's because the transistor turns off far faster than a mechanical slide switch opens — and the diode still handles the spike quietly in the background. You've replaced a mechanical device with an electronic one that's faster, quieter, and controllable.
What "controllable" opens up
The button is just a placeholder. Anything that can put ~1 V on the base through a 1 kΩ will fire this circuit:
- A light sensor on a voltage divider — Sunrise Fan (next project).
- A temperature sensor on a voltage divider — hot rooms auto-cool.
- An Arduino pin — Level 7, and now every fan is programmable.
- A motion detector — the same fan turns on when someone walks past.
Same circuit downstream, different circuit upstream. That's the whole gift of the transistor.
🧠 Your challenge
No single right answer. That's the point.
- Latch it with the slide switch. Instead of a momentary push button, put the slide switch in the trigger line. Now the fan runs continuously when the slide is on. Which trigger do you prefer for a desk fan and which for a hand fan? (Answer: slide for desk — hands-free continuous. Button for hand fan — you don't want it running in your bag.)
- Two-button OR. Add a second push button in parallel with the first (same trick as Panic Doorbell's two-button OR). Either button fires the fan. Sketch it before wiring.
- Two-motor fan. Wire a second motor in parallel with the first, each with its own flyback diode. Press the button — both spin. What's the collector current now, and can the transistor handle it? (Two motors ≈ 280 mA. The 2N2222 is rated to 600 mA continuous, so yes — but the base current needs to grow to match, or the transistor drops out of saturation. What base resistor would you pick?)
- Skip the transistor? Wire the button directly in series with the motor — no transistor. Does it work? (Yes, briefly — but a cheap tactile push button is rated for maybe 50 mA and 150 mA will wear its contacts fast, plus you'll feel a little snap when you release without a diode. This is exactly why the transistor exists.)
- Feel the transistor. With the fan running, gently touch the flat face of the 2N2222. Is it warm? (A little — the transistor dissipates V_CE(sat) × I_C = 0.2 V × 143 mA ≈ 30 mW. Warm but not hot. Now imagine if V_CE were 2 V instead of 0.2 V — that's 15× the heat. This is why "in saturation" matters.)
For grown-ups: safety notes
- Battery-safe throughout. 4.5 V and up to ~150 mA won't harm you even in direct hand contact. The transistor dissipates about 30 mW when saturated — warm but not hot.
- If the transistor gets hot to the touch within seconds of pressing the button, disconnect the battery and check E-B-C leg order. Backwards transistors dump their power as heat instead of driving the motor. Every batch has a "flat face, E-B-C left to right" convention; if yours doesn't match, cross-check the datasheet.
- If the diode gets hot, it's wired backwards — banded end should face battery +. Flip it and everything cools immediately.
- The 2N2222 is comfortable up to about 600 mA continuous through the collector. This project asks for ~140 mA and the base drive supports ~760 mA, so you have room to spare — but if you experiment with two motors in parallel (~280 mA), keep the base drive strong (don't go bigger than a 1 kΩ base resistor) so the transistor stays saturated.
- Fingers, hair, and paper blades don't mix well. The motor spins around 6,000 RPM unloaded. Tie hair back, keep loose sleeves clear.
- Never wire this to mains. Every part is low-voltage. Wall power would kill the 1N4001 and the 2N2222 in that order, within one cycle of the sine wave.
- The paper fan blade should feel smooth in your fingers as you spin it by hand. If it wobbles or catches, re-centre it on the shaft — an off-centre blade stresses the motor bearings and can throw paper bits.
Checked against
Keep building
You might also like
shares ideas with this one