The DHT21 (AM2301) is a popular digital sensor for measuring temperature and humidity. It combines a capacitive humidity sensor and a thermistor to provide digital signal output, making it convenient for use in electronics projects and IoT systems. Below is a detailed overview:
Key Specifications:
Temperature Measurement:
- Range: -40°C to 80°C
- Accuracy: ±0.5°C
- Resolution: 0.1°C
Humidity Measurement:
- Range: 0% to 100% RH
- Accuracy: ±3% RH (typical)
- Resolution: 0.1% RH
Power Requirements:
- Operating Voltage: 3.3V to 5.5V
- Average Current: 0.5 mA (approx.)
Output:
- Digital signal (single-bus communication protocol).
Response Time:
- Temperature: ≤1 second
- Humidity: ≤5 seconds
Size:
- Compact design for easy integration into systems.
Features:
- Factory-calibrated sensor ensures accuracy.
- Long-term stability and reliability.
- Low power consumption.
- Compatible with microcontrollers like Arduino, Raspberry Pi, and ESP series.
- Encased in a protective housing, making it more robust than DHT11 or DHT22.
Applications:
- Weather monitoring systems.
- Home automation (HVAC systems, humidifiers).
- Agricultural and industrial environmental monitoring.
- IoT devices.
Interfacing:
To interface the DHT21/AM2301 with microcontrollers:
- Connect the VCC pin to a 3.3V or 5V power supply.
- Connect the GND pin to ground.
- Connect the Data pin to a digital I/O pin on the microcontroller. A 4.7k-10k ohm pull-up resistor is often required between the Data pin and VCC.
Example Libraries:-
- Arduino: Use libraries like
DHT
or Adafruit DHT Sensor Library
. - Python: For Raspberry Pi, libraries like
Adafruit_DHT
are commonly used.