
You know Pomodoro timers: 20-25 minutes of focus time followed by short breaks. Here, at the end of your focus period, a small USB fan turns on, spreading a pleasant aroma from the essential oil you’ve dropped into it. No bells or alarms—just an LED effect and a cool aromatic breeze. It’s easy to build and makes your home office desk “smart.”
Required Materials
Component | Specification / Quantity |
---|---|
Micro:bit (V1 or V2) | – |
5V USB mini fan | 40-60 mm diameter, < 200 mA |
Power supply | Powerbank or USB adapter |
NPN transistor (2N2222) | For driving the fan |
Diode (1N4148) | For back emf |
100 Ω resistor | Transistor base resistor |
Crocodile cables × 3 | For easy connections |
Cotton pad + essential oil | Lavender / mint (1 ml) |
Alternative: If you find an ultra-mini 3V fan instead of 5V, you can power it directly from the Micro:bit batteries without a transistor (≤ 90 mA). The USB fan definitely works and is brighter, which is why we used it in this example.
Step-by-Step Setup (Total ≈ 45 min)
1. Set Up the Circuit (10 min)
Micro:bit P0 ──■──────┐
│ 100 Ω
▼
Transistor (2N2222)
▲
Fan GND ──────┘──▶│ 1N4148
Fan +5 V ─────────────(+5 V USB)
Micro:bit GND ────────────────┘
- The 100 Ω resistor limits the current from P0 and protects the transistor.
- The 1N4148 diode “quenches” voltage spikes generated when the fan coil turns off.
2. Prepare the Scented Pad (3 min)
Drop 1-2 drops of essential oil onto the cotton pad, attach it to the center of the fan with double-sided tape.
3. Upload the Code (15 min)
In MakeCode, click “New Project” → paste the following in the JavaScript tab:
let workTime = 20 * 60 // seconds
let fanTime = 30 // seconds
let counter = 0
input.onGesture(Gesture.Shake, function () {
counter = 0
basic.showIcon(IconNames.Heart)
})
basic.forever(function () {
basic.pause(1000)
counter++
// LED countdown graph
let bar = Math.map(counter, 0, workTime, 25, 0)
led.plotBarGraph(bar, 25)
if (counter >= workTime) {
// Run the fan
pins.digitalWritePin(DigitalPin.P0, 1)
for (let i = 0; i < fanTime; i++) {
basic.showRainbow()
basic.pause(1000)
}
pins.digitalWritePin(DigitalPin.P0, 0)
basic.clearScreen()
counter = 0 // New focus cycle
}
})
How it works:
- Shake → resets the counter, starts a new focus period.
- Every second, the countdown column in the LED matrix decreases.
- When 20 min (1200 sec) is up, P0 goes HIGH → fan runs for 30 sec, LEDs flow in rainbow animation.
- Fan turns off, cycle starts again.
4. Make a Case/Stand (10 min)
- Secure the fan to a small angled cardboard base facing the desk; keep the cotton pad at the front.
- Attach the Micro:bit to the powerbank with double-sided tape; shorten cables and tidy up the desk.
5. Test It (5 min)
- Turn on the powerbank, start with “shake” in a closed room.
- After 20 minutes, observe the fan activating, the aroma spreading, and the LED animation finishing.
- If the fan doesn’t turn, check the connections and the USB 5V power supply.
How It Works
Component | Function | Detail |
---|---|---|
Micro:bit | Timer + LED animation control | Counts seconds with counter variable. |
Transistor | Converts P0 signal to switch for 5V fan | 2N2222 NPN, comfortable up to 200 mA. |
Diode | Absorbs inductive voltage | Fan coil generates reverse voltage when turning off. |
Cotton + essential oil | Aromatic vapor | Fan carries scent from pad through breeze. |
Development Ideas
Improvement | Benefit |
---|---|
Add OLED display (I2C) | Show remaining time in minutes-seconds. |
Three-mode timer | A button: 15 min work / B: 25 min / shake: reset. |
RGB NeoPixel ring | Colorful light effect during breaks. |
Humidification version | Add ultrasonic “mist” module to create aroma vapor. |
Frequently Asked Questions
Question | Answer |
---|---|
Battery instead of USB? | You can get 5V with 2×AA NiMH + boost module; powerbank is more practical. |
How many drops of essential oil? | 1-2 drops of lavender provides a cool, soft scent; mint is refreshing. |
Why P0 HIGH/LOW? | For transistor base current; P0 HIGH → base current flows → fan on; LOW → off. |
Advantage of Micro:bit V2? | V2 has a sound chip but it’s not necessary for this project; both work. |
Conclusion & Share
Now you have an aromatherapy timer that reinforces the work-break cycle with scent, minimal wiring, and adds elegance to your desk. Share your photo on social media with the hashtag #ScentedBreaks, and experiment to find which oil blend keeps you more energized!
Wishing you fragrant breaks!