Skip to main content

DHT22 – Temperature and Humidity Sensor

[Click the image to enlarge it]

Pin Identification and Configuration

No:

Pin Name

Description

For DHT22 Sensor

1

Vcc

Power supply 3.5V to 5.5V

2

Data

Outputs both Temperature and Humidity through serial Data

3

NC

No Connection and hence not used

4

Ground

Connected to the ground of the circuit

For DHT22 Module

1

Vcc

Power supply 3.5V to 5.5V

2

Data

Outputs both Temperature and Humidity through serial Data

3

Ground

Connected to the ground of the circuit

 

DHT22 Specifications

  • Operating Voltage: 3.5V to 5.5V
  • Operating current: 0.3mA (measuring) 60uA (standby)
  • Output: Serial data
  • Temperature Range: -40°C to 80°C
  • Humidity Range: 0% to 100%
  • Resolution: Temperature and Humidity both are 16-bit
  • Accuracy: ±0.5°C and ±1%

Note: The DHT22 datasheet can be found at the bottom of the page

 

DHT22 Equivalent Temperature Sensors

DHT11, AM2302, SHT71

 

Other Temperature Sensors

Thermocouple, TMP100, LM75, DS18820, SHT15, LM35DZ, TPA81, D6T

 

Difference between DHT22 Sensor and Module

The DHT22 sensor is the successor of the DHT11 module, it can either be purchased as a sensor or as a module. Either way the performance of the sensor is same. The sensor will come as a 4-pin package out of which only three pin will be used whereas the module will come with just three pins as shown in the DHT22 pinout above.

The only difference between the sensor and module is that the module will have a filtering capacitor and pull-up resistor inbuilt, and for the sensor you have to use them externally if required.

The module is slightly costly than the DHT11, but it has a higher measuring range and slightly better accuracy .

 

Where DHT22 Sensor is Used

The DHT22 is a commonly used Temperature and humidity sensor. The sensor comes with a dedicated NTC to measure temperature and an 8-bit microcontroller to output the values of temperature and humidity as serial data. The sensor is also factory calibrated and hence easy to interface with other microcontrollers.

The sensor can measure temperature from -40°C to 80°C and humidity from 0% to 100% with an accuracy of ±1°C and ±1%. So if you are looking to measure in this range then this sensor might be the right choice for you.

 

How to use DHT22 Sensor

The DHT22 Sensor is factory calibrated and outputs serial data and hence it is highly easy to set it up. The connection diagram for this sensor is shown below.

DHT22 Microcontroller Interfacing Circuit Diagram

As you can see the data pin is connected to an I/O pin of the MCU and a 5K pull up resistor is used. This data pin outputs the value of both temperature and humidity as serial data. If you are trying to interface DHT22 with Arduino Uno then there are ready made libraries for it which will give you a quick start.

If you are trying to interface it with some other MCU then the datasheet given below will come in handy. The output given out by the data pin will be in the order of 8bit humidity integer data + 8bit the Humidity decimal data +8 bit temperature integer data + 8bit fractional temperature data +8 bit parity bit. To request the DHT11 module to send these data the I/O pin has to be momentarily made low and then held high as shown in the timing diagram below.

DHT22 Timing Diagram

The duration of each host signal is explained in the datasheet, with neat steps and illustrative timing diagrams

 

Applications

  • Measure temperature and humidity
  • Local Weather station
  • Automatic climate control
  • Environment monitoring

 

2D – model of the sensor

DHT22 Sensor Dimensions




Download Datasheet PDF:
DHT22 Sensor Datasheet