Anda di halaman 1dari 19

Department of Electronics and Communication Engineering

A.Y.2019-20
I Semester
III/IV B. Tech

Skilling(IOT)
MINI WEATHER STATION USING ARDUINO AND LCD
GROUP NO-14

Mini project by

S.NO NAME OF THE STUDENT Regd.No

1 K.BHARGAVI 170040390

1
BONAFIDE CERTIFICATE

This is to certify that this project report entitled “ MINI WEATHER


STATION USING ARDUINO AND LCD ”submitted to KLEF ,vaddeswaram, is
a bonafide record of work done by“ K.BHARGAVI (170040390)” .

Signature of HOD

Place:
Date:

2
ACKNOWLEDGMENT

I take privilege to express my gratitude to our Guide sri P.KANAKARAJA sir for his
enthusiastic co-operation, valuable suggestions and in time helps in doing the
main project.

We wish to give grateful acknowledgement to all the staff members of our


Electronics and Communication Engineering Department who helped and given
valuable suggestions for the successful completion of our project.

It is a pleasure to express my sincere gratitude to our Head of the


Department Dr.Suman Maloji sir for his kind co-operation and timely assistance.

We express our gratitude to our principal Dr.K.Subbarao for his


encouragement and facilities provided during the course of project.
I wish to express my gratitude to the management and the people who
helped me directly or indirectly in accomplishing our main project.

3
TABLE OF CONTENTS

S.NO TITLE PAGE NO

1. Abstract 5

2. Introduction 6-7

3. Block and circuit diagram 8-10

4. Components required 11

5. Components explanation of the project 12-14

6. Working 15-17

7. Outputs results and conclusion 18

8. References 19

4
ABSTRACT

The generation of Arduino based mini-weather station with Wi-Fi connection. The
weather station

collects the following data related to the weather and environment using
different sensors:

(1) Temperature

(2) Humidity

(3) Atmospheric pressure

(4) Light intensity

The aim is to make a small and simple weather station, using open hardware.

5
INTRODUCTION

Arduino microcontrollers are inexpensive, widely available, globally supported,


open source computing platforms for controlling hardware. There are many
environmental monitoring sensors that are easy to interface with Arduino boards.
The goal for this project is to construct a basic weather station that:

(i) measures temperature, relative humidity, and barometric pressure

(ii) stores data collected at some pre-determined sampling interval, with date and
time stamps,for later retrieval

(iii) uses a solar-charged battery power supply for the station

(iv) introduces the use of packet radio modules for sending weather station data
from one Arduino to another

(v) shows how to use an Arduino-compatible high-resolution analog to digital


converter for sensors that need resolution better than the on-board 10-bit 0-5 V
resolution.

Even if you are used to working with Arduinos, using them for stand-alone
outdoor applications poses some additional challenges. I rewrote this document
several times as I learned more about converting applications that are easy to
implement in a familiar indoor breadboard/Arduino UNO environment to systems
that minimize power requirements for reliable and sustainable outdoor
applications. This is by no means the only available source of information about
Arduino-based weather stations. But, many of the sources I have looked at are
short on details, and it is often the smallest details that can facilitate or derail such
a project. The first step is to define the equipment needed to meet the project goals.
6
The weather is one such possible factor. In this project we build an Arduino based
device for measurements of ambient air temperature, pressure and humidity. The
weather can be defined merely as the state of the atmosphere. Numerous factors
can influence the weather conditions or the atmosphere. It is almost impossible
to predict the weather conditions, but with technology, it has been made
possible. Weather stations have been specially designed for this purpose. As the
state of the atmosphere is directly related to the air temperature and pressure,
knowing the air temperature as well as strength can give us powerful insight
about the weather around us.

We all know that a weather station is not a single device, but it is a collection of
many small tools to form a larger unit. It consists of various sensors and gadgets
that work together but in specific ways to transmit proper and accurate data of
the weather variables. It is not easy for ordinary people to understand the central
working principle of these units.

So that you can be more familiar with the device, it is quite vital for you to know
the various equipment of a weather station and also the way they work. We have
tried our best to explain to you this mechanism less straightforwardly and
technically.

7
BLOCK DIAGRAM:

8
CIRCUIT DIAGRAM:
(i)Arduino interfacing with sensors:

9
(ii)arduino and lcd interfacing:

10
COMPONENTS REQUIRED:
 Arduino
 DHT22 sensor
 BMP180 sensor
 16x2 LCD
 Resistors(1k,10k,4.75k)
 Light sensor
 4x2 PCB
 Transformer
 Power supply

11
COMPONENTS EXPLANATION

DHT11 Sensor:

DHT11 sensor is popularly known as Temperature and humidity sensor. It can


measure temperature and humidity from surrounding as the name suggests.
It is a 4 pin device but only 3 of them are used. It may look like a very simple
component, but it has a microcontroller inside the sensor which passes the data in
digital form to the arduino board.
It send 8 bit data every second to arduino, to decode the received signal, we need
to include library in the code which is designed to handle it.

The circuit connection from sensor to arduino is very simple. The output of the
sensor is connected to A1 pin of arduino. The supply Vcc and GND are connected
to power supply pins of arduino.

BMP180 sensor:

The BMP180 is barometric sensor; it can measure atmospheric pressure, altitude


and temperature. The temperature measurement from this sensor is neglected as we
have dedicated sensor for measuring the ambient temperature.
The sensor measures altitude of the setup from the sea level, it is also one of the
parameter used in meteorology.

12
16X2 LCD :
LCD (Liquid Crystal Display) screen is an
electronic display module and find a wide range of applications. A 16x2 LCD
display is very basic module and is very commonly used in various devices and
circuits. ... A 16x2 LCD means it can display 16 characters per line and there are 2

An LCD is an electronic display module which uses liquid crystal to produce a


visible image. The 16×2 LCD display is a very basic module commonly used in
DIYs and circuits. The 16×2 translates o a display 16 characters per line in 2 such
lines. In this LCD each character is displayed in a 5×7 pixel matrix

Arduino:
Arduino is an open-source hardware and software company, project and user
community that designs and manufactures single-board microcontrollers
and microcontroller kits for building digital devices. Its products are licensed
under the GNU Lesser General Public License (LGPL) or the GNU General Public
License (GPL), permitting the manufacture of Arduino boards and software
distribution by anyone. Arduino boards are available commercially in
preassembled form or as do-it-yourself (DIY) kits.
Arduino board designs use a variety of microprocessors and controllers. The
boards are equipped with sets of digital and analog input/output (I/O) pins that may
be interfaced to various expansion boards or breadboards (shields) and other
circuits. The boards feature serial communications interfaces, including Universal
Serial Bus (USB) on some models, which are also used for loading programs from
personal computers. The microcontrollers can be programmed using C and C++
programming languages. In addition to using traditional compiler toolchains, the

13
Arduino project provides an integrated development environment (IDE) based on
the Processing language project.

14
WORKING :
To interface a LCD to the ARDUINO UNO, we need to know a few things.
1. #include <LiquidCrystal.h>
2. lcd.begin(16, 2);
3. LiquidCrystal lcd(0, 1, 8, 9, 10, 11);
4. lcd.print("hello, world!");

As by the above table we only need to look at these four lines for establishing a
communication between an ARDUINO and LCD.
First we need to enable the header file (‘#include <LiquidCrystal.h>’), this header
file has instructions written in it, which enables the user to interface an LCD to
UNO in 4 bit mode without any fuzz. With this header file we need not have to
send data to LCD bit by bit, this will all be taken care of and we don’t have to
write a program for sending data or a command to LCD bit by bit.

Second we need to tell the board which type of LCD we are using here. Since we
have so many different types of LCD (like 20x4, 16x2, 16x1 etc.). Here we are
going to interface a 16x2 LCD to the UNO so we get ‘lcd.begin(16, 2);’. For 16x1
we get ‘lcd.begin(16, 1);’.

In this instruction we are going to tell the board where we connected the pins. The
pins which are connected need to be represented in order as “RS, En, D4, D5, D6,
D7”. These pins are to be represented correctly. Since we have connected RS to
PIN0 and so on as show in the circuit diagram, we represent the pin number to
board as “LiquidCrystal lcd(0, 1, 8, 9, 10, 11);”. The data which needs to be
displayed in LCD should be written as “ cd.print("hello, world!");”. With this
command the LCD displays ‘hello, world!’.

As you can see we need not to worry about any thing else, we just have to initialize
and the UNO will be ready to display data. We don’t have to write a program loop
to send the data BYTE by BYTE here.

The way of communication between LCD and UNO is explained step by step in C
code given below:

15
CODE:
#include <dht.h>
#include <stdlib.h>
#include <SoftwareSerial.h>
#include <DHT.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085_U.h>
#define DHT22_PIN 2
dht DHT;
Adafruit_BMP085_Unified bmp = Adafruit_BMP085_Unified(10085);

int luminancePin = A0;


unsigned long duration;
unsigned long starttime;
unsigned long sampletime_ms = 30000;
unsigned long delay_time = 60000;
unsigned long lowpulseoccupancy = 0;
float ratio = 0;
float concentration = 0;
#include <LiquidCrystal.h>
LiquidCrystal lcd(0, 1, 8, 9, 10, 11); /// REGISTER SELECT PIN,ENABLE
PIN,D4 PIN,D5 PIN, D6 PIN, D7 PIN
//setup
void setup()
{
lcd.begin(16, 2);
//Serial.begin(9600);

}
void loop(){
char buffer[10];
//light sensor
float luminance = analogRead(luminancePin);
//temperature and humidity
int chk = DHT.read22(DHT22_PIN);
float humidity = DHT.humidity;
float temperature = DHT.temperature;
//pressure and temperature1

16
sensors_event_t event;
bmp.getEvent(&event);
float pressure = 0;
float temperature1 = 0;
if (event.pressure)
{
pressure = event.pressure;
bmp.getTemperature(&temperature1);
}
lcd.print(" Light:");//print name
lcd.print(luminance);//print name
lcd.print(" ");//print name
lcd.print("Temp:");//print name
lcd.print(temperature);
lcd.print(" ");
lcd.print("Humidity:");
lcd.print(humidity);
lcd.print(" ");
lcd.setCursor(0, 1); // set the cursor to column 0, line 2
lcd.print("Pressure:");//print name
lcd.print(pressure);//print name
lcd.print(" ");//print name
lcd.print("Temp1:");//print name
lcd.print(temperature1);
lcd.print(" ");
delay(700);//delay of 0.75sec
lcd.scrollDisplayLeft();//shifting data on LCD
lcd.setCursor(0, 0);// set the cursor to column 0, line11
Serial.println("Light Sensor");
Serial.println(luminance);
Serial.println("Humidity Sensor");
Serial.println(humidity);
Serial.println("Temperature Sensor");
Serial.println(temperature);
Serial.println("Pressure Sensor");
Serial.println(pressure);
Serial.println("Temperature1 Sensor");
Serial.println(temperature1);
// delay(5000);
}
17
OUTPUTS AND RESULTS:
The parameters like temperature, pressure, humidity, light intensity are
displayed in LCD as below:

18
REFERNCES:
1. https://create.arduino.cc/projecthub/igorF2/arduino-uno-mini-weather-station-
31b555?ref=tag&ref_id=iot&offset=9
2. https://circuitdigest.com/microcontroller-projects/arduino-lcd-interfacing-tutorial

19

Anda mungkin juga menyukai