0% found this document useful (0 votes)
27 views67 pages

Zegbi Schéma

This document describes a thesis that developed a low-cost automatic wireless weather station. It uses an Arduino board to measure weather parameters like temperature, pressure, humidity, wind speed, and direction. A Zigbee link sends this data to a GUI program on a PC created in LabVIEW. The GUI displays current conditions, logs data in Excel format, and hosts the information on a webpage. This system provides real-time weather monitoring and alerts at a lower cost than traditional weather stations.

Uploaded by

ajaghjagh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views67 pages

Zegbi Schéma

This document describes a thesis that developed a low-cost automatic wireless weather station. It uses an Arduino board to measure weather parameters like temperature, pressure, humidity, wind speed, and direction. A Zigbee link sends this data to a GUI program on a PC created in LabVIEW. The GUI displays current conditions, logs data in Excel format, and hosts the information on a webpage. This system provides real-time weather monitoring and alerts at a lower cost than traditional weather stations.

Uploaded by

ajaghjagh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/308971760

A LOW COST ZIGBEE BASED AUTOMATIC WIRELESS WEATHER STATION


WITH GUI AND WEB HOSTING FACILITY

Thesis · July 2014


DOI: 10.13140/RG.2.2.15921.99686

CITATIONS READS

6 3,546

3 authors, including:

Abhishek Thakur Rajesh Kumar


Thapar Institute of Engineering and Technology Guru Gobind Singh Indraprastha University
64 PUBLICATIONS 391 CITATIONS 46 PUBLICATIONS 345 CITATIONS

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Image Forensic using Machine Learning View project

Analysis of soil Properties for construction View project

All content following this page was uploaded by Abhishek Thakur on 10 October 2016.

The user has requested enhancement of the downloaded file.


A LOW COST ZIGBEE BASED
AUTOMATIC WIRELESS WEATHER
STATION WITH GUI AND WEB
HOSTING FACILITY

THESIS

SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE AWARD


OF THE DEGREE OF

MASTER OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION

SUBMITTED BY
NITANT SABHARWAL
(University Roll No. 1268997)

JULY 2014

PUNJAB TECHNICAL UNIVERSITY


JALANDHAR, INDIA
ABSTRACT

The climate change is one of the most important factors affecting the quality of life and the
activity of the increasingly population. The current means of meteorological parameters data
collection are indeed rather limited and make use of some very expensive weather stations,
leading to a lack of comprehensively monitoring due to cost constraints and inconveniences.

In this thesis work, we have proposed and developed a low cost hardware module based on
Arduino Uno Board, which measures the meteorological data, including air temperature,
atmospheric pressure, relative humidity, dew point temperature, wind speed and wind direction.
It sends this information to the Graphical User Interface (GUI) application running on a PC
through Zigbee wireless link. The user friendly GUI, a standalone application for windows, is
developed in LabVIEW. The application displays the current conditions graphically, logs the
data in a format accessible by MS Excel and has a facility to host the same information through
a webpage on the internet.

This system is also a mathematical model which is capable of generating short time local alerts
based on these weather parameters. This gives on line and real time effect. The idea behind this
program is to monitor, condition mapping, weather forecasting and further to warn the people
from its disastrous effects.

It will be highly useful in increasing the resolution of high accuracy low cost weather stations on
the land for a better forecasting model, landing the aircraft, navigational and the ship borne
effects, tornado, tsunami, cloud bursts and in healthcare alerts etc. In future we are going to link
with satellite system as a global feature of this system.

It can be permanently located at one location or transported to another location where localized
weather measurement is needed. Such a system with lower cost has been proposed in this thesis
work.

ii
ACKNOWLEDGEMENT

Apart from the efforts of me, the success of this dissertation depends largely on the
encouragement and guidelines of many others. I take this opportunity to express my gratitude to
the people who have been instrumental in the successful completion of this dissertation.

I would like to place on record my deep sense of gratitude to. Prof. RAJESH KUMAR, Head of
Department of Electronics & Communication Engineering, Indo Global College of Engineering,
Abhipur, India, for his generous guidance, help and useful suggestions.

I express my sincere gratitude to DR. BASUDEO PRASAD, Ex. Scientist CSIO Chandigarh, for
his stimulating guidance, continuous encouragement and resourceful help throughout the course
of present work.

I am extremely thankful to DR. PROMILA KAUSHAL, Principal, Indo Global College of


Engineering, Abhipur, for providing me infrastructural facilities to work in, without which this
work would not have been possible.

I express gratitude to Er. Abhishek Thakur, Assistant Professor Dept. of ECE and other faculty
members of ECE Department for their intellectual support throughout the course of this work.
Finally, I am indebted to all whosoever has contributed in this dissertation work.

Nitant Sabharwal

iii
LIST OF FIGURES

Figure Title Page

1 Weather Satellite 3

2 Weather Balloons 4

3 Weather Radar 5

4 Microcontroller Based WMS 6

5 Wireless Automatic WMS 7

6 BMP085 based Digital Sensor 10

7 SHT21 Humidity Sensor 11

8 Anemometer Reed Switch Symmetry 12

9 Reed Switch 13

10 Wind Vane Sensor 14

11 Arduino UNO based on ATMega-328 Microcontroller 15

12 XBee Module 16

13 JDH 204A LCD Display 16

14 Schematic Block Diagram 20

15 BMP085 Application Circuit 24

16 Measurement of Temperature and Pressure 25

17 Calculating Pressure and Temperature 27

18 Wind Directions 30

19 Front Panel 34

20 Block Diagram 35

21 Step- 1 (Web Server) 36

22 Step- 2 (Web Server) 36

23 Step- 3 (Web Server) 37

iv
24 Step- 4 (Web Server) 37

25 Step- 5 (Web Server) 38

26 Step- 6 (Web Server) 38

27 Step- 7 (Web Server) 39

28 Step- 8 (Web Server) 39

29 Step- 9 (Web Server) 40

30 Step- 10 (Web Server) 40

31 Weather Monitoring Station 41

32 JHD 204A Display- Running Hardware 42

33 Snapshot- Running GUI 43

34 Snapshot - Running GUI on Live Webpage 44

35 Data Logging Stopped 45

36 Data Logging in Progress 45

37 Data Files 46

38 Data File in Excel 46

39 Temperature Plots 47

40 Pressure Plots 48

41 Humidity Plots 48

42 Wind Rose 49

43 Detailed Circuit Diagram 55

44 A sample schematic I2C 56

v
LIST OF TABLES
Table Title Page
1 Pin Connections 21-22

2 Calibration Coefficients 26

3 Basic Commands for SHT21 31

4 Dew Point and Human Comfort 33

5 Comparison with Base Paper 50

vi
CONTENTS

Page No.

Candidate’s Declaration i

Abstract ii

Acknowledgements iii

List of figures iv

List of Tables vi

Chapter 1: INTRODUCTION 1
1.1 Project Overview 1

1.2 Objective 2

Chapter 2: REVIEW 3
2.1 Review of Weather Monitoring Techniques 3

2.1.1 Weather Monitoring Satellite 3

2.1.2 Weather Balloons 4

2.1.3 Weather Radar 5

2.1.4 Weather Monitoring by Microcontroller 6

2.1.5 Weather Monitoring using Simple Instruments 6

2.1.6 Wireless Automatic Weather Monitoring Station (WMS) 7

2.2 Literature Review 8

2.2.1 M. Haefke, S. C. Mukhopadhyay and H. Ewald [IEEE, 2011] 8

2.2.2 Mircea Popa, Member IEEE, and Catalin Iapa [2011] 8

2.2.3 Babar Khan [2012] 9

vii
Chapter 3: PROPOSED WORK 10
3.1 Hardware Description 10

3.1.1 BMP085 10
3.1.2 SHT21 11
3.1.3 Anenometer 12
3.1.4 Reed Switch 12
3.1.4 Potentiometer Based Wind Vane Sensor 13
3.1.5 Arduino Uno 14
3.1.6 XBee/ ZigBee 15
3.1.7 JHD204A LCD Module 16
3.2 Software Specifications 17
3.2.1 Arduino Development Environment 17
3.2.1.1 Writing Sketches 17
3.2.1.2 Uploading 18
3.2.1.3 Libraries 18
3.2.1.4 Serial Monitor 19
3.2.2 LabVIEW 2012 19
3.2.2.1 LabVIEW VI 19
3.2.2.2 Application Builder 20
3.3 System Design 20

Chapter 4: METHODOLOGY 23
4.1 Data Acquisition 23
4.1.1 BMP085 23
4.1.1.1 Measurement of Pressure and Temperature 24
4.1.1.2 Calibration Coefficients 25
4.1.1.3 Calculation of Pressure and Temperature 26
4.1.1.4 Calculation of Approximate Current Weather Condition 28
4.1.2 Anemometer 28
4.1.3 Wind Vane Sensor 29
4.1.4 SHT21 Humidity Sensor 30
4.1.4.1 Start Up the Sensor 31
4.1.4.2 Relative Humidity Conversion 32
4.1.4.3 Temperature Conversion 32
4.1.4.4 Calculation of Dew Point 32
viii
4.2 LabVIEW Programming 34
4.2.1 Front Panel 34
4.2.2 Block Diagram 35
4.2.3 Making a Web Server Snapshots 36

Chapter 5: RESULTS 41
5.1 Developed Hardware 41
5.2 GUI and Web Hosting Snapshots 42
5.3 Data Logging Facility 45
5.4 Results and Comparison 47
5.4.1 Temperature 47
5.4.2 Pressure 47
5.4.3 Relative Humidity 48
5.4.4 Wind Rose 49
5.5 Comparison from Previous Work 50
5.5.1 Difference between Base Paper and Proposed Work 50

Chapter 6: CONCLUSION AND FUTURE SCOPE 51


6.1 Conclusion 51
6.2 Future Scope 51

References 52

APPENDIX 1: Detailed Circuit Diagram 55

APPENDIX 2: I2C Interface 56

ix
CHAPTER 1
INTRODUCTION

1.1 Project Overview

The climate change is one of the most important factors affecting the quality of life and the
activity of the increasingly population. The current means of meteorological parameters data
collection are indeed rather limited and make use of some very expensive weather stations,
leading to a lack of comprehensively monitoring due to cost constraints and inconveniences.
Nevertheless, the acquisition of comprehensive meteorological data is the prerequisite condition
for the accuracy of weather forecast. If there is not enough data gathered of meteorological
parameters, the publicly available information about weather forecast would be inaccurate.

Weather monitoring has been very important to man over centuries. It directly or indirectly
affects our day by day life, for example cloud bursts, storms, tornado, tsunami etc. have always
made us realize the existence of nature time to time. For past few years due to global warming,
increased pollution & population and massive utilization of resources, the atmospheric conditions
are changing rapidly. Warm days have become warmer and cold days colder. The average
temperature of earth has risen by 0.5°C over the past century. The rains have also become erratic.
The seasons have started overlapping, warm weather during winter and cold conditions during
spring or summer. The seasonal climatic variations have been converted into daily variations.
These weather conditions strongly affect the health of plants and animals. The changes in climate
are perceptible in Punjab, as is their effect on agriculture. The changing climatic conditions have
baffled meteorologists as well, for whom it has become really difficult to predict the seasonal or
daily weather conditions. Punjab, agriculturally the most important state of the country, has also
witnessed climatic changes like in other parts of the country. Considering the importance of
agriculture in Punjab, the national food security and livelihood security of about 16 million
people dependent on agriculture and its vulnerability to climate change, it is important that efforts
be made to carry out extensive research on developing adoption technologies in relation to
climate change. Weather parameters are the basic tools which can be used to predict the weather.
In this scenario it has become very important to have good monitoring over weather conditions.

A weather station is that facility on land or sea, which has the instruments and devices for
observing and measuring atmospheric parameters to provide the information for weather
forecasts. Weather data is also used to study the weather patterns and climate change. The
1
parameters for weather observations include temperature, atmospheric pressure, relative
humidity, wind speed, wind direction, rainfall amounts and their maximum & minimum values
etc. Weather affects almost every field of man’s activities, including agriculture, health,
transportation and leisure time.

Typical weather stations have the following instruments:

 Thermometer for measuring air temperature


 Barometer for measuring atmospheric pressure
 Hygrometer for measuring humidity.
 Anemometer for measuring wind speed
 Wind direction sensor for measuring wind vane
 Rain gauge for measuring liquid precipitation over a set period of time.

The proposed system will measure the parameters of the weather by low cost digital sensors and
communicate these values to a computer system via Zigbee wireless link. And then it will display
the information in a graphical application and host it on the web. The proposed system will also
consist of a mathematical model to generate short time local alerts based on the local data. We
have used LabVIEW and Arduino platform to achieve this objective.

1.2 OBJECTIVE
 The aim of this project is to set up and run a completely low cost, compact, easy to mount,
automatic, wireless weather station with a Graphical User Interface (GUI), automatic
datalogger and a web hosting facility.
 Its results should be quite accurate with a correlation factor of at-least 0.7, when they will
be compared with the data values of weather monitoring centres across India.
 Weather monitoring, condition mapping and generating weather alerts & warn the people
from its disastrous effects like tornado, tsunami or cloud bursts etc. And to provide the
useful information for landing the aircraft, in navigational & ship borne effects and for
health care centres or hospitals.

2
CHAPTER 2
REVIEW

2.1 REVIEW OF WEATHER MONITORING TECHNIQUES

Weather monitoring has been very important through centuries as weather parameters give the
basic tools and mechanism to understand and predict the weather. If we go through the history,
ancient people also used to predict the weather according to the clouds formation, winds and
temperature sensations through body etc.

We started making instruments a few centuries back, to calculate the raw parameters of weather
more precisely and then we began to understand the mechanism of weather forecasting. Weather
forecasting models came into existence as we explored the relation between weather parameters
and weather patterns. In the 21st century, various weather monitoring techniques are available,
which are discussed below.

2.1.1 WEATHER MONITORING SATELLITE

Weather Monitoring Satellite is used to monitor the weather, clouds and climate of the earth.
These satellites can be polar or geostationary. Weather monitoring satellites not only monitor
clouds and climate, but they can also monitor fire, pollution, sand, dust storms, snow cover,
oceanic currents and many more real-time situations.

Fig.1 Weather Satellite


3
Vanguard 2 was the first weather satellite, which was launched on February 17, 1959. It had the
capability to measure cloud cover and resistance. But, because its axis of rotation was very poor,
it could not collect notable amount of data.

Some satellites can detect the changes in the sea state, ice fields, ocean color and vegetation or
greenery on the fields. For example, the European ENVISAT in 2002 monitored carefully the
northwest coast of Spain when Prestige oil was spill off, which although was not a weather
satellite but a flying instrument (ASAR), which can see the changes in the sea surface. TIROS-1
was the first weather satellite which was considered a success. It was launched by NASA on
April 1, 1960. TIROS is considered the mother of the Nimbus program, the technology and
research of TRIOS is the heritage for most of the Earth-observing satellites by NASA and
NOAA.

2.1.2 Weather Balloons

A weather balloon is a type balloon, which can go to higher altitudes and carries the weather
measurement equipment or instruments to collect and send the information back to the earth
station, about the temperature, pressure, relative humidity and wind by means of a small device
called radiosonde. It passes through the different layers of the atmosphere giving the layered
information of weather parameters. Wind data can be obtained by radar equipment, radio
direction techniques, or navigation systems like Global Positioning System (GPS). Balloons
which are made to stay at a constant altitude for a long time are known as transosondes.

Fig.2: Weather Balloons


4
Léon Teisserenc de Bort was a French meteorologist. He is known to be the first man to use the
weather balloons. In 1896 he launched many balloons from his observatory in Trappes, France.
In 1958, Transosondes weather balloons helped diagnose radioactive debris from atomic fallout.

2.1.3 WEATHER RADAR

Weather radar or Weather Surveillance Radar (WSR) or Doppler weather radar, is used to locate
precipitation, its motion, its type i.e. rainfall, snowfall or hail etc. Most of the weather radars are
pulse-Doppler radars and they are capable of rain droplets motion detection. This data can also
be used to determine the potential of causing a storm. Radar is used for larger images of data like
cloud formation, storm cells, hurricanes. Live coverage by Radars can improve the alerts and
forecasting system to greater accuracy. Radar images can be used to make weather forecasts by
processing them in specialized software. This can generate short time or long term forecast alerts.
Radar data is also converted into numerals for numerical forecasting based models for generating
better analysis and forecast.

Fig.3: Weather Radar


5
2.1.4 WEATHER MONITORING BY MICROCONTROLLER

Microcontroller based weather monitoring system consists of sensors and one or more
microcontroller units to carry out the processing and calculations of weather parameters. These
systems are low cost and can measure the data on ground or sea. Weather monitoring by
microcontroller is a good option for achieving high resolution of ground stations.

Fig.4: Microcontroller Based WMS

2.1.5 WEATHER MONITORING USING SIMPLE INSTRUMENTS

For a long time simple technology and basic instruments has been used to monitor the weather
like thermometer for measuring air and sea surface temperature, barometer for measuring
atmospheric pressure, hygrometer for measuring humidity, anemometer for measuring wind
speed, rain gauge for measuring liquid precipitation over a set period of time. These instruments
are the basis of all the weather calculations.

6
2.1.6 WIRELESS AUTOMATIC WEATHER MONITORING STATION (WMS)

In Indian Weather Stations, an observer takes the readings of weather parameters from the
instruments manually. And then a separate team is needed to handle the data, process it and
manipulate it in laymen understandable form. The solution is to make a microcontroller based
system. But in industrial environment, it is certainly a hazard to monitor the weather through
wires. Hence a wireless fully automatic WMS is the need of the hour.

Fig.:5 Wireless Automatic WMS

Wireless Automatic WMS consists of mainly four parts as, sensors, microcontroller, wireless
module (any wireless technology) and a computer system. Microcontroller sends the sensor data
to computer system through wireless link and computer system displays it graphically and also
logs the data.

Today Zigbee is the most promising and advanced wireless technology which allows the mesh
network structure. This is very helpful in implementing more WMS over a wide area. Hence data
handling and forecasting is much easier in this manner.

7
2.2 LITERATURE REVIEW

Various papers on weather monitoring stations by using microcontroller and wireless technology
are being discussed here. A brief review about the technique used, objectives, and their future
scope is given below.

2.2.1 M. Haefke, S. C. Mukhopadhyay and H. Ewald (IEEE, 2011) [1]

They proposed a Zigbee based smart sensing platform for monitoring environmental parameters.
The smart weather station consists of SiLab C8051F020 microcontroller based measuring units,
which collects the value of the temperature, relative humidity, pressure and sunlight. These units
send their data wireless to a central station, which collects the data, stores and displays them into
a database. The facility of adding a few more sensors and a few more stations has been provided.

The future scope is:

 Further development on downsizing the system

 Using more sensors for more environmental parameters

 Using alternative energy sources

 Analysis of the measured data

 Improve visualization of weather variables output.

2.2.2 Mircea Popa, Member IEEE, and Catalin Iapa (2011) [2]

They presented a weather station consisting in temperature, humidity, pressure and luminosity
sensors, a microcontroller and a GSM module. The station can be controlled through a mobile
phone with SMS service. Output is text based only. The 24 hour previous data is stored in this
system.

The future scope of this paper is:

 Adding other sensors, such as sensors for wind direction and speed and sensors for
precipitations.
 Adding a friendlier user interface; the present solution is based on text only.

8
 Connecting the weather station to Internet so that the information can be present real-time
and can be consulted through a PC or a mobile phone with the GPRS service.

2.2.3 Babar Khan (2012) [3]

In his Master thesis work setup and implemented a weather station using LabVIEW program.
The sensors were mounted on a mast and connected to Datalogger. To retrieve data from
Datalogger, LabVIEW coding was done which displayed real weather condition and log data into
Microsoft SQL server. In LabVIEW coding of historical data analysis it was made possible to
retrieve data for a desired period of time.

The future work which can be done in this project is:

 Improve visualization of weather variables output and use more sensors.


 Make it a global system by implementing web hosting.
 Make it a cost effective system.
 Make mathematical models for future prediction of air temperature, pressure and wind
speed. Make long term alerts for seven days ahead.
 Make the prediction whether there will be sun, rain, snow or fog.

9
CHAPTER 3
PROPOSED WORK

3.1 HARDWARE DESCRIPTION

In this research work, we are going to make a real time system, which will measure the
temperature, pressure, humidity, dew point, wind speed and wind direction. For this purpose we
have used the following sensors:

3.1.1 BMP085

We are using barometric digital pressure sensor BMP085 which calculates pressure and
temperature with great accuracy. The BMP085 is based on piezo-resistive technology for EMC
robustness, high accuracy and linearity as well as long term stability.

Robert Bosch is world market leader for pressure sensors in automotive applications. Based on
experience of over 200 million pressure sensors in the field, the BMP085 continues a new
generation of micro-machined pressure sensors.

Fig.6 BMP085 based Digital Sensor [9]

The BMP085 is a high-precision, low-power digital barometer. The BMP085 offers a measuring
range of 300 to 1100 hPa with an accuracy down to 0.03 hPa in ultra-high resolution mode (that's
0.25m of altitude at sea level!). The Pascal (symbol: Pa) is the SI derived unit of pressure. It is a
measure of force per unit area, defined as one newton per square meter. Common multiple units

10
of the Pascal are the hectopascal (1 hPa ≡ 100 Pa), kilopascal (1 kPa ≡ 1000 Pa), megapascal (1
MPa ≡ 1,000,000 Pa), and gigapascal (1 GPa ≡ 1,000,000,000 Pa).

Key features of BMP085 include I2C interface, fully calibrated, Pb-Free, halogen-free and RoHS
compliant. The operating temperature is from -400C to 800C. Based on piezo-resistive technology
for high accuracy, ruggedness, small size, cost effective and long term stability a suitable sensor
for this project.

The BMP085 consists of a piezo-resistive sensor, an analog to digital converter and a control unit
with E2 PROM and a serial I2C interface. The BMP085 delivers the uncompensated value of
pressure and temperature. The E2 PROM has stored 176 bit of individual calibration data. This
used to compensate offset, temperature dependence and other parameters of the sensor.

3.1.2 SHT21

SHT21 is digital humidity and temperature sensor from Sensirion. It has a 4-pin interface that
can communicate directly with the analog pins on the Arduino.

The SHT21 utilizes a capacitive sensor element to measure humidity, while the temperature is
measured by a band gap sensor. Both sensors are seamlessly coupled to a 14-bit ADC, which
then transmits digital data to the Arduino over the I2C protocol. Because of the sensor’s tiny
size, it has incredibly low power consumption, making it suited for virtually any application.

Fig.7: SHT21 Humidity Sensor [10]

11
3.1.3 ANEMOMETER

A three cup anemometer assembly is used to calculate the wind speed by calculating the rotation
per minute of the anemometer cups symmetry, with the help of a reed switch and a magnet.

Fig.8: Anemometer Reed Switch Symmetry

With each rotation the switch closes and opens for a single time. As shown in Fig.2 a magnet is
placed on the shaft of rotating cup symmetry which rotates with the rotation of cups. As the
magnet passes the reed switch while rotating, the switch toggles twice.

3.1.3.1 REED SWITCH

The reed switch is an electrical switch operated by an applied magnetic field. It was invented at
Bell Telephone Laboratories in 1936 by W. B. Ellwood. It consists of a pair of contacts on ferrous
metal reeds in a hermetically sealed glass envelope. The contacts are normally open, closing
when a magnetic field is present. The switch may be actuated by a coil, making a reed relay. Or

12
by bringing a magnet near to the switch. Once the magnet is pulled away from the switch, the
reed switch will go back to its original position.

Fig.9: Reed Switch [11]

The reed switch contains a pair (or more) of magnetisable, flexible, metal reeds whose end
portions are separated by a small gap when the switch is open. The reeds are hermetically sealed
in opposite ends of a tubular glass envelope. A magnetic field (from an electromagnet or a
permanent magnet) will cause the reeds to come together, thus completing an electrical circuit.
The stiffness of the reeds causes them to separate, and open the circuit, when the magnetic field
ceases. Since the contacts of the reed switch are sealed away from the atmosphere, they are
protected against atmospheric corrosion. The hermetic sealing of a reed switch make them
suitable for use in explosive atmospheres where tiny sparks from conventional switches would
constitute a hazard.

3.1.4 POTENTIOMETER BASED WIND VANE SENSOR

Wind vane sensor is used to detect the wind direction, i.e. from which direction the wind is
flowing. The wind vane sensor consists of wind vane mechanism and a potentiometer. The wind
vane changes its direction according to the direction from which the wind is flowing. To detect
the position of the wind vane, the potentiometer is connected with the wind vane mechanism. It
rotates with the rotation of the wind vane mechanism. A 10 kilo ohm 10 turns potentiometer is
used in this project. Every position has its unique resistance value through which we can find the
exact position of wind vane mechanism.

Potentiometer has 3 pins. Pin 1 and Pin 3 are the ends of 10k resistance. Pin 2 changes its
resistance with respect to Pin 1 and 3 according to the rotation of the shaft of potentiometer. In
this project we will measure the wind direction with a resolution of 220-230 angle change. In this
way we will get 16 directions through this wind vane sensor.

13
Fig.10: Wind Vane Sensor

3.1.5 ARDUINO UNO

Arduino Uno is an open-source electronics prototyping platform based flexible hardware and
software. Arduino can sense the environment by receiving input from a variety of sensors and
can affect its surroundings by controlling lights, motors, and other actuators. The microcontroller
on the board is programmed using the Arduino programming language (based on Wiring) and
the Arduino development environment (based on Processing). Arduino projects can be stand-
alone or they can communicate with software running on a computer. Here in this project we are
getting the real time data from these meteorological sensors as discussed above, by connecting
through this microcontroller (ATMega 328) and displaying the real time results of measurement
on the serial monitor screen of arduino software running on a notebook personal computer. In
this project we are connecting this Arduino UNO to a PC through a USB cable. The USB
connection itself is providing the supply voltage and connection to the controller, hence we need
no separate power supply at this moment to run the controller.
14
Fig.11: Arduino UNO based on ATMega-328 Microcontroller [12]

An Arduino board consists of an Atmel 8-bit AVR microcontroller with complementary


components to facilitate programming and incorporation into other circuits. An important aspect
of the Arduino is the standard way that connectors are exposed, allowing the CPU board to be
connected to a variety of interchangeable add-on modules known as shields. Some shields
communicate with the Arduino board directly over various pins, but many shields are
individually addressable via an I²C serial bus, allowing many shields to be stacked and used in
parallel. This hardware can also be operated using a Computer System with “LabVIEW 2012”
or latest along with “LabVIEW Interface for Arduino” application extension installed on the
system.

3.1.6 XBEE / ZIGBEE

XBee or ZigBee is the brand name from Digi International for a family of form factor compatible
radio modules. Digi XBee 802.15.4 modules are the easiest-to-use, most reliable and cost-
effective RF devices. The 802.15.4 XBee modules provide two friendly modes of communication

15
– a simple serial method of transmit/receive or a framed mode providing advanced features.
XBees are ready to use out of the package, or they can be configured through the X-CTU utility
or from your microcontroller. These modules can communicate point to point, from one point to
a PC, or in a mesh network.

Fig.12: XBee Module [13]

3.1.7 JHD204A LCD MODULE

This is a 20x4 LCD display, meaning that it has four rows having twenty characters in each row.
It has 16 pins which can be interfaced to any microcontroller in two modes, i.e. either 4 pin mode
or in 8 pin mode. In 4 pin mode it can be operated by four data pins and in 8 pin mode 8 data
lines are needed. Here we will use 4 pin mode. It also has backlit of yellow colour. Here is shown
in the figure below the JHD204A LCD.

Fig.13: JDH 204A LCD Display


16
3.2 SOFTWARE SPECIFICATIONS

We have used two software platforms i.e. Arduino IDE for programming the microcontroller of
the hardware, and second LabVIEW for making a Graphical Application which can run on any
windows PC.

3.2.1 ARDUINO DEVELOPMENT ENVIRONMENT

The Arduino Integrated Development Environment (IDE) is a cross-platform application written


in Java, and is derived from the IDE for the Processing programming language and the Wiring
projects. It is designed to introduce programming to artists and other newcomers unfamiliar with
software development. It includes a code editor with features such as syntax highlighting, brace
matching, and automatic indentation, and is also capable of compiling and uploading programs
to the board with a single click.

Arduino programs are written in C or C++. The Arduino IDE comes with a software library
called "Wiring" from the original Wiring project, which makes many common input/output
operations much easier. Users only need define two functions to make a runnable cyclic executive
program:

setup(): a function run once at the start of a program that can initialize settings

loop(): a function called repeatedly until the board powers off

The Arduino development environment 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 hardware to upload programs and communicate with them. In this project we are
using the latest version of Arduino IDE that is “Arduino 1.0.5”.

3.2.1.1 WRITING SKETCHES

Software written using Arduino are called sketches. These sketches are written in the text editor.
Sketches are saved with the file extension .ino. It 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 environment including complete
error messages and other information. The bottom right-hand corner of the window displays the

17
current board and serial port. The toolbar buttons allow you to verify and upload programs,
create, open, and save sketches, and open the serial monitor.

3.2.1.2 UPLOADING

Before uploading our sketch, we need to select the correct items from the Tools > Board and
Tools > Serial Port menus. The boards are described below. On the Mac, the serial port is
probably something like /dev/tty.usbmodem241 (for an Uno or Mega2560 or Leonardo) or
/dev/tty.usbserial-1B1 (for a Duemilanove or earlier USB board), or /dev/tty.USA19QW1b1P1.1
(for a serial board connected with a Keyspan USB-to-Serial adapter). On Windows, it's probably
COM1 or COM2 (for a serial board) or COM4, COM5, COM7, or higher (for a USB board) - to
find out, you look for USB serial device in the ports section of the Windows Device Manager.
On Linux, it should be /dev/ttyUSB0, /dev/ttyUSB1 or similar.

Once we've selected the correct serial port and board, press the upload button in the toolbar or
select the Upload item from the File menu. Current Arduino boards will reset automatically and
begin the upload. With older boards (pre-Diecimila) that lack auto-reset, we'll need to press the
reset button on the board just before starting the upload. On most boards, we'll see the RX and
TX LEDs blink as the sketch is uploaded. The Arduino environment will display a message when
the upload is complete, or show an error.

When we upload a sketch, we're using the Arduino bootloader, a small program that has been
loaded on to the microcontroller on our board. It allows us to upload code without using any
additional hardware. The bootloader is active for a few seconds when the board resets; then it
starts whichever sketch was most recently uploaded to the microcontroller. The bootloader will
blink the on-board (pin 13) LED when it starts (i.e. when the board resets).

3.2.1.3 LIBRARIES

Libraries provide extra functionality for use in sketches, e.g. working with hardware or
manipulating data. To use a library in a sketch, select it from the Sketch > Import Library menu.
This will insert one or more #include statements at the top of the sketch and compile the library
with our sketch. Because libraries are uploaded to the board with your sketch, they increase the
amount of space it takes up. If a sketch no longer needs a library, simply we can delete its #include
statements from the top of our code.
18
3.2.1.4 SERIAL MONITOR

Displays serial data being sent from the Arduino board (USB or serial board). To send data to
the board, we can enter text and click on the "send" button or press enter. We can choose the
baud rate from the drop-down that matches the rate passed to Serial.begin in our sketch. Here in
this project we are using baud rate of 9600 bits per second (bps).

3.2.2 LabVIEW 2012

LabVIEW (short for Laboratory Virtual Instrument Engineering Workbench) is a system-design


platform and development environment for a visual programming language from National
Instruments.

The graphical language is named "G". Originally released for the Apple Macintosh in 1986,
LabVIEW is commonly used for data acquisition, instrument control, and industrial automation
on a variety of platforms including Microsoft Windows, various versions of UNIX, Linux, and
Mac OS X. The latest version of LabVIEW is LabVIEW 2013, released in August 2013.

3.2.2.1 LabVIEW VI

LabVIEW programs are called virtual instruments, or VIs, because their appearance and
operation imitate physical instruments, such as oscilloscopes and multimeters. LabVIEW
contains a comprehensive set of tools for acquiring, analysing, displaying, and storing data, as
well as tools to help you troubleshoot code you write.

In LabVIEW, we build a user interface, or front panel, with controls and indicators. Controls are
knobs, push buttons, dials, and other input mechanisms. Indicators are graphs, LEDs, and other
output displays. After you build the front panel, we add code using VIs and structures to control
the front panel objects. The block diagram contains this code.

We can use LabVIEW to communicate with hardware such as data acquisition, vision, and
motion control devices, as well as GPIB, PXI, VXI, RS232, and RS485 instruments. Here in the
proposed program we will monitor the weather parameters by using LabVIEW 2012. We will
log the real time weather parameters to a TDMS file, which is accessible by MS Excel and a web
facility for remote viewing will be available.

19
3.2.2.1 APPLICATION BUILDER

Application Builder is used to create a build specification for and build a stand-alone application.
We can configure settings for specified VIs to add passwords, remove block diagrams, or apply
other settings. We also can select different destination directories for VIs without breaking the
links between VIs and subVIs.

It is a great tool for creating our own applications. In my proposed work, I have created a
standalone application which is a .exe file for windows. Hence our weather monitoring
equipment can be installed in any PC.

3.3 SYSTEM DESIGN

Internet Cloud
PC with
GUI
Applicatio
n ZigBee with
USB
Connection

ZigBee
Wireless
Link
LCD
ZigBee Module
Wireless
Module

SHT21 Wind
Humidity Vane
Sensor Sensor

BMP085 Wind
Pressure Speed
Sensor Sensor
ArduinoUno
ATMega328 u-Controller

Fig.14: Schematic Block Diagram


20
We are interfacing the sensors with the microcontroller ATMEGA-328 within the arduino uno
board. The Arduino Uno is first programmed through the usb cable and Arduino IDE on a
computer system. The software programming of the microcontroller is done in C or C++ in
Arduino IDE. After uploading the sketch (arduino program) to the microcontroller the device
starts collecting the data from the sensors connected to it. It sends the data serially to its Tx
terminal. We can collect the data through USB cable but in our proposed system we are using
Zigbee wireless link to receive the data. And by using Zigbee xplorer, usb cable and XCTU
software we can configure the Zigbee module with a PC. Once it is configured, it can receive the
data from another Zigbee module connected to the hardware. The GUI application built using
LabVIEW processes the data retrieved from the hardware through Zibgee link and further
displays it, saves it and hosts the data in graphical form to the internet. The schematic diagram is
shown in Fig.14 above.

The pin connections, keeping unmentioned pins open, are given below. For detailed circuit
diagram refer Appendix 1.

Sensor Name Sensor Pin Arduino Pin


VCC 3.3V
GND GND
BMP085 SCL A5
SDA A4
PIN 1 5V
ANEMOMETER PIN 2 A1
PIN 1 5V
WIND DIRECTION SENSOR PIN 2 A0
PIN 3 GND
VCC 3.3V
GND GND
SHT21 SCL A5
SDA A4
VCC 3.3V
GND GND
ZigBee RX TX
TX RX

21
GND GND
VCC 5V
V0 3.3V
RS 12
R/W GND
JHD 204A E 11
D4 5
D5 4
D6 3
D7 2
Table 1: Pin Connections

22
CHAPTER 4
METHODOLOGY

4.1 DATA AQUISITION


Data acquisition is the most complicated and important phase of a real time instrument. We are
reading the sensor values which are in raw format. And then they are converted to human
understandable forms. To maintain the accuracy calibration is performed. In digital sensors the
calibration coefficients are there to measure the accurate value. And in analog sensors calibration
is manually performed. To read all the values from the sensors and to calculate the actual values,
we need full understanding of the sensors, how they interpret the data and how we can extract
the data. For this purpose the details and schemes are as follows:

4.1.1 BMP085

The BMP085 is designed to connect directly to a microcontroller via the I2C bus. The pressure
and temperature data has to be compensated by calibration data of the E2PROM of the BMP085.
The BMP085 delivers the uncompensated value of pressure and temperature. The 176 bit of
individual calibration data stored in E2PROM is used to compensate offset, temperature
dependence and other parameters of the sensor.

 UP = pressure data (16 to 19 bit)


 UT = temperature data (16 bit)

Here in the diagram below the connections to the microcontroller are shown. The BMP085 is
given a supply of 3.3V with a 100nF capacitor. The pull-up registers of 4.7k are connected to the
SCL and SDA. This is because the microcontroller has a high value at 5V and low value at 0V.
And the BMP085 can only work on 3.3V and OV as high and low. That’s why pull up registers
are used at SDA and SCL lines.

The XCLR is used to clear the BMP085 buffer. The BMP085 can operate without any connection
to the XCLR and EOC. We have used only 2 pin interface with the controller i.e. SDA and SCL.
And the BMP085 is being powered by 3.3V and GND to perform the calculations. The diagram
below shows the application circuit containing the mechanism of connections to the
microcontroller.

23
Fig.15: BMP085 Application Circuit [9]

4.1.1.1 Measurement of Pressure and Temperature

The microcontroller sends a start sequence to start a pressure or temperature measurement. After
converting time, the result value (UP or UT, respectively) can be read via I2C interface. For
calculating the temperature value in 0C and pressure in hPa, the calibration data has to be used.
These constants can be read out from the BMP085 E2PROM via the I2C interface at software
initialization.

24
Fig. 16: Measurement of Temperature and Pressure [9]

4.1.1.2 Calibration Coefficients

The 176 bit E2PROM is partitioned in 11 words of 16 bit each. These contain 11 calibration
coefficients. Every sensor module has individual coefficients. Before the first calculation o
temperature and pressure, the master reads out the E2PROM data.

The data communication can be checked by checking that none of the words has the value 0 or
0xFFFF.

25
BMP085 register address
Parameter MSB LSB
AC1 0xAA 0xAB
AC2 0xAC 0xAD
AC3 0xAE 0xAF
AC4 0xB0 0xB1
AC5 0xB2 0xB3
AC6 0xB4 0xB5
B1 0xB6 0xB7
B2 0xB8 0xB9
MB 0xBA 0xBB
MC 0xBC 0xBD
MD 0xBE 0xBF
Table 2: Calibration Coefficients [9]

4.1.1.3 Calculation of Pressure and Temperature

Here we will discuss how to read from BMP085 and calculate the true temperature and pressure
in steps of 1Pa and temperature in steps of 0.10C. When the program is started for reading the
sensor, first of all E2PROM of BMP085 is read out.

The uncompensated values are read by sending or writing 0x2E into register 0xF4, then after at
least 4.5ms delay, registers 0xF6 (MSB) and 0xF7 (LSB) are read out. Then the uncompensated
temperature is calculated as shown in figure below. In the same way to read the uncompensated
pressure values the procedure is shown in the figure below.

Then the true temperature and true pressure are calculated by the procedure shown in flow
diagram below. After calculating the true values of temperature and pressure we can use it in our
program to display it on LCD or to send to the GUI or to use it in calculating the weather
conditions etc.

The following figure shows the detailed algorithm for pressure and temperature measurement:

26
Fig. 17: Calculating Pressure and Temperature [9]

27
4.1.1.4 CALCULATION OF APPROXIMATE CURRENT WEATHER CONDITION

To calculate the current weather condition based on pressure value at current altitude (321m,
Chandigarh), we need to calculate the expected pressure at current altitude. Let ePressure is the
expected pressure at current altitude (in meters). And p0 be the pressure at sea level (101325Pa).

Then according to the datasheet of the BMP085:

ePressure = p0 * ((1- currentAltitude)/44330)5.255

By using this ePressure we can calculate the weather difference.

weatherDifference= currentPressure – ePressure

If the weatherDifference > 250, that means probably the weather is Sunny.

If the weatherDifference <= 250 and > -250, that means probably the weather is Partly Cloudy.

If the weatherDifference <= -250, that means probably the weather is Rainy.

This is how we can find the estimate weather conditions based on current pressure reading at
current known altitude.

4.1.2 ANEMOMETER

As we are using a simple reed switch with cup symmetry. At every single rotation of cups, the
reed switch closes and opens once. We need to calculate the time interval between the two
successive close open cycles. By this we can calculate the speed of rotation of cups.

The radius of our 3 cup anemometer is 10cm.

Hence the circumference comes out to be,

C= (2*(3.14)*10 ) cm

Let “t” be the time (ms) for one rotation of the anemometer.

Then the speed at which the cup anemometer is rotating comes out to be,

Speed = C / t (cm/ms)

&

Speed = (c / t) * 36 km/h

28
This is the speed of the anemometer cups.

To find the speed of the wind we need to calibrate it. For calibration we need to find out the
minimum wind required to start the anemometer rotation.

While practically observed, the wind at a speed of 1.65km/h starts the rotation of the cups. Hence
to calibrate we will add this value with the calculated speed. i.e.

WindSpeed = (Speed + 1.65) km/h)

4.1.3 WIND VANE SENSOR

This is just made up of wind vane symmetry and potentiometer. Potentiometer rotates with the
rotation of wind vane, hence we get unique value of resistance at every point. We can assign a
particular direction to specific resistance values. In this way this symmetry can be used to find
out the direction on the serial monitor. To accomplish the actual direction we need to set a
reference direction mark, on which the device should be mounted or installed, so that it may tell
the accurate direction of wind.

In arduino we can use any analog pin to read the potentiometers value by analogRead(). This
function returns the value in between 0 to 1024. Means, while rotating the shaft of potentiometer,
in 10 turns the value will go from 0 to 1024. And we can assign each direction a particular range
of values in our sketch. This will give a precise value of direction.

The wind vane sensor can detect the direction of wind with a resolution of 16 different directions
as shown in the figure below. In this figure N ~ North, S ~ South, E ~ East and W ~ West.

The wind vane sensor is very useful and significant meteorological instrument as it is not only
useful in predicting weather conditions but also predicting the moisture level increase or pollution
level change in case we have sea or some industry nearby. If the air is coming from sea, the
moisture level is surely to be increased. And if the wind is coming from the industry it will surely
going to increase the pollution level.

The direction of wind is also very significant in weather change. If we are having different
stations along a large area, the wind direction is used to predict the weather conditions and to
generate short time or long time alerts. Here is given the wind vane directions and their angle
from the north. This is the resolution our proposed system can perform.

29
Fig. 18: Wind Directions

4.1.4 SHT21 HUMIDITY SENSOR

Humidity is the amount of water vapour in the air. Water vapour is the gaseous state of water and
is invisible. Humidity indicates the likelihood of precipitation, dew, or fog. Higher humidity
reduces the effectiveness of sweating in cooling the body by reducing the rate of evaporation of
moisture from the skin. There are three main measurements of humidity: absolute, relative and
specific. We generally use Relative Humidity (RH). Relative humidity is the ratio of the partial
pressure of water vapour in the air–water mixture to the saturated vapour pressure of water at
those conditions. The relative humidity of air is a function of both its water content and
temperature. Relative humidity is normally expressed as a percentage (%).

SHT21’s power supply is 3.3V DC. One capacitor valued 100nF is added between VDD and
GND for power filtering.

30
4.1.4.1 START UP SENSOR

As a first step, the sensor is powered up to the chosen supply voltage VDD (between 2.1V and
3.6V). After power-up, the sensor needs at most 15ms, while SCL is high, for reaching idle state,
i.e. to be ready accepting commands from the master (MCU). Current consumption during start
up is 350IA maximum. Whenever the sensor is powered up, but not performing a measurement
or communicating, it is automatically in idle state (sleep mode).

Each transmission sequence begins with Start condition (S) and ends with Stop condition (P). A
high to low transition on the SDA line while SCL is high is called Start Condition. The Start
condition is a unique state on the bus created by the master, indicating to the slaves the beginning
of a transmission sequence (bus is considered busy after a Start).

A low to high transition on the SDA line while SCL is high is called the Stop Condition. The
Stop condition is a unique state on the bus created by the master, indicating to the slaves the end
of a transmission sequence (bus is considered free after a Stop).

After sending the Start condition, the subsequent I2C header consists of the 7-bit I2C device
address ‘1000’000’ and an SDA direction bit (Read R: ‘1’, Write W: ‘0’). The sensor indicates
the proper reception of a byte by pulling the SDA pin low (ACK bit) after the falling edge of the
8th SCL clock. After the issue of a measurement command (‘1110’0011’ for temperature,
‘1110’0101’ for relative humidity’), the MCU must wait for the measurement to complete. The
basic commands are summarized in Table below.

Table.3: Basic Commands for SHT21 [10]

Default resolution is set to 12 bit relative humidity and 14 bit temperature reading. Measured
data are transferred in two byte packages, i.e. in frames of 8 bit length where the most significant
bit (MSB) is transferred first (left aligned). Each byte is followed by an acknowledge bit. The

31
two status bits, the last bits of LSB, must be set to ‘0’ before calculating physical values. For
example the following transferred 16 bit relative humidity data ‘0110’0011’0101’0000’ = 25424.

4.1.4.2 RELATIVE HUMIDITY CONVERSION

With the relative humidity signal output SRH the relative humidity RH is obtained by the
following formula (result in %RH), no matter which resolution is chosen:

RH = -6 + 125 (SRH / 2t6)

4.1.4.3 TEMPERATURE CONVERSION

The temperature T is calculated by inserting temperature signal output ST into the following
formula (result in °C), no matter which resolution is chosen:

T = -46.85 + 175.72 ( ST / 2t6)

4.1.4.4 CALCULATION OF DEW POINT

The dew point is the temperature below which the water vapor in air at constant barometric
pressure condenses into liquid water at the same rate at which it evaporates. The condensed water
is called dew when it forms on a solid surface.

The dew point is a water-to-air saturation temperature. The dew point is associated with relative
humidity. A high relative humidity indicates that the dew point is closer to the current air
temperature. Relative humidity of 100% indicates the dew point is equal to the current
temperature and that the air is maximally saturated with water. When the moisture content
remains constant and temperature increases, relative humidity decreases.

There is a very simple approximation that allows conversion between the dew point, temperature
and relative humidity. This approach is accurate to within about ±1°C as long as the relative
humidity is above 50%:

Tdp = T – [ (100 – RH) / 5 ];

And

RH = 100 – ( T – Tdp ) ;

32
Dew point is very important in weather forecasts as well as in various applications in medical
field as it is closely related to the human health and comfort.

Here, in the following table, we will analyse the relationship between the human perception and
dew point under specific temperature and RH.

Relative humidity at
Dew point Human perception
32 °C

Severely high. Even deadly


Over 26 °C 65% and higher
for asthma related illnesses

Extremely uncomfortable, fairly


24–26 °C 62%
oppressive

21–24 °C Very humid, quite uncomfortable 52–60%

Somewhat uncomfortable for most


18–21 °C 44–52%
people at upper age

OK for most, but all perceive the


16–18 °C 37–46%
humidity at upper age

13–16 °C Comfortable 38–41%

10–12 °C Very comfortable 31–37%

Under 10 °C A bit dry for some 30%

Table 4: Dew Point and Human Comfort [Source: Wikipedia 2014]

33
4.2 LabVIEW PROGRAMMING
4.2.1 FRONT PANEL

Fig.19: Front Panel


34
4.2.2 BLOCK DIAGRAM
The complete block diagram screen is shown in figure below.

Fig.20 Block Diagram

35
4.2.3 Making a Web Server Snapshots
Port forwarding should be turned on from the router and service provider. The steps for making
this application web server are shown below.

Fig.21 Step- 1 (Web Server)

Fig.22 Step- 2 (Web Server)

36
Fig.23 Step- 3 (Web Server)

Fig.24 Step- 4 (Web Server)

37
Fig.25 Step- 5 (Web Server)

Fig.26 Step- 6 (Web Server)


38
Fig.27 Step- 7 (Web Server)

Fig.28 Step- 8 (Web Server)


39
Fig.29 Step- 9 (Web Server)

Fig.30 Step- 10 (Web Server)

40
CHAPTER 5
RESULTS

5.1 Developed Hardware

All the pin connections are done in a manner as shown in Pin Connections Table 1 and in
APPENDIX 1. The practical hardware developed is shown in the figure below. The proposed
hardware board can take power directly from USB. Second way is to connect the 9-12V dc supply
on the Power Pin of Arduino. When the instrument is on, it will display the readings of all the
variables along-with current weather alert on the LCD display. And it will send the same data to
the computer GUI application through Zigbee link.

Fig31: Weather Monitoring Station

41
After setting up the hardware and all connections, we first turn on the device by connecting it to
a battery or to some other source of power.

On start-up the LCD module displays a welcome message. And then it shows the readings as
shown in Figure below, where T stands for Temperature, P for Pressure, H for Relative Humidity,
DP for Dew Point Temperature, W for Wind Speed, Direction from where it is coming and its
angle from North. Last Row shows the current weather alert, which is a short time alert.

Fig. 32: JHD 204A Display- Running Hardware

5.2 GUI and Web Hosting Snapshots

The graphical application made in LabVIEW running in real-time and hosting the same screen
on a webpage is shown below. When hosting the GUI the port forwarding from the router should
be turned on and a good internet connection should be available through the router, then only it
will be hosted to internet. To view it remotely we need to type on URL bar: [IP address]:[Port
Adress] and then enter. E.g.: 155.252.47.251:12000, where 155.252.47.251 is our IP address of
the hosting computer and 12000 is the port no which is forwarded to the internet.

42
Fig.33 Snapshot 11- Running GUI

43
Fig.34 Snapshot 12- Runinng GUI on Live Webpage

44
5.3 Data Logging Facility

There is a button in green, on the top middle of the GUI named as Start Data Logging. As we
press this button the system starts logging the real-time weather data on TDMS files which are
accessible in MS Excel. The button turns red and caption changes to Stop Data Logging as we
press it for the first time. If we again press it, it stops the data logging and turns green with initial
caption. Here we have shown the a few screenshots of this process.

Fig.35 Data Logging Stopped

Fig.36 Data Logging in Progress

The data logging files are saved in a directory C:\WeatherData. The TDMS files with names of
different parameters are shown in the figure below.

45
Fig.37 Data Files

Fig.38 Data File in Excel

46
5.4 Results and Comparison

After developing and calibrating the proposed system, the output data (April, 2014) is being
compared with the data of “Meteorological Centre Chandigarh (MCC), Sector-39 Chandigarh”
and “Snow and Avalanche Study Establishment (SASE), Sector-37, Chandigarh, Laboratory by
DRDO”. The results, comparisons and correlation factor are discussed below.

5.4.1 Temperature

When compared the temperature values calculated by the proposed system in April, 2014 and
the temperature data of the MCC Chandigarh, the correlation factor of 0.92 has been calculated.
Fig.10 shows the comparison graph of the readings of temperature.

Temperature Data
40

35

30

25

20

15

10

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

MCC Data Instrument Data

X Axis: Data Points, Y Axis: Temperature (0C)

Fig.39: Temperature Plots

5.4.2 Pressure

The pressure readings correlation factor comes out to be 0.86. These readings are being compared
with the data of SASE. And the comparison is shown in Fig.11.

47
Pressure Data
976

974

972

970

968

966

964
1 2 3 4 5 6 7 8 9 10 11 12

SASE data Instrument Data

X Axis: Data Points, Y Axis: Pressure (hPa)

Fig.40: Pressure Plots

5.4.3 Relative Humidity

The relative humidity (%RH) results when compared with the MCC data, are very good with a
correlation factor of 0.98. The comparison of both the data values is shown in Fig.12 below.

Humidity Data
90

80

70

60

50

40

30

20

10

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

MCC Data Instrument Data

X Axis: Data Points, Y Axis: Humidity (%RH)

Fig.41 Humidity Plots


48
5.4.4 Wind Rose

Wind Rose has been plot with a good correlation factor of 0.98. The wind rose plot of the values
is shown in Fig.13 below.

Wind Rose
N
45.00%
NNW NNE
40.00%
35.00%
NW NE
30.00%
25.00%
20.00%
WNW ENE
15.00%
10.00%
5.00%
W 0.00% E

WSW ESE

SW SE

(0-4>
SSW SSE (4-8>
S (8-12>

(12-16>

Wind Speed is in km/h

Fig.42: Wind Rose

49
5.5 Comparison from Previous Work

5.5.1 DIFFERENCE BETWEEN BASE PAPER AND PROPOSED WORK

Comparison with Base Paper (M. Haefke, S. C. Mukhopadhyay and H. Ewald [IEEE, 2011])

Sr. No. Existing Proposed

1 A weather station made of the A weather station made of temperature,


temperature, relative humidity, humidity, pressure and wind speed &
pressure and sunlight. It sends the data wind direction sensors embedded in a
to a central station using Zigbee which microcontroller based board. It sends
stores, and displays the data. the data to a central station using Zigbee
which stores, displays and hosts the data
through internet and webpage.

2 GUI is graph and text based. GUI is very attractive and user friendly
consisting of analog meters, digital
meters as well as graphs of the
parameters.

3 GUI is developed using C# and GUI is developed using LabVIEW2012,


captures the serial communication. which is latest and easy technology and
captures serial communication.

4 No facility of short time alerts is given. It calculates the real time weather
parameters to generate the short time
local alerts.

Table 5: Comparison with Base Paper [1]

50
CHAPTER 6
CONCLUSION AND FUTURE SCOPE

6.1 Conclusion

In this thesis work, we have proposed a low cost automatic wireless weather monitoring station
equipment with software application for monitoring, logging and web hosting facilities. It is
capable of calculating temperature, pressure, humidity, wind speed, wind direction and a
mathematical model for calculating dew point temperature and short time local alerts. The results
are very good with a correlation factor greater than 0.85, while compared with the readings of
Meteorological Centre Chandigarh and Snow and Avalanche Study Establishment (SASE)
Chandigarh Laboratory. The proposed system is very useful in Indian market due to its low
budget, high accuracy, and user friendly interface along-with low maintenance charges. The total
cost to setup this equipment has come out to be approximately Rs.10,000. The readings are very
clear and update at a rate of 1Hz. These readings are stored in a database using proposed GUI
application. By its low cost, many Automatic Weather Monitoring Equipment can be installed at
various places. A very good sensor results have made this project a very valuable one.

6.2 Future Scope

In future one can add a few more sensors like rain gauge, light sensors etc. Using Zigbee mesh
networks and satellite communication, this type of low cost systems can give a good resolution
and accuracy of environmental parameters over a wide area, for making more accurate
forecasting and study of weather patterns more accurate and easy.

The tasks which can be done in the future are:

1. One can implement a few more sensors and connect it to the satellite as a global feature
of this system. And long-time (> 7days) weather forecasting can be done, by using Zigbee
Mesh Technology and covering larger area.

2. In aircraft, navigation, and military there is a great scope of this real-time system.

3. It can also be implemented in hospitals or medical institutes for the research & study in
“Effect of Weather on Health and Diseases”, hence to provide better precaution alerts.

51
REFERENCES

1. M. Haefke, S. C. Mukhopadhyay! and H. Ewald, “A Zigbee Based Smart Sensing

Platform for Monitoring Environmental Parameters”, 2011 IEEE

2. Mircea Popa, Member IEEE, and Catalin Iapa, “Embedded Weather Station with Remote

Wireless Control”, 19th Telecommunications forum TELFOR 2011, IEEE

3. Babar Khan, “Wireless sensor networking using AADI Sensors with WSN Coverage”,

Mater Thesis Telemark University College, 2012

4. Zhen Fang, Zhan Zhao, Xunxue Cui, LiDong Du, Daoqu Geng, Yundong Xuan, Jing Xu,

ShaoHua Wu, “Micro Sensor Network Node Design for Meteorological Parameter

Monitoring”, IEEExplore

5. W. CHEBBI, M. BENJEMAA, A. KAMOUN, M. JABLOUN, A. SAHLI, “Development

of a WSN Integrated Weather Station node for an Irrigation Alert Program under Tunisian

Conditions”, 2011 IEEE 8th International Multi-Conference on Systems, Signals &

Devices

6. G.Hoogenboom � D.D Gresham, “Auto weather station network “, Proceeding of the

1997 Georgia water resource Conference. Athens, vol.1,pp :483-486, April,1997

7. Perrin, D. McMahon, N. Crane, M. Ruskin, H.J. Crane, L. Hurley, B.: The effect of a

meteorological tower on its top-mounted anemometer in APPLIED ENERGY journal,

Volume 84, Issue 4, pp. 413-424, 2007, DOI: doi:10.1016/j.apenergy.2006.09.002

8. Machacek, Z, Srovnal, V., “Automated system for data measuring and analyses from

embedded systems”, In 7th WSEAS International Conference on Automatic Control,

Modeling and Simulation, Mar 13- 15, pp. 43-48, Prague, Czech Republic (2005)

9. BMP085 DATASHEET, BST-BMP085-DS000-06/Revision 1.3/ Aug 2011

10. SHT21 DATASHEET, www.sensirion.com, Version 3 – December 2011

52
11. Reed Switch, ORD213 Super Ultraminiature, Datasheet, J2R0012-38-22

12. http://www.arduino.cc/

13. Zigbee Alliance, Zigbee Specification. Version 1.0 Zigbee Document 053474r06,

December 14th, 2004

14. Gupta, Sen Gourab, and Tin Chew Moi, “Embedded Programming with Field-

Programmable Mixed-Signal μControllers”, 2005

15. Columbia-Weather. “Pegasus EX PortableWeather Station - Columbia WeatherSystems,

Inc.” http://www.columbiaweather.com/Pegasus EX-Brochure.pdf (June 3, 2010)

16. Muthoni MASINDE, Antoine BAGULA, Muthama NZIOKA, “SenseWeather: Sensor-

Based Weather Monitoring System for Kenya”, www.IST-Africa.org/Conference2013

17. Beniston, Martin. From Turbulence to Climate: Numerical Investigations of the

Atmosphere with a Hierarchy of Models. Berlin: Springer, 1998

18. Pielke, Roger A. Mesoscale meteorological modeling. San Diego: Academic Press, 2002

19. Blair, Thomas A., and Robert C. Fite. Weather Elements. Englewood Cliffs, N.J.:

Prentice-Hall, 1965

20. P. Kinney, “Zigbee Technology: Wireless Control that Simply Works”, White Paper

dated 2 October 2003

21. Behrouz A. Frouzan, “Data Communication”, Third Edition, Tata McGraw-Hill

Publishing company Limited, 2004, Pp 19-110

22. Andrew S. Tenenbaum, “Computer Networks”, Fourth Edition Pearson Publication

Limited, 2003, Pp 21-89

23. William Stalling, “Wireless Communication and Networks”, Fourth Edition, Pearson

Publication Limited, 2004, Pp 39-118

24. 802.15.4, Part 15.4: Wireless Medium Access (MAC) and Physical Layer (PHY)

Specifications for Low-Rate Wireless Personal Control Area Networks (LRWPANs)

53
25. Free scale Semiconductor, Zigbee Implementer’s Guide; Document Number: F8W-2004-

0007, May 23, 2005

26. Weiser, M., “The Computer for the 21st Century”, Scientific America, September 1991

27. DK Boman, “International survey: virtual-environment research,” Computer, Volume

28,Issue 6 (June 1995) pages:57-65,Year of Publication :1995.ISSN :0018-9162

28. N. Kotamäki, S. Thessler, J. Koskiaho, A.O. Hannukkala, H. Huitu, T. Huttula, J.

Havento, M. Järvenpää, “Wireless in-situ Sensor Network for Agriculture and Water

Monitoring on a River Basin Scale in Southern Finland: Evaluation from a Data User’s

Perspective”, Sensors, 9, pp.2862-2883, (2009)

29. K. Martinez, J. K. Hart, and R. Ong, “Environmental Sensor Networks”, IEEE Computer,

38(8), pp.50–56, (2004)

30. C. Hartung, R. Han, “FireWxNet: A Multi-tiered Portable Wireless System for

Monitoring Weather Conditions in Wildland Fire Environments”, In Proc. of 4th

International Conference on Mobile Systems, Applications and Services, pp. 28-41, 2006

54
APPENDIX 1
Detailed Circuit Diagram

Fig 43: Detailed Circuit Diagram


55
APPENDIX 2
I2C Interface

I²C (Inter-Integrated Circuit, referred to as I-squared-C, I-two-C, or IIC) is a multimaster serial


single-ended computer bus invented by Philips used for attaching low-speed peripherals to a
motherboard, embedded system, cell phone, or other electronic device. Not to be confused with
the term Two Wire Interface which only describes a compatible hardware interface.

I²C uses only two bidirectional open-drain lines, Serial Data Line (SDA) and Serial Clock (SCL),
pulled up with resistors. Typical voltages used are +5 V or +3.3 V although systems with other
voltages are permitted.

The I²C reference design has a 7-bit or a 10-bit (depending on the device used) address space.
Common I²C bus speeds are the 100 kbit/s standard mode and the 10 kbit/s low-speed mode, but
arbitrarily low clock frequencies are also allowed. Recent revisions of I²C can host more nodes
and run at faster speeds (400 kbit/s Fast mode, 1 Mbit/s Fast mode plus or Fm+, and 3.4 Mbit/s
High Speed mode). These speeds are more widely used on embedded systems than on PCs. There
are also other features, such as 16-bit addressing.

Fig. 44: A sample schematic I2C

The above mentioned reference design is a bus with a clock (SCL) and data (SDA) lines with 7-
bit addressing. The bus has two roles for nodes: master and slave:

Master node — node that generates the clock and initiates communication with slaves

Slave node — node that receives the clock and responds when addressed by the master

56
The bus is a multi-master bus which means any number of master nodes can be present.
Additionally, master and slave roles may be changed between messages (after a STOP is sent).

There are four potential modes of operation for a given bus device, although most devices only
use a single role and its two modes:

master transmit — master node is sending data to a slave

master receive — master node is receiving data from a slave

slave transmit — slave node is sending data to the master

slave receive — slave node is receiving data from the master

The master is initially in master transmit mode by sending a start bit followed by the 7-bit address
of the slave it wishes to communicate with, which is finally followed by a single bit representing
whether it wishes to write(0) to or read(1) from the slave.

If the slave exists on the bus then it will respond with an ACK bit (active low for acknowledged)
for that address. The master then continues in either transmit or receive mode (according to the
read/write bit it sent), and the slave continues in its complementary mode (receive or transmit,
respectively).

The address and the data bytes are sent most significant bit first. The start bit is indicated by a
high-to-low transition of SDA with SCL high; the stop bit is indicated by a low-to-high transition
of SDA with SCL high. All other transitions of SDA take place with SCL low.

If the master wishes to write to the slave then it repeatedly sends a byte with the slave sending
an ACK bit. (In this situation, the master is in master transmit mode and the slave is in slave
receive mode.)

If the master wishes to read from the slave then it repeatedly receives a byte from the slave, the
master sending an ACK bit after every byte but the last one. (In this situation, the master is in
master receive mode and the slave is in slave transmit mode.)

The master then either ends transmission with a stop bit, or it may send another START bit if it
wishes to retain control of the bus for another transfer (a "combined message").

57

View publication stats

You might also like