DHT22 Sensor: A Digital Humidity and Temperature Sensor

The DHT22 Sensor and AM2302 are the same sensors is designed for measuring the relative humidity and temperature of its surrounding air. It has an inbuilt humidity sensor and thermistor to detect the humidity and temperature. In this article I’m sharing the details of Pinout, electrical characteristics and specifications.

Pinout

DHT22 pinout

Pin Configuration

PinFunction
1VDD – positive supply voltage
2DATA data pin
3NC (Not Connected)
4GND is ground pin

Features

  • The DHT22 delivers a pre calibrated digital signal.
  • The Measurement Ranges of Humidity and Temperature is about,
    • Humidity: 0 – 100% RH
    • Temperature: -40ยฐC to 80ยฐC
  • The measurement value is high Accurate and it is about,
    • Humidity: ยฑ2% RH (max ยฑ5%)
    • Temperature: ยฑ0.5ยฐC
  • Long Term Stability and Low Power Consumption
  • Long Transmission Distance of  Up to 20 meters.
  • Fully Interchangeable with no need for additional components.

Applications

  • HVAC systems
  • Weather stations
  • Environmental monitoring
  • Greenhouses
  • IoT projects

Internal Structure and Technology

This DHT22 sensor is designed with two types of sensors which are capacitive humidity sensor and a thermistor. The capacitive humidity sensor which senses the humidity and thermistor will check the temperature of the sensor’s surrounding area. The detected signal is passed to the micro controller for further processing of the data.

Technical Specifications

ParameterValue
Voltage Supply3.3V to 6V DC
Output SignalDigital (Single-wire bus)
Humidity Range0 – 100% RH
Temperature Range-40ยฐC –  80ยฐC
Accuracyยฑ2% RH; ยฑ0.5ยฐC
Resolution0.1% RH; 0.1ยฐC
DimensionsSmall: 14ร—18ร—5.5mm; Large: 22ร—28ร—5mm
Sampling RateEvery 2 seconds

Communication Protocol

The DHT22 uses a single-wire serial communication protocol. The data packet sent from the sensor includes:

  • 8 bits integral RH
  • 8 bits decimal RH
  • 8 bits integral temperature
  • 8 bits decimal temperature
  • 8 bits checksum

Data Transmission Process:

  1. Start Signal: The MCU sends a low signal >1ms.
  2. Sensor Response: DHT22 sends a response signal followed by 40 bits of data.
  3. Bit Encoding:
    • โ€˜0โ€™ bit: 26โ€“28 ยตs high level
    • โ€˜1โ€™ bit: ~70 ยตs high level

The sensor returns to standby mode until the next start signal.

Electrical Characteristics

ConditionMinTypMaxUnit
Voltage3.356V
Measuring Current11.5–mA
Standby Current40–50ยตA

Best Practices and Precautions

  • Avoid operating outside the recommended RH and temperature ranges.
  • Protect from chemical vapors and strong light and UV exposure.
  • Use shielded cables to improve communication quality.
  • Avoid using it under dew conditions or in critical safety systems.
  • Recommended soldering temperature is < 260ยฐC.