Smart Fan — Temperature + Distance
Only blows when it is hot AND someone is within 100 cm
DHT11
Ultrasonic
Fan
LED
IoT
What you will learn
- How to combine multiple sensors with AND/OR logic
- How to design a system that responds to its environment, not just a button
- How to make the system robust (no false triggers, no missed triggers)
- How to drive a DC motor from a microcontroller using PWM
What you will need
| Component |
|---|
| 1× Arduino Uno R3 |
| 1× DHT11 sensor |
| 1× HC-SR04 ultrasonic |
| 1× DC motor fan |
| 1× red LED |
| 1× green LED |
| 2× 220Ω resistor |
| 1× breadboard |
| 11× jumper wires |
Step by step
Take it further
- Add a third condition: only run the fan between 6am and 11pm (use millis() for time).
- Add a "boost mode" button — when held, the fan runs at maximum speed (use a different tone).
- Print a daily log of "fan on" events with timestamps to the Serial Monitor.
Practise it before you build it
Wire this circuit in the ThinkEdge Learn simulator first. The simulator runs a real Arduino sketch against a modified-nodal-analysis solver, so the LED on screen actually lights when the current is right — no hardware, no burnt components, and a class can try it in a browser.
Related projects
Pet Feeder — Distance-Triggered ServoWhen the pet is near, drop food
DHT11 — Auto Fan ControllerHot day, fan on. Cool day, fan off.
Ultrasonic — Reverse Parking SensorBeep faster as you get closer
DHT11 — Temperature AlarmToo hot, too cold, or just right
Bionic Hand PrototypeA cardboard hand controlled by fishing line — anatomy meets engineering
Police SirenAlternating red + blue LEDs with a wailing 600–1500 Hz buzzer
Guides that use this project
8 guides on the site build this project as part of a longer explanation. The guide says why the circuit works; this page says how to wire it.
Repairable Phone: The Engineering Behind a Phone You Can OpenA repairable phone is designed around replaceable modules, standard connectors and long software support. What that means in engineering terms.
GPU Repair: Why Graphics Cards Fail and Whether Fixing One PaysGraphics cards fail from solder fatigue, VRM breakdown, dead fans and ageing capacitors. How to diagnose the cause and whether a repair is worth the money.
Home Energy MonitoringHow to monitor energy use in a home or classroom: clamp meters, energy monitoring modules, the difference between watts and watt-hours, and what the data shows.
What an AI Agent Actually IsAn AI agent is a loop of model calls, tools and memory. Learn how that loop maps onto the sense, decide, act cycle of a robot you can build this term.
Physical AI: Intelligence That Has to ActPhysical AI is intelligence that drives a motor, not a cursor. Here is how models, controllers and feedback split up, and how to build the loop safely.
AI Swarm: Many Small Robots, Three RulesA swarm is not a clever algorithm, it is three local rules. Learn separation, alignment and cohesion, then build them as if-statements on an Arduino.
Self-Improving AI: Three Different ClaimsSelf-improving AI means three different things. Separate them, then build the version you can measure: a controller that tunes itself and shows you the numbers.
DGX Spark: What the Hardware Actually IsDGX Spark packs a 20-core Arm CPU and a Blackwell GPU into 128 GB of shared memory. Here is what it buys you, what it costs, and where it does not help.
Where this project sits
It is also part of these lists, which is how a class usually finds it.
Arduino LED projects for beginners36 projects in this list
Arduino ultrasonic distance sensor projects10 projects in this list
Arduino DHT11 temperature sensor projects7 projects in this list
Try the full simulator with your class
103 guided circuit projects, 21 lessons and an in-browser Arduino simulator. The first 15 projects are free, no account needed. One licence covers a whole school.