-40C to 80C (0.5C accuracy)
-40C to 80C (0.5C accuracy)
0% to 100% RH (2% accuracy)
Outputs temperature and humidity values as a digital signal, eliminating the need for analog-to-digital converters.
Uses a single bus pin for data transmission, reducing the number of required I/O pins on the microcontroller.
1.5mA (typical)
0.1mA (typical)
2 seconds (typical)
2 seconds (typical)
3.3V to 5.5V (allowable voltage range)
15mm x 12mm x 6mm (L x W x H)
No external sensors or components required
Built with high-quality components for reliable operation in various environments
Physical Characteristics
15mm x 12mm x 6mm (L x W x H)
2 grams (approximately)
| + VCC | Power supply pin (3.3V to 5.5V) |
| + GND | Ground pin |
| + DATA | Single-wire communication pin |
Applications
| The DHT22 temperature sensor is suitable for a wide range of applications, including |
Certifications and Compliance
| The DHT22 temperature sensor module complies with the following certifications and standards |
Conclusion
The DHT22 temperature sensor module is a reliable, accurate, and user-friendly component for measuring temperature and humidity levels in various IoT applications. Its compact design, low power consumption, and digital output make it an ideal choice for projects requiring precise environmental monitoring.
DHT22 Temperature Sensor DocumentationOverview
The DHT22 is a low-cost, accurate, and reliable digital temperature and humidity sensor. It's widely used in IoT projects, weather stations, and home automation systems.PinoutVCC: Connect to 3.3V or 5V power supply
GND: Connect to ground
DATA: Connect to digital pin on microcontrollerTechnical SpecificationsTemperature range: -40C to 80C with 0.5C accuracy
Humidity range: 0% to 100% with 2% accuracy
Resolution: 0.1C for temperature, 0.1% for humidity
Response time: 5 secondsCode Examples### Example 1: Arduino Connection and Reading Temperature and HumidityThis example demonstrates how to connect the DHT22 sensor to an Arduino board and read temperature and humidity values.```c
#include <DHT.h>#define DHTPIN 2 // Digital pin connected to the DHT sensor
#define DHTTYPE DHT22DHT dht(DHTPIN, DHTTYPE);void setup() {
Serial.begin(9600);
dht.begin();
}void loop() {
delay(2000);float t = dht.readTemperature();
float h = dht.readHumidity();if (isnan(t) || isnan(h)) {
Serial.println("Failed to read from DHT sensor!");
} else {
Serial.print("Temperature: ");
Serial.print(t);
Serial.println(" C");Serial.print("Humidity: ");
Serial.print(h);
Serial.println(" %");
}
}
```### Example 2: Raspberry Pi Connection using PythonThis example demonstrates how to connect the DHT22 sensor to a Raspberry Pi and read temperature and humidity values using Python.```python
import Adafruit_DHTsensor = Adafruit_DHT.DHT22
pin = 4 # GPIO pin connected to the DHT sensorwhile True:
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)if humidity is not None and temperature is not None:
print('Temp={0:0.1f}C Humidity={1:0.1f}%'.format(temperature, humidity))
else:
print('Failed to get reading. Try again!')
```Note: Make sure to install the necessary libraries and modules for your chosen platform before running the code examples.