The DHT22 is a digital temperature and humidity sensor by Aosong Electronics, also sold under the name AM2302. It measures both parameters through a single data line and outputs fully calibrated digital readings — no ADC, no analog noise, no external calibration required. For projects where the DHT11’s ±2°C accuracy and limited humidity range aren’t enough, the DHT22 is the natural step up: wider range, tighter accuracy, and a decimal-point resolution that the DHT11 simply doesn’t offer.
What is DHT22?

The DHT22 outputs a calibrated digital signal using a proprietary single-bus communication technique, with its sensing elements connected to an internal 8-bit microcontroller. Every unit is temperature-compensated and calibrated in a precision chamber, with the calibration coefficients stored in OTP memory that the sensor reads automatically during each measurement.
Its small size, low power consumption, and transmission distance of up to 20 metres make it suitable for a wide range of demanding installation conditions. The AM2302 variant is electrically identical but comes with a wired lead instead of bare pins — useful when the sensor needs to be mounted at a distance from the main board.
DHT22 overview
| Parameter | Value |
|---|---|
| Sensor Type | Digital Temperature & Humidity Sensor |
| Operating Voltage | 3.3V – 6V DC |
| Current Consumption | 1–1.5mA (measuring), 40–50µA (standby) |
| Temperature Range | −40°C to +80°C |
| Humidity Range | 0% to 100% RH |
| Output Type | Digital (Single-Wire) |
| Temperature Accuracy | ±0.5°C |
| Humidity Accuracy | ±2% RH (max ±5% RH) |
| Communication | Single-Wire (proprietary, not Dallas 1-Wire) |
| Mounting Type | Through Hole (SIP-4) |
| Compatible Boards | Arduino Uno, ESP32, Raspberry Pi |
Pinout

| Pin Name | Type | Description |
|---|---|---|
| Vcc | Power | Supplies power to the sensor (3.3V – 6V DC) |
| DATA | Data | Single-wire serial data input/output |
| NC | — | Not connected |
| GND | Power | Ground connection |
Note: A 10kΩ pull-up resistor between DATA and VCC is required for reliable communication. A 100nF decoupling capacitor between VCC and GND is also recommended to filter supply noise. Although the DHT22 uses a single data wire, it is not compatible with the Dallas/Maxim 1-Wire protocol — each sensor requires its own dedicated data pin.
Working principle
When the host microcontroller sends a start signal, the DHT22 wakes from low-power mode and responds with a 40-bit data packet. The full communication cycle takes approximately 5ms.
The 40-bit packet is structured as: 8-bit humidity integer + 8-bit humidity decimal + 8-bit temperature integer + 8-bit temperature decimal + 8-bit checksum. The sensor transmits the most significant bit first, and the checksum is the last 8 bits of the sum of the first four bytes.
For example, a raw response of 0x02 0x33 0x00 0xFE 0x33 decodes as:
- Humidity: 563 → 56.3% RH
- Temperature: 254 → 25.4°C
- Checksum: 0x33 ✓
Each bit is transmitted starting with a 50µs low pulse, followed by a high pulse whose duration determines the bit value — a 26–28µs high means “0”, while a 70µs high means “1”.
The minimum sampling interval is 2 seconds — pushing the sensor harder than this will not yield more accurate results and may produce invalid readings.
DHT22 Internal Components

1. Capacitive Polymer Humidity Sensor The sensing element is a polymer capacitor — a hygroscopic dielectric layer between two electrodes whose capacitance shifts proportionally with the moisture content of the surrounding air. This is what gives the DHT22 its full 0–100% RH range.
2. NTC Thermistor A high-precision negative temperature coefficient thermistor whose resistance falls predictably with rising temperature. The internal MCU reads this and converts it to a Celsius value with 0.1°C resolution.
3. Internal 8-bit Microcontroller Reads both sensing elements, applies the stored calibration coefficients, formats the result into the 40-bit packet, and manages the single-wire communication protocol — all without any processing on the host side.
4. OTP Calibration Memory Factory calibration coefficients for each individual unit are stored in OTP memory and are loaded automatically during every measurement cycle, ensuring the sensor stays accurate without any user intervention.
5. Single-Wire Interface Circuit Manages the proprietary serial timing — the start signal handshake, 80µs response pulse, and bit-by-bit transmission — at the hardware level.
Specifications
Detailed Key Specifications are listed below.
| Parameter | Value |
|---|---|
| Supply Voltage | 3.3V – 6V DC |
| Supply Current | 1–1.5mA (measuring), 40–50µA (standby) |
| Temperature Range | −40°C to +80°C |
| Humidity Range | 0% to 100% RH |
| Temperature Accuracy | ±0.5°C |
| Humidity Accuracy | ±2% RH (max ±5% RH) |
| Temperature Resolution | 0.1°C |
| Humidity Resolution | 0.1% RH |
| Temperature Repeatability | ±0.2°C |
| Humidity Repeatability | ±1% RH |
| Humidity Hysteresis | ±0.3% RH |
| Long-Term Stability | ±0.5% RH/year |
| Sampling Rate | Once every 2 seconds (minimum) |
| Communication | Single-Wire (proprietary) |
| Data Format | 40-bit (MSB first) + 8-bit checksum |
| Max Cable Length | 20m (with quality shielded wire) |
| Pull-up Resistor | 10kΩ (recommended) |
| Package | SIP-4, 2.54mm spacing |
| Dimensions | 14×18×5.5mm (small), 22×28×5mm (large) |
| Operating Temperature | −40°C to +80°C |
| Storage Temperature | −40°C to +80°C |
Helpful resources
- Download the datasheet here
- DHT22 with Arduino
- DHT22 with ESP32
- DHT22 with Raspberry pi