We are going to calculate the surrounding temperature and humidity and the same will display it on a 16x2 LCD screen.
In this project, we are going to calculate the surrounding temperature and humidity and the same will display it on a 16x2 LCD screen.
A mixed temperature and humidity sensor DHT11 is utilized with Arduino uno to develop this project.
Working of this project depends on single-wire serial communication. The first Arduino transmits a start signal to the DHT module and then DHT presents a response signal including temperature and humidity data.
Arduino gathers and removes in two parts one is humidity and the second one is temperature and then sends them to 16x2 LCD.
In this project, we have utilized a sensor module DHT11. The DHT11 sensor module is a linked module for sensing humidity and temperature which presents a calibrated digital output signal.
DHT11 delivers us a specific value of humidity and temperature and assures high security and long term immobility. DHT11 module operates on serial communication.
This module transfers data in the form of the pulse train of a specific time period. Before sending data to Arduino it requires some initialize command with a time delay. And the whole process time is about 4ms.
Entire data transmission is of 40-bit and data format of this process is given below:
Firstly, Arduino sends a high to low start signal to DHT11 with 18Âµs delay. And then Arduino pull-up the data line and waits for 20-40Âµs for DHTâs response (as shown below). Once DHT recognizes starts signal, it will send a low voltage level response signal to Arduino of time delay about 80Âµs. After that DHT controller pulls up the data line and holds it for 80Âµs for DHTâs arranging of transmitting data.
When a data bus is at a low voltage level which means that DHT11 is transmitting a response signal. Once it is done, DHT again presents a data line pull-up for 80Âµs for preparing data transmission.
The data format that is transmitting by DHT to Arduino for every bit starts with 50Âµs low voltage level and length of high voltage level signal defines whether a data bit is â0â or â1â.
#include<dht.h> // Including library for dht
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
#define dht_dpin 12
byte degree =
lcd.print(" Humidity ");
lcd.print(" Measurement ");
lcd.print("Circuit Digest ");
lcd.print(DHT.humidity); // printing Humidity on LCD
lcd.print(DHT.temperature); // Printing temperature on LCD