DHT22 / AM2302 Temperature and Humidity Sensor

DHT22 / AM2302 Temperature and Humidity Sensor image

View on Amazon

Overview

The DHT22 is a versatile and affordable sensor for measuring temperature and humidity. It provides calibrated digital output and is easy to interface with microcontrollers. With a temperature measurement range of -40°C to 80°C and humidity range of 0% to 100%, the DHT22 is suitable for a variety of applications, including environmental monitoring and HVAC systems.

About DHT22 / AM2302 Temperature and Humidity Sensor

The DHT22, also known as AM2302, is a low-cost digital sensor designed for precise temperature and humidity measurement. It uses a capacitive humidity sensor and a thermistor for reliable data collection and communicates via a single-wire digital interface, ensuring easy integration with ESP32, Arduino, and other microcontrollers.

Key Features

  • Improved Accuracy & Range – More precise than DHT11, with a wider measurement range.
  • Single-Wire Communication – Simple interfacing with microcontrollers.
  • Capacitive Humidity Sensing – Ensures stable and long-term performance.
  • Ideal for Demanding Applications – Used in weather stations, HVAC systems, and industrial monitoring.

With its affordability and high accuracy, the DHT22 is a great choice for climate monitoring and smart home applications. 🚀

Where to Buy

Get Your DHT22 / AM2302

DHT22 / AM2302 Temperature and Humidity Sensor

Starting from

$5 per unit

Amazon com
Amazon.com Ships worldwide
Amazon de
Amazon.de Ships to EU
Aliexpress
AliExpress Best value option

💡 Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specs

DHT22 / AM2302 Specifications

Complete technical specification details for DHT22 / AM2302 Temperature and Humidity Sensor

📊 Technical Parameters

Operating Voltage 3.3V to 5.5V
Temperature Range -40°C to 80°C
Humidity Range 0% to 100% RH
Temperature Accuracy ±0.5°C
Humidity Accuracy ±2% RH
Sampling Rate 0.5 Hz (once every 2 seconds)
Dimensions 15.1mm x 25mm x 7.7mm
Pin Configuration

DHT22 / AM2302 Pinout

The DHT22/AM2302 uses the same 4-pin layout as the DHT11, with improved accuracy and wider measurement range.

Visual Pinout Diagram

Pinout Diagram Primary
DHT22 / AM2302 Temperature and Humidity Sensor pinout
4
Total Pins

Pin Types

Power
2
Communication
1
Control
1

Quick Tips

🔌

Uses proprietary single-wire digital protocol,⚠️ Requires 5kΩ to 10kΩ pull-up resistor on DATA pin

💡

Higher accuracy than DHT11 (±0.5°C vs ±2°C),⏱️ Can be read once every 2 seconds

❄️

Operates in wider temperature range (-40°C to 80°C)

Pin Descriptions

Pin NameTypeDescriptionNotes
1 VCC
Power

Power supply input (3.3V to 6V)

Works with both 3.3V and 5V logic levels

2 DATA
Communication

Digital signal output

Single-wire digital interface for data transmission

3 NC
Control

Not connected

Leave this pin unconnected

4 GND
Power

Ground connection

Connect to ESP32 ground

Connection Guide

Wiring DHT22 / AM2302 to ESP32

Connect the DHT22/AM2302 using the single-wire digital interface with a pull-up resistor for stable readings.

Visual Wiring Diagram

Wiring Diagram Recommended
DHT22 / AM2302 Temperature and Humidity Sensor wiring with ESP32
4
Connections

Connection Status

Required
4

Protocol

OneWire

Pin Connections

DHT22 / AM2302 PinConnectionESP32 PinDescription
1 VCC Required
3.3V

Power supply (3.3V to 6V supported)

2 GND Required
GND

Ground connection

3 DATA Required
GPIO4

Digital data line

4 DATA (Pull-up) Required
5kΩ to VCC

Pull-up resistor for reliable communication

💡

Any GPIO pin works - GPIO4 is commonly used

🔧

5kΩ pull-up resistor recommended (10kΩ also works)

Use 3.3V for ESP32, sensor supports up to 6V

⏱️

Minimum 2 second interval between readings

🌡️

Better accuracy than DHT11 for demanding applications

Help & Support

DHT22 / AM2302 Troubleshooting

Common issues and solutions to help you get your sensor working

Common Issues

Debugging Tips

Code Examples

DHT22 / AM2302 Programming Examples

Ready-to-use code examples for different platforms and frameworks

Summary

Wrapping Up DHT22 / AM2302

The ESP32 DHT22 / AM2302 Temperature and Humidity Sensor is a powerful environment sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.

Best Practices

For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.

Safety First

Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.

Ready to Start Building?

Now that you have all the information you need, it's time to integrate the DHT22 / AM2302 into your ESP32 project and bring your ideas to life!