DHT11 — Auto Fan Controller
Hot day, fan on. Cool day, fan off.
DHT11
Fan
Threshold
Sensor
What you will learn
- How a thermostat works (read sensor → compare → switch output)
- How to add "hysteresis" so the fan doesn't oscillate on/off every second
- How to drive a fan with digitalWrite() on a digital-only pin (vs analogWrite() on PWM pins 3,5,6,9,10,11)
What you will need
| Component |
|---|
| 1× 9V battery |
| 1× DHT11 |
| 1× 220Ω resistor |
| 1× red LED |
| 1× DC Motor Fan |
| Breadboard |
| 7× jumper wires |
Step by step
Take it further
- Add a humidity check — only turn on the fan if temp > 30 AND humidity > 60%.
- Print the temp to Serial Monitor every 5 seconds — build a data log.
- Add a second buzzer that beeps louder as the temperature rises (alarm that gets worse).
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
DHT11 — Temperature AlarmToo hot, too cold, or just right
Insulation Test ChamberWhich material keeps heat in best?
DHT11 — Digital ThermometerRead the room temperature on your laptop
Smart Fan — Temperature + DistanceOnly blows when it is hot AND someone is within 100 cm
Police SirenAlternating red + blue LEDs with a wailing 600–1500 Hz buzzer
LDR — Light-Following Robot (Solar Tracker)It always faces the brightest spot
Guides that use this project
6 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.
Edge AI: Decisions Made on the DeviceEdge AI runs the decision on the device instead of in the cloud. Here is what that buys you in latency and privacy, and what a 32 KB microcontroller can really do.
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.
Artificial Intelligence for StudentsArtificial intelligence for students: what a model really is, the three ways to learn it that are not hype, and the projects that prove each one landed.
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 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.