You are on page 1of 12

PROJECT TITLE :

HUMIDITY AND TEMPERATURE


MEASUREMENT USING ARDUINO

Executed by:
1.Pavan Maggesh Rajkumar :
2.Sugyan Anand: B27
3.Likhith.P: B42
TITLE :
HUMIDITY AND TEMPERATURE
MEASUREMENT USING ARDUINO

ABSTRACT :

Humidity and temperature are common parameters to measure


environmental conditions. In this Arduino based project we are going to
measure ambient temperature and humidity and display it on a LED
screen. A combined temperature and himidity sensor DHT11 is used
with Arduino uno to develop this Celsius scale thermometer and
percentage scale humidity measurement project. 
DHT11 is a Humidityy and Temperature Sensor, which generates
calibrated digital output. DHT11 can be interface with any
microcontroller like Arduino, Raspberry Pi, etc. and get instantaneous
results. DHT11 is a low cost humidity and temperature sensor which
provides high reliability and long term stability.
In this project, we will build a small circuit to interface Arduino with
DHT11 Temperature and Humidity Sensor. One of the main applications
of connecting DTH11 sensor with Arduino is weather monitoring.
INTRODUCTION :
This project consists of three sections - one senses the humidity and
temperature by using humidity and temperature sensor DHT11. The
second section reads the DHTsensor module’s output and extracts
temperature and humidity values into a suitable number in percentage
and Celsius scale. And the third part of the system displays humidity and
temperature on 128*64 LED.

Working of this project is based on single wire serial communication.


First arduino send a start signal to DHT module and then DHT gives a
response signal containing temperature and humidity data. Arduino
collect and extract in two parts one is humidity and second is
temperature and then send them to 128*64 LED.

DESCRIPTION OF METHOD :
PARTS USED :
1.ARDUINO UNO BOARD:
Arduino uno board is the most popular board in the Arduino board
family. In addition, it is the best board to get started with electronics and
coding. Some boards look a bit different from the one given below, but
most Arduinos have majority of these components in common.
2.DHT11 SENSOR MODULE;
Here in this project we have used a sensor module namely DHT11. This
module features a humidity and temperature complex with a calibrated
digital signal output means DHT11 sensor module is a combined module
for sensing humidity and temperature which gives a calibrated digital
output signal. DHT11 gives us very precise value of humidity and
temperature and ensures high reliability and long term stability. This
sensor has a resistive type humidity measurement component and NTC
type temperature measurement component with an 8-bit microcontroller
inbuilt which has a fast response and cost effective and available in 4-
pin single row package.
DHT11 module works on serial communication i.e. single wire
communication. This module sends data in form of pulse train of
specific time period. Before sending data to arduino it needs some
initialize command with a time delay. And the whole process time is
about 4ms. A complete data transmission is of 40-bit and data format of
this process is given below:
8-bit integral RH data + 8-bit decimal RH data + 8-bit integral T data +
8-bit decimal T data + 8-bit check sum.

3.OLED DISPLAY.
Here we are using 128*64 LED display for the project. which is used to
display the outcome of the project i.e., temperature and humidity .
This oled display is connected to arduino board by respective pins.

Complete process :

First of all arduino sends a high to low start signal to DHT11 with
18µs delay to ensure DHT’s detection. And then arduino pull-up the data
line and wait for 20-40µs for DHT’s response. Once DHT detects starts
signal, it will send a low voltage level response signal to arduino of time
delay about 80µs. And then DHT controller pull up the data line and
keeps it for 80µs for DHT’s arranging of sending data.
 
When data bus is at low voltage level it means that DHT11 is sending
response signal. Once it is done, DHT again makes data line pull-up for
80µs for preparing data transmission.
Data format that is sending by DHT to arduino for every bit begins with
50µs low voltage level and length of high voltage level signal
determines whether data bit is “0” or “1”.
Circuit Diagram and Explanation:

An 128*64 LED is used for displaying temperature and humidity which


is directly connected to arduino in 4-bit mode.
Pins of LED namely GND,VCC,SDA and SCL are connected to
arduino digital pin namely GND,5V,A4 and A5 respectively.
And a push button is connected to arduino digital pins GND and pin
number 4.

DATA:
PROGRAMING DESCRIPTION:

In programming, we are going to use pre-built libraries for DHT11


sensor and LED display module.

The Source code is given below:

/* code to measure room temperature and humidity


* by Sugyan ,Pavan and Likith
*/

#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>
#include "DHT.h"

// OLED display TWI address


#define OLED_ADDR 0x3C

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

// 128 x 64 pixel display


#define SSD1306_LCDHEIGHT 64

#define BUTTON_PIN 4
#define POWER_PIN 10
#define GND 12
#define DHTPIN 11
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
int button=1,temperature,flag=1,humidity;

void setup() {
pinMode(POWER_PIN,OUTPUT);
digitalWrite(POWER_PIN,HIGH);
pinMode(GND,OUTPUT);
digitalWrite(GND,LOW);
pinMode(BUTTON_PIN, INPUT);
pinMode(BUTTON_PIN, INPUT_PULLUP);
dht.begin();
// initialize and clear display
display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
display.display();
delay(1000);
display.clearDisplay();
display.setTextColor(WHITE);
display.setCursor(0,0);
display.display();
}

void loop() {
int button=digitalRead(BUTTON_PIN);
if(button==LOW)
{
delay(300);
flag=!flag;
}
temperature = dht.readTemperature();
display.clearDisplay();
if (isnan(temperature))
{
display.setCursor(0,0);
display.setTextSize(1);
display.print("Failed to read data");
display.setCursor(0,8);
display.print("from DHT sensor!");
display.display();
return;
}
display.setCursor(0,0);
display.setTextSize(4);
if(flag==1)
{
//Displaying temperature
display.print(String(temperature));
display.drawCircle(64, 5, 5, WHITE);
display.setCursor(75,0);
display.print("C");
}
else
{
//Displaying humidity
humidity = dht.readHumidity();
display.print(String(humidity)+" %");
}
display.display();

RESULTS:
Room Temperature and Humidity were measured precisely and
successfully.

CONCLUSION:
By the above result of the project we can conclude that room
temperature and humidity can be measured precisely using arduino
and DHT11 sensor.

You might also like