Blog, Uncategorized

DHT22 Digital Temperature & Humidity Sensor Module

DHT22 Digital Temperature & Humidity Sensor

High-Precision Environmental Sensing for Arduino Projects

Introduction

The DHT22 (AM2302) is a calibrated digital sensor that provides high-accuracy temperature and humidity measurements. With its single-wire serial interface, it’s perfect for weather stations, greenhouse monitoring, and HVAC systems.

DHT22 Digital Temperature & Humidity Sensor

Key Features

🌡️ High Accuracy

±0.5°C temperature, ±2% humidity

🔌 Simple Interface

Single-wire digital communication

📶 Long Range

Up to 20m signal transmission

🔄 Fast Updates

2-second sampling rate

Technical Specifications

Temperature Range -40°C to 80°C
Humidity Range 0-100% RH
Operating Voltage 3.3V – 5.5V DC
Current Consumption 1.5mA (measuring), 50μA (standby)
Resolution 0.1°C / 0.1% RH
Dimensions 27mm × 59mm × 13.5mm

Pin Configuration

Pin Function Arduino Connection
1 VCC (3.3V-5V) 5V
2 DATA Digital Pin (D2)
3 NC Not Connected
4 GND GND
Note: Requires 4.7KΩ-10KΩ pull-up resistor between DATA and VCC

Wiring with Arduino

Important: Avoid long wires (>20cm) without proper shielding to prevent signal issues

Library Setup

  1. Install the DHT sensor library by Adafruit
  2. Include the required libraries:
  3. Initialize the sensor:

Basic Sensor Example

Advanced Features

Heat Index Calculation

Fahrenheit Conversion

Sensor Diagnostics

Power Saving

Troubleshooting

No Readings (NaN values)

  • Verify wiring connections
  • Check pull-up resistor is installed
  • Ensure proper power supply (3.3V-5V)

Incorrect Values

  • Keep sensor away from heat sources
  • Allow 2 seconds between readings
  • Check for condensation on sensor

Communication Errors

  • Shorten data wire length
  • Try different digital pin
  • Add 100nF capacitor between VCC and GND