T ThinkEdge Learn

Arduino DHT11 temperature sensor projects

Read the room temperature and then do something about it — a thermometer, an alarm, a fan and a combined smart fan.

7 projects Easy first Arduino nano, Arduino uno, Arduino mega

The DHT11 is a one-wire sensor: the Arduino asks for a reading over a single data pin and the sensor answers with a number, not a voltage. That makes it the easiest digital sensor to wire and the easiest to get subtly wrong, because a missing pull-up resistor produces a reading of zero rather than an error.

The projects here use it in two ways — read it and print it, or read it and decide something. The thermometer is the first, and it is enough to learn the protocol. The alarm adds a threshold and a decision. The fan adds an output. The smart fan combines it with an ultrasonic sensor, and that one is the first project on the site where two inputs have to agree before anything happens.

What you need

The parts below are the ones the most of these projects share. Each project page lists the full set for that build.

PartUsed byWhy
Breadboard4Holds the circuit together without solder
1× red LED3The output you can see working
1× breadboard3Holds the circuit together without solder
1× DHT11 sensor3Reads something about the world
1× green LED2The output you can see working
1× 9V battery2The supply the circuit runs on

All 7 arduino dht11 temperature sensor projects

Easiest first. Each card links to the project's own page with the wiring, the parts and the code written out.

Arduino Nano — Temperature on Serial Monitor

Read the room temperature every 2 seconds and print it

Tier 1 · Basics · Easy · 20 min
DHT11 — Digital Thermometer

Read the room temperature on your laptop

Tier 2 · Logic & Sensors · Easy · 30 min
DHT11 — Auto Fan Controller

Hot day, fan on. Cool day, fan off.

Tier 3 · Combined Projects · Intermediate · 40 min
DHT11 — Temperature Alarm

Too hot, too cold, or just right

Tier 3 · Combined Projects · Intermediate · 35 min
Insulation Test Chamber

Which material keeps heat in best?

Tier 3 · Combined · Intermediate · 40 min
Arduino Mega — Multi-Sensor Data Hub

Read 3 sensors at once and stream them to the Serial Monitor

Tier 3 · Combined Projects · Advanced · 40 min
Smart Fan — Temperature + Distance

Only blows when it is hot AND someone is within 100 cm

Tier 4 · Capstone · Advanced · 60 min

How to use these with a class

These 7 projects run from about 20 minutes to 60 minutes each, and 1 of them are Tier 1 — one component and one idea, which is what a class can finish in a single period.

Each project page carries the full build — the concept, the parts, the wiring one step at a time and the sketch — so a class can work through it without the teacher having to explain every wire.

Every one of them can be practised in the browser simulator first, with the real sketch and a real circuit solver behind it, and the first 15 projects are free with no account.

Common questions

Why do I need a 10k resistor on the DHT11 data pin?

The data line idles high, and the sensor pulls it low to talk. Without the pull-up the pin floats and the Arduino reads noise. The 10 kΩ resistor between the data pin and 5 V holds the line high between bits.

How accurate is the DHT11?

About ±2 °C, which is plenty for a classroom. It also has a resolution of 1 °C, so a reading of 24.3 °C is not meaningful — it will be 24 °C.

How often can I read it?

Once every two seconds is the recommended maximum. Reading it faster gives you the same value twice and costs the Arduino time for nothing.

Related

All the projectsThe complete catalogue The guidesHow the ideas behind these work Arduino projects for beginnersThe board-specific builds Arduino simulator in the browserTry any of these without hardware

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.