Stufin
Home Quick Cart Profile

DHT11 Humidity and Temperature Sensor Module

Buy Now on Stufin

Temperature measurement range

0C to 50C (2C accuracy)

Humidity measurement range

20% to 80% RH (5% accuracy)

  • Digital Output:

Outputs digital signals directly to a microcontroller or computer

No need for external analog-to-digital conversion (ADC)

  • Low Power Consumption:

Operating voltage

3.3V to 5V

Current consumption

< 0.5mA (average)

  • Simple Interface:

3-pin interface (VCC, DATA, and GND)

Easy to connect to any microcontroller or computer

  • Fast Response Time:

Temperature measurement response time

10-15 seconds

Humidity measurement response time

1-2 seconds

  • Compact Design:

Small module size (15.5 mm x 12 mm x 6 mm)

Suitable for use in compact IoT devices

  • Reliability:

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

Operating temperature range

-20C to 80C

Storage temperature range

-40C to 125C

Humidity range

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.

Pin Configuration

  • DHT11 Humidity and Temperature Sensor Module Pinout Explanation
  • The DHT11 Humidity and Temperature Sensor Module is a popular IoT component used to measure temperature and humidity in various applications. The module has a 3-pin interface, which makes it easy to connect and use with microcontrollers, Arduino boards, and other IoT devices.
  • Pinout Structure:
  • Here's a breakdown of each pin on the DHT11 Humidity and Temperature Sensor Module:
  • Pin 1: VCC (Power Supply)
  • Function: Power supply pin for the module
  • Voltage: Typically 3.3V to 5V (check the datasheet for specific voltage requirements)
  • Connection: Connect to the power supply of your microcontroller or board (e.g., Arduino 5V pin)
  • Pin 2: DATA (Output)
  • Function: Digital output pin that provides temperature and humidity data
  • Signal: Digital signal (0V to VCC)
  • Connection: Connect to a digital input pin on your microcontroller or board (e.g., Arduino digital pin)
  • Pin 3: GND (Ground)
  • Function: Ground pin for the module
  • Connection: Connect to the ground pin on your microcontroller or board (e.g., Arduino GND pin)
  • Connecting the Pins:
  • To connect the DHT11 Humidity and Temperature Sensor Module to your microcontroller or board, follow these steps:
  • 1. Connect the VCC (Pin 1) to the power supply pin on your microcontroller or board (e.g., Arduino 5V pin).
  • 2. Connect the DATA (Pin 2) to a digital input pin on your microcontroller or board (e.g., Arduino digital pin).
  • 3. Connect the GND (Pin 3) to the ground pin on your microcontroller or board (e.g., Arduino GND pin).
  • Important Notes:
  • Make sure to check the datasheet for the specific voltage requirements and pin configurations of your DHT11 module.
  • Use a pull-up resistor (typically 10k) between the DATA pin and VCC pin to ensure stable communication.
  • Avoid applying voltage to the pins in the wrong order, as this may damage the module.
  • By following these guidelines, you can successfully connect and use the DHT11 Humidity and Temperature Sensor Module in your IoT projects.

Code Examples

DHT11 Humidity and Temperature Sensor Module Documentation
Overview
The 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 Specifications
Temperature 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 5mm
Pinout
VCC: 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 11
DHT 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_DHT
DHT_SENSOR = Adafruit_DHT.DHT11
DHT_PIN = 17  # Connect DHT11 OUT pin to Raspberry Pi GPIO 17
while 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 dht
dht_sensor = dht.DHT11(machine.Pin(4))  # Connect DHT11 OUT pin to ESP8266 GPIO 4
while 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.