DHT22 (AM2302) Temperature & Humidity Sensor
The upgrade pick for demanding projects — 4x better accuracy, wider range, and the same wiring as DHT11.
The DHT22 (also sold as the AM2302) is a digital temperature and humidity sensor built around a capacitive humidity element and a precision NTC thermistor, both read out over the same single-wire digital bus used by the rest of the DHT family. It's the sensor to reach for once a project outgrows the DHT11 — it holds calibration well, covers a genuinely wide operating range, and drops into the exact same code and wiring most makers already know.
The tradeoffs are modest: it samples at roughly half the rate of the DHT11 (about once every 2 seconds) and costs a couple of dollars more. In exchange you get ±0.5°C temperature accuracy, ±2% RH humidity accuracy, and reliable operation from -40°C up to 80°C — cold enough for an outdoor winter enclosure and hot enough for most indoor equipment bays. If your project only needs a rough indoor reading and you want a faster refresh, the pin- and library-compatible DHT11 is the cheaper, quicker option — see the variants table below.
Specifications
| Operating voltage | 3.3V – 6V DC |
| Operating current | 1–1.5 mA (measuring), 40–50 µA (standby) |
| Temperature range | -40°C to 80°C |
| Temperature accuracy | ±0.5°C |
| Humidity range | 0% to 100% RH |
| Humidity accuracy | ±2% RH |
| Resolution | 16-bit (0.1°C / 0.1% RH steps) |
| Sampling rate | 0.5 Hz max (once every 2s recommended) |
| Interface | Single-wire digital (proprietary, not I2C/SPI) |
Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power, 3.3V–6V DC |
| 2 | DATA | Single-wire digital I/O — needs a 4.7kΩ–10kΩ pull-up to VCC |
| 3 | NC | Not connected — leave floating |
| 4 | GND | Ground |
Most breadboard-friendly DHT22 modules (often labeled AM2302) expose only 3 pins (VCC, DATA, GND) because the pull-up resistor and a decoupling capacitor are already built onto the breakout PCB. If you're wiring the bare 4-pin sensor directly, add a 4.7kΩ–10kΩ resistor between DATA and VCC yourself — without it the data line floats and reads fail intermittently or return NaN. Longer cable runs (a few meters) tend to be more reliable with a stronger pull-up toward the 4.7kΩ end of that range.
Variants
DHT22 is the accuracy and range upgrade over the DHT11, at roughly double the price and half the sample rate. Wiring and library calls are identical between the two — just swap DHTTYPE — so it's a drop-in swap if a project needs sub-degree accuracy or has to survive outdoor or freezing conditions. If you want tighter accuracy still, the DHT21 sits between them but is harder to source.
| Variant | Temp range | Hum range | Accuracy | Protocol | Price |
|---|---|---|---|---|---|
| DHT22 (AM2302) | -40–80°C | 0–100% RH | ±0.5°C / ±2% RH | Single-wire, 0.5 Hz | ~$3–5 |
| DHT11 | 0–50°C | 20–90% RH | ±2°C / ±5% RH | Single-wire, 1 Hz | ~$1–2 |
| DHT21 (AM2301) | -40–80°C | 0–100% RH | ±0.3°C / ±3% RH | Single-wire, 0.5 Hz | ~$4–6 |