0% found this document useful (0 votes)
32 views

weather monitoring

The document presents a project report on an Arduino-based weather station developed by students at the Govt. Graduate College Kotsultan, aimed at monitoring weather conditions using IoT technology. It details the system's components, including sensors for temperature, humidity, and rain, and discusses the implementation and functionality of the system for real-time weather reporting. The report includes acknowledgments, a literature review, and a theoretical framework for understanding IoT applications in weather monitoring.

Uploaded by

M Salman
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)
32 views

weather monitoring

The document presents a project report on an Arduino-based weather station developed by students at the Govt. Graduate College Kotsultan, aimed at monitoring weather conditions using IoT technology. It details the system's components, including sensors for temperature, humidity, and rain, and discusses the implementation and functionality of the system for real-time weather reporting. The report includes acknowledgments, a literature review, and a theoretical framework for understanding IoT applications in weather monitoring.

Uploaded by

M Salman
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/ 48

Arduino Based Weather Station

A Project report submitted in partial fulfilment


of the requirements for the degree of BS Physics at Department of

Physics, Govt. Graduate College Kotsultan (Layyah)

By

Aqsa Zubaira BSKTP-20-01


Fouzia Imran BSKTP-20-15
Taiba Talha BSKTP-20-20
Zainab Liaqat BSKTP-20-21
Saba Bibi BSKTP-20-32

Under the supervision of

Ishfaq Hussain Shah

Department of Physics
Govt. Graduate College Kotsultan (Layyah)
DECLARATION

“We Do hereby declare that this submission is our own work conformed to the norms and
guidelines given in the Ethical Code of Conduct of the Institute and that, to the best of our
knowledge and belief, it contains no material previously written by neither another person
nor material (data, theoretical analysis, figures, and text) which has been accepted for the
award of any other degree or diploma of the university or other institute of higher learning,
except where due acknowledgment has been made in the text.”

Aqsa Zubaira BSKTP-20-01


Fouzia Imran BSKTP-20-15
Taiba Talha BSKTP-20-20
Zainab Liaqat BSKTP-20-21
Saba Bibi BSKTP-20-32
Department of Physics
Govt. Graduate College Kotsultan (Layyah)

CERTIFICATE
To whom it may concern

This is to certify that the project work entitled Arduino Based Weather Station is
the bona fide work carried out by
Aqsa Zubaira BSKTP-20-01
Fouzia Imran BSKTP-20-15
Taiba Talha BSKTP-20-20
Zainab Liaqat BSKTP-20-21
Saba Bibi BSKTP-20-32,
are students of BS Physics in the Department of physics, Govt. Graduate College
Kotsultan (Layyah), in partial fulfillment of the requirements for the degree of
Bachelor of Physics.
ACKNOWLEDGEMENT

It is my great fortune that we have got opportunity to carry out this project work under the supervision
of Ishfaq Hussain Shah in the Department of Physics, Govt. Graduate College Kotsultan (Layyah),
we express my sincere thanks and deepest sense of gratitude to my guide for his constant support,
unparalleled guidance and limitless encouragement.

We wish to convey our gratitude to the Head of Department of Physics.

I would also like to convey my gratitude to all the faculty members and staff of the Department
of Physics.

Thanks to the fellow members of our group for working as a team.


: Table of Contents:

Topic Page no.

I. List of Acronyms i
II. List of Figures ii
III. Abstract iii
Chapter 1 Introduction 1
1.1. Overview 3
1.2. Literature Review 3-5
Chapter 2 Theory 6
2.1. Basic theory and operation 7 - 10
2.2. Block diagram of the system 10 - 11
2.3. Advantages of proposed system 11
Chapter 3 Proposed System and Architecture 13
3.1. Features of the proposed system 14
3.2. Proposed hardware architecture 14
3.3. Circuit Diagram 14 - 16
3.4. List of required hardware components 16
3.5. Details of hardware component 16
3.6. Arduino UNO 16 - 18
3.8. DHT11 20
3.11. LCD Display 24
Chapter 4 Algorithm 25
4.1. Flow chart of the system 26
4.2. Source code 27 - 34
Chapter 5 Implementation 35
5.1. Prototype model of the system 36
5.2. Implementation hardware 36
Chapter 6 Observation &Result 37
6.1. Details of the experimental results 38 - 39
Chapter 7 Conclusion & Future Scope 40 - 41
Chapter 8 Reference 42 - 44
• List of Acronyms

1) IoT – Internet of Things


2) DHT- Digital Humidity and Temperature
3) LCD – Liquid Crystal Display
4) BMP – Barometric Pressure
5) LED – Light Emitting Diode
6) SDA – Serial Data
7) SCL – Serial Clock
8) A.I – Analog Input
9) D.I – Digital Input
10) GND – Ground
11) TX – Transmitting Pin
12) RX – Receiving Pin
13) VCC – Common Collector Voltage

i
List of Figures

Serial No. Figure Name Figure No.


1. NodeMCU 1
3. DHT11 with Arduino 3
4. Rain sensor with Arduino 4
5. Arduino UNO 5
7. Hardware Circuit 7
8. LCD Display 8

ii
Abstract
The system proposed in this paper is an advanced solution for monitoring the weather
conditions at a particular place and making the information visible anywhere in the world. The
DHT11 sensor is used to measure the value of the Temperature and Humidity in the form that is
readable to humans. Here things might be whatever like electronic gadgets, sensors, and
automotive electronic equipment. The system deals with monitoring and controlling the
environmental conditions like temperature and relative humidity.

iii
Chapter -1

Introduction

1
Introduction
Here we introduce a smart weather reporting system over the Internet. Our introduced system allows for
weather parameter reporting over the Internet. It allows people to directly check the weather online
without the need of a weather forecasting agency. The system uses temperature, humidity as well as rain
with a humidity sensor to monitor weather and provide live reporting of the weather statistics. The
system constantly monitors temperature using temperature sensor, humidity using humidity sensor and
also for rain. Weather monitoring system deals with detecting and gathering various weather parameters
at different locations which can be analyzed or used for weather forecasting. The aim of this system is
achieved by technologies such as Internet of Things (IOT) and Cloud. The idea of internet of things is
to connect a device to the internet and to other required connected devices. Using the Internet, the
information from the IOT device can easily be transferred to the cloud and then from the cloud to the
end user. Weather Monitoring is an essential practical implementation of the concept of Internet of
Things, it involves sensing and recording various weather parameters and using them for alerts, sending
notifications, adjusting appliances accordingly and for long term analysis. Also, we will try to identify
and display trends in parameters using graphical representation. The devices used for this purpose are
used to collect, organize and display
information. It is expected that the internet of things is going to transform the world by monitoring and
controlling the phenomenon of environment by using sensors/devices which are able to capture, process
and transmit weather parameters. Cloud is the availability of computer system resources like data
storage, computing power without direct active management of user. The data captured is transmitted to
the cloud so that the data could be further displayed. Besides this, the system consists of components
such as Arduino UNO board which is a microcontroller board consisting of 14 digital pins, a USB
connection and everything used to support microcontroller; DHT11 is Temperature and humidity sensor
which is used for detecting these mentioned parameters; WIFI module is used to convert the data
collected from the sensors and then send it to the web server. So, in this way weather conditions of any
location can be monitored from any remote location in the world. The system constantly transmits this
data to the micro controller which now processes this data and keeps on transmitting it to the online web
server over a wifi connection. This data is live updated to be viewed on the online server system. Also
system allows user to set alerts for particular instances. In today’s world many pollution monitoring
systems are designed by different environmental parameters. Existing system model is presented IOT
based Weather monitoring and reporting system where you can
collect, process, analyze, and present your measured data on web server. Wireless sensor network
management model consists of end device, router, gateway node and management monitoring center.
End device is responsible for collecting wireless sensor network data, and sending them to parent

2
node, then data are sent to gateway node from parent node directly or by router. After receiving the data
from
wireless sensor network, gateway node extracts data after analyzing and packaging them into Ethernet
format data, sends them to the server. Less formally, any device that runs server software.
1.1. OVERVIEW: -
Assemble all system as per circuit diagram. Program the NodeMCU using Arduino IDE. You will get
confirmation on your screen once The NodeMCU is a programable controller which has inbuilt wi-fi
module
We connect three sensors 1) BMP180 2) DHT11 and 3) Rain Sensor to NodeMCU. By using these three
sensors, we can collect the required weather data for monitoring purpose. This pooled data is stream
over the Internet to display it or read it from anywhere. After the successfully programmed hardware,
the NodeMCU get one IP address. We can browse this IP address from any of WEB browser like
Chrome, Firefox, Internet Explorer etc.so we display the required live data which fetched by sensors in
beautiful Graphical User Interface format. The weather parameters that we monitor are Temperature,
Pressure, Humidity and Rain. Also, you can check whether data through anywhere using Internet as we
hosted this server publicly. We developed an android application for easy access to our weather
monitoring system.
1.2. Literature Review
In this paper, the author elaborates how the weather prediction system is becoming a crucial challenge
in every Weather extreme event that causes an adverse effect of the system on lives and property as well.
Hence the accuracy of weather data is being one of the critical challenges to enhance the weather
prediction skills and build up the resilience to effect of detrimental weather report condition. The author
describes that Uganda and various other developing countries have looked challenges in developing
timely & accurate weather data due to scarce weathers observation. The scarce weather monitoring is a
part of the high cost of developing automatic weather situations. The restricted funding is available to
national meteorological services of the respective countries. In this proposed system the author firstly
takes care of the problems and then applies them. The author proposed an Automatic weather monitoring
Station based on a wireless sensor network. The planning of the author is to develop three generations
of Automatic weather stations or AWS prototypes. In this research, the author evaluates the 1st-
generation AWS prototype to improve the 2nd generation depending upon the need and generation. The
author provides a suggestion to improve the nonfunctional requirement such a power consumption, data
accuracy, reliability, and data transmission in order to have an Automatic Weather Station. The non-
functional requirement collapsed with cost reduction in order to produce a robust and affordable
Automatic Weather Station (AWS) Therefore the proposed work, like developing countries like Uganda
will be able to acquire the AWS in suitable quantities. So that it can improve the weather forecasting
The author in [2], presents an IoT-based weather monitoring system.
3
In this research, the environmental parameter can be retrieved through sensors. The author uses a
different sensor to scale the various parameter like humidity, temperature, pressure, rain value & the
LDR sensor is used. The system also calculates the dew point value from the temperature prototype. The
temperature sensor can be used to measure the value of the particular area, room, or any place. With the
help of the LDR sensor, the light intensity can be used as described by the author. The author in this used
an additional functionality of the weather monitoring as SMS alert system based on the exceed the value
of the sensing parameters as temperature, humidity, pressure, light intensity, and rain value. The author
also adds an email and tweet post alerting system. The author in this system uses node MCU 8266, and
various sensors. In this paper [3], the author represents a low-cost live weather monitoring system using
OLED display, in which the author displays the various fields where the IoT has produced innovative
things in the system. The author described A new revolutionary system. Which measures the real-time
Weather's condition. The monitoring weather situation is very much helpful for everyone either for
farmer or industry or daily working people or for school as well. So, the author by developing a live
weather monitoring system reduced the difficulty level for farmers and industry as well. In this paper,
the author uses an OLED display that will display the weather conditions and In the proposed model, the
author uses an ESP8266-EX microcontroller-based WeMos D1 board executed on Arduino, that
retrieved the data from the cloud. WeMos D1 is a wifi module that is developed on ESP- 8266EX
microcontroller. It has a 4MB flash memory. It one of the Excellent which is programmed with node
MCU and Arduino ide. In this paper Author uses only two gadgets to measure the weather conditions
i.e., Wemos and OLED, After the connection, it will store the data on the cloud for storing data a
thingspeak website is used to display the data regarding weather. The system displays the data on OLED
and thing speak cloud. The author's aim is to obtain live information on weather conditions on OLED
display. The author in [4], proposed a system that monitors and predicts the weather condition by which
anyone can plan for our day-to-day life. This activity became helpful in every field either in agriculture
or industry. So as to achieve monitoring and predicting weather info, the author uses 2 stages of the
weather management system. In which they amalgamated the information from the sensors, bus
mobility, and deep learning technology is used to allow a weather reporting system in stations and buses
in real-time. Forecasting of weather is achieved through the friction model. Depending upon the sensing
measurement from vehicles like buses, the work incorporates the strength of local information
processing. The author talks about in stage-I, sensing of weather’s condition, multilayer perception
model and long-term memory are trained and then it will verify using temperature data, humidity, air
pressure of test environment. In Stage-II, the training is applied to learn the time series of weather
information. To get accurate data or not, to check the system performance, the author comparing the
predicted weather data and actually obtained data from the environment Protection Administrator and
central Baeuro of Taichung observation system that calculate the prediction of accuracy. The author
finally talks about the proposed system has

4
reliable performance on monitoring of weather. And this model also proposed a one-day weather forecast
or prediction via the training model. So finally, the author demonstrates that this system presents a real-
time weather monitoring and prediction system using bus information management. The author
represents 4 basic components 1- Information management. 2- Interactive bus stop 3- Machine learning
predictive model 4- weather information platform. In this, information shown via dynamic chart. The
author [5], implement an IoT-based weather monitoring system, in this research paper, the author
describes that how with the help of IoT technology, the weather can be monitored. And which provide
the info of climate-changing conditions. With the help of this project, people can be aware of the climate
condition changes. It gives an accurate and efficient output and the algorithm as the swarm is used to
implement for further improving the accuracy. So, in this project, the author aims to make a weather
monitoring with the help of IoT. In this project, the hardware and software are used which makes it easy
to implement. In the project, the author uses a different sensor to collect the information of the climate
and stored it in the cloud. For this storage, the website www.thingspeak.com is commonly used for
Internet of things projects. And from the cloud storage space, it extracts the whole weather data and
uploads it to the android mobile application using an API key. Tools which detect the rain drops, is called
rain sensor. Once the plague reveals the raindrops on the strips and the voltage is considered from that.

5
Chapter - 2
Theory

6
THEORY
2.1 IoT (Internet of Things)

IoT (Internet of Things) is an advanced automation and analytics system which exploits networking,
sensing, big data, and artificial intelligence technology to deliver complete systems for a product or
service. These systems allow greater transparency, control, and performance when applied to any
industry or system.

IoT systems have applications across industries through their unique flexibility and ability to be
suitable in any environment. They enhance data collection, automation, operations, and much more
through smart devices and powerful enabling technology.

2.1.1 IoT−Key Features

The most important features of IoT include artificial intelligence, connectivity, sensors, active
engagement, and small device use. A brief review of these features is given below

• AI − IoT essentially makes virtually anything “smart”, meaning it enhances every aspect of life
with the power of data collection, artificial intelligence algorithms, and networks. This can mean
something as simple as enhancing your refrigerator and cabinets to detect whenmilk and your
favourite cereal run low, and to then place an order with your preferred grocer.
• Connectivity − New enabling technologies for networking and specifically IoT networking, mean
networks are no longer exclusively tied to major providers. Networks can exist on a much smaller
and cheaper scale while still being practical. IoT creates these small networks between its system
devices.
• Sensors − IoT loses its distinction without sensors. They act as defining instruments that
transform IoT from a standard passive network of devices into an active system capable of real-
world integration.
• Active Engagement − Much of today's interaction with connected technology happens through
passive engagement. IoT introduces a new paradigm for active content, product, or service
engagement.
• Small Devices − Devices, as predicted, have become smaller, cheaper, and more powerful over
time. IoT exploits purpose-built small devices to deliver its precision, scalability, and versatility.
2.1.1 IoT – Advantages

7
The advantages of IoT span across every area of lifestyle and business. Here is a list of some of the
advantages that IoT has to offer.
• Improved Customer Engagement − Current analytics suffer from blind spots and significant
flaws in accuracy; and as noted, engagement remains passive. IoT completely transforms this to
achieve richer and more effective engagement with audiences.
• Technology Optimization − The same technologies and data which improve the customer
experience also improve device use, and aid in more potent improvements to technology. IoT
unlocks a world of critical functional and field data.
• Reduced Waste − IoT makes areas of improvement clear. Current analytics give us superficial
insight, but IoT provides real-world information leading to more effective management of
resources.
• Enhanced Data Collection − Modern data collection suffers from its limitations and its design
for passive use. IoT breaks it out of those spaces and places it exactly where humans really want to
go to analyse our world. It allows an accurate picture of everything.
2.1.1 IoT – Disadvantages
Though IoT delivers an impressive set of benefits, it also presents a significant set of challenges. Here
is a list of some its major issues.
• Security − IoT creates an ecosystem of constantly connected devices communicating over
networks. The system offers little control despite any security measures. This leaves users exposed
to various kinds of attackers.
• Privacy − The sophistication of IoT provides substantial personal data in extreme detail without
the user's active participation.
• Complexity − Some find IoT systems complicated in terms of design, deployment, and
maintenance given their use of multiple technologies and a large set of new enabling technologies.
• Flexibility − Many are concerned about the flexibility of an IoT system to integrate easily with
another. They worry about finding themselves with several conflicting or locked systems.

• Compliance − IoT, like any other technology in the realm of business, must comply with
regulations. Its complexity makes the issue of compliance seem incredibly challenging when many
consider standard software compliance a battle.

2.1.4 IoT Software

IoT software addresses its key areas of networking and action through platforms, embedded systems,
partner systems, and middleware. These individual and master applications are responsible for data
collection, device integration, real-time analytics, and application and process extension within the
IoT network. They exploit integration with critical business systems

8
(e.g., orderingsystems, robotics, scheduling, and more) in the execution of related tasks.

• Data Collection
This software manages sensing, measurements, light data filtering, light data security, and
aggregation of data. It uses certain protocols to aid sensors in connecting with real-time, machine- to-
machine networks. Then it collects data from multiple devices and distributes it in accordance with
settings. It also works in reverse by distributing data over devices. The system eventually transmits
all collected data to a central server.
• Device Integration
Software supporting integration binds (dependent relationships) all system devices to create the body
of the IoT system. It ensures the necessary cooperation and stable networking between devices. These
applications are the defining software technology of the IoT network because without them, it is not
an IoT system. They manage the various applications, protocols, and limitations of each device to
allow communication.

• Real-Time Analytics
These applications take data or input from various devices and convert it into viable actions orclear
patterns for human analysis. They analyze information based on various settings and designs in order
to perform automation-related tasks or provide the data required by industry.
• Application and Process Extension
These applications extend the reach of existing systems and software to allow a wider, more effective
system. They integrate predefined devices for specific purposes such as allowing certain mobile
devices or engineering instruments access. It supports improved productivity and more accurate data
collection.

2.1.2. Internet of Things - Technology and Protocols

IoT primarily exploits standard protocols and networking technologies. However, the major enabling
technologies and protocols of IoT are RFID, NFC, low-energy Bluetooth, low-energy wireless, low-
energy radio protocols, LTE-A, and WiFi-Direct. These technologies support the specific networking
functionality needed in an IoT system in contrast to a standard uniform networkof common systems.
• NFCandRFID
RFID (radio-frequency identification) and NFC (near-field communication) provide simple,
lowenergy, and versatile options for identity and access tokens, connection bootstrapping, and
payments.
RFID technology employs 2-way radio transmitter-receivers to identify and track tagsassociated
with objects.

9
NFC consists of communication protocols for electronic devices, typically a mobile device and a
standard device.
• Low-Energy Bluetooth
This technology supports the low-power, long-use need of IoT function while exploiting a standard
technology with native support across systems.
• Low-Energy Wireless
This technology replaces the most power hungry aspect of an IoT system. Though sensors and other
elements can power down over long periods, communication links (i.e., wireless) must remain in
listening mode. Low-energy wireless not only reduces consumption, but also extends the life of the
device through less use.
• Radio Protocols
ZigBee, Z-Wave, and Thread are radio protocols for creating low-rate private area networks. These
technologies are low-power, but offer high throughput unlike many similar options. This increases
the power of small local device networks without the typical costs.
• LTE-A
LTE-A, or LTE Advanced, delivers an important upgrade to LTE technology by increasing not only
its coverage, but also reducing its latency and raising its throughput. It gives IoT a tremendous power
through expanding its range, with its most significant applications being vehicle, UAV, and similar
communication.
• WiFi-Direct
WiFi-Direct eliminates the need for an access point. It allows P2P (peer-to-peer) connections with
the speed of WiFi, but with lower latency. WiFi-Direct eliminates an element of a network thatoften
bogs it down, and it does not compromise on speed or throughput.
2.1.3. Internet of Things - Common Uses
IoT has applications across all industries and markets. It spans user groups from those who want to
reduce energy use in their home to large organizations who want to streamline their operations. It
proves not just useful, but nearly critical in many industries as technology advances and we move
towards the advanced automation imagined in the distant future.

• Engineering, Industry, and Infrastructure


Applications of IoT in these areas include improving production, marketing, service delivery, and
safety. IoT provides a strong means of monitoring various processes; and real transparency creates
greater visibility for improvement opportunities.

The deep level of control afforded by IoT allows rapid and more action on those opportunities,
which include events like obvious customer needs, nonconforming product, malfunctions in
equipment, problems in the distribution network, and more.
10
• Government and Safety
IoT applied to government and safety allows improved law enforcement, defense, city planning, and
economic management. The technology fills in the current gaps, corrects many current flaws, and
expands the reach of these efforts. For example, IoT can help city planners have a clearer view of
theimpact of their design, and governments have a better idea of the local economy.

• Home and Office


In our daily lives, IoT provides a personalized experience from the home to the office to the
organizations we frequently do business with. This improves our overall satisfaction, enhances
productivity, and improves our health and safety. For example, IoT can help us customize our office
space to optimize our work.

• Health and Medicine


IoT pushes us towards our imagined future of medicine which exploits a highly integrated networkof
sophisticated medical devices. Today, IoT can dramatically enhance medical research, devices, care,
and emergency care. The integration of all elements provides more accuracy, more attention to detail,
faster reactions to events, and constant improvement while reducing the typical overhead of medical
research and organization.

2.2. Block Diagram

Block diagram with Arduino

11
Block diagram of Node MCU

2.3. Advantages of Proposed System


• Decreased field damaging conditions
• Improved safety and security
• High-quality receiving data
• Less power consumption
• Accuracy is High
• Smart way to monitor Environment
• The low cost and efforts are less in this system

12
Chapter - 3
Proposed System and
Hardware Architecture

13
3.1. Features of purposed system
In IOT enabled weather monitoring system project, Arduino Uno measures 4 weather parameters using
respective 4 sensors. These sensors are a temperature sensor, humidity sensor, light sensor, and rain level
sensor. These 4 sensors are directly connected to Arduino Uno since it has an inbuilt Analog to digital
converter. The weather monitoring system gives high accuracy and reliability for weather monitoring
and climate changing. It uses the renewable energy source like solar panel for charging the connected
battery. Through the web, it access real time weather information and data. This system can be
communicated over general packet radio service (GPRS) network. Low maintenance is required for end
users. It is capable for storing data and providing it to the users as required.

3.2. Purposed Hardware Architecture


The implemented system consists of a microcontroller (ESP8266) as a main processing unit for the entire
system and all the sensor and devices can be connected with the microcontroller. The sensors can be
operated by the microcontroller to retrieve the data from them and it processes the analysis with the
sensor data and updates it to the internet through Wi-Fi module connected with via blynk app then we
can measure temperature, humidity, pressure and rain fall.

3.3. Circuit Diagram

14
Fig – 2 Circuit diagram of BMP180 with Arduino

Fig – 3 Circuit diagram of DHT11 with Arduino

15
3.5. List of required hardware components

Serial No. Name of the components

1. Arduino UNO
2. ESP8266 WiFi Module
3. DHT11
4. BMP180
5. Rain Sensor
6. 16*2 LCD Display
7. Beard Board
8. Jumper Wire
9. Data Cable

3.6. Details of Hardware Component

3.6.1. Arduino UNO

Arduino Uno is a microcontroller board based on the ATmega328P (datasheet). It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator (CSTCE16M0V53-R0), and a USB connection, a power jack, an ICSP header and a
reset button. It contains everything needed to support the microcontroller; simply connect it to
a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started..
You can tinker with your Uno without worrying too much about doing

16
something wrong, worst case scenario you can replace the chip for a few dollars and start over
again. "Uno" means one in Italian and was chosen to mark the release of Arduino Software
(IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the reference
versions of Arduino, now evolved to newer releases. The Uno board is the first in a series of
USB Arduino
boards, and the reference model for the Arduino platform; for an extensive list of current, past
or outdated boards see the Arduino index of boards.

Fig – 5 Arduino Uno

• Pin Configuration of Arduino UNO


• Vin - This is the input voltage pin of the Arduino board used to provide input supply from an
external power source.
• 5V - This pin of the Arduino board is used as a regulated power supply voltage and it is used
to give supply to the board as well as onboard components.
• 3.3V - This pin of the board is used to provide a supply of 3.3V which is generated from a
voltage regulator on the board.
• GND - This pin of the board is used to ground the Arduino board.
• Reset - This pin of the board is used to reset the microcontroller. It is used to Resets the
microcontroller.

17
• Analog Pins - The pins A0 to A5 are used as an analog input and it is in the range of 0-5V.
• Digital Pins - The pins 0 to 13 are used as a digital input or output for the Arduino board.
• Serial Pins - These pins are also known as a UART pin. It is used for communication between
the Arduino board and a computer or other devices. The transmitter pin number 1 and receiver
pin number 0 is used to transmit and receive the data resp.
• External Interrupt Pins - This pin of the Arduino board is used to produce the External
interrupt and it is done by pin numbers 2 and 3.
• PWM Pins - These pins of the board is used to convert the digital signal into an analog by
varying the width of the Pulse. The pin numbers 3,5,6,9,10 and 11 are used as a PWM pin.
• SPI Pins - This is the Serial Peripheral Interface pin, it is used to maintain SPI communication
with the help of the SPI library. SPI pins include:

1) SS: Pin number 10 is used as a Slave Select


2) MOSI: Pin number 11 is used as a Master Out Slave In
3) MISO: Pin number 12 is used as a Master In Slave Out
4) SCK: Pin number 13 is used as a Serial Clock

• LED Pin: The board has an inbuilt LED using digital pin-13. The LED glows only when the
digital pin becomes high.
• AREF Pin: This is an analog reference pin of the Arduino board. It is used to provide a
reference voltage from an external power supply.

18
3.2.1. Pin Configuration

19
4.2.2. Some features of ESP8266

• Low cost, compact and powerful Wi-Fi Module


• Power Supply: +3.3V only
• Current Consumption: 100mA
• I/O Voltage: 3.6V (max)
• I/O source current: 12mA (max)
• Built-in low power 32-bit MCU @ 80MHz
• 512kB Flash Memory
• Can be used as Station or Access Point or both combined0
• Supports Deep sleep (<10uA)
• Supports serial communication hence compatible with many development platform like
Arduino
• Can be programmed using Arduino IDE or AT-commands or Lua Script

4.3. DHT11(Temperature & Humidity sensor)

The DHT-11 Digital Temperature and Humidity Sensor is a basic, ultra-low-cost digital
temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to
measure the surrounding air and spits out a digital signal on the data pin (no analog input pins
needed).

Fig – 7 DHT11(Temperature & Humidity Sensor)

3.3.1. Pin Configuration of DHT11

20
3.3.2. DHT11 Specifications

• Operating Voltage: 3.5V to 5.5V


• Operating current: 0.3mA (measuring) 60uA (standby)
• Output: Serial data
• Temperature Range: 0°C to 50°C
• Humidity Range: 20% to 90%
• Resolution: Temperature and Humidity both are 16-bit
• Accuracy: ±1°C and ±1%

3.4. LCD Display


A Liquid Crystal Display commonly abbreviated as LCD is basically a display unit built using
Liquid Crystal technology. When we build real life/real world electronics - based projects, we
need a medium/device to display output values and messages. The most basic form of
electronic display available is 7 Segment displays – which has its own limitations. The next
best available option is Liquid Crystal Displays which comes in different size specifications.
Out of all available LCD modules in market, the most commonly used one is 16×2 LCD
Module which can display 32 ASCII characters in 2 lines. To establish a good communication
between human world and machine world, display units play an important role. And so, they
are an important part of embedded systems. Display units - big or small, work on the same
basic principle. Besides complex display units like graphic displays and 3D display, one must
know working with simple displays like 16x1 and 16x2 units.

Fig – 11 16*2 LCD Display

21
Chapter - 4
Algorithm

22
4.1. Flow chart of the system

23
4.2. Source Code
4.2.1. DHT11 with Arduino
#include <SimpleDHT.h>
// for DHT11,
// VCC: 5V or 3V
// GND: GND
// DATA: 3
int pinDHT11 = 3;
SimpleDHT11 dht11(pinDHT11);
void setup() {
// start working...
Serial.println("Temperature and Humidity Data");
Serial.begin(9600);
}
void loop() {
// read without samples.
byte temperature = 0;
byte humidity = 0;
int err = SimpleDHTErrSuccess;
if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
Serial.print("Read DHT11 failed, err="); Serial.print(SimpleDHTErrCode(err));
Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); delay(1000);
return;
}
Serial.print((int)temperature); Serial.print(" *C, ");
Serial.print((int)humidity); Serial.println(" H");
// DHT11 sampling rate is 1HZ.
delay(1500);
}
4.1.2. Rain Sensor With Arduino
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}

24
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}
4.1.3. BMP180 (Pressure)
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085_U.h>

/* This driver uses the Adafruit unified sensor library (Adafruit_Sensor),


which provides a common 'type' for sensor data and some helper functions.

To use this driver you will also need to download the Adafruit_Sensor
library and include it in your libraries folder.

You should also assign a unique ID to this sensor for use with
the Adafruit Sensor API so that you can identify this particular
sensor in any data logs, etc. To assign a unique ID, simply
provide an appropriate value in the constructor below (12345
is used by default in this example).

Connections
===========
Connect SCL to analog 5
Connect SDA to analog 4
Connect VCC to 3.3V DC
Connect GROUND to common ground

History
=======

25
2013/JUN/17 - Updated altitude calculations (KTOWN)
2013/FEB/13 - First version (KTOWN)
*/

Adafruit_BMP085_Unified bmp = Adafruit_BMP085_Unified(10085);

/**************************/
/*
Displays some basic information on this sensor from the unified
sensor API sensor_t type (see Adafruit_Sensor for more information)
*/
/**************************/
void displaySensorDetails(void)
{
sensor_t sensor;
bmp.getSensor(&sensor);
Serial.println(" ");
Serial.print ("Sensor: "); Serial.println(sensor.name);
Serial.print ("Driver Ver: "); Serial.println(sensor.version);
Serial.print ("Unique ID: "); Serial.println(sensor.sensor_id);
Serial.print ("Max Value: "); Serial.print(sensor.max_value); Serial.println(" hPa");
Serial.print ("Min Value: "); Serial.print(sensor.min_value); Serial.println(" hPa");
Serial.print ("Resolution: "); Serial.print(sensor.resolution); Serial.println(" hPa");
Serial.println(" ");
Serial.println("");
delay(250);
}

/**************************/
/*
Arduino setup function (automatically called at startup)
*/
4.1.4. ESP8266 with Rain Sensor via Blynk
#include <SoftwareSerial.h>

26
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "P4pODDBKIyHrzw2YJW5g6Bfc8-H1bWqa";
char ssid[] = "ASUS_X00TD";
char pass[] = "suvadip1998";

BlynkTimer timer;

void moisture() {
int rainSensor = analogRead(A0);
rainSensor = map(rainSensor, 0, 1023, 0, 350);
Blynk.virtualWrite(V5, rainSensor);
Serial.println(rainSensor);
}
void setup() {
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
timer.setInterval(350, moisture);

}
void loop()
{
Blynk.run();
timer.run();
4.1.5. ESP8266 with BMP180 via Blynk App
#include <Wire.h>
#include <Adafruit_BMP085.h>
#include <Blynk.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

Adafruit_BMP085 bmp;

27
float temp, pressure, Altitude, Sealevel;

char auth[] = "8LU16RepIbHVm0gt7-9-XMz9l-rwXjsS";

char ssid[] = "Dlink";


char pass[] = "Pabitra1999";

void setup()
{

Serial.begin(115200);
WiFi.begin(ssid, pass);
Serial.print("Connecting. .... ");

while(WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print("Waiting to connect WiFi\n");
}
Serial.print("WiFi is connected \n");
Serial.print(WiFi.localIP());

Blynk.begin(auth, ssid, pass);

if (!bmp.begin())
{
Serial.println("Could not find a valid BMP085 sensor, check wiring!");
while (1)
{

28
}

void loop()
{
Blynk.run();

temp = bmp.readTemperature();
pressure = bmp.readPressure();
Sealevel = bmp.readSealevelPressure();
Altitude = bmp.readAltitude();

Blynk.virtualWrite(V6, temp);
Blynk.virtualWrite(V7, pressure);
Blynk.virtualWrite(V8, Sealevel);
Blynk.virtualWrite(V9, Altitude);

Serial.print("Temperature = ");
Serial.print(bmp.readTemperature());
Serial.println(" *C");

Serial.print("Pressure = ");
Serial.print(bmp.readPressure());
Serial.println(" Pa");

Serial.print("Altitude = ");
Serial.print(bmp.readAltitude());
Serial.println(" meters");

Serial.print("Pressure at sealevel (calculated) = ");

29
Serial.print(bmp.readSealevelPressure());
Serial.println(" Pa");

Serial.println();

}
5.1.6. ESP8266 with DHT11 via Blynk App
#define BLYNK_TEMPLATE_ID "TemplateID"
#define BLYNK_DEVICE_NAME "Temperature Alert"
#define BLYNK_AUTH_TOKEN "Auth Token"

#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

#include <DHT.h>

char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "WiFi Username"; // type your wifi name


char pass[] = "WiFi Password"; // type your wifi password

#define DHTPIN 2 // Mention the digital pin where you connected


#define DHTTYPE DHT11 // DHT 11
DHT dht(DHTPIN, DHTTYPE);
BlynkTimer timer;

void sendSensor(){
float h = dht.readHumidity();
float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit
if (isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor!");

30
return;
}

Serial.println(t);
Blynk.virtualWrite(V6, h);
Blynk.virtualWrite(V5, t);
Serial.print("Temperature : ");
Serial.print(t);
Serial.print(" Humidity : ");
Serial.println(h);

if(t > 30){


// Blynk.email("[email protected]", "Alert", "Temperature over 28C!");
Blynk.logEvent("temp_alert","Temp above 30 degree");
}
}

void setup(){
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
dht.begin();
timer.setInterval(2500L, sendSensor);
}

void loop(){
Blynk.run();
timer.run();
}

31
Chapter - 5
Implementation

32
5.1. Prototype mode of the system -

Fig – 12 Hardware Circuit

5.2. Implementaion of Hardware –


Ease of monitoring your local weather conditions in real time from anywhere in the world.
For storing weather and environment data for short and long term for studying weather
pattern changes and to understand how human induced climate change affected your local
weather.Easy deployment of the setup for monitoring local atmospheric conditions and
microclimates for weather forecasting and prediction.
Farmers need to know the temperature, relative humidity, soil moisture, rain fall etc. to
enhance their crop production and the following type of sensors are utilized to obtain the
data:Temperature sensor.Humidity / hygrometer sensor.Soil moisture sensor.Rain sensor etc.
For an airplane pilot he/she needs to know wind speed, wind direction, atmospheric pressure,
precipitation, visibility etc. before they takeoff and they use the following sensors:
Barometric sensor – for measuring atmospheric pressure.
Anemometer – for measuring wind speed.
Rain sensor.

33
Chapter - 6
Observation And
Result

34
6.1. Experimental Analysis along with Results

38
Chapter - 7
Conclusion And Future
Scope

39
7.1. Conclusion
By keeping the weather station in the environment for monitoring enables self-protection
(i.e., smart environment) to the environment. To implement this need to use the sensor
devices in the environment for collecting the data and analysis. By using sensor devices in the
environment, we can bring the environment into real life. Then the collected data and analysis
results will be available to the user through LCD. The smart way to monitor the environment
an efficient, low-cost embedded system is presented in this paper. It also sent the sensor
parameters to the cloud. This data will be helpful for future analysis and it can be easily
shared to other users also. This model can be expanded to monitor the developing cities and
industrial zones for pollution monitoring. To protect the public health from pollution, this
model provides an efficient and low-cost solution for continuous monitoring of environment.
7.2. Future Scope
One can implement a few more sensors and connect it to the satellite as a global feature of
this system. Adding more sensors to monitor other environmental parameters such as CO2,
Pressure and Oxygen Sensor. In aircraft, navigation and the military there is a great scope of
this real-time system. 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.

40
Chapter - 8
Reference

41
[1]. Mary Nsabagwaa, Maximus Byamukamab, Emmanuel Kondelaa, “Towards a robust and
affordable Automatic Weather Station “, journal homepage:
www.elsevier.com/locate/deveng.
[2]. Ravi Kishore Kodali and Snehashish Mandal “IoT Based Weather Station” 2016
International Conference on Control, Instrumentation, Communication and Computational
Technologies (ICCICCT) 978-1-5090- 5240-0/16/$31.00, IEEE, (2016).
[3]. Ravi Kishore Kodali and Archana Sahu “An IoT based Weather Information Prototype
Using WeMos” 2016 2nd International Conference on Contemporary Computing and
Informatics (ic3i), 978-1-5090-5256- 1/16/$31.00, IEEE, (2016)
[4]. Zi-Qi Huang, Ying-Chih Chen and Chih-Yu Wen, “Real-Time Weather Monitoring and
Prediction Using City Buses and Machine Learning”, Vols. 3 to 21 Published 10 September
(2020)
[5]. Kavya Ladi, A V S N Manoj, G V N Deepak, “IOT Based Weather Reporting System to
Find Dynamic Climatic Parameters”, International Conference on Energy, Communication,
Data Analytics and Soft Computing (ICECDS-2017)
[6]. P. Susmitha, G. Sowmyabala “Design and Implementation of Weather Monitoring and
Controlling System”, International Journal of Computer Applications (0975 – 8887) Volume
97– No.3, (July 2014)
[7]. Tanmay Parashar1, Shobhit Gahlot2, Akash Godbole3, Y.B. Thakare4 “Weather
Monitoring System Using Wi-Fi”, (IJSR) ISSN (Online): 2319-7064 Index Copernicus Value
(2015): 78.96, 2015
[8]. Nutant Sabharwal, Rajesh Kumar, Abhishek Thakur, Jitender Sharma “A LOW-COST
ZIGBEE BASED AUTOMATIC WIRELESS WEATHER STATION WITH GUI AND
WEB HOSTING FACILITY” e-ISSN: 1694-2310 | p-ISSN: 1694-2426, Vol. 1, Spl. Issue 2
(May 2014)
[9]. M. Prasanna, M. Iyapparaja, M. Vinothkumar, B Ramamurthy, S.S. Manivannan,” An
Intelligent Weather Monitoring System using Internet of Things”, International Journal of
Recent Technology and Engineering (IJRTE) ISSN: 2277-3878, Volume-8 Issue4, November
(2019)
[10]. Mircea Popa and Catalin Iapa “Embedded Weather Station with Remote Wireless
Control”, 19th Telecommunications forum TELFOR 2011 Serbia, Belgrade, November 22-
24, 2011, 978-1-4577-1500- 6/11/$26.00, IEEE, 2011

42
[11].A Study on IoT Approach for Monitoring Water Quality Using MQTT Algorithm,
Alfiya Abubaker1, Kavya C R2, Tilju Thomas3, Nikhil Joseph4, Shifana Begum5, 1,2,3,4
Final Year UG Students, Dept. of CSE, Srinivas School Of Engineering, Mangalore
[12]. IoT Based Water Quality Monitoring System, Mourvika Shirode, Monika Adaling, Jyoti
Biradar, Trupti Mate, Department of Electronics & Telecommunication Keystone School of
Engineering, Pune, Maharashtra, India
[13]. https://internetofthingsagenda.techtarget.com/definition/I nternet-of-Things-IoT
[14]. Girija C Department of Electronics and Communication, NIEIT, Andreanna Grace
ShiresDepartment of Electronics and Communication, NIEIT, Mysuru Internet of Things
(IoT) based Weather, International Journal of Engineering Research & Technology (IJERT)
[15]. Mobile APP & IoT Based Station Weather Station. AUTHOR: K. N. V.
SATYANARAYANA, S. R. N. REDDY, K. N. V. SURESH VARMA & P. KANAKA
RAJU
[16]. Arduino Based Weather Monitoring System. AUTHOR: Karthik Krishnamurthi, Suraj
Thapa, Lokesh Kothari, Arun Prakash
[17]. Internet of Things (IoT) Based Weather Monitoring system, Bulipe Srinivas Rao1, Prof.
Dr K. Srinivasa Rao2, Mr N. Ome3, international Journal of Advanced Research in Computer
and Communication Engineering, ISO 3297:2007 Certified, Vol. 5, Issue 9, September 2016
[18]. https://how2electronics.com

43

You might also like