Interfacing DHT11 Temperature and Humidity Sensor with Arduino

Learn the interfacing of DHT11 Temperature and Humidity sensor with Arduino. The DHT11 sensor is capable of measuring Temperature as well as humidity. We will be using Arduino UNO and DHT11 sensor for this. So, let’s start.

First, let’s start with the basics of the DHT11 Temperature and Humidity sensor.
Power: 3-5V
Current: 2.5mA
Humidity: 20-95%, ±5% accuracy
Temperature: 0 to 50°C, ±2°C accuracy

Step 1: Required Components

DHT11 Sensor x 1
Breadboard x 1
Arduino UNO Board x 1
Jumper Wires

Step 2: Circuit Time

Make the circuit as per given diagram. DHT11 has basically 3 pins, VCC, GND, and Data. VCC pin is used to provide power supply to the module and Data pin send data to the Arduino board. Connect VCC pin of DHT11 to +5v of Arduino. Then, Connect Data pin of DHT11 to pin 8 of Arduino. Now, Connect GND pin to GND of Arduino.

Circuit of DHT11 Temperature and Humidity Sensor with Arduino

Step 3: Code Time

This is code for DHT11 in Arduino. We have included the “dht” library included in Arduino IDE. Then, declare Data pin as pin 8. Begin the serial monitor at 9600 baud rate. Use the DHT.read11 to take a reading from DHT11 Data pin. Now, Serial monitor then prints Temperature and humidity.

Step 4: Upload the code to Arduino

Upload the above-given code to the Arduino UNO Board after the components are set as per the Circuit Diagram. Data pin of DHT11 provides reading to Arduino board and Arduino will display it in the serial monitor. Screenshot of the output of Serial Monitor is as below.

Screenshot of DHT11 Temperature and Humidity Sensor with Arduino

For information about uploading code to Arduino UNO Click Here.

Leave a Reply