Skip to content
sensors / dht11.md

DHT11

A cheap single-wire temp + humidity sensor. ±2°C / ±5 %RH accuracy. The 3-pin breakout (VCC, DATA, GND) skips the pull-up resistor work.

In stock Manufacturer 1 files · 670 KB

Specs

Spec Value
Humidity range 20–90 %RH (±5 %)
Temp range 0–50 °C (±2 °C)
Sample rate 1 Hz
Voltage 3.3–5 V
Output Custom 1-wire (not Dallas 1-Wire!)

Wiring (3-pin module)

Module Arduino Uno
VCC (+) 5 V
DATA D2
GND (–) GND

If the module has 4 pins (bare DHT11), add a 10 kΩ pull-up between DATA and VCC.

Wiring example — Arduino + DHT library

#include "DHT.h"

#define DHTPIN  2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

void setup() { Serial.begin(9600); dht.begin(); }
void loop() {
  float t = dht.readTemperature();
  float h = dht.readHumidity();
  if (!isnan(t) && !isnan(h)) {
    Serial.print(t); Serial.print(" °C  ");
    Serial.print(h); Serial.println(" %RH");
  }
  delay(2000);
}

Library: Adafruit_Sensor + DHT sensor library (Arduino IDE → Library Manager).

Schematic

DHT11 modules are simple — sensor + pull-up resistor + decoupling cap. See the datasheet PDF for the internal block diagram and protocol timing.

DHT11 vs DHT22

DHT11 DHT22
Temp accuracy ±2 °C ±0.5 °C
RH accuracy ±5 % ±2 %
Range 0–50 °C -40 to 80 °C
Cost Low ~2×

Pick DHT22 if you need accuracy or sub-zero readings.

Last updated: 2026-05-13 · Source on GitHub