0C to 50C (2C accuracy)
0C to 50C (2C accuracy)
20% to 80% RH (5% accuracy)
Outputs digital signals directly to a microcontroller or computer
No need for external analog-to-digital conversion (ADC)
3.3V to 5V
< 0.5mA (average)
3-pin interface (VCC, DATA, and GND)
Easy to connect to any microcontroller or computer
10-15 seconds
1-2 seconds
Small module size (15.5 mm x 12 mm x 6 mm)
Suitable for use in compact IoT devices
Built-in capacitors for noise filtering and decoupling
High immunity to interference and noise
Package Includes
1 x DHT11 Humidity and Temperature Sensor Module
1 x 3-pin header (for easy connection to a microcontroller or computer)
Applications
Weather stations and forecasting systems
Home automation and smart building systems
Industrial control and monitoring systems
Environmental monitoring systems
Agricultural and livestock monitoring systems
Medical and healthcare devices
Operating Conditions
-20C to 80C
-40C to 125C
20% to 80% RH
Wiring Diagram
| The wiring diagram for the DHT11 sensor module is straightforward |
| Pin | Function |
| --- | --- |
| VCC | Power supply (3.3V to 5V) |
| DATA | Digital data output |
| GND | Ground |
Notes
The DHT11 sensor module should be placed away from direct sunlight, moisture, and heat sources to ensure accurate measurements.
The module should be connected to a 3.3V or 5V power supply to ensure proper operation.
For accurate measurements, the sensor should be calibrated periodically according to the manufacturer's recommendations.
DHT11 Humidity and Temperature Sensor Module DocumentationOverviewThe DHT11 Humidity and Temperature Sensor Module is a low-cost, digital temperature and humidity sensor module that can be easily integrated into various IoT projects. It is a popular choice for monitoring environmental conditions in applications such as home automation, weather stations, and industrial control systems.Technical SpecificationsTemperature range: 0C to 50C (2C accuracy)
Humidity range: 20% to 80% RH (5% accuracy)
Communication protocol: Digital (Single-bus)
Power supply: 3.3V to 5V
Operating current: 2.5mA (average)
Response time: 1 second
Dimensions: 15mm x 15mm x 5mmPinoutVCC: Power supply (3.3V to 5V)
GND: Ground
OUT: Digital output (temperature and humidity data)Code Examples### Example 1: Basic Temperature and Humidity Reading (Arduino)This example demonstrates how to read temperature and humidity data from the DHT11 sensor using an Arduino board.
```c
#include <DHT.h>#define DHTPIN 2 // Connect DHT11 OUT pin to Arduino digital pin 2
#define DHTTYPE DHT11 // DHT 11DHT dht(DHTPIN, DHTTYPE);void setup() {
Serial.begin(9600);
dht.begin();
}void loop() {
float temperature = dht.readTemperature();
float humidity = dht.readHumidity();Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" C");Serial.print("Humidity: ");
Serial.print(humidity);
Serial.println(" %RH");delay(2000);
}
```
### Example 2: Monitoring Temperature and Humidity with a Raspberry Pi (Python)This example demonstrates how to read temperature and humidity data from the DHT11 sensor using a Raspberry Pi and Python.
```python
import Adafruit_DHTDHT_SENSOR = Adafruit_DHT.DHT11
DHT_PIN = 17 # Connect DHT11 OUT pin to Raspberry Pi GPIO 17while True:
humidity, temperature = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN)if humidity is not None and temperature is not None:
print("Temperature: {:.1f} C".format(temperature))
print("Humidity: {:.1f} %RH".format(humidity))
else:
print("Failed to retrieve data from DHT11 sensor")time.sleep(2)
```
### Example 3: IoT Weather Station with ESP8266 (MicroPython)This example demonstrates how to read temperature and humidity data from the DHT11 sensor using an ESP8266 board and MicroPython.
```python
import machine
import dhtdht_sensor = dht.DHT11(machine.Pin(4)) # Connect DHT11 OUT pin to ESP8266 GPIO 4while True:
temperature = dht_sensor.temperature()
humidity = dht_sensor.humidity()print("Temperature: {:.1f} C".format(temperature))
print("Humidity: {:.1f} %RH".format(humidity))time.sleep(2)
```
These code examples demonstrate the basic usage of the DHT11 Humidity and Temperature Sensor Module in various IoT contexts. The module can be easily integrated into more complex projects, such as home automation systems, weather stations, and industrial monitoring systems.