DHT11

DHT11 – Digital Humidity and Temperature Sensor

Specifications:

  • Sensor Type: Advanced
  • Sensor Output: Digital
  • Communication Protocol: 1-wire (40-bit data packet) (details are in databook)
  • Supply Voltage (Vcc): 3.5 – 5.5 V
  • (sonsor is compatible with 5V and may also work with 3.3V micro-controllers)
  • Current Consumption: 0.3 mA
  • Databook: DHT11.pdf

Interfacing Notes:

DHT11-pinsDHT11-inside

DHT11 sensor shown above requires a 10k-ohm pull up resistor between the DATA and Vcc pins. It is available as an easier to use 3-pin module, which includes the pull up resistor and sometimes an additional power LED.

 DHT11-module1 DHT11-module2

The 3-pin module shown above has the pin sequence GND, DATA, Vcc. However, if the sensor is to be used with a sensor shield, it is preferable to get the following type of module which has the pins arranged in GND, Vcc, DATA (Signal) sequence, so that it is compatible with the sensor shield’s standard pin sequence GND, Vcc, Signal (GVS).

  DHT11-module1-GVS

Arduino IDE library (with example test code):

  • Download library version 1.3.0 from google docs folder below
  • DHT_sensor_library.zip (by Adafruit, Version 1.3.0)
  • Later version of library may be available in Arduino IDE Library Manager
  • Library supports DHT11, DHT21 and DHT22 sensors
  • Default DHT example test code pin connections are shown below
Sensor Pins  ---  Arduino or Sensor Shield Pins
        GND <---> GND
        Vcc <---> Vcc (5V)
       DATA <---> D2  (Signal)