You are on page 1of 52

Final Year Project Report

Drive Queen Taxi App


Android Application

Project Advisor
Mr. Khurshid Asghar
By

Muhammad
Reg. No. OK140808
Usman Saeed
Ali Akram Reg. No. OK140797
Shahzad Ashraf Reg. No. OK140826
Azeem Adam Reg. No. OK140804

University of Education, Okara Campus


Department of Computer Sciences & Information Technology

Session 2015-2019
A Project Report
Of

Drive Queen Taxi App

WEATHER PREDICTION SYSTEM

II
An Under-Graduate Project submitted to the Department of Computer Science & IT
as partial fulfilment of the requirements for the award of Degree of BS (Hons.) Information
Technology.

Name Registration Number Student Signature

Faran Sabir OK140808 ____________________

Ali Akram OK140797 ____________________

Shahzad Ashraf OK140826 ____________________

Azeem Adam OK140804 ____________________

Project Supervisor

Mr. Khurshid Asghar

Asst. Prof. Department of CS & IT

University of Education, Lahore (Okara Campus)

III
AUTHOR’S DECLARATION
We Faran Sabir, Ali Akram, Shahzad Ashraf and Azeem Adam hereby state that our
project titled “Weather Prediction System Desktop-Based Application” is our own
work and has not been submitted previously by us for taking any degree from this
University i.e. University of Education, Lahore (Okara Campus) or anywhere else in
the country/world. At any time if our statement found to be incorrect even after I
graduate the University has the right to withdraw our BS (Hons.) IT degree.

Faran Sabir (OK140808) Signature: ________________________

Ali Akram (OK140797) Signature: ________________________

Shahzad Ashraf (OK140826) Signature: ________________________

Azeem Adam (OK140804) Signature: ________________________

Dated: _________________

IV
PLAGIARISM UNDERTAKING
We solemnly declare project that is represented titled “Weather Prediction System
Desktop-Based Application” are solely our work with no significant contribution from
any other person. Small contribution/help wherever taken has been duly
acknowledged and that complete project has been written by us.

We understand the zero-tolerance policy of HEC and University of Education, Lahore


towards plagiarism. Therefore, we author of above titled project report declare that no
portion of our project report has been plagiarized and any material used as reference is
properly referred/cited.

We understand if we found guilty of any formal plagiarism in the above titled project
even after award of BS (Hons.) IT degree, the University reserve the right to
withdraw/revoke our BS (Hons.) IT degree and that HEC and the University has right
to publish our name on the HEC/University website on which name of students are
placed who submitted plagiarized work.

Faran Sabir (OK140808) Signature: ________________________

Ali Akram (OK140797) Signature: ________________________

Shahzad Ashraf (OK140826) Signature: ________________________

Azeem Adam (OK140804) Signature: ________________________

Dated: _________________

V
CERTIFICATE

It is certified that We Faran Sabir, Ali Akram, Shahzad Ashraf and Azeem Adam have
carried out all the work related to this project under our supervision at the Department
of Computer Science, University of Education, Lahore (Okara Campus).

Project Supervisor

Mr. Khurshid Asghar Assistant Professor IT


Department of Computer Science

Head of Department

Mr. Khurshid Asghar Assistant Professor IT


Department of Computer Science

Date:___________________

VI
DEDICATION

With great honour, gratification & sincere devotion

We dedicate this project to

Our parents, Teachers & Friends

Who always strengthened us Throughout

The way of our success to

“Love & live without status”

VII
ACKNOWLEDGEMENT

Alhamdulillah! With the grace of Almighty Allah (SWT) and the blessings of prophet
Muhammad (PBUH), we’ve been able to complete this final year project. The work
accomplished is a feeling of joy and contentment. However, we want to relate this
open door on account of all who have straightforwardly or in an unforeseen way
helped us to perform this task.

Foremost, we would like to express our sincere gratitude to our Supervisor, Head
of the department of Computer Science, University of Education Okara Campus Mr.
Khurshid Asghar. In addition to our advisor, we like to express our gratitude towards
our teachers Mr. Inam-Ul-Haq, Mr. Asis Jamal and Mr. Ahmad Nawaz-Ul-Ghani
every individual who gave their precious time and constructive criticism to complete
this undertaking.

Particularly, we are very thankful to Mr. Asis Jamal whose continuous support,
encouragement & motivation help us to complete this final year project. We would
also like to thank Mr. Asis Jamal for his guidance and encouraging us to work hard
and smart. We have found him very helpful while discussing the optimization issues
in this dissertation work. His critical comments on our work have certainly made us
think of new ideas and techniques in the fields of optimization and software
simulation.

We are grateful to the God Almighty who provides all the resources of every kind
to us, so that we make their proper use for the benefit of mankind. May He keep
providing us with all the resources, and the guidance to keep helping the humanity.

The Project Team

VIII
ABSTRACT
A Weather prediction is an automatic software with has been made just to provide
convenience to user this system is used to know about the future weather changes
which are very much useful for the people as many of life events of daily dealings are
dependent upon weather in any institution or for any individuals. This application is
built to deal with the problems regarding weather prediction. Such types of
applications are very much necessary in order to detect the problems and solve them.
This system will provide us the present weather condition as well as inform us about
future changes that are going to occur. It is the most dramatic problem for many
individuals who have to do their daily dealings on the basis of weather. Even though
there are a lot of technologies available. We expect our system will provide you in the
best of everyone’s need. This proposed system is designed for the use of `University
of Okara (Department of Computer Sciences & Information Technology).

IX
REVISION CHART
This chart contains a history of this document’s revisions. The entries below are
provided solely for illustration purposes. Those entries should be deleted until the
revisions they refer to have actually been created.

The document itself should be stored in revision control, and a brief description of
each version should be entered in the Revision Control System. A brief description
can be repeated in this section. Revisions need not be described elsewhere in the
document, unless they explain the document.

Version Primary Author(s) Description of Version Date Completed


Draft Azeem Adam Initial draft created for distribution 15 Dec. 2017
and review comments
Preliminary Ali Akram Second draft incorporating initial 12 Feb. 2018
review comments, distributed for final
review
Final Faran Sabir First complete draft, which is placed 17 April. 2018
under change control
Revision 1 Shahzad Ashraf Revised draft, revised according to the 09 May. 2018
change control process and maintained
under change control
Revision 2 Azeem Adam Revised draft, revised according to the 28 June. 2018
change control process and maintained
under change control
Complete Faran Sabir The project complete and checked. 9 July. 2018

Ali Akram

Azeem Adam

Shahzad Ashraf

X
PREFACE
This final year project was prepared as a partial fulfillment of the requirements of
acquiring the degree Bachelor of Science in Information Technology (BSIT), in the
department of Computer Science, located at the University of Education Lahore,
Okara Campus.

The thesis consists of six chapters. Chapter 1 explain the basic purpose of this system
is predict the weather offline. Chapter 2 provides a review of the literature, raising and
discussing key concepts the traditional system of satellite-based system, radar-based
system microcontroller system and Arduino based systems. These systems are almost
online and needs internet connection for weather forecasting. Whole process is time
consuming and cost effective. Chapter 3 presents motivation in which to perform all
steps attracting user to our method, benefits and objectives. This system will help a
user to shortly measure the weather and predict the weather without using internet.
This system also helps to measure temperature in poultry farms to save the birds from
extreme temperature. Arduino microcontroller can manage their food and medicos
including other necessities. Making SRS the questionnaire method is used. The entire
desktop-based program is developed and developed using object-oriented code,
mainly using Java to manage time and cost in developing the system use cost value
approach. Chapter 4 show the implementation of the system that which technologies
are used for proposed system. For this system Java is used as front-end development,
MYSQL is used for the database of the system and microcontroller Arduino
development code for Arduino and Barometric pressure sensor. It also explains the
structure of the system that how a local user or admin will interact with the system.
Chapter 5 conclude the proposed system. Finally, the team proposed a software
application that aims to predict weather without internet according to formal laws and
guidelines. The weather prediction system is developed using JAVA, Arduino
Development Kit and MySQL. It has certain features, such as sensing temperature,
humidity, atmospheric pressure, making it superior to the public weather forecasting
system manual. In future this system will enhance on the demand of farms and also in
public. Chapter 6, the references of all the research work are presented followed by
research questionnaire in Appendix.

XI
Table of Contents

Chapter 1..................................................................................................................................1

Introduction..............................................................................................................................1

1.1. Introduction..............................................................................................................2

1.2. Statement of the Problem..........................................................................................2

1.2.1. Satellite Based System..........................................................................................3

1.2.2. Radar Based System..............................................................................................3

1.2.3. Microcontroller Based System..............................................................................3

1.2.4. Arduino Based System..........................................................................................3

1.3. Objectives of the Project...........................................................................................4

1.4. Scope of the Project..................................................................................................4

Chapter 2..................................................................................................................................5

Background & Motivation........................................................................................................5

2.1 Background..............................................................................................................6

2.2. Why it is happening?................................................................................................6

2.3. Motivation................................................................................................................7

Chapter 3..................................................................................................................................8

System Requirement.................................................................................................................8

& Specification.........................................................................................................................8

3.1 Functional Requirements..........................................................................................9

3.2 Non-Functional Requirements..................................................................................9

3.3 Hardware Requirement.............................................................................................9

3.3.1. Barometric Device................................................................................................9

3.3.2. Arduino Microcontroller.....................................................................................10

3.3.3. Other Hardware..................................................................................................11

3.4. Software Requirement............................................................................................11

3.4.1. Java.....................................................................................................................11

3.4.2. MySQL.................................................................................................................11

XII
3.4.3. Arduino Compiler IDE.........................................................................................12

Chapter 4................................................................................................................................13

System Architecture................................................................................................................13

4.1. Structure of the System...........................................................................................14

4.1.1. Administrator......................................................................................................14

4.1.2. Local user............................................................................................................14

4.2. Use Case Diagram..................................................................................................15

4.3. DFD Diagram.........................................................................................................15

4.4. ER Diagram............................................................................................................16

4.5. Activity Diagram....................................................................................................16

Chapter 5................................................................................................................................18

Methodology...........................................................................................................................18

5.1. Implementation.......................................................................................................19

5.2. Technologies.......................................................................................................19

5.3. How it will work?................................................................................................19

2.1.1. Connection Names..........................................................................................19

2.1.2. Connecting Wires to the Board.......................................................................19

2.1.3. Connecting the Board to your Arduino...........................................................20

2.1.4. Installing the Arduino Library..........................................................................21

2.1.5. Running the Example Sketches.......................................................................22

2.1.6. Calculating Weather........................................................................................22

2.1.7. Determining Altitude......................................................................................26

Conclusion..............................................................................................................................33

3. Bibliography...................................................................................................................34

XIII
Table of Figures
Figure 2.1. Barometric Pressure Sensor Connection Slots...................................................7

Figure 4.4: Barometric Pressure Sensor Overview.............................................................19

Figure 4.5: Barometric Pressure Sensor Device..................................................................20

Figure 4.6: Connecting Arduino with Barometric Pressure Sensor..................................21

Figure 4.7: Example Code for Arduino BMP_180.............................................................22

Figure 4.8: Serial monitor for Arduino’s output.................................................................23

Figure 4.9: Proposed System’s main Page...........................................................................26

Figure 4.10: Weather Forcast..................................................................................................26

XIV
List of Tables
Table 1: Different System.......................................................................................................5

Table 2: Connection Overview.............................................................................................16

Table 3: Pressure & Units.......................................................................................................19

XV
Chapter 1
Introduction

1
1.1. Introduction
Weather forecasting is the process of finding or to predict the upcoming weather changes
in a specific area. This time Weather Prediction System allow user to measure the weather
condition of their environment using a smart microcontroller without using internet and
any other resources. This can help the Birds keeper to frequently know the Atmospheric
pressure and temperature of the Bird’s Shelter.

A Microcontroller named Arduino will regulate the system throughout the whole
process. The proposed system will aggregate the previous observations which the Arduino
microcontroller sense through a sensor named Barometric Pressure Sensor and calculate
the upcoming weather condition and display graphical notations. The system will be the
cost-effective system for different firms as well in public. This is much cheaper than a
general forecasting system.

The system helps in weather prediction for planting of crops because knowledge of
weather is very much essential in agriculture. Flying operations also need good knowledge
of weather because a little mistake in prediction can endanger precious lives of people so
this system also beneficial for it. Weather forecasting help us to make added up to date
every day decision and may even help stay us out of danger.

1.2. Statement of the Problem


Weather monitoring is very much essential for our daily life dealings. Agriculturists need
weather prediction for planting of crops because knowledge of weather is very much
essential in agriculture. Flying operations also need good knowledge of weather because a
little mistake in prediction can endanger precious lives of people. Weather forecasting help
us to make added up to date every day decision and may even help stay us out of danger.
Contemporary weather forecasting involves a combination of computer models,
surveillance, and a fact of trend and pattern. By the usage of weather prediction system,
you can detect the weather five days before which can enhance anyone’s ability in daily
dealings. Far from this, complete weather prediction systems are little bit less practice
because modules of weather like pressure and temperature are quite complex.

2
Satellite Based System
Satellite information is easy for prediction of weather by use as an element of combination
with habit meteorological perception in the short examination and predictable type of
weather approximate to focus data. Can Sat is a scale replacement of sketch, for the
making of the satellite.

Radar Based System


In Radar based systems like creators introduced a technique that coordinates both
information sources to give strategic and in order climate radar.

Microcontroller Based System


The important function of microcontroller is to make some fixed gallows to map an air
hack frame which allow the saw of environment parameter in a business. This type of work
includes dissimilar sensors like Gas sensors, temperature sensors, and with the use of ARM
9 LPC1768 microcontrollers.

Arduino Based System


From end to end a specific framework it can obviously collect data about stickiness and
temperature. Through this frame author can apparently get together data about tackiness
and temperature. The points of interest appear with the help of past and present condition
of the databases. Below is the summary of a digit of other processor-based systems and
their inconvenience with method used.

Sr No. Techniques Problems

1 Prediction Climate prediction has been difficult to address. Fault prediction


occur due to climate changes.

2 Sensor A sensor network may need a lot of extra wiring to be install both
for wire and wireless

3 Camera For vertical photography which want clear sky, no cloud and is
humped by strong thermal activity in air.

4 Arduino Structure is drawback size must be as little as probable.


Table 1: Different System

1.3. Objectives of the Project


3
 Most of computer model used for forecasting are run by National Weather Service,
which create estimate model base on compound formulas.

 These models are used by many dissimilar weather and information services in
prepare every day forecasts.

 Local weather observer, balloons, satellites, and weather station also help provide
data for forecasts.

 You don't need to have a processor or weather expand to try your hand at
forecasting, though.

 The most basic weather forecasting consists of simple observation. For example,
you can look up at the clouds and try to recognize tell-tale patterns as people did in
the past.

 Elevated, buoyant clouds usually foretell fine weather.

 A cloudy sky means rain or snow is on the way.

 Confident weather sort seems to be linked with convinced types of weather, at least
most of time.

1.4. Scope of the Project


The system provides the detail structure of the weather forecasting. Weather Prediction
System synchronizes the environment condition through the barometric sensor. It senses
the Humidity, Sea-Level Atmospheric Pressure, Pressure & Temperature. Weather
Prediction System is the easiest way to manage all functionalities of a Radar Based
forecasting System, which facilitates general public and to poultry farms to maintain the
temperature of the specific area by using automated system with these sensors.

4
Chapter 2
Background & Motivation

5
2.1 Background
Various recently available weather monitoring systems were studied and found they are
categorized based on various techniques which are summarized below. Few systems are
based on the communication media used and others are based on workstation and
techniques. Current project is based on the processor and technique structure. There are
variety of communications’ channels used in unlike field of embedded systems recently
based on GSM based, GPRS, WSN network, etc. The 10 hottest years since records began
have apparently all happened since 1997. But whose records and when did they begin? The oldest
ongoing instrumental record of temperature in the world is the Central England Temperature
record, started in 1659, and the journey starts of detecting the weather.

Cloud Based weather monitor system are classified based on knowledge used WSN,
Satellite, Microcontroller, Arduino, GSM, Radar; Prediction based system, Sensor Based
System. Over the past few centuries, physical laws governing aspects of the atmosphere
have been expressed and refined through mathematical equations. The idea of numerical
weather forecasting—predicting the weather by solving mathematical equations—was
formulated in 1904 by Vilhelm Bjerknes (1862-1951, Norwegian) and developed by
British mathematician Lewis Fry Richardson (1881-1953, British).

Despite the advances made by Richardson, it took him, working alone, several months
to produce a wildly inaccurate six-hour forecast for an area near Munich, Germany. In fact,
some of the changes predicted in Richardson’s forecast could never occur under any
known terrestrial conditions. Adding to the failure of this effort, a six-hour forecast is not
particularly useful if it takes weeks to produce.

6
2.2. Why it is happening?
To solve this trouble, weather station forever takes away belongings of height from their
report pressure reading by mathematically addition the equal set pressure to make it appear
as if the reading was taken at sea level. When you do this, a higher reading in San
Francisco than Denver will forever be because of weather pattern, and not since of height.
To do this, there is a purpose in the records called Sea-Level (P, A). This takes
unconditional pressure (P) in Pa, and station’s current altitude (A) in meters and remove
effects of height from pressure. You can use output of this purpose to straight contrast your
weather reading to other station about world.

2.3. Motivation
The atmospheric pressure at any known place on earth is not stable. The composite contact
between earth’s roll, group slope, and many other aspect outcomes in magnificent area of
higher and smaller pressure, which in twist base variation in weather we see every day. By
assessment for change in pressure, you can predict short-term change in weather. For
example, plunging pressure naturally resources wet weather or a hurricane is imminent (a
low-pressure system is moving in).

Increasing pressure typically resources that clear climate is future (a high-pressure


system is moving through). But remember that atmospheric pressure also varies with
height. The total pressure in Denver (altitude 5280') will for all time be lower than total
pressure in San Francisco (altitude 52'). If conditions station just reports their total
pressure, it would be hard to straight evaluate pressure capacity from one place to another
(and large-scale weather prediction depend on capacity from as many station as possible).

We will show you how to join this sensor to an Arduino microcontroller and use integrated
software library to obtain dimensions out of sensor. (These instructions and source code
may help if you are using unlike type of microcontroller.) We’ll also show you how to
understand readings for both monitoring weather and showing changes in altitude.

7
Chapter 3
System Requirement
& Specification

8
3.1 Functional Requirements
The proposed system must meet the following functional requirements.

 Proper Login and Logout of the system


 Administration and Users
 Proper Method of getting value from devices
 Administration and Users viewing different of reports

The system configuration is to make a specialized arrangement that full fill the functional
requirements of the system. Now in the project life cycle there should be a useful detail
(Functional Specifications) and containing a total description of operational needs of the
different organizations.

At this phase of the project we analyse and specify all the requirements and needs of the
user. When we gather the requirements, we focus on the following:

 Validation
 Verification
 Requirements Expressing
 Requirements Prioritizing
 Relationship to other requirements
 Specific Requirements

3.2 Non-Functional Requirements


The proposed system must meet the following non-functional requirements.

 The system is easy to handle


 The response time is reasonable
 Database is secure, proper privileges are maintained
 There is proper mechanism to have backup of data for recovery in case of failure
 GUI is user friendly

3.3 Hardware Requirement

Barometric Device

The BMP180 Breakout is a barometric pressure sensor with an I 2C (“Wire”) interface.


Barometric pressure sensors measure the complete pressure of the air around them. This
pressure varies with both the weather and altitude. Depending on how you interpret the
data, you can monitor changes in the weather, measure altitude, or any other tasks that
require an accurate pressure reading.

9
Arduino Microcontroller

Arduino is an open-source electronics platform based on easy-to-use hardware and


software. Arduino boards are able to read inputs light on a sensor, a finger on a button, or a
Twitter message and turn it into an output activating a motor, turning on an LED,
publishing few things online. You can tell your board what to do by sending a set of
instructions to the microcontroller on the board. To do so you use the Arduino
programming language (based on Wiring), and the Arduino Software (IDE), based
on Processing.

Other Hardware

10
3.3. Software Requirement

Java
Java is an extensively use programming language specifically deliberate for use in
distributed environment of internet. It is most trendy programming language for
Android smartphone application and is in the midst of the most preferred for edge
device and internet of things development. Java was designed to have the look and feel of
the C++ language, but it is simpler to use than C++ and enforces an object-oriented
programming model. Java can be used to create complete applications that may run on a
single computer or be distributed among servers and clients in a network. It can also be
used to build a small application module or applet for use as part of a webpage. We prefer
JAVA as the frontend because it is an advance language. It might open new opportunities in
the future, because it is becoming the popular. Also, it has simple coding as compared with
the other language and we need a special software for this.

MySQL
MySQL is a relational database management system (RDBMS). It is frequently used with
free of charge software projects that need a full feature database management system. It is
accepted due to esteem of JAVA, because JAVA is frequently merged with MySQL.
MySQL is used mostly in data warehousing, Web databases, e-commerce, logging
applications and distributed applications. It prefers MySQL because it is a freeware
database management system. And its operations are relatively simple to understand.
Usually MySQL is paired with JAVA for a number of applications. It has an ideal
combination with the JAVA without any compatibility issues.

Arduino Compiler IDE


The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains
a text editor for writing code, a message area, a text console, a toolbar with buttons for
common functions and a series of menus. It connects to the Arduino and Genuino hardware
to upload programs and communicate with them.

11
The editor has features for cutting/pasting and for searching/replacing text. The
message area gives feedback while saving and exporting and also displays errors. The
console displays text output by the Arduino Software (IDE), including complete error
messages and other information. The bottom righthand corner of the window displays the
configured board and serial port. The toolbar buttons allow you to verify and upload
programs, create, open, and save sketches, and open the serial monitor.

12
Chapter 4
System Architecture

13
4.1. Structure of the System
The Barometric Weather Analysis System has only one user and user have their own login
session to do certain task. The user is:

 Administrator

 Local User

These users have unlike login sessions and they can do certain functions within the session.

Administrator
The main functions in admin session are:

 Predict Weather

 Update/Delete History

 Change password

 Logout

 Annual/ Monthly Report

Local user
 Predict Weather

14
 Change Password

 Logout

4.2. Use Case Diagram


Use-case for the preferred system will be:

4.3. DFD Diagram

First level of DFD diagram of weather detection system is shows that how modules of the
system divided into sub modules each of which deals with different aspects of the project.

 Process the weather detection and the results


 Process pressure sensor and all its results

 Make aggregate of sensor data

 Create weather forecast

15
4.4. ER Diagram

The entity relationship diagram used to show the relationship between the tables. But in
this project we have only one table that is login table.In this project there is no need to
make a huge database.

4.5. Activity Diagram

16
Chapter 5
Methodology

17
In this chapter the material and methods used to develop College Management System are
described in detail. We used Agile software development life cycle to develop the proposed
CMS.

18
5.1. Agile Software Development Life Cycle

Agile Software Development Life Cycle Overview In Agile methodology, for the
development of this project the agile development model is best. Because that is full fill the
requirements of the project. Because this project require time to time changes that’s why
this development model is best. Because this development model is used to enhance the
facility and satisfaction of the customer. This section explores the meanings that are
currently associated with the concept of “agile”, and to provide a definition of the agile
software development method. Figure 3.1 represents the agile software development life
cycle.

Agile development is based on the idea of incremental and iterative development, in


which the phases within a development life cycle are revisited repeatedly. It iteratively
improves software by using customer feedback to converge on solutions. In agile
development, rather than a single large process model that implemented in conventional
SDLC, the development life cycle is divided into smaller parts, called “increments” or
“iterations”, in which each of these increments touches on each of the Figure 3.1 Agile
Software Development Life Cycle. There are 9 conventional phases of development.
According to Agile Manifesto, the major factors of agile factors include the following four:

• Early customer involvement

19
• Iterative development

• Self-organizing teams

• Adaptation to change

There are currently six methods that are identified as agile development methods,
which are Crystal methodologies, dynamic software development method, feature driven
development, lean software development, scrum, and extreme programming. Table 3.1.
Agile software development life cycle steps adopted to develop project

Step Phase Description


Step-1 Define In first step the current trends in this aspect are
determined.
Step-2 Design In the second phase procedures are adopted to build the
requirements for development of product.
Step-3 Build Specifications are written according to requirements.
Step-4 Test The developed functions of the product are verified by
mapping the requirements to functionality.
Step-5 Release Finally, product is ready to deploy.

20
Chapter 6
Implementation

21
6.1. Implementation
Connection Names

The BMP180 Breakout Board breaks out five connections from IC. These connections are
known as “pins” because they come from pins on IC, these are holes in which we plot
solding wires.

Figure Implementation.1: Barometric Pressure Sensor Overview

We will connect four of the five pins on the board to our Arduino. The four pins you need
are labeled +, -, CL, and DA.

Connecting Wires to the Board

You can use unlike methods for your connection. example, we’ll solder on a five-pin
length of male-male header strip, and use male/female jumper wires to connect the
BMP180 to your Arduino. Solder a 5-pin length of male-male header to the board. You can
solder it on any point you desire; You should use bread boards for bottom, for top you must
use jumper wires.

22
Figure Implementation.2: Barometric Pressure Sensor Device

Connecting the Board to your Arduino

When soldering is completed, connect the +, -, CL, and DA pins to your Arduino. Arduino
models are unlike for unlike pins the I 2C interface; Use the chart to see the structure of
plotting cables.

SIGNIFICANT: Connect power pins (+ and -) ONLY to a 3.3V supply.


Larger -Currents will completely damage the part. Note that because I 2C uses
open drain drivers, it is safe to connect the I2C pins (DA and CL) to an I2C
port on a 5V microprocessors.

BMP180 label Pin function Arduino connection

Any pin labelled SDA, or:

Uno, Red board, Pro / Pro Mini A4


DA (SDA) I2C data
Mega, Due 20

Leonardo, Pro Micro 2

23
Any pin labelled SCL, or:

Uno, Red board, Pro / Pro Mini A5


CL (SCL) I2C clock
Mega, Due 21

Leonardo, Pro Micro 3

"-" (GND) Ground GND

"+" (VDD) 3.3V power supply 3.3V

Leave disconnected unless you're connecting to a


IO (VDDIO) I/O voltage
lower-voltage microprocessor

Table 2: Connection Overview

Figure Implementation.3: Connecting Arduino with Barometric Pressure Sensor

Installing the Arduino Library

Libraries are combinations of software functions used as a single purpose, used to


communicate with unlike systems. We have written an Arduino library called
SFE_BMP180 that allows you to Communicate efficiently to the BMP180 sensor. This
library is not present in the specific portal but to install or to import library is not a difficult
task. If you’d like to interface the BMP180 to a microcontroller other than an Arduino, the

24
C++ source code in the library and the information in the datasheet may be helpful when
writing your own code.

Running the Example Sketches

The library used by you uses two example which shows two operations used for BMP180.
These are designed to be blueprints to help you write your own code. After installation of
the library, run the Arduino IDE, and open the given menu items: File/Examples / Spark
fun BMP180 / SFE_BMP180_example.

Figure Implementation.4: Example Code for Arduino BMP_180

When you have opened up the example run the code (remember to select the correct board
type and serial port), and open the Serial Monitor to 9600 baud. You should see few
diagnostic information (if it can’t find the device, double check your hardware
connections) followed by pressure readings. For more about pressure, see the next section,
Calculating Weather and Altitude. The readings in your terminal should look few things
like this, with data more relevant to your current place.

25
Calculating Weather

The BMP180 was designed to accurately measure atmospheric pressure. Atmospheric


pressure varies with both weather and altitude; you can measure both of these using this
sensor. Here’s how:

Figure Implementation.5: Serial monitor for Arduino’s output

6.1.1.1. What is Atmospheric Pressure?

The definition of pressure is a force “push” on an area. A common unit of pressure is


pounds per square inch (psi). One pound, push on one square inch, equals one psi. The SI
unit is newtons per square meter, which are called Pascal (Pa). There are lots of conditions
in which pressure can be check (gravity, pull, etc.), but right now we are keen in
atmospheric pressure, which is force that the air around you are exerting on everything.
The weight of gasses in atmosphere creates atmospheric pressure. One does not normally
notice that air weigh anything, but if you took a one-inch wide column of air from sea level
to the top of the atmosphere, its weigh about 14.7 pounds. (A 1 cm wide column of air
would weigh about 1 kg.) This weight, push down on the footprint of that column, creates
the atmospheric pressure that we can measure with sensors like the BMP180. Because that
inch-wide column of air weighs about 14.7 pounds, and is push on one square inch, it

26
follows that the average sea level pressure is about 14.7 pounds per square inch (psi), or
101325 Pascal’s. This will drop about 4% for each 1000 feet (or 300 meters) you ascend.
The higher you get, the less pressure you’ll see, because the column to the top of the
atmosphere is that much shorter and therefore weighs less. This is useful to know, because
by calculating the pressure and doing few math, you can find your altitude.

Fun fact: The air pressure at 12,500 feet (3810 meters) is only half of that at sea level. In
other words, half of the mass of the atmosphere is below 12,500 feet, and the air at 12,500
feet is half as dense as that at sea level. No wonder you have a harder time breathing up
there. The BMP180 outputs complete pressure in pascals (Pa). One pascal is a very small
amount of pressure, almost the amount that a sheet of paper will exert resting on a table.
You will more often see computation in hectopascals (1 hPa = 100 Pa) or kilopascals (1
kPa = 1000 Pa). The Arduino library we’ve provided outputs floating-point values in hPa,
which also happens to equal one millibar (mbar).

Here are few turnings to other pressure units:

Pressure Units

1 hPa 100 Pa = 1 mbar = 0.001 bar

1 hPa 0.75006168 Torr

1 hPa 0.01450377 psi (pounds per square inch)

1 hPa 0.02953337 inHg (inches of mercury)

1 hpa 0.00098692 atm (standard atmospheres)


Table 3: Pressure & Units

6.1.1.2. Temperature Effects

Because temperature affect the density of a gas, and density affect the mass of a gas, and
mass affect the pressure (whew), atmospheric pressure will change suddenly with
temperature. Pilots know this as “density altitude”, which makes it easier to take off on a
cold day than a hot one because the air is denser and has a greater aerodynamic effect. To
compensate for temperature, the BMP180 includes a rather good temperature sensor as
well as a pressure sensor. To do a pressure reading, you first take a temperature reading,

27
then merge that with a raw pressure reading to come up with a final temperature-requite
pressure measurement.

6.1.1.3. Calculating Complete Pressure

As we mentioned, if application requires calculating complete pressure, all have to do is


get a temperature reading, then do a pressure reading. Final pressure reading will be in hPa
= mbar. If we wish, we can convert this to a unlike unit using the above turning factors.

6.1.1.4. Weather Observations

The atmospheric pressure at any given place on earth (or anywhere with an atmosphere)
isn’t constant. The composite interaction between the earth’s spin, axis tilt, and many other
factors result in moving areas of higher and lower pressure, which in turn cause the
difference in weather we see every day. By watching for changes in pressure, you can
predict short-term changes in the weather. For example, flow pressure usually means wet
weather or a storm is approaching (a low-pressure system is moving in). Rising pressure
usually means that clear weather is approaching (a high-pressure system is moving
through). But remember that atmospheric pressure also varies with altitude. If weather
stations just reported their complete pressure, it would be difficult to directly contrast
pressure computation from one place to another (and large-scale weather predictions
depend on computation from as many stations as possible). To solve this problem, weather
stations always remove effects of altitude from their reported pressure readings by
mathematically adding the equivalent fixed pressure to make it appear as if the reading was
taken at sea level. When you do this, a higher reading in San Francisco than Denver will
always be because of weather patterns, and not because of altitude. To do this, there is a
function in the library called sea-Level (P, A). This takes complete pressure (P) in hPa, and
the station’s current altitude (A) in meters and removes the effects of the altitude from the
pressure. You can use the output of this function to directly compare your weather readings
to other stations around the world.

28
Figure Implementation.6: Proposed System’s main Page

Figure Implementation.7: Weather Forcast

2.1.1. Determining Altitude

Since pressure varies with altitude, you can use a pressure sensor to measure altitude (with
a few caveats). The average pressure of the atmosphere at sea level is 1013.25 hPa (or
mbar). This drops off to zero as you climb towards the vacuum of space. Because the curve

29
of this drop-off is well understood, you can compute the altitude difference between two
pressure computation (p and p0) by using this equation:

There are two ways you can take advantage of this:

1. If you use sea level pressure (1013.25 hPa) as the baseline pressure (p 0), the output
of the equation will be your current altitude above sea level.

2. Or, if you take a single pressure reading at your current place, and use that as your
baseline (p0), all subsequent pressure readings will result in relative altitude
changes from the baseline. Climb the stairs and you should see the altitude go from
zero to 3 or 4 meters. Go down to the basement, and you’ll see -3 or -4 meters.
There’s an example sketch included with the library called
BMP180_altitude_example.ino that shows how to do this.

There’s a function in the library called altitude (P, P0) that lets you accomplish both of
these things. If you give it the sea level pressure (1013.25 hPa) for p 0, and your local
pressure for p, it will give you your altitude above sea level. If you use a local pressure
measurement for p0, subsequent p pressure readings will give you your change in altitude
from the baseline.

Now for the caveats:

Accuracy: How accurate is this? The theoretical noise level at the BMP180s highest
resolution is 0.25m (about 10 inches), though in practice we see noise on the order of 1m
(40 inches). You can improve the accuracy by taking a large number of readings and
averaging them, although this will slow down your sample rate and response time.

Weather: You should also remember that pressure changes due to weather will affect your
altitude readings. The best accuracy will be obtained if you take a “fresh” p 0 when you
need it and don’t rely on it to be accurate for extended periods due to changes in the
weather.

30
Maximum altitude: The BMP180 can’t measure all the way down to vacuum (or up to
space). It’s advertised lower limit is about 300 hPa (or mbar), which corresponds to an
altitude of about 3000m or 30,000 feet. People have flown these to higher altitudes and
gotten useful results, but this isn’t guaranteed or likely to be accurate. (You might consider
using GPS for high-altitude computation).

Minimum altitude: Similarly, this sensor isn’t suited for large pressures either. The
advertised upper limit is 1100 hPa=mbar (or 16 psi), which is about 500 feet below sea
level (that’s in air - the BMP180 isn’t submersible in water). This sensor isn’t a good
choice for submersible or compressed-gas computation.

31
32
Chapter 6

Testing

33
34
Chapter 7

Conclusion

35
Conclusion
Weather Forecasting in many institutions often becomes tough, hard job, which lends itself
to inaccuracies. Manual Weather Prediction is always accompanied with a lot of confusion
and human error. By employing an automated system, we are allowing resources to be
released to other areas where they can be used more effectively. This system provides a
user-friendly Weather Prediction for the Humans. Human will be aware about Weather
condition rate and will get updated Weather condition any time. Hopefully it might helpful
for institutions and humans to do their routine activities.

36
3. Bibliography

[1] BMP180 Barometric Pressure Sensor Hookup on:


https://learn.sparkfun.com/tutorials/what-is-an-arduino?
__hstc=753710.3e252d740863762757bd89c552107763.1509274518933.1509274518933.1
509284412715.2&__hssc=753710.1.1509284412715&__hsfp=2684144485
[2] INFONIC in “Barometric Weather Prediction” on www.infonic.com
[3] Consultant: Mr. Khurshid Asghar (Head of Department of Computer Sciences)
University of Okara
[4] Helping Hands: Fik-Xun Developers
[5] https://www.youtube.com/watch?v=wAbDUwUdiro
[6] https://www.youtube.com/watch?v=WNttrjuipL0
[7] https://ieeexplore.ieee.org/document/4289915/
[8] https://www.mmm.ucar.edu/weather-research-and-forecasting-model
[9] https://ieeexplore.ieee.org/document/8093397/
[10] www.jmest.org/wp-content/uploads/JMESTN42352157.pdf
[11] https://create.arduino.cc/projecthub/projects/tags/weather
[12] https://courses.lumenlearning.com/geophysical/chapter/collecting-weather- data/
[13] https://www.arduino.cc/en/Guide/ArduinoUno
[14] cactus.io › Projects › Weather
[15] https://maker.pro › Arduino › Projects
[16] www.instructables.com › technology › microcontrollers
[17] www.instructables.com › technology › electronics
[18] https://www.manta.com › ... › Radar Manufacturers and Servicing
[19] https://makezine.com/2015/11/20/build-your-own-arduino-weather-station/
[20] https://acadpubl.eu/jsi/2018-118-16-17/articles/16/31.pdf
[21] https://create.arduino.cc/projecthub/projects/tags/monitoring
[22] https://learn.sparkfun.com/tutorials/bmp180-barometric-pressure-sensor-hookup-

37

You might also like