DHT11 Temperature and Humidity Module
Overview
The DHT11 digital temperature and humidity sensor is a composite sensor with calibrated digital signal output. It uses dedicated digital module acquisition technology and temperature and humidity sensing technology to ensure the product has extremely high reliability and excellent long-term stability. The sensor includes a resistive humidity sensing element and an NTC temperature measurement element, connected to a high-performance 8-bit microcontroller. Therefore, this product has excellent quality, ultra-fast response, strong anti-interference capability, and extremely high cost-performance ratio. The sensor connects to Arduino through 3P digital line. Single-wire serial interface makes system integration simple and fast. Combined with our provided code, you can quickly set it up. Ultra-small size, extremely low power consumption, and signal transmission distance of over 20 meters make it the best choice for various applications and even the most demanding application scenarios. The product comes in 3-pin PH2.0 package for convenient connection.
Product Photos

Product Specifications
- Supply Voltage: 3.3V~5V
- Interface Type: Digital
- Temperature Range: 0-50℃ Error ±2℃
- Humidity Range: 20-90%RH Error ±5%RH
Pin Description

No. | Pin | Description |
---|---|---|
1 | GND | Power Negative |
2 | VCC | Power Positive |
3 | S | Analog Signal Input |
Example Code
Arduino
/*
# Description:
# The following code can detect the current environmental humidity and temperature
*/
//
// FILE: dht11_test1.pde
// PURPOSE: DHT11 library test sketch for Arduino
//
#include <dht11.h>
dht11 DHT;
#define DHT11_PIN 4
void setup(){
Serial.begin(9600);
Serial.println("DHT TEST PROGRAM ");
Serial.print("LIBRARY VERSION: ");
Serial.println(DHT11LIB_VERSION);
Serial.println();
Serial.println("Type,\tstatus,\tHumidity (%),\tTemperature (C)");
}
void loop(){
int chk;
Serial.print("DHT11, \t");
chk = DHT.read(DHT11_PIN); // READ DATA
switch (chk){
case DHTLIB_OK:
Serial.print("OK,\t");
break;
case DHTLIB_ERROR_CHECKSUM:
Serial.print("Checksum error,\t");
break;
case DHTLIB_ERROR_TIMEOUT:
Serial.print("Time out error,\t");
break;
default:
Serial.print("Unknown error,\t");
break;
}
// DISPLAY DATA
Serial.print(DHT.humidity,1);
Serial.print(",\t");
Serial.println(DHT.temperature,1);
delay(2000);
}
Mind+ Example Code

Troubleshooting
For more questions and interesting applications, please visit the Forum or join QQ technical exchange group: 522420541