Professional Documents
Culture Documents
Internet of Things IOT Based Weather Monitoring System
Internet of Things IOT Based Weather Monitoring System
Section: 01
Submitted to:
Submitted by:
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 technology
behind this is the Internet of Things (IoT), which is an advanced and efficient solution for
connecting the things to the internet and to connect the entire world of things in a network. The
system here deals with monitoring and controlling the environmental conditions like
temperature, relative humidity and rainfall measure with sensors and sends the information to the
web page and then plots the sensor data as graphical statistics. The data updated from the
implemented system can be accessible on the internet from anywhere in the world.
Introduction
Proposed Model
Hardware Specifications:
● Atmega Microcontroller
● DHT11 Digital Temperature Humidity Sensor
● Rain Drop Sensor
● ESP8266 Wi-Fi Module
● LCD Display
● Crystal Oscillator
● Resistors
● Capacitors
● Voltage Regulator
● Potentiometer
● Cables and Connectors
● Diodes
● Breadboard
● LED
● Transformer/Adapter
● Push Buttons
● Switch
● IC
Software Specifications
● Arduino Compiler
● MC Programming Language: C
● Programming Code
● IoT Web Page
System Architecture
This IoT weather reporting system works on the principle of sensors working. When it is
connected with 220V AC supply then it steps down 220V AC into 9V AC with the help of a step
down AC transformer. Because this system mostly consists of electronic components, these AC
voltages are converted into D.C with the help of bridge rectifier. The rectifier is made with four
4007 diodes. The current cannot be converted to pure DC and some fluctuations are observed. So
the solution to that is adding an electrolytic capacitor of 1000 µF (microfarad). Now the
capacitor has pure DC of 9V. But we need 5V DC supply. The step is regulating to 5V DC with
the help voltage regulator that is connected with an LED. LCD display, WIFI module and
microcontroller are powered up with this voltage regulator. Here we have used the LM 7805
voltage regulator for this purpose. Also a 10 kilo ohm (kΩ) resistor is connected just beside a
power switch. The power switch is used to reset the whole circuit.
The next part is the Arduino Microcontroller and its IC number is Atmega328. Arduino is
programmed and fitted inside the IC. There are 28 ports and a crystal oscillator of 16 MHz
(MegaHertz) is connected to the 11th port and it is used to generate frequency. Two 22 pF
(picoFarad) capacitors are placed on two sides of the crystal. Lastly, a potentiometer of 10 kilo
ohm (kΩ) is placed near the LCD display. If the potentiometer is rotated, the words on the LCD
display can be seen clearer.
This system automatically displays the temperature, humidity and weather condition on a
dedicated server, ThingSpeak as well as it also displays this data on the LCD display. Because
this whole work is done automatically therefore the 18F452 microcontroller is the main
intelligent controller of this system. It is programmed in C language with the help of Arduino
IDE software and is interfaced with LCD display, WIFI module, LM 358 rain drop sensor,
humidity and temperature sensor. Using the WIFI module, the data are recorded and sent to the
webpage after 10 - 20 seconds, where graphs can be generated using ThingSpeak.
Temperature and humidity sensor works on the principle voltage and current, means when
temperature is increased then its producing voltage is increased similarly when humidity is
increased then its producing current is increased. These increasing current and voltage values are
measured by the microcontroller and then gives the logic high signal to WIFI module and
internal LCD display against these measured values. Then its internal LCD display displays these
values of its LCD screen and WIFI modem which is linked with the internet, displays these
values of ThingSpeak. Where the user can easily check the current status of the weather without
connecting a forecasting agency. Similarly, this system also tells the rain status when a raindrop
falls on the raining board. Raining board is basically the printed circuit board when a raindrop
falls on this board, it is short circuited and its short circuited current value is sensed by the
microcontroller through a raindrop sensor. Then it displays these values on an online webpage
and LCD display. This is simply the working of an IOT based weather reporting system.
Hardware Specifications in Detail:
Atmega Microcontroller:
/Raindrop Sensor is a tool used for sensing rain. It consists of two modules, a rain board that
detects the rain and a control module, which compares the analog value, and converts it to a
digital value. The raindrop sensors can be used in the automobile sector to control the windshield
wipers automatically, in the agriculture sector to sense rain and it is also used in home
automation systems. The control module of the raindrop sensor has 4 outputs. VCC is connected
to a 5V supply. The GND pin of the module is connected to the ground. The D0 pin is connected
to the digital pin of the microcontroller for digital output or the analog pin can be used. To use
the analog output, the A0 pin can be connected to the ADC pin of a microcontroller.
Here we used ESP8266 Wi-Fi module which is having TCP/IP protocol stack integrated on chip.
So that it can provide any microcontroller to get connected with Wi-Fi network. ESP8266 is a
preprogrammed SOC and any microcontroller has to communicate with it through the UART
interface. It works with a supply voltage of 3.3v. The module is configured with AT commands
and the microcontroller should be programmed to send the AT commands in a required sequence
to configure the module in client mode. The module can be used in both client and server modes.
LCD Display
LCD (Liquid Crystal Display) is a type of flat panel display which uses liquid crystals in its
primary form of operation. LEDs have a large and varying set of use cases for consumers and
businesses, as they can be commonly found in smartphones, televisions, computer monitors and
instrument panels. LCDs are lit by a backlight, and pixels are switched on and off electronically
while using liquid crystals to rotate polarized light. A polarizing glass filter is placed in front and
behind all the pixels, the front filter is placed at 90 degrees. In between both filters are the liquid
crystals, which can be electronically switched on and off.
Crystal Oscillator
Resistors
The resistor is a passive electrical component to create resistance in the flow of electric current.
In almost all electrical networks and electronic circuits they can be found. The resistance is
measured in ohms. An ohm is the resistance that occurs when a current of one ampere passes
through a resistor with a one volt drop across its terminals. The current is proportional to the
voltage across the terminal ends. This ratio is represented by Ohm’s law:
Resistors are used for many purposes. A few examples include delimiting electric current,
voltage division, and heat generation, matching and loading circuits, control gain, and fix time
constants. They are commercially available with resistance values over a range of more than nine
orders of magnitude.
Capacitors
Capacitor is an electronic component that stores electric charge. The capacitor is made of 2 close
conductors (usually plates) that are separated by a dielectric material. The plates accumulate
electric charge when connected to the power source. One plate accumulates positive charge and
the other plate accumulates negative charge. The capacitance is the amount of electric charge
that is stored in the capacitor at voltage of 1 Volt. The capacitance is measured in units of
Faraday (F). The capacitor disconnects current in direct current (DC) circuits and short circuit in
alternating current (AC) circuits. For this project we have used a 1000µF capacitor.
Voltage Regulator
A potentiometer (also known as a pot or pot meter) is defined as a 3 terminal variable resistor in
which the resistance is manually varied to control the flow of electric current. A potentiometer
acts as an adjustable voltage divider. It is a passive electronic component. Potentiometers work
by varying the position of a sliding contact across a uniform resistance. In a potentiometer, the
entire input voltage is applied across the whole length of the resistor, and the output voltage is
the voltage drop between the fixed and sliding contact. A potentiometer has the two terminals of
the input source fixed to the end of the resistor. To adjust the output voltage the sliding contact
gets moved along the resistor on the output side.
Diodes
A diode is a device which allows current flow through only one direction. That is the current
should always flow from the Anode to Cathode. The cathode terminal can be identified by using
a grey bar as shown in the picture above. We have used four 1N4007 diodes in this project. For
1N4007 diodes, the maximum current carrying capacity is 1A it can withstand peaks up to 30A.
Hence we can use this in circuits that are designed for less than 1A. The reverse current is 5uA
which is negligible. The power dissipation of this diode is 3W.
Breadboard
A breadboard is a rectangular plastic board with a bunch of tiny holes in it. These holes let you
easily insert electronic components to prototype (meaning to build and test an early version of)
an electronic circuit, like this one with a battery, switch, resistor, and an LED (light-emitting
diode).
LED
LEDs (Light Emitting Diodes) are semiconductor light sources that combine a P-type
semiconductor (larger whole concentration) with an N-type semiconductor (larger electron
concentration). Applying a sufficient forward voltage will cause the electrons and holes to
recombine at the P-N junction, releasing energy in the form of light. Compared with
conventional light sources that first convert electrical energy into heat, and then into light, LEDs
(Light Emitting Diodes) convert electrical energy directly into light, delivering efficient light
generation with little-wasted electricity.
Transformer/Adapter
A Step down Transformer is a device which converts high primary voltage to a low secondary
voltage. In a Step down Transformer, the primary winding of a coil has more turns than the
secondary winding. In this project we have used a 9-0-9; 750 mA transformer.
Push Button/Switch
These 6mm push button momentary on switches are an essential part of any breadboard-based or
through-hole project. Useful for single-press activities, such as reset functions, the switches are
part of most Arduino-based kits. The key to using these switches is figuring out which leads are
actually switched. The switching action happens between the closer leads. The other two leads
are connected internally (shorted) to the leads that switch.
IC
An integrated circuit, or IC, is a small chip that can function as an amplifier, oscillator, timer,
microprocessor, or even computer memory. An IC is a small wafer, usually made of silicon, that
can hold anywhere from hundreds to millions of transistors, resistors, and capacitors. These
extremely small electronics can perform calculations and store data using either digital or analog
technology. For our project we have used the ATmega328 which is a single-chip microcontroller
created by Atmel in the megaAVR family. It has a modified Harvard architecture 8-bit RISC
processor core.
Arduino Compiler
A program for Arduino hardware may be written in any programming language with compilers
that produce binary machine code for the target processor. For this project we have used the
software Arduino IDE. The Arduino Integrated Development Environment (IDE) is a cross-
platform application (for Windows, macOS, Linux) that is written in functions from C and C++].
It is used to write and upload programs to Arduino compatible boards, but also, with the help of
3rd party cores, other vendor development boards.
MC Programming Language: C
Microcontrollers were originally programmed only in assembly language, but various high-level
programming languages, such as C, Python and JavaScript, are now also in common use to target
microcontrollers and embedded systems. This project has been programmed using C language. C
is a general-purpose, procedural computer programming language supporting structured
programming, lexical variable scope, and recursion, while a static type system prevents
unintended operations.
Programming Code
Programming part of this project plays a very important role to perform all the operations. First
of all we include required libraries and initialize variables.
Then we enter the Write API key and take some strings.
In void loop () function we read temperature and humidity and then show those readings on the
LCD.
Void send2server () function is used to send the data to the server. Send2server function is a
timer interrupt service routine, calling in every 20 seconds. When we call update function, the
timer interrupt service routine is called.
In this IoT project we are going to monitor Humidity, Temperature and Rain Drop over the
internet using ThingSpeak where we will show the current Humidity, Temperature and Rain
Drop data over the Internet using the ThingSpeak server. It is accomplished by the data
communications between Arduino in the microcontroller, DHT11 Sensor Module, ESP8266
WIFI module and LCD. Celsius scale thermometer and percentage scale humidity meter displays
the ambient temperature and humidity through a LCD display and also sends it to ThingSpeak
server for live monitoring from anywhere in the world.
Here we are explaining about How to send Data to ThingSpeak server by using ESP8266 WIFI
Module:
1. First of all, the user needs to create an Account on ThingSpeak.com, then Sign In and click on
Get Started.
2. Then go to the ‘Channels’ menu and click on New Channel option on the same page for
further process.
3. Now the user will see a form for creating the channel, the user needs to fill in the Name and
Description as per their choice. Then fill ‘Humidity’, ‘Temperature’ and ‘Rain Sensor’ in Field
1, Field 2 and Field 3 labels, tick the checkboxes for both Fields. Also tick the check box for
‘Make Public’ option below in the form and finally Save the Channel. Now a new channel has
been created.
4. Now click on ‘API keys’ tab and save the Write and Read API keys, here we are only using
Write key. You need to Copy this key in char *api_key in the Code.
5. After it, click on ‘Data Import/Export’ and copy the Update Channel Feed GET Request URL,
which is:
https://api.thingspeak.com/update?api_key=SIWOYBX26OXQ1WMS&field1=0
6. Now user need to open “api.thingspeak.com” using the httpGet function with the postUrl as
“update? api_key=SIWOYBX26OXQ1WMS&field1=0” and then send data using data feed or
update request address.
Graphical Representation of Data
This approach ideally requires a dc amplifier with zero drift characteristics and unity voltage
gain, and a dc meter movement with adequate sensitivity.
In another approach the ac signal is rectified after amplification. Where full-wave rectification
takes place in the meter circuit connected to the output terminal of the ac amplifier. This
approach generally requires an AC amplifier with high open-loop gain and large amounts of
negative feedback to overcome the nonlinearity of the rectifier diodes.
Ac voltmeters are usually of the average-responding type, with the meter scale calibrated in
terms of the rms value of the sine wave. Since so many waveforms in electronics are sinusoidal,
this is an entirely satisfactory solution and certainly much less expensive than a true rms-
responding voltmeter. Non sinusoidal waveforms, however, will cause this type of meter to read
high or low, depending on the form factor of the waveform.
The rms value of a voltage wave that has equal positive and negative excursion is related to the
average value by the form factor, as the ratio of the rms value of the average value of this
waveform, for a sinusoid can be expressed as
Therefore, when an average responding voltmeter has scale marking corresponding to the rms
value of the applied sinusoidal input waveform, those markings are actually collected by a factor
of the true value of applied voltage.
Non sinusoidal waveforms, when applied to this voltmeter, will cause the meter to read high or
low, depending on the form factor of the waveform.
Inductor-Capacitor Oscillators: there is a board class of oscillator that uses the resonant
characteristics of an inductor-capacitor, LC circuit to generate a stable frequency. The oscillator
consists of an amplifier and a feedback network such that the total gain of the loop, that is gain of
the amplifier divided by the loss of the feedback network, is exactly equal to one, and the total
phase shift around the loop is zero. Oscillators are designed such that these characteristics are
met at only one frequency. This can be achieved by using various combinations of inductors,
capacitors and resistors.
ADVANTAGES
● The IoT Weather Monitoring System project using Atmega microcontroller is fully
automated.
● It does not require any human attention.
● We can get prior alert of weather conditions.
● It is low cost and efforts are less.
● In this system accuracy is high.
● It is a smart way to monitor.
● Environment Efficient.
APPLICATIONS
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 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.
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 the Wi-Fi. 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 the environment.
THANK YOU.