DHT22 Temperature Sensor
🌡️ DHT22 Temperature & Humidity Sensor
High Accuracy • Digital Output • Environmental Monitoring
📌 What is DHT22?
The DHT22 (also known as AM2302) is a digital temperature and humidity sensor that provides high accuracy readings compared to basic sensors.
👉 It measures:
Temperature
Relative Humidity
✔ Commonly used in:
Weather stations
IoT projects
Smart home systems
⚙️ Working Principle
The sensor contains two main components:
Humidity Sensor (Capacitive type)
Measures moisture in air
Capacitance changes with humidity
Temperature Sensor (Thermistor)
Measures ambient temperature
👉 Internal microcontroller:
Converts readings into digital data
Sends via single-wire communication
🔌 Pin Configuration (4-pin)
Pin 1 (VCC) → 3.3V – 6V
Pin 2 (DATA) → Digital signal output
Pin 3 (NC) → Not connected
Pin 4 (GND) → Ground
✔ Requires pull-up resistor (4.7k–10kΩ) on DATA line
📊 Technical Specifications
Operating Voltage: 3.3V – 6V
Temperature Range: -40°C to +80°C
Humidity Range: 0% – 100% RH
Temperature Accuracy: ±0.5°C
Humidity Accuracy: ±2–5% RH
Resolution:
Temperature: 0.1°C
Humidity: 0.1%
Sampling Rate: ~0.5 Hz (1 reading every 2 seconds)
🔄 Output Type
Digital signal (single-wire protocol)
No need for ADC (unlike analog sensors)
✔ Data is transmitted as a 40-bit digital message
🧠 Data Format (Simplified)
16 bits → Humidity
16 bits → Temperature
8 bits → Checksum
✨ Key Features
High accuracy compared to DHT11
Wide measurement range
Digital output (easy to interface)
Long transmission distance (up to ~20m with proper wiring)
Stable and reliable performance
🛠️ Applications
Weather monitoring systems
Smart home automation
HVAC systems
Agricultural monitoring
Greenhouse control
IoT environmental sensors
🔗 Arduino Connection
VCC → 5V (or 3.3V)
GND → GND
DATA → Digital pin (e.g., D2)
Add pull-up resistor between VCC and DATA
⚡ Advantages
Higher accuracy than basic sensors
Wider temperature and humidity range
Digital output (less noise interference)
Reliable for long-term monitoring
⚠️ Limitations
Slower sampling rate (2 seconds)
Slightly more expensive than basic sensors
Requires timing-sensitive communication
Performance affected by condensation
💡 Important Notes
Do not take readings faster than every 2 seconds
Use proper pull-up resistor for stable communication
Avoid placing sensor in direct sunlight or water exposure
Allow time to stabilize after power-up
🧾 Summary
The DHT22 sensor is a high-accuracy digital sensor for measuring:
✔ Temperature
✔ Humidity
👉 Ideal for:
IoT projects
Environmental monitoring
Smart systems
