Interfacing of DHT11 Temperature and Humidity Sensor with Arduino Nano

Hi, Hello Electronics Lovers welcome to this tutorial, in this tutorial I will show you how to Interface DHT11 a very popular temperature and humidity sensor with Arduino. Unlike LM35 this is a digital sensor which has only a single pin output and easily displayed humidity and temperature. We have our regular setup our 16×2 LCD and our DHT 11 sensor. DHT 11 sensor has four pins the third pin which is NC means not connected, the first pin goes to VCC mean 5 Volts the second pin is a digital output and the fourth pin is for ground.

We will make this circuit by using the Digital pin D7 of the Arduino Nano as an input pin, of course, you can use any available digital input-output pins also. Before move further so let’s see the documentation data sheet for DHT11, you people can easily check and read the datasheet of DHT 11 humidity and temperature sensor in google or an Arduino official website| Temperature and Humidity Sensor.

Library up-gradation in Arduino is very valuable for the case of interfacing new sensors or components with Arduino microcontroller. In this case, we will need the library of DHT 11 sensor, you can download library of this sensor from our website under the section of Arduino tab. Kindly, make sure that library is updated After extracting or copying DHT 11 library into Arduino library folder. The next step is to write the code for this project, further details of the project and code are available in below video.

Schematic Diagram :

I have designed this graphical Schematic diagram by using a free simulation tool known as Fritzing. I really like this tool, if you are new and haven’t heard about this wonderful tool, must visit the official website of Fritizing and download this user-friendly tool for yourself now.

Code :

#include <dht.h>

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

dht DHT;

#define DHT11_PIN 7

void setup(){

lcd.begin(16, 2);

lcd.setCursor(0,0);

lcd.print(“www.Electronics”);

delay(1000);

lcd.setCursor(0,1);

lcd.print(“Lovers.com”);

delay(7000);

}

void loop()

{

int chk = DHT.read11(DHT11_PIN);

lcd.clear();

lcd.setCursor(0,0);

lcd.print(“Temp: “);

lcd.print(DHT.temperature);

lcd.print((char)223);

lcd.print(“C”);

lcd.setCursor(0,1);

lcd.print(“Humidity: “);

lcd.print(DHT.humidity);

lcd.print(“%”);

delay(1000);

}

Watch Video:

Must try this project at school or university lab, it,s an easy project. Don’t hesitate to ask any question related to this project If you found any difficulty while making this project | Temperature and Humidity Sensor .

Services by JLCPCB ✅

About ElectronicsLovers

Electronics lovers provide information by publishing tutorials, electronic circuit, Technology news, Final year project ideas and DIY stuff. Electronics lovers is a true place for the student and engineer or hobbyist to surpass within the field of electronics design.

Visit Our Official Online Store

Our aim is to provide cool & unique stuff and gadgets that you are unable to get it in a retail store or other online stores (or due to high prices) at unbeatable prices & Quality as well.
No offer can beat the exclusive offer provided by ElectronicsLovers.

Download Our Android App

Today when information technology is very much important, there should be a source where you can access freely and get whatever you are looking for. Download our app today and get the latest and updated content on your smartphone! Available on Google Play store.