Professional Documents
Culture Documents
Executed by:
1.Pavan Maggesh Rajkumar :
2.Sugyan Anand: B27
3.Likhith.P: B42
TITLE :
HUMIDITY AND TEMPERATURE
MEASUREMENT USING ARDUINO
ABSTRACT :
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:
DATA:
PROGRAMING DESCRIPTION:
#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>
#include "DHT.h"
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
#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.