DHT11 or DHT22
The box holds three of each, so this is a real decision rather than a purchase. The DHT11 stops at 0 °C and is worth ±2 °C; the DHT22 covers −40 to 80 °C and is worth ±0.5 °C. Which matters depends entirely on what happens to the number afterwards.
The two ranges, drawn
Move the marker to the coldest temperature the sensor will ever see, then say what the number is for.
The range is the hard limit and the accuracy is the soft one. Below 0 °C the DHT11 is simply outside its specification — Aosong's datasheet gives 0 to 50 °C and nothing about behaviour underneath it, and in practice you get a reading that is wrong rather than a reading that is missing. That is the worse failure, because nothing in your sketch can detect it.
The numbers, side by side
Every row here is from the two manufacturers' datasheets rather than from a listing.
| DHT11 · TK38 | DHT22 · TK39 | |
|---|---|---|
| Temperature | 0 to 50 °C | −40 to 80 °C |
| Temperature accuracy | ±2 °C | ±0.5 °C |
| Temperature steps | 1 °C | 0.1 °C |
| Humidity | 20–80 % RH | 0–100 % RH |
| Humidity accuracy | ±5 % RH | ±2 % RH |
| Humidity steps | 1 % | 0.1 % |
| Supply | 3–5.5 V | 3.3–6 V |
| A reading every | 1 s | 2 s |
| Cage | blue | white |
Two of those deserve a footnote.
The DHT11's humidity range is temperature-dependent in the datasheet: 30–90 % at 0 °C, 20–90 % at 25 °C, and 20–80 % at 50 °C. Our board's silkscreen prints the conservative 20–80 %, which is the figure to plan around.
The DHT22's supply starts at 3.3 V, not 3 V. On a board whose 3V3 rail sags under Wi-Fi that is worth knowing; the DHT11 has half a volt more room underneath it.
The rule
Make the number, look at the number: DHT11. A display in the hallway, a first sketch, a demonstration, anything where being two degrees out changes nothing. It is also the sensor to leave permanently wired to a breadboard while you are learning, because breaking it costs a sixth of the box.
Plot the number, or act on it: DHT22. Anything that goes on a graph you will compare with last week, anything that switches a fan or a heater, and anything outdoors. ±2 °C is not a small error on a chart — it is wider than most of the variation you are trying to see, so the graph ends up being a picture of the sensor.
Outside the DHT11's range at all: DHT22. No judgement required.
What does not differ
Wiring, library, pin count, and the code apart from one word. Both are single- wire parts with the pull-up already on the board, both are read with the same library and the same two function calls, and swapping one for the other is a one-line change — the subject of forty bits and a checksum, because it is a one-line change that fails quietly if you forget it.
If neither is enough — you want an I²C bus you already have wired, faster readings, or better than ±0.5 °C — the parts to look at are the SHT31 and the BME280, which adds pressure for about the same money.
When it does not work
For accuracy, yes. For everything else they are close: same wiring, same library, same one data pin, and the DHT11 answers in one second where the DHT22 needs two. It is also the one to make your mistakes on — six sensors and three of them cheap is the point of the box.
If they are both DHT11s, that is within specification. ±2 °C each means two of them can legitimately be four degrees apart. Put them next to each other for an hour before deciding anything is broken, and if you need them to agree, use the DHT22s.
No. Its range starts at 0 °C, and below that it does not read low and warn you — it either fails or reports something meaningless. An outdoor logger built on a DHT11 goes blind on the coldest night of the year, which is usually the data you wanted.
The DHT22, for the humidity rather than the temperature. Greenhouses spend a lot of time above 80 % RH, which is the top of the DHT11's stated range, and ±5 % near saturation is the difference between damp and condensing.
The six PCBs in the box are the same PCB. What the four pins are, and which one is connected to nothing.
One board, two sensors →Edit this page — content/books/dht22/dht11-or-dht22.mdx
Questions about this product
See what other owners have asked, and read their solutions.
This page covers several products. Choose yours to see the right discussions.
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.