Wiring up DHT11 Temp & Humidity sensor to the Arduino


DHT11 Temperature and Humidity sensor

The DHT11 is chosen because it is lab calibrated, accurate and stable and its signal output is digital. Most important of all, it is relatively inexpensive for the given performance. Below is the pinout of the sensor. 


 Pin       Name     Description
 1  VDD  Power supply 3 - 5.5 V DC
 2  DATA  Serial data output
 3  NC  Not connected
 4  GND  Ground


Connect the sensor to the Arduino as shown below

 DHT11  Arduino
 Pin 1  Vcc
 Pin 2  Analog0
 Pin 4  Gnd

Install the DHT11 library:

Down load this zipped file and unzip it under the libraries directory of the Arduino IDE folder. For example, for my computer's setup, the directory is


After copying files across, the directory


should have the following two files: dht.h and dht.cpp


Load the program dht11.ino after you save it onto your computer and open it in Arduino IDE .


Fig 1. Arduino IDE

                                                                   Fig 2: How to connect the sensor to Arduino


Running the program:

- Compile the program in the IDE
- Run the program and open the Serial port ( shown below )

           Fig 3: How to see the Serial port output

Output of the program:

And you should see the temperature and Humidity readings



Zircon - This is a contributing Drupal Theme
Design by WeebPal.