Skip to Content

DHT11 Temperature And Humidity Sensor Module With DIP Red LED

The DHT11 Temperature and Humidity Sensor Module measures ambient temperature and relative humidity and provides the readings through a digital single-wire interface. It combines a capacitive humidity sensing element, a temperature sensor, and an internal controller that processes the measurements and transmits calibrated digital data. This module includes a red power indicator LED, onboard pull-up resistor, and filter capacitor. Its three-pin connection makes it suitable for basic environmental monitoring projects using Arduino and other microcontrollers.

Package Includes

  • 1 x DHT11 Temperature and Humidity Sensor Module


DHT Temperature Humidity Sensor
24.50 AED 24.50 AED (Tax included)

Terms and Conditions
30-day money-back guarantee
Shipping: 2-3 Business Days

 

Features

  • Temperature and humidity measurement: Measures ambient temperature and relative humidity.
  • Digital output: Transmits measurement data through a single-wire digital interface.
  • Factory calibration: Provides calibrated digital readings without requiring external analog signal processing.
  • Temperature compensation: Includes internal temperature compensation for humidity measurement.
  • Onboard power indicator: Red LED indicates that the module is powered.
  • Integrated components: Includes a pull-up resistor and filter capacitor on the module.
  • Low power consumption: Suitable for basic low-power environmental monitoring.
  • Mounting provision: PCB includes a screw hole for secure installation.
  • Microcontroller compatibility: Can interface with Arduino and other MCUs that support the DHT11 communication protocol.

Principle of Operation

The DHT11 uses a capacitive humidity sensing element to detect changes in relative humidity and an internal temperature sensor to measure ambient temperature. An integrated controller processes the sensor signals and provides calibrated digital readings.

DHT11 temperature and humidity sensor - STEMinds Documentation

Communication uses a single-wire digital protocol. The microcontroller sends a start signal, and the DHT11 responds with a 40-bit data frame containing humidity, temperature, and checksum information.

Measuring Humidity Using Sensor (DHT11) : 5 Steps - Instructables

Each data frame contains:

  • 8 bits for integer relative humidity.
  • 8 bits for decimal relative humidity.
  • 8 bits for integer temperature.
  • 8 bits for decimal temperature.
  • 8 bits for checksum verification.

The module requires a new communication cycle for each reading. The DHT11 should not be read more frequently than once every second; a longer interval, such as 2 seconds, is recommended.

Pinout

DHT11 temperature and humidity sensor module pinout

Pin Label Description
1 VCC Power supply (3.3V to 5.5V)
2 DATA / OUT Digital data output
3 GND Ground

Note: Check the module's printed pin labels and orientation before connecting it. Reversing VCC and GND may damage the sensor.

Wiring and Connection

The DHT11 module can be connected to an Arduino using three wires. The data output connects to a digital GPIO pin, not an analog input.

DHT11 temperature and humidity sensor Arduino connection diagram

Arduino connection:

  • VCC → Arduino 5V
  • GND → Arduino GND
  • DATA / OUT → Arduino digital pin 2

Note: The module includes an onboard pull-up resistor. A separate pull-up resistor is generally not required when using this module. Check the output voltage compatibility when connecting it to a 3.3V-only microcontroller.

Library

The Adafruit DHT sensor library provides functions for reading temperature and humidity from the DHT11.

To install the library:

  1. Open the Arduino IDE.
  2. Select Sketch > Include Library > Manage Libraries.
  3. Search for DHT sensor library by Adafruit.
  4. Install the library.
  5. Search for and install Adafruit Unified Sensor if requested as a dependency.

Library repository: Adafruit DHT Sensor Library

Code

The following Arduino example reads temperature and relative humidity from the DHT11 using the Adafruit DHT library. Connect the module's DATA pin to Arduino digital pin 2.

#include "DHT.h"

#define DHTPIN 2
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  dht.begin();

  Serial.println("DHT11 Temperature and Humidity Sensor");
}

void loop() {
  delay(2000);

  float humidity = dht.readHumidity();
  float temperature = dht.readTemperature();

  if (isnan(humidity) || isnan(temperature)) {
    Serial.println("Failed to read from DHT11 sensor");
    return;
  }

  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.print(" %");

  Serial.print("  Temperature: ");
  Serial.print(temperature);
  Serial.println(" C");
}

How the code works:

  • DHTPIN defines the digital pin connected to the sensor's DATA output.
  • DHTTYPE selects the DHT11 sensor model.
  • dht.begin() initializes the sensor communication.
  • readHumidity() retrieves the relative humidity reading.
  • readTemperature() retrieves the temperature in degrees Celsius.
  • The program checks for invalid readings and displays valid measurements in the Serial Monitor.

Note: The DHT11 has limited measurement resolution and accuracy compared with newer environmental sensors. It is intended for basic monitoring rather than precision measurement.

Applications

  • Home automation: Monitor indoor temperature and humidity.
  • Weather monitoring: Build basic environmental monitoring stations.
  • HVAC systems: Monitor ambient conditions for temperature and ventilation control.
  • Greenhouses: Monitor temperature and humidity in agricultural environments.
  • Data logging: Record environmental measurements using microcontrollers.
  • IoT projects: Add temperature and humidity sensing to connected devices.
  • Laboratory projects: Use for basic environmental experiments and demonstrations.

Specifications

Specification Value
Sensor DHT11
Operating voltage 3.3V to 5.5V DC
Current consumption 0.5 mA to 2.5 mA (measurement-dependent)
Output type Digital, single-wire interface
Humidity measurement range 20% to 90% RH
Humidity accuracy ±5% RH
Humidity resolution 1% RH
Temperature measurement range 0°C to 50°C
Temperature accuracy ±2°C
Temperature resolution 1°C
Sampling interval At least 1 second; 2 seconds recommended
Power indicator Red LED
Number of pins 3
Module dimensions Approximately 32 × 14 mm

Comparison of DHT11, DHT22, and LM35

DHT11 vs DHT22: Pinout, Working & Arduino Code

The DHT11 and DHT22 measure both temperature and humidity, while the LM35 is an analog temperature sensor that measures temperature only.

Feature DHT11 DHT22 LM35
Temperature range 0°C to 50°C -40°C to 80°C -55°C to 150°C (device-dependent)
Temperature accuracy ±2°C Typically ±0.5°C Typically ±0.5°C at 25°C
Humidity range 20% to 80% RH 0% to 100% RH Not supported
Humidity accuracy ±5% RH Typically ±2% to ±5% RH Not supported
Output type Digital Digital Analog
Typical applications Basic environmental monitoring Wider-range environmental monitoring Temperature measurement

Resources