Features:
- Full-range temperature compensation
- Measures relative humidity and temperature
- Calibrated digital signal output
- Excellent long-term stability
- No extra components required for basic usage
- 4-pin package for flexible integration
- Ultra-low power consumption
Principle of Operation:
- Asynchronous single-wire serial communication (not One-Wire)
- 5K pull-up resistor required between VCC and Data
- Outputs: 8-bit humidity integer + 8-bit humidity decimal + 8-bit temperature integer + 8-bit temperature decimal + 8-bit checksum
Pinout:

Pin |
Label |
Description |
1 |
VCC |
Power supply 3.5V to 5.5V |
2 |
Data |
Digital serial data output |
3 |
NC |
No connection (not used) |
4 |
GND |
Ground |
Note: Reversing VCC and GND will damage the sensor.
Applications:
- Weather monitoring stations
- Humidity controllers
- Air conditioning systems
Circuit Diagram:
Follow these connections:
- Place a 10K resistor between Pin 1 (VCC) and Pin 2 (Data)
- Pin 1 → Arduino 5V
- Pin 2 → Arduino digital pin 2
- Pin 4 → GND
- Pin 3 → Not connected

Library:
Install the SimpleDHT library: Sketch > Include Library > Add .ZIP Library
Example Arduino Code:
#include "SimpleDHT.h"
int pinDHT22 = 2;
SimpleDHT22 dht22(pinDHT22);
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("=================================");
Serial.println("Sample DHT22...");
float temperature = 0;
float humidity = 0;
int err = SimpleDHTErrSuccess;
if ((err = dht22.read2(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
Serial.print("Read DHT22 failed, err=");
Serial.println(err);
delay(2000);
return;
}
Serial.print("Sample OK: ");
Serial.print(temperature);
Serial.print(" *C, ");
Serial.print(humidity);
Serial.println(" RH%");
delay(2500);
}
Technical Details:
- Temperature range: -40 to 80°C ±0.5°C
- Humidity range: 0 to 100% RH ±2%
- Resolution: 0.1°C / 0.1% RH
- Operating voltage: 3V to 6V
- Current consumption: 1–1.5 mA
- Sampling rate: Every 2 seconds
Resources:
Comparison: DHT22 Sensor vs DHT22 Module
Feature |
DHT22 Sensor |
DHT22 Module |
Form Factor |
Standalone 4-pin sensor |
Integrated module with extra components |
Pinout |
4 pins (VCC, Data, NC, GND) |
3 pins (VCC, Data, GND) |
Power Supply |
3.3V to 5.5V |
Wider range due to onboard regulation |
Ease of Use |
Requires external pull-up |
Simplified wiring |
Accuracy/Precision |
Sensor-dependent |
May vary slightly based on PCB quality |
Features:
- Full-range temperature compensation
- Measures relative humidity and temperature
- Calibrated digital signal output
- Excellent long-term stability
- No extra components required for basic usage
- 4-pin package for flexible integration
- Ultra-low power consumption
Principle of Operation:
- Asynchronous single-wire serial communication (not One-Wire)
- 5K pull-up resistor required between VCC and Data
- Outputs: 8-bit humidity integer + 8-bit humidity decimal + 8-bit temperature integer + 8-bit temperature decimal + 8-bit checksum
Pinout:

Pin |
Label |
Description |
1 |
VCC |
Power supply 3.5V to 5.5V |
2 |
Data |
Digital serial data output |
3 |
NC |
No connection (not used) |
4 |
GND |
Ground |
Note: Reversing VCC and GND will damage the sensor.
Applications:
- Weather monitoring stations
- Humidity controllers
- Air conditioning systems
Circuit Diagram:
Follow these connections:
- Place a 10K resistor between Pin 1 (VCC) and Pin 2 (Data)
- Pin 1 → Arduino 5V
- Pin 2 → Arduino digital pin 2
- Pin 4 → GND
- Pin 3 → Not connected

Library:
Install the SimpleDHT library: Sketch > Include Library > Add .ZIP Library
Example Arduino Code:
#include "SimpleDHT.h"
int pinDHT22 = 2;
SimpleDHT22 dht22(pinDHT22);
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("=================================");
Serial.println("Sample DHT22...");
float temperature = 0;
float humidity = 0;
int err = SimpleDHTErrSuccess;
if ((err = dht22.read2(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
Serial.print("Read DHT22 failed, err=");
Serial.println(err);
delay(2000);
return;
}
Serial.print("Sample OK: ");
Serial.print(temperature);
Serial.print(" *C, ");
Serial.print(humidity);
Serial.println(" RH%");
delay(2500);
}
Technical Details:
- Temperature range: -40 to 80°C ±0.5°C
- Humidity range: 0 to 100% RH ±2%
- Resolution: 0.1°C / 0.1% RH
- Operating voltage: 3V to 6V
- Current consumption: 1–1.5 mA
- Sampling rate: Every 2 seconds
Resources:
Comparison: DHT22 Sensor vs DHT22 Module
Feature |
DHT22 Sensor |
DHT22 Module |
Form Factor |
Standalone 4-pin sensor |
Integrated module with extra components |
Pinout |
4 pins (VCC, Data, NC, GND) |
3 pins (VCC, Data, GND) |
Power Supply |
3.3V to 5.5V |
Wider range due to onboard regulation |
Ease of Use |
Requires external pull-up |
Simplified wiring |
Accuracy/Precision |
Sensor-dependent |
May vary slightly based on PCB quality |