es project sensor

Post on 09-Jan-2017

38 Views

Category:

Education

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

LCD humidity temperature LCD humidity temperature readerreader

Presented byPresented by::Waed shagareen Ayat Waed shagareen Ayat

bdyratbdyrat

Presentation outline• Project purpose• Project idea• Project component• Project block diagram• Project Mechanism• Project programming

Project purpose• Humidity and temperature are common

parameters to measure environmental conditions

• LCD humidity and temperature reader useful in remote weather stations, home environment control systems, and agricultural/garden monitoring systems.

Project idea• In this Arduino based project we are

going to measure ambient temperature and humidity then display it on a 16x2 LCD screen.

Project component • Arduino Uno • DHT11 temperature and humidity

sensor • Backlit LCD (16x2) characters Liquid

Crystal Display • Breadboard Electronic Components • Jumper cables • potentiometer • ohm resistor

Project component• Arduino Uno

Arduino is an open-source electronics Arduino is an open-source electronics prototyping platform based on flexible, easy-prototyping platform based on flexible, easy-to-use hardware and softwareto-use hardware and software

Topic 1: Meet Arduino Uno

DHT11 temperature and humidity sensor

• The DHT11 humidity and temperature sensor measures relative humidity (RH) and temperature.

• The formula for relative humidity is as follows: Relative Humidity = (density of water vapor /

density of water vapor at saturation) x 100%• The DHT11 uses one signal wire to transmit

sensor readings to the Arduino digitally.•

Backlit LCD (16x2) characters Liquid Crystal Display

• . A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments .

Project block diagram

Project Mechanism• 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.

• liquid crystal display is used for displaying temperature and humidity which is directly connected to arduino in 4-bit mode. Pins of LCD namely RS, EN, D4, D5, D6 and D7 are connected to arduino digital pin number 2, 3, 4, 5, 6 and 7. And a DHT11 sensor module is also connected to digital pin 12 of arduino with a 5k pull-up resistor

Project Programming • In programming using Arduino IDE , we are

going to use pre-built libraries for DHT11 sensor and LCD display module. 

• Then we have defined pins for LCD and DHT sensor and initialized all the things in setup.

• Then in a loop by using DHT function reads DHT sensor and then using some dht functions we extract humidity and temperature and display them on LCD.

Arduino IDE

Select Serial Port and Board

Project Code#include <dht.h>#include <LiquidCrystal.h>

dht DHT;

#define DHT11_PIN 3

LiquidCrystal lcd(12,11,4,5,6,7);

void setup() { // put your setup code here, to run once: Serial.begin(9600); lcd.begin(16,2); lcd.setCursor(0,0); lcd.print(" Welcome"); delay(2000); lcd.clear();}

void loop() { // must issue this command to store the temp and humid data in DHT object int chk = DHT.read11(DHT11_PIN);

int temp = DHT.temperature , humid = DHT.humidity ;

Serial.println('$'); Serial.println(temp); Serial.println(humid); lcd.print(temp); lcd.print(" Celsius"); lcd.setCursor(0,1); lcd.print(humid); lcd.print("% Humid"); delay(8000); lcd.clear(); lcd.print("Have a Nice Day"); lcd.setCursor(0,1); lcd.print(" -Home Weather"); delay(4000); lcd.clear();

}

Thank You

top related