You are on page 1of 43

Project Report

on

Fabrication of Affordable Weather


Station

Submitted in partial fulfillment of the requirements


for the award of the degree of
BACHELOR OF TECHNOLOGY
IN
MECHANICAL ENGINEERING

Submitted By:
Aniket Jha(2819486)
Bhuwan(2819490)
Pratham(2819483)
Batch (2019-2023)

Panipat Institute of Engineering & Technology,


(Affiliated to Kurukshetra University Kurukshetra,
India)Samalkha,Panipat
(Session 2022-2023)
CANDIDATE’S DECLARATION

We hereby declare that the work presented in this Project Report entitled
“Fabrication of Affordable Weather Station”, submitted in partial
fulfillment of the requirement for the award of the degree of Bachelor of
Technology in Mechanical Engineering, submitted to Panipat Institute of
Engineering & Technology, Kurukshetra University, Kurukshetra, India
is an authentic record of our own work carried out during the period from
under the guidance of Mr. Rajinder Kumar.

The work reported in this project report has not been submitted by us for the
award of any other degree or diploma.

Date: Student(s) Name& Roll no. :

AniketJha(2819486)
Place: PIET Bhuwan(2819490)
Pratham(2819483)

i
CERTIFICATE

This is to certify that the Project Report (Code e.g. MEC-414 A) entitled
“Fabrication of Affordable Weather Station” done by Aniket
Jha(2819486), Bhuwan(2819490), Pratham(2819483) is an authentic work
carried out by him/these students at under my/our guidance. The matter
embodied in this Project Report has not been submitted earlier for the award of
any degree or diploma to the best of our knowledge and belief.

Project Guide(s):

Mr. Rajinder Kumar

The B.tech Project Viva-voce examination of the above student(s) has been held on

……………….and accepted.

Project Coordinator (ME)

Mr. Rajinder Kumar

Assistant Professor

Head of Department (ME) External Examiner

Dr. Sunil Dhull

Associate Professor

ii
Acknowledgement

It gives us immense pleasure to express our deep sense of gratitude to our supervisor
Mr. Rajinder Kumar for his invaluable guidance, motivation, constant inspiration and
above all for his ever-cooperating attitude that enabled us in bringing up this project
in the present form. We are extremely thankful to them for all kinds of possible help
and advice during the course of this work.

We are greatly thankful to Dr. Sunil Dhull (HOD ME), Mr. Rajinder Kumar for their
inspiration and help.

We solely take the responsibility of any possible mistakes that may have occurred in
preparing this report and we would like to welcome comments and queries during the
submission of this report.

Aniket Jha (2819486)

Bhuwan (2819490)

Pratham (2819483)

iii
ABSTRACT

Weather forecasting stations are systems that allow forecasting of daily, weekly or
monthly weather conditions. These systems, which are used by meteorology in our
country, can be both difficult and costly for individual use. Smart weather stations are
being developed that can be used individually in order to get rid of such problems. In
this study, a smart weather station has realized for the monitoring of weather
conditions when changing during the day. The data that received from the
temperature, humidity and pressure in the air station, are processed by an Arduino-
based processor and then estimated weather information has been given to users

iv
CONTENTS

Candidate's Declaration i

Certificate ii

Acknowledgement iii

Abstract iv

List of Figures vii

List of Tables viii

Chapter No Description Pag


e
No.
Chapter 1: INTRODUCTION 1

1.1 Introduction 1

1.2 Relevance of Project 1

1.3 Purpose 2

1.4 Scope of the Project 2

1.5 Problem definition 2

1.6 Problem explanation 3

1.7 Objective 3

1.8 Existing system 3

1.9 Proposed system 4

Chapter 2: LITERATURE REVIEW 5

2.1 Related work 5

v
Chapter 3: SYSTEM REQUIREMENTS 6

3.1 General description 6

3.2 Hardware requirements 7

3.3 Software requirements 19

Chapter 4: METHODOLOGY & SYSTEM 21


DESIGN

4.1 Methodology 22

4.2 Preliminary design 22

4.3 Working concept 22

4.4 Flow Chart 23

4.5 Use Case diagram 24

4.6 Circuit diagram 24

Chapter 5: TESTING 25

5.1 Testing & Validation 25

5.2 Testing levels 26

5.3 White box testing 28

Chapter 6: EXPERIMENTAL RESULT 29

6.1 Outcome of the 29


proposed system

Chapter 7: CONCLUSIONS 30

Chapter 8: APPENDICES 31

Chapter 9: REFERENCES 34

vi
List of Figures

Fig No. Fig Name Page no.

Fig 3.1 Arduino UNO 8

Fig 3.2 DHT11 Sensor 11

Fig 3.3 BMP180 Sensor 13

Fig 3.4 Jumper wires 15

Fig 3.5 Breadboard 16

Fig 3.6 LCD 17

Fig 3.7 Structure of LCD 19

Fig 3.8 Arduino IDE Interface 20

Fig 4.1 Schematic diagram 22

Fig 4.2 Flow chart 23

Fig 4.3 Use Case diagram 24

Fig 4.4 Structure diagram 24

Fig 6.1 Output screen 29

vii
List of Tables

Table Table Name Page no

Table 3.1 Technical Specification 10

Table 3.2 DHT Pinout configuration 12

Table 3.3 BMP180 Pinout configuration 13

Table 3.4 LCD Pin Interface 18

Table 5.1 Test case 1 25

Table 5.2 Test case 2 26

vii
1. INTRODUCTION

1.1 Introduction:

Weather forecasting is the application of science and technology to predict the state of
the atmosphere for a given location. Human beings have attempted to predict the
weather informally for millennium and formally since the nineteenth century.
Weather forecasts are made by collecting quantitative data about the current state of
the atmosphere on a given place and using scientific understanding of atmospheric
processes to project how the atmosphere will evolve on that place.

Weather is driven by air pressure (temperature and moisture) differences between one
place and another. These pressure and temperature differences can occur due to the
sun angle at any particular spot, which varies by latitude from the tropics. The
atmosphere is a chaotic system, so small changes to one part of the system can grow
to have large effects on the system as a whole. This makes it difficult to accurately
predict weather more than a few days in advance, though weather forecasters are
continually working to extend this limit through the scientific study of weather,
meteorology. It is theoretically impossible to make useful day-to- day predictions
more than about two weeks ahead, imposing an upper limit to potential for improved
prediction skill.

Once an all-human endeavor based mainly upon changes in barometric pressure,


current weather conditions, and sky condition, weather forecasting now relies on
computer-based models that take many atmospheric factors into account. Human
input is still required to pick the best possible forecast model to base the forecast
upon, which involves pattern recognition skills, tele-connections, knowledge of model
performance, and knowledge of model biases.

1.2 Relevance of Project:

The relevance of the project is to implement such system for a small area is feasible,
since they are designed for it and the overhead for maintaining such systems for a
small area is very low.

Our proposed system makes use of 1 sensor to measure the weather/environment


factors such as temperature & humidity.

1
1.3 Purpose:

The present work is to develop an Arduino based personal weather station which
measures the ambient temperature. The weather condition is driven by air pressure
(temperature and moisture) differences between one place and another. These
pressure and temperature differences can occur due to the sun angle at any particular
spot. Through this system we can automatically collect the information about
humidity and ambient temperature in out neighbouring environment.

1.4 Scope of the Project:

By implementing such system for a small area is feasible, since they are designed for
it and the overhead for maintaining such systems for a small area is very low .Our
proposed system makes use of 1 sensor to measure weather/environment factors such
as temperature & humidity.

The present work is to develop an Arduino based personal weather station which
measures the ambient temperature. It is used to measure weather factors such as
temperature, humidity and pressure.

1.5 Problem Definition:

There are a lot of high end systems available these days for round the clock weather
monitoring. But these systems are implemented on a very large scale, for monitoring
real time weather for a whole city or state. Implementing such system for a small area
is not feasible, since they are not designed for it and the overhead for maintaining
such systems for a small area is very high.

 Our proposed system makes use of one sensor to measure the


weather/environment factors such as temperature, humidity, light intensity, dew
point and heat index.

 The values read from the sensors are processed by the Arduino micro-controller
and stored in a text file which can be processed upon to derive analysis.

 The readings are also displayed on an on board LCD for quick viewing. All
these readings can be analyzed to get the weather characteristics of a particular
area and record the weather pattern.

 These recorded parameters are essential and vary from places to places.

2
1.6 Problem Explanation:

 Through this system we can automatically collect the information abouthumidity


and ambient temperature in out neighbouring environment.

 These recorded parameters are essential and vary from places to places.

 All these requirements are fed into the database and these values are essentials
and recorded over time.

 Using these values as input we can plot a weather chart of a particular area over
time. Based on the present weather factors and preset values the set actions are
done.

 The set action can include turning on the heating system when the
temperature is colder than the set value and turning on the cooling system
when the temperature is hot or humid beyond the set values.

1.7 Objective:

The objective of this Arduino project is to build weather monitoring station. In this
project, we are measuring temperature, humidity, atmospheric pressure etc.

The main features of our project design are that it is small in size, low cost, less
weight, less power consumption etc. We are here using DHT11 Sensor, which can
measure physical parameters temperature, humidity. BMP180 Sensor is basically a
pressure sensor.

1.8 Existing System:

There are a lot of high end systems available these days for round the clock weather
monitoring. But these systems are implemented on a very large scale, for monitoring
real time weather for a whole city or state. Implementing such system for a small area
is not feasible, since they are not designed for it and the overhead for maintaining
such systems for a small area is very high.

1.8.1 Limitation of Existing System:

 Implementing such system for a small area is not feasible

 It is a web based application.

3
 The overhead for maintaining such systems for a small area is very high

1.9 Proposed System:


Our proposed system makes use one sensor to measure the weather/environment
factors such as temperature, humidity, etc. The values read from the sensors are
processed by the Arduino micro-controller and stored in a text file which can be
processed upon to derive analysis. The readings are also displayed on an on board
LCD for quick viewing.

1.9.1 Advantages:

 All these readings can be analyzed to get the weather characteristics of a


particular area and record the weather pattern. These recorded parameters are
essential and vary from places to places. All these requirements are fed into the
database and these values are essentials and recorded over time.

 Using these values as input we can plot a weather chart of a particular area over
time. Based on the present weather factors and preset values the set actions are
done. The set action can include turning on the heating system when the
temperature is colder than the set value and turning on the cooling system when
the temperature is hot or humid beyond the set values.

 The serial output from the Arduino micro-controller which are the values read
from the sensors can also be stored in a database. The database can be used as a
source for data if we want to display values through a website or a standalone
application.

4
2. LITERATURE REVIEW

2.1 Related Work:

Weather Forecasting using Arduino Based Cube-Sat, by M. ahaman Laskar, R.


Bhattacharjee, M.SauGiri and P.Bhattacharya. They have designed an autonomous
small cube satellite which provides the weather information without using any
internet network. The limitations of this system are that it may not communicate to a
long distance without powerful transceivers section, there may be problem in
recording data at higher altitude with the help of gas balloon. The components have
no protection from rain so they may get damaged even due to long time use.

Arduino Based Weather Monitoring System by Jitendra Singh, Rehan Mohammed,


Mradul Kankaria, Roshan Panchal, Sachin Singh, Rahul Sharma. They have
presented an automated system for weather monitoring which uses different sensors
like DHT11, Light dependent resistor and Rain sensor.
Implementation of Weather Monitoring System by Kiranmai Nandagiri and
Jhansi Rani Meetu. The authors have proposed a system which senses the temperature
and humidity of a particular room. The system cannot be operated from anywhere and
the data collected is not accessible.
Wireless Arduino Based Weather Station by Amber Katyal, Ravi Yadav, Manoj
Pandey. The authors have described a system with Arduino which functions using a
Wi-Fi shield and different sensors like DHT11, BMP 185, Rain sensor, soil moisture
sensor, etc. They used Thinkspeak in order to use MATLAB to get knowledge from
the information obtained from the readings on the server.
Design of Weather Monitoring System Using Arduino Based Database
Implementation by Sarmad Nozad Mahmood Forat Falih Hasan. The R language is
used to evaluate results and reveal outputs. They have setup a control unit which can
operate other appliances like AC, heater, fans etc.
Raspberry Pi Based Weather Monitoring System by Meetali V. Rasal, Prof. Jaideep
G. Rana. The authors have proposed a model which can visualize and store various
weather parameters and with the help of sensors interfaced to raspberry pi which
stored data in SD card and it can be controlled using the LCD display which shows
results. A web application with the current status recorded can be accessed by logging

5
in using the username and password which will give the output in the form of
graphically represented data.
Arduino Based Automatic Wireless Weather Station with Remote Graphical
Application and Alerts by Hardeep Saini, Abhishek Thakur, Satinderpar Ahuja, Nitant
Sabharwal, Naveen Kumar[9]. The model proposed in this system includes Zigbee
wireless technology which measures the meteorological data.
Through weather monitoring system we can collect the information about humidity
and temperature and according to current and previous data we can produce the
results in graphical manner in the system. After reviewing many articles, there are
presently no papers that mention monitoring the combination of temperature, lighting
and humidity in one integrated system and have actuators to modify these settings. In
addition to this, there is one research paper that has discussed monitoring these three
environmental conditions; however, there has been no mention about having actuators
to modify. So our main idea was to coin a system that can sense the main components
that formulates the weather and can be able to forecast the weather without human
error.
Ancient weather forecasting methods usually relied on observed patterns of events,
also termed pattern recognition. For example, it might be observed that if the sunset
was particularly red, the following day often brought fair weather. This experience
accumulated over the generations to produce weather lore. However, not all of these
predictions prove reliable, and many of them have since been found not to stand up to
rigorous statistical testing. The simplest method of forecasting the weather,
persistence, relies upon today's conditions to forecast the conditions tomorrow. This
can be a valid way of forecasting the weather when it is in a steady state, such as
during the summer season in the tropics. This method of forecasting strongly depends
upon the presence of a stagnant weather pattern. It can be useful in both short range
forecasts and long range forecasts. Measurements of barometric pressure and the
pressure tendency (the change of pressure over time) have been used in forecasting
since the late 19th century.

6
3. SYSTEM REQUIREMENTS

3.1 General Description of the System:

3.1.1 Overview of functional requirements:

In software engineering, a functional requirement defines a function of a software


system or its component. A function is described as a set of inputs, the behavior, and
outputs. Functional requirements may be calculations, technical details, data
manipulation and processing and other specific functionality that define what a
system is supposed to accomplish. Behavioral requirements describing all the cases
where the system uses the functional requirements are captured in use cases.

Here, the system has to perform the following tasks:

 The working principle of this work describes the interdependent functionality of


the components and their output. The circuit diagram is shown in Fig. 1.

 Firstly, all the components are initialized by supplying the required power of
+5v. There is a temperature sensor, dht11; we are using one temperature sensors
to get a accurate value of temperature reading and taking the average of the two
values.

 Depending on the temperature, hot air or cool air introduced to maintain the
temperature threshold value, which is preset. If the temperature is too low for
the particular area hot air is blown in to bring the temperature to moderation.
Otherwise, if the temperature is too high, cold air is blown and thereby raising
the temperature to the required level. This is how temperature is manipulated.

3.1.2 Overview of data requirements:

Data requirements are not needed for the project. Readings shown by LCD are
recorded.

3.2 Hardware Requirements:

Here we briefly describe the components and the specific properties of each of the
components used in the design are also detailed:

7
1. Ardino UNO

The Arduino UNO is a standard board of Arduino. Here UNO means 'one' in Italian.
It was named as UNO to label the first release of Arduino Software. It was also the
first USB board released by Arduino. It is considered as the powerful board used in
various projects. Arduino.cc developed the Arduino UNO board.

Arduino UNO is based on an ATmega328P microcontroller. It is easy to use


compared to other boards, such as the Arduino Mega board, etc. The board consists of
digital and analog Input/Output pins (I/O), shields, and other circuits.

Arduino is an open source electronic board that supports both the hardware and
software. Arduino is considered the most typical microcontroller that deals with the
input modules such as the sensors that transfers the realized data into the Arduino in
order to take the suitable decision. Moreover, Arduino microcontroller deals with
output modules and devices such as controlling the lights, motors, and the other
actuators. The part responsible for controlling modules is equipped regularly on the
board called (ATMEGA) that can be programmed by using Arduino IDE programing
language.
The Arduino UNO includes 6 analog pin inputs, 14 digital pins, a USB connector, a
power jack, and an ICSP (In-Circuit Serial Programming) header. It is programmed
based on IDE, which stands for Integrated Development Environment. It can run on
both online and offline platforms.

Fig 3.1 Arduino UNO

8
Let's discuss each component in detail:

 ATmega328 Microcontroller- It is a single chip Microcontroller of the ATmel


family. The processor code inside it is of 8-bit. It combines Memory (SRAM,
EEPROM, and Flash), Analog to Digital Converter, SPI serial ports, I/O lines,
registers, timer, external and internal interrupts, and oscillator.

 ICSP pin - The In-Circuit Serial Programming pin allows the user to program
using the firmware of the Arduino board.

 Power LED Indicator- The ON status of LED shows the power is activated.
When the power is OFF, the LED will not light up.

 Digital I/O pins- The digital pins have the value HIGH or LOW. The pins
numbered from D0 to D13 are digital pins.

 TX and RX LED's- The successful flow of data is represented by the lighting


of these LED's.

 AREF- The Analog Reference (AREF) pin is used to feed a reference voltage
to the Arduino UNO board from the external power supply.

 Reset button- It is used to add a Reset button to the connection.

 USB- It allows the board to connect to the computer. It is essential for the
programming of the Arduino UNO board.

 Crystal Oscillator- The Crystal oscillator has a frequency of 16MHz, which


makes the Arduino UNO a powerful board.

 Voltage Regulator- The voltage regulator converts the input voltage to 5V.

 GND- Ground pins. The ground pin acts as a pin with zero voltage.

 Vin- It is the input voltage. The input voltage to the Arduino board when it's
using an external power source (as opposed to 5 volts from the USB connection
or other regulated power source). You can supply voltage through this pin, or, if
supplying voltage via the power jack, access it through this pin.

 Analog Pins- The pins numbered from A0 to A5 are analog pins. The function
of Analog pins is to read the analog sensor used in the connection. It can also
act as GPIO (General Purpose Input Output) pins.

9
Technical Specification:

Microcontroller ATmega328

Operating Voltage 5V
Input Voltage (recommended) 7-12V

Input Voltage (limits) 6-20V

Digital I/O Pins 14

Analog Input Pins 6

DC Current per I/O Pin 40mA

DC Current for 3.3V Pin 50mA

Flash Memory 32KB

SRAM 2KB

EEPROM 1KB

Clock Speed 16MHz

Table 3.1 Technical Specification

2. DHT11-Temperature and Humidity sensor:

DHT11 is a low-cost digital sensor for sensing temperature and humidity. This sensor
can be easily interfaced with any micro-controller such as Arduino, Raspberry Pi etc.
to measure humidity and temperature instantaneously.

DHT11 humidity and temperature sensor is available as a sensor and as a module. The
difference between this sensor and module is the pull-up resistor and a power-on
LED. DHT11 is a relative humidity sensor. To measure the surrounding air this
sensor uses a thermistor and a capacitive humidity sensor.

Working Principle

DHT11 sensor consists of a capacitive humidity sensing element and a thermistor for
sensing temperature. The humidity sensing capacitor has two electrodes with a
moisture holding substrate as a dielectric between them. Change in the capacitance

1
value occurs with the change in humidity levels. The IC measure, process this
changed resistance values and change them into digital form.

For measuring temperature this sensor uses a Negative Temperature coefficient


thermistor, which causes a decrease in its resistance value with increase in
temperature. To get larger resistance value even for the smallest change in
temperature, this sensor is usually made up of semiconductor ceramics or polymers.

The temperature range of DHT11 is from 0 to 50 degree Celsius with a 2-degree


accuracy. Humidity range of this sensor is from 20 to 80% with 5% accuracy. The
sampling rate of this sensor is 1Hz .i.e. it gives one reading for every second. DHT11
is small in size with operating voltage from 3 to 5 volts. The maximum current used
while measuring is 2.5mA.

Fig 3.2 DHT11 Sensor

DHT11 sensor has four pins- VCC, GND, Data Pin and a not connected pin. A pull-
up resistor of 5k to 10k ohms is provided for communication between sensor and
micro-controller.

DHT11 Specification

 Operating Voltage: 3.5V to 5.5V

 Operating current: 0.3mA (measuring) 60uA (standby)

 Output: Serial data

 Temperature Range: 0°C to 50°C

 Humidity Range: 20% to 90%

1
 Resolution: Temperature and Humidity both are 16-bit

 Accuracy: ±1°C and ±1%

DHT Pinout Configuration

No. Pin Name Description

1 Vcc Power supply 3.5 to 5.5 v

2 Data Outputs both Temperature and Humidity through


serial data

3 NC No Connection and hence not used


Connected to the ground of the circuit
4 Ground

Table 3.2 DHT Pinout Configuration

Application

This sensor is used in various applications such as measuring humidity and


temperature values in heating, ventilation and air conditioning systems. Weather
stations also use these sensors to predict weather conditions. The humidity sensor is
used as a preventive measure in homes where people are affected by humidity.
Offices, cars, museums, greenhouses and industries use this sensor for measuring
humidity values and as a safety measure.

3. BMP180 Sensor:

BMP180 is one of sensor of BMP XXX series. They are all designed to measure
Barometric Pressure or Atmospheric pressure. BMP180 is a high precision sensor
designed for consumer applications. Barometric Pressure is nothing but weight of air
applied on everything. The air has weight and wherever there is air its pressure is
felt. BMP180 sensor senses that pressure and provides that information in digital
output. Also the temperature affects the pressure and so we need temperature
compensated pressure reading. To compensate, the BM180 also has good temperature
sensor.

The BMP180 sensor is mainly used to measure atmospheric pressure or biometric


pressure.The working principle of the air pressure sensor is very simple, it works

1
based on the weight of air. Because the air around us has a certain weight, and this

weight has a specific pressure.

Fig 3.3 BMP180 Sensor

BMP180 Pinout Configuration

BMP180 is available in two modules. One is Five pin module and other is Four pin
module. With Five pin module we have additional +3.3V pin which is absent in four
pin module. Other than that the functioning is same.

Pin Name Description

VCC Connected to +5V

GND Connected to ground.

SCL Serial Clock pin (I2C interface)

SDA Serial Data pin (I2C interface)

Table 3.3 BMP180 Pinout

Configuration BMP180 Sensor Features

 Can measure temperature and altitude.

 Pressure range: 300 to 1100hPa

 High relative accuracy of ±0.12hPa

 Can work on low voltages

 3.4Mhz I2C interface


1
 Low power consumption (3uA)

 Pressure conversion time: 5msec

 Potable size

BMP180 Sensor Specification

 Operating voltage of BMP180: 1.3V – 3.6V

 Input voltage of BMP180MODULE: 3.3V to 5.5V

 Peak current : 1000uA

 Consumes 0.1uA standby

 Maximum voltage at SDA , SCL : VCC + 0.3V

 Operating temperature: -40ºC to +80ºC

Applications

 Indoor navigation

 Sport devices

 Computer Peripherals

 GPS

 Weather forecast

 Vertical velocity Indication

4. Jumper Wires:
Jumper wires are simply wires that have connector pins at each end, allowing them to
be used to connect two points to each other without soldering. Jumper wires are
typically used with breadboards and other prototyping tools in order to make it easy to
change a circuit as needed. Fairly simple. In fact, it doesn’t get much more basic than
jumper wires.

Though jumper wires come in a variety of colors, the colors don’t actual y mean
anything. This means that a red jumper wire is technically the same as a black one.
But the colors can be used to your advantage in order to differentiate between types of
connections, such as ground or power.

1
Jumper wires typically come in three versions: male-to-male, male-to-female and
female-to-female. The difference between each is in the end point of the wire. Male
ends have a pin protruding and can plug into things, while female ends do not and are
used to plug things into. Male-to-male jumper wires are the most common and what
you likely will use most often. When connecting two ports on a breadboard, a male-
to-male wire is what you’l need.

Fig 3.4 Jumper Wires (Male to Female)

5. Breadboard:

A Breadboard is simply a board for prototyping or building circuits on. It allows you
to place components and connections on the board to make circuits without soldering.
The holes in the breadboard take care of your connections by physically holding onto
parts or wires where you put them and electrically connecting them inside the board.
The ease of use and speed are great for learning and quick prototyping of simple
circuits. More complex circuits and high frequency circuits are less suited to
breadboarding. Breadboard circuits are also not ideal for long term use like circuits
built on perfboard (protoboard) or PCB (printed circuit board), but they also don’t
have the soldering (protoboard), or design and manufacturing costs (PCBs).

Why we use a Breadboard?

As mentioned before, a breadboard is handy because you can set up circuits quickly
and temporarily to test them and move on to a more permanent arrangement after
investigating how it works on the breadboard. They are great for hobbyists and
tinkerers to set up projects as a standalone device, or as a peripheral to an Arduino,
Raspberry Pi, LaunchPad, BeagleBone, and many other development boards. They
come in many sizes to fit projects large and small. Breadboards are also inexpensive,

1
and the parts that work with them are also typically inexpensive too. If you want to
make your project more permanent, moving from a design on a breadboard to
protoboard or PCB will be easier than skipping to those harder to manipulate boards.

If you’re just getting started, or are well down the path of electronic design, you’ll run
across breadboards. Getting to know their strengths of quick and easy circuit creation,
and their weaknesses of impermanence and limitations in terms of power handling
and RLC (resistance, inductance, capacitance) effects will help you create many fun
and useful projects later.

Fig 3.5 Breadboard

6. Liquid Crystal Display (LCD):

The LCD (Liquid Crystal Display) is a type of display that uses the liquid crystals for
its operation.

Here, we will accept the serial input from the computer and upload the sketch to
the Arduino. The characters will be displayed on the LCD.

The library that allows us to control the LCD display is called Liquid Crystal Library,
which is discussed below:

The library is declared as:

#include <LiquidCrystal.h>
The library is based on a compatible chipset called Hitachi HD44780. It is found on
most of the LCDs that are based on text. It works with either an 8-bit mode or 4-bit
mode. Here, the bit mode signifies the data lines in addition to the enable, rs, and rw
control lines (optional).

1
LCD Structure

The LCD display has a 16-pin interface.

The structure of the LCD is shown

below:

Fig 3.6 LCD

The Liquid Crystal Display has a parallel interface. It means that the microcontroller
operates several pins at once to control the LCD display.

The 16-pins present on the LCD display are discussed below:

 RS

The Register Select (RS) pin controls the memory of the LCD in which we write the
data. We can select either the data register or the instruction register. The LCD looks
for the upcoming instruction, which is present in the instruction register.

 R/W
The Read/Write pin selects the reading or writing mode.

 E

The Enable (E) mode is used to enable the writing to the registers. It sends the data to
the data pins when the mode is HIGH.

 D0 to D7

These are eight data pins numbered as D0, D1, D3, D3, D4, D5, D6, and D7. We can
set the state of the data pin either HIGH or LOW.

1
Pin 1 of the LCD is the Ground pin, and pin 2 is the Vcc or the voltage source pin.

The pin 3 of the LCD is the VEE or the contrast pin. For example, we can connect the
potentiometer's output to the VEE and can adjust the contrast of the LCD.

The A and K pins are also called as Backlight pins (Bklt+ and Bklt-).

Pin No Function Name


1 Ground 0 V Vss
2 Supply voltage 5V VDD
3 Contrast adjustment Vo
4 Register Select Rs
5 Read / Write signal R/W
6 Data read / write Enable E
signal

7 Low order data bus used for data D0-D3


8 transfer between
microcontroller and LCD
9
display
10
11 High order data bus used D4-D7
12 for data transfer between
microcontroller and LCD
13
display
14
15 Backlight 5V LED +
16 Backlight 0V LED -

Table 3.4 LCD Pin Interface

Principles of LCD

The process includes putting the data (to be displayed on the LCD screen) into the
data registers. The instructions in the Register Select are kept in the instruction
register. The liquid crystal library has simplified process to display the characters on
the LCD.

The LCDs can be controlled in 4-bit or 8-bit modes, which requires 7 and 11
Input/Output pins from the particular Arduino board.

1
Structure of LCD

Fig 3.7 Structure of LCD

3.3 Software Requirement:

Arduino IDE

To program our Arduino microcontroller we used the Arduino coding language.


The Arduino language is based on C/C++ and the most basic executable
program only needs two functions, a setup() and a loop(), to run. In the setup()
function variables, pin modes, serial communication, etc are initialized. This
function only runs once. The loop() function is where you write your actual code.
As the name suggests, the loop() loops and it loops continuously until your
device is powered off.

Simple as it may sound, it possible to write rather complex programs only using
above described structure. In fact, the program running on our weather station,
collecting data from the different sensors, is written in this exact form.

Arduino provides a free and easy to use integrated development environment.


This tool was developed to help introduce programming to people not used to
software development, which made it perfect for us and our project. The
Arduino IDE largely consists of a code editor and a compiler but also has some
nifty features which makes it easy for the user to upload programs to their
devices and to read input sent back from the device trough a serial
communication port.

The sensors we used had prewrite - ten libraries for Arduino communication,
these are possible to download from the internet.

1
Some of the sensors have more than one library, the ones that we used for this
project are; DHT and BMP280, the BMP library also requires access to Wire
(comes preinstalled with Arduino IDE), SPI (comes preinstalled with Arduino
IDE). In the Arduino language you only need to specify the header files to get
access to the libraries.

There are libraries for the LM35 sensor as well but we decided to instead read the
output voltage using the function analogRead(), which is built into the Arduino
language, and then calculate the associated temperature.

Fig 3.8 Arduino IDE Interface

The rest of the code interprets the input and figure out what sensor to read a value
from. If the input is not supported, nothing will happen. There is a full list of
supported commands in the appendix. The lines of code that read measurements
are quite similar for all the sensors, however there are some slight differences that
are worth noticing.

2
It simply checks what data the user is interested in and answer with an echo of the
request (TP or T) and associated measurement. bme.readTemperature() and
bme.readPressure() are functions defined in the BMP library.

The code for DHT22 is almost the same, but since this sensor is somewhat unstable
there is also a check that makes sure the measurement actually was successful, if not it
returns a humidity of -1 or a temperature of 1000. Similar as for the BMP, the
functions dht.readHumidity() and dht.readTemperture() are defined in the DHT
library.

2
4. METHODOLOGY & SYSTEM DESIGN

4.1 Methodology:

The Arduino Uno Microcontroller Board was used as the main hardware component,
while the Arduino IDE was used in writing the instruction codes (known as firmware)
which was uploaded into the microcontroller. Fig 4.1 shows the schematic diagram
used to design the Weather Monitoring System. Fig 4.4 highlights the implementation
of the circuit diagram using the selected components. The connections between
components are also shown.

4.2 Preliminary Design:

A preliminary design is a design of an entire treatment facility, carried out in


sufficient detail to enable accurate estimation of the costs for constructing and
operating a treatment facility.

Fig 4.1 Schematic Diagram

4.3 Working Concept of the Weather Station:

 The weather station comprises of three parts: collecting the real-time weather
data, processing the data in the Arduino board, showing the data to the user on
the LCD.

2
 The sensors DHT11 and BMP180 collect the data in real-time. That data is then
converted into electrical signals. These signals are then sent to the Arduino
board.

 Arduino board compiles these signals. Then sends the appropriate data in the
form of electrical signals to the LCD.

 The LCD then shows the final output to the user.

 All these processes happen in real-time. So the data also gets updated in real
time.

4.4 Flow Chart:

Fig 4.2 shows the flowchart for the design of the instructions that drives the
microcontroller. The firmware was developed using Arduino IDE which provided
needed tools to debug and upload to the microcontroller.

Fig 4.2 flow chart

2
4.5 Use Case Diagram:

A use case diagram is a dynamic or behavior diagram in UML. Use case diagrams
model the functionality of a system using actors and use cases. Use cases are a set of
actions, services, and functions that the system needs to perform.

Fig 4.3 Use case diagram

4.6 Circuit Diagram:

Fig 4.4 Circuit diagram

2
5. TESTING

5.1 Testing and Validation:

5.1.1 Test Number 1:

To verify if appropriate output is given by LCD

Test case number


TC_o1

Test case name Output verification 1

Description This test case is done to verify if


appropriate output is given by lcd

Input Room temperature and humidity


is recorded

Expected output Appropriate answer is found

Actual output Appropriate answer is found

Remarks Test Successful

Table 5.1 Test Case 1

5.1.2 Test Number 2:

To verify if the user is able to access the personal weather station only after session
hours.

2
Test case number TC_02

Test case name Timing verification

Description This test case is done to verify if the user is able


to access the personal weather station only after
session hours.

Input Try to access the personal weather station


before session hours.

Expected output Able to open the personal weather station.

Actual output Able to open the personal weather station.

Remarks Test Successful

Table 5.2 Test case 2

5.2 Testing Levels:

5.2.1 Functional Testing:

Functional Testing is a type of software testing whereby the system is tested against
the functional requirements/specifications. Functions (or features) are tested by
feeding them input and examining the output. Functional testing ensures that the
requirements are properly satisfied by the application. This type of testing is not
concerned with how processing occurs, but rather, with the results of processing. It
simulates actual system usage but does not make any system structure assumptions.
During functional testing, Black Box Testing technique is used in which the internal
logic of the system being tested is not known to the tester. Functional testing is
normally performed during the levels of System Testing and Acceptance Testing.

2
Typically, functional testing involves the following steps:

 Identify functions that the software is expected to perform.

 Create input data based on the function’s specifications.

 Determine the output based on the function’s specifications.

 Execute the test case.

 Compare the actual and expected outputs.

5.2.2 Non-Functional Testing:

Non-functional testing is defined as a type of Software testing to check non-functional


aspects (performance, usability, reliability, etc) of a software application. It is
designed to test the readiness of a system as per nonfunctional parameters which are
never addressed by functional testing. An excellent example of non-functional test
would be to check how many people can simultaneously login into a software. Non-
functional testing is equally important as functional testing and affects client
satisfaction.

5.2.2.1 Non-Functional Testing Parameters:

 Security:

The parameter defines how a system is safeguarded against deliberate and sudden
attacks from internal and external sources. This is tested via Security Testing.

 Reliability:

The extent to which any software system continuously performs the specified
functions without failure. This is tested by Reliability Testing.

 Survivability:

The parameter checks that the software system continues to function and recovers
itself in case of system failure. This is checked by Recovery Testing.

 Availability:

The parameter determines the degree to which user can depend on the system
during its operation. This is checked by Stability Testing.

2
The purpose of testing is to discover errors. Testing is the process of trying to
discover every conceivable fault or weakness in a work product. It provides a way to
check the functionality of components, subassemblies, assemblies and/or a finished
product it is the process of exercising software with the intent of ensuring that the
There are various types of test. Each test type addresses a specific testing
requirement.

5.3 White box Testing:

White Box Testing (also known as Clear Box Testing, open Box Testing, Glass Box
Testing, Transparent Box Testing, Code-Based Testing or Structural Testing) is a
software testing method in which the internal structure/design/implementation of the
item being tested is known to the tester. The tester chooses inputs to exercise paths
through the code and determines the appropriate outputs. Programming know-how
and the implementation knowledge is essential. White box testing is testing beyond
the user interface and into the nitty-gritty of a system.

Types of white box testing:

White box testing encompasses several testing types used to evaluate the usability of an
application, block of code or specific software package. There are listed below:

1. Unit Testing: It is often the first type of testing done on an application. Unit
testing is performed on each unit or block of code as it is developed. Unit Testing is
essentially done by the programmer. As a software developer, you develop a few
lines of code, a single function or an object and test it to make sure it works before
continuing Unit Testing helps identify a majority of bugs, early in the software
development lifecycle. Bugs identified in this stage are cheaper and easy to fix.

2. Testing for Memory Leaks: Memory leaks are leading causes of slower running
applications. AQA specialist who is experienced at detecting memory leaks is
essential in cases where you have a slow running software application.

Apart from above, a few testing types are part of both black box and white box
testing. They are listed as below:

 White Box Penetration Testing: In this testing, the tester/developer has full
information of the application's source code, detailed network information, IP
addresses involved and all server information the application runs on. The aim is to
attack the code from several angles to expose security threats.
2
6. EXPERIMENTAL RESULT

6.1 Outcome of the Proposed System:

All the modules were designed and all the components were assembled. The testing of
each module was carried out successfully. The sensor readings were effectively
retrieved in a stable environment and stored in files. Thus the testing phase was
completed. This study was performed in a controlled manner. Thus, there is a need to
conduct further experiments in environments more similar to real weather conditions.

Fig 6.1 Output Screen

2
7. CONCLUSIONS & RECOMMENDATION

This concludes that the present work was a success and it will provide a competent
method for recording real time weather readings and help farmers whose livelihood
depends on the weather in a country like India to produce better quality crops. It can
be used to gather information about the requirements for each area over the years. The
gathered information is used to determine the optimal conditions for plants to grow
and the farmer can modify the environment suitable for the growth of the plant. This,
in turn will have a huge impact on agriculture and also on farmers throughout the
world. It is recommended that the work can further be analyzed by taking
readings for two or three months for two or three different seasons in order to
determine optimal conditions of an environment which will help farmers and event
organizers.

Limitations of the weather system is mentioned below

 This system is developed for Small area.

 It is not web based system.

3
8. APPENDICES

8.1 Arduino Code:

#include "DHT.h"

#include <LiquidCrystal_I2C.h>

#include <SFE_BMP180.h>

#include <Wire.h>

SFE_BMP180 pressure;

float temperature;

#define ALTITUDE 227.0

#define DHTPIN 2 // what pin we're connected to

#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

LiquidCrystal_I2C lcd(0x27, 20, 4);

void setup(void) {

lcd.init();

lcd.print("Reading sensors");

dht.begin();

lcd.backlight();

pressure.begin();

void loop() {

float humidity, pressure;

3
humidity = dht.readHumidity()-15.0f;

pressure = readPressureAndTemperature();

delay(2000);

lcd.clear();

char tempF[5];

char humF[5];

char pressF[7];

dtostrf((temperature-2), 5, 1, tempF);

dtostrf(humidity, 2, 0, humF);

dtostrf(pressure, 7, 2, pressF);

//Printing Temperature

lcd.print("T:");

lcd.print(tempF);

lcd.print((char)223);

lcd.print("C ");

//Printing Humidity

lcd.setCursor(0,1);

lcd.print("H: ");

lcd.print(humidity);

lcd.print("%");

//Printing Pressure

lcd.setCursor(0,2);

lcd.print("P: ");

lcd.print(pressF);

lcd.print(" hPa");

3
float readPressureAndTemperature()

char status;

double T,P,p0,a;

status = pressure.startTemperature();

if (status != 0)

delay(status);

status = pressure.getTemperature(T);

if (status != 0)

temperature = T;

status = pressure.startPressure(3);

if (status != 0)

delay(status);

status = pressure.getPressure(P,T);

if (status != 0)

p0 = pressure.sealevel(P,ALTITUDE);

return p0;

3
9. REFERENCES
1. K. Krishnamurthi, S. Thapa, L. Kothari, A. Prakash, “Arduino Based Weather
Monitoring System” International Journal of Engineering Research and General
Science Volume 3, Issue 2, March, April, 2015.

2. D-Robotics, UK, DHT11 Humidity & Temperature Sensor datasheet. [online].


Available: https://www.droboticsonline.com, (30/Jul/2010).

3. Xiamen Amotec Display CO,.LTD, Specification of LCD Module LCD datasheet


Modulesparkfun.[online].Available:https://www.sparkfun.com/datasheets/LCD.(29,O
ct, 2008.

4. “Weather Monitoring Station: A Review” Int. Journal of Engineering Research and


Application, ISSN : 2248-9622, Vol. 6, Issue 6, ( Part -1) June 2016, pp.55-60.

5. F. Hahn, M. Pablo, J. Reyes “Solar Driven Wind Speed Monitoring System


Using Wireless or Wired Sensors” SciRes, Energy and Power Engineering, Vol 6,
PP.213-221, 2014.

6. A. Katyal, R. Yadav, M. Pandey, "Wireless Arduino Based Weather Station"


International Journal of Advanced Research in Computer and Communication
Engineering Vol. 5, Issue 4, April, 2016.

You might also like