Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

DHT11 vs DHT22 — which temperature and humidity sensor to buy?

DHT11 and DHT22 (AM2302) compared on range, accuracy, resolution, read speed and price in India — and why the DHT11 falls short in an Indian summer.

Community draft — report a mistake

DHT11DHT22 (AM2302)
Temperature range0–50 °C−40–80 °C
Temperature accuracy±2 °C±0.5 °C
Humidity range20–90 % RH0–100 % RH
Humidity accuracy±5 % RH±2 % RH typical (up to ±5 %)
Resolution1 °C and 1 % RH on most modules0.1 °C and 0.1 % RH
Fastest readingOnce a secondOnce every 2 seconds
Supply3–5.5 V3.3–6 V
Usual colourBlueWhite
Typical module price in India₹60–120₹180–320

They look alike, use the same three wires and the same Arduino library. The DHT22 costs two to three times as much — and for most real projects it’s worth it. Figures are from the manufacturers’ datasheets (Aosong for both); prices are indicative for 3-pin modules.

Why the DHT11 disappoints in India

  • Its range stops at 50 °C. A sensor in a sunny balcony, rooftop enclosure or tin shed in May can go past that.
  • ±2 °C and whole-degree steps. Your room reads 31, then 33, with nothing in between. Fine for “is it hot?”, poor for a graph or a fan controller.
  • 20–90 % humidity range. Monsoon air in Mumbai or Kerala sits above 90 % for days; the DHT11 can’t report it.

Where the DHT11 is fine

  • First experiments and school demos.
  • Indoor projects that only need a rough trend.
  • When you’re buying ten and the budget is tight.

Using either one

  • Same library (DHT sensor library by Adafruit). Change one word in the code: DHT dht(pin, DHT11); or DHT22. Picking the wrong type gives nonsense or failed reads.
  • 3-pin modules have the pull-up resistor; a bare 4-pin sensor needs 10 kΩ from DATA to VCC.
  • Don’t read faster than the table allows — you’ll get the previous value or a failure.
  • Both work on 3.3 V boards (ESP32, Pico W) powered from 3V3.

Wiring guides: DHT22 with Arduino Uno, DHT22 with ESP32, and the DHT11 component page. Getting “Failed to read from DHT sensor”? See the fix.

Verdict

Buy the DHT22 unless the project is a one-off demo. If you need better accuracy than the DHT22, faster readings, or pressure as well, step up to an I2C sensor — DHT22 vs BME280 vs SHT31.

↑↓ to move · Enter to open