Weather Station Design Using IoT Platform Based
Weather Station Design Using IoT Platform Based
On Arduino Mega
Medilla Kusriyanto Agusti Anggara Putra
Electrical Engineering Department Electrical Engineering Department
Industrial Technology Faculty, Indonesia Islamic University Industrial Technology Faculty, Indonesia Islamic University
Yogyakarta, Indonesia Yogyakarta, Indonesia
[email protected] [email protected]
Abstract— Weather stations are built for the purpose of atmospheric pressure, rain, and solar radiation. Weather
collecting quantitative data about the weather conditions of a data are sent via Wi-Fi network to a database server as well
place. Monitoring weather conditions in an environment today is as it stored in memory card. On the other hand, a web
considered to be very important because of the uncertain weather
application which presents acquired weather data at
changes every day. This research tries to make weather station
which can be accessed through website by using IoT platform. remote locations. This system provides real-time data
Users can know the weather changes in an area without the need acquisition and transfer of measured parameter like other
to come to the area. This design uses Arduino Mega 2560 as a high cost commercial weather station. It is very low cost,
microcontroller. The measured weather parameters include small size, easy use and reliable which can be easily used in
temperature and humidity using DHT-22 sensors, rain detection various applications.
using FC-37 rain sensor, and air pressure using BMP180 sensor. In [2], it is mentioned that an Automatic Weather Station
Air pressure measurement results are used to predict the weather. (AWS) data logger using microcontroller Netduino. It will be
The measurement results of all sensors are stored in SD Card and
useful to each sector which affected by weather. This research
displayed on TFT LCD 2.2 'and website using ESP8266 wifi
module. In this research, the difference of measurement result implement a telemetry system on Netduino logger in purpose to
with PCE-THB 40 module with an average error of 3.74% for place it on remote area application, beside the study was
temperature, 2.14% for air humidity and 0.32% hPa for air developed a switching channel method to expand the number of
pressure. I/O analog pin on Netduino. This research conclude that
processing analog signal on Netduino has an alteration between
Keywords— IoT, ESP8266, Weather Station, Data Logger its real value even not significantly, some treatment has
implemented to reduce the error of data output, with using good
I. INTRODUCTION
power resource and moving averaging on each data reads
Weather Station is a form of application of science and (FAH).
technology to know and predict the weather conditions at a In [3], it is mentioned that weather information is required
particular location. The weather station is designed to collect before performing an activity, especially activities that directly
quantitative data about the weather conditions of a region in relate to nature such as agricultural activities. Weather
order to be able to know and predict weather conditions in a parameters are taken from the temperature, wind speed and
region. In Indonesia weather conditions are always announced
solar radiation intensity. The system was designed with speed
for a 24-hour period through weather forecasts analyzed by the
of optokopler as sensors, sensor LM35 as temperature sensor
Meteorology Climatology and Geophysics Agency (BMKG)
and sensor instensitas LDR as a measure of the sun. all sensors
Human activities depend on weather factors. Weather is an acquired by ATmega8535 microcontroller. The signal from the
air condition that lasts for a short period of time so the short- sensor is then processed and sent to the processor board to be
term weather forecasting process should be done as quickly and translated into wind speed of the data parameter, temperature,
accurately as possible. Weather conditions in a place is and intensity of the sun. KYL 1020 U used as an intermediary
determined by a number of factors including air temperature, to transmit data from the processor board to the client computer.
humidity, wind direction, wind speed and air pressure. By In [4], it is mentioned that climate observing has critical
looking at these factors, the weather can be predicted for weather influence on mankind. Gathering of the various data of fleeting
conditions the next day. elements of the climate variations is extremely noteworthy. The
In this research try to develop weather prediction by using essential point of their research is to build up an installed
IoT platform. With this device, users can know the weather framework to outline a climate observing framework which
conditions of a place by utilizing the internet network. empowers the checking of climate parameters. This type of
frame work includes various sensors involving temperature,
In [1], it is mentioned that they have designed, developed
Humidity, wind speed, wind bearing information can be signed
and tested a low cost weather monitoring station using
into cloud so that any one (validated individual) from wherever
raspberry pi, which monitor the weather data, including
can watch the particular information. If there should be an
wind speed, wind direction, air temperature, humidity,
occurrence of any catastrophes like flame, substantial
Authorized licensed use limited to: Universiti Tun Hussein Onn Malaysia. Downloaded on June 11,2024 at 12:38:44 UTC from IEEE Xplore. Restrictions apply.
downpour, overwhelming wind, temperature or moistness ambient temperature connected to 8-bit single-chip computers
might be wild, in these cases the moment data can be passed on and converted into digital signals on the data pin.
all through the world utilizing cloud to the verified people, To measure humidity, DHT22 uses two electrodes by
regardless of the fact that his equipment is wrecked in crisis. holding the substrate moisture between the electrodes. Changes
In [5], it is mentioned that developed wireless sensors to in humidity are obtained from changes in the conductivity of the
send weather parameter data. In this research, a cheap, simple substrate or resistance between changes in these electrodes. The
system can be developed to form a weather station system. The change in the resistance value is measured and processed by the
microcontroller is used to process data from sensors in the form IC which makes it ready to be read by the microcontroller.
of temperature, air pressure, humidity and wind speed data to
be sent wirelessly using 433 Mhz radio frequency with an To measure temperature, this sensor uses an NTC or
thermistor temperature sensor. A thermistor is actually a variable
optimal delivery distance of 150m.
resistor whose resistance changes according to temperature
II. PROPOCED DESIGN OF THE WHEATER STATION changes. This sensor is made from semiconductive materials
such as ceramics or polymers to give a large change in the value
A. Wheather System of resistance from small changes in temperature
The main part of the weather forecast system is shown in E. Wireless Modul ESP8266
Fig 1. this system consists of arudino mega 2560
microcontroller as data processing center, DHT 22 temperature ESP8266 is a WiFi module with high performance that can
stand alone because it has GPIO and can also be connected to a
sensor, rain detection sensor, BMP 180 air pressure sensor,
microcontroller. This WiFi module is a SoC (System on Chip)
DS3231 RTC, 3.5 "touch screen LCD, esp 8266 as information
with an integrated TCP / IP protocol stack that allows the
sending media to IoT platform and SD data storage Card. microcontroller to access WiFi networks with simple
connectivity (SPI / SDIO or I2C interface / UART). This module
is programmed using AT-Command commands if using Serial
communication.
F. Weather Forecast Algorithm
This algorithm uses the words "Modern Altimeter and
Baromator using the MPL115A system" written by John B.
Young. This algorithm uses the barometric sensor measurement
pressure to estimate the weather. This method uses a simple
approach to see an increase or decrease in pressure. In general,
the increase in pressure over time is the tendency to approach
the weather will be bright. While the pressure drop indicates the
weather will rain or cloudy.
Fig. 1. Wheather System Block Diagram
A more complex approach to measuring pressure and seeing
B. Rain Sensor how gradients change over time and stored on a variable in
measurement. This method can take less than 12 hours to see the
This module is used to find out if there is rain. The module pattern of pressure changes. Table 1. shows the changes in
works by measuring the humidity obtained from drops of water pressure and weather conditions predicted. Pressure changes are
collected on the sensor board. The amount of water drops makes measured within one hour. It takes at least 3 hours to conclude
the parallel resistance found on the sensor board have a change how the pressure changes.
in value. If the drops of water collected on the ground increase,
the resistance value which is converted to the voltage form will TABLE I. PRESSURE AND PREDICTED WHEATHER
be lower and if the drops of water collected are small, the voltage
value changes to high. When the sensor board is dry (there is no Analysis Output
water point), this module outputs a 5 volt analog voltage. dP/dt > 0.25 kPa/h Increased pressure
C. Air Pressure Sensor fast, unstable.
0.05 kPa/h < dP/dt < 0.25 kPa/h Increased pressure
BMP180 is a pressure sensor made by Bosch company. The slowly, stable or good
air pressure sensor measures the absolute pressure around the weather
sensor and varies according to weather and altitude (Altitude). -0.05 kPa/h < dP/dt < 0.05 kPa/h Stable weather conditions
Depending on how to use data, the BMP180 can be used to -0.25 kPa/h < dP/dt < -0.05 kPa/h Pressure drop
monitor weather changes, height measurements, or other tasks slowly, light rain / stable
that require accurate pressure readings. dP/dt < -0.25 kPa/h Fast pressure drop,
BMP180 has a sampling rate of up to 128 samples per storm or unstable
second and the design is connected directly to the
microcontroller with I2C communication. The BMP180 G. PCE-THB 40 Modul
consists of a piezo-resistive sensor, an analog to digital PCE-THB 40 is a digital thermometer-hygrometer-
converter and a control unit with E2PROM and I2C interfaces. barometer with data recording functionality. This compact yet
robust data logger detects ambient temperature, relative
D. DHT 22 Air and Humidity Sensor humidity and atmospheric or barometric pressure. Measurement
DHT22 is a digital sensor that is used to measure the values are displayed in real time on the large LCD screen and
temperature and humidity of the surrounding air. DHT22 uses saved to the included SD card. Data can also be transferred via
capacitive humidity sensors and thermistors to measure the an optional USB data cable complete with PC-compatible
Authorized licensed use limited to: Universiti Tun Hussein Onn Malaysia. Downloaded on June 11,2024 at 12:38:44 UTC from IEEE Xplore. Restrictions apply.
software (SOFT-LUT-US) for live visualization. Measurement TABLE III. HUMIDITY TEST RESULT
quota can be freely adjusted, with data captured every 5, 10, 30,
weather station PCE-THB 40 module error
60, 120, 300 or 600 seconds, or automatically when there is an Time
humidity (%) Humidity (%) (%)
alteration of ±1º, ±1% RH or ±1 hPa. 9:30:00 43 44 1
10:00:00 24 24 0
III. RESULT AND DISCUSSION 10:30:00 25 22 3
Testing is done to get the data produced by the tool while 11:00:00 32 31 1
11:30:00 25 26 1
working. This test is done by comparing weather parameters 12:00:00 38 36 2
obtained from weather station with PCE-THB 40 module 12:30:00 32 27 5
measurements and data provided on the BMKG website. The 13:00:00 49 47 2
weather parameters measured are temperature, humidity and air 13:30:00 44 43 1
pressure. 14:00:00 59 58 1
14:30:00 49 46 3
A. Temperature Test Result 15:00:00 57 54 3
15:30:00 59 55 4
The test is carried out by comparing the measurement data 16:00:00 61 58 3
of DHT22 temperature sensor with PCE-THB 40 Module Mean of error (%) 2.14
measurement data every half hour
TABLE II. TEMPERATURE TEST RESULT From the measurement data using the PCE-THB 40 module,
the measurement of air humidity is 22-58%. In the comparison
Weather station PCE-THB 40 error of air humidity measurement using DHT22 sensor and PCE-
Time
Temperature (°C) Temperature (°C) (%)
THB 40 module, the biggest air humidity error is 5% at 12.30
9:30:00 35 36 2.86
10:00:00 45 47 4.44 and the average error is 2.14%, where the accuracy of the
10:30:00 47 48 2.13 DHT22 temperature sensor is ± 5%.
11:00:00 43 42 2.33
11:30:00 43 45 4.65 C. Testing of Air Pressure Sensor
12:00:00 37 39 5.41 The test is done by comparing the data on the measurement
12:30:00 44 44 0.00 results of BMP180 Pressure sensor with 40 PCE-THB Module
13:00:00 34 35 2.94
13:30:00 38 38 0.00 measurement data every half hour. The test result shown in table
14:00:00 32 33 3.13 4.
14:30:00 34 37 8.82
15:00:00 32 34 6.25 TABLE IV. AIR PRESSURE TEST RESULT
15:30:00 32 34 6.25
16:00:00 32 33 3.13 weather station air PCE-THB 40 air error
Mean of error (°C) 3.74 Time
pressure (hPa) pressure (hPa) (%)
9:30:00 975.9 973 0.30
From the measurement results of the DHT22 sensor, the 10:00:00 975.9 972.8 0.32
highest temperature is 47 ° C at 10.30 and the lowest is 32 ° C at 10:30:00 975.6 972.8 0.29
11:00:00 975.5 972.4 0.32
3:00 p.m. In table 1 it is seen that the air temperature data is 11:30:00 974.8 971.7 0.32
fluctuating, where the air temperature increases at 9.30-11.30 12:00:00 974.1 971.3 0.29
and decreases at 12:30-16.00. This can be caused by the duration 12:30:00 973.7 971 0.28
of sun exposure and the difference in the angle of arrival of 13:00:00 973.6 970.4 0.33
sunlight. The smallest angle of the sun comes in the morning and 13:30:00 972.7 969.8 0.30
14:00:00 972.6 969.7 0.30
evening, while the biggest angle is during the day. Data 14:30:00 972.4 969.4 0.31
fluctuations are caused by sunny and cloudy weather conditions. 15:00:00 972.3 969.2 0.32
15:30:00 972.1 969.1 0.31
From the measurement data using PCE-THB 40 module, the 16:00:00 973.8 969.2
temperature values range from 33-48˚C. On the results of 0.47
Mean of error (hPa) 0.32
temperature measurement comparison using DHT22 sensor and
PCE-THB 40 module, the biggest temperature error is 3 ° C at
14.30 and the average error is 1.35˚C, where the accuracy of the From the data, the air pressure moves down gradually from
DHT22 temperature sensor is ± 0.5 ° C. 09:30 to 15:30, then moves up from 15.30-16.00. From the
B. Testing of Air Humidity Sensor results of the BMP180 sensor measurement, the highest air
pressure is 975.9 hPa at 09:30 and the lowest is 972.1 hPa at
The test was carried out by comparing the data of DHT22 15.30, where a rapid decrease in air pressure can indicate
humidity sensor measurement with 40 PCE-THB Module weather changes.
measurement data every half hour. The test result shown in table
3. From the measurement data using the PCE-THB 40 module,
the air pressure measurement was 969.1 - 973 hPa. At the
From the results of testing the DHT22 sensor, the highest air comparison of air pressure measurement using BMP180 sensor
humidity was 61% at 4:00 p.m. and the lowest was 24% at 10:00. and PCE-THB 40 module, the biggest air pressure error is 3.1
From table 3 it can be seen the fluctuating air humidity data, hPa at 12.30 and the average error is 3.08 hPa, where the
where the humidity increases at 11:30 until 16:00 and moves accuracy of the BMP180 pressure sensor is -4.0 and + 2.0 hPa.
down at 09.30-10.30. This is because warm air can hold more
water vapor than cold air, so that the large air humidity is D. Test of data delivery on the IoT platform website
inversely proportional to the air temperature. While fluctuating The test is done by looking at the status of sending data to the
data is caused by cloudy weather conditions. website dweet.io on the data logger. From the results of
Authorized licensed use limited to: Universiti Tun Hussein Onn Malaysia. Downloaded on June 11,2024 at 12:38:44 UTC from IEEE Xplore. Restrictions apply.
observations on the status of the data logger, data transmission
can be done as long as the Wifi ESP8266 module is connected
properly to the microcontroller and connected to the internet
network. The test result shown in Fig 2.
IV. CONCLUSION
From the results of the study it can be concluded that weather
Fig. 2. Dasboard IoT Platform stations have been made using DHT22 temperature and
humidity sensors, BMP180 air pressure, FC37 rain detection,
E. Testing Weather Forecast Algorithms which can connect to the internet and have a data logger. All
The test is done by comparing the data from the weather menu views in the mini weather station are in accordance with
forecast algorithm with weather forecast data available on the the program created. At temperature test using DHT22 sensor
BMKG website, then compared to the actual weather conditions. and PCE-THB 40 module there is difference of measurement
From table 4, there is a decrease in air pressure which indicates that is biggest error 3˚C and mean of error is 1.35˚C. In air
that weather conditions will change. humidity test using DHT22 sensor and PCE-THB 40 module
there is difference of measurement that is biggest error 5% and
Stored data shows the results of the weather forecast are mean of error is 2,14%.
"stable rainy" at 09.30-15.30 and "stable" at 15.42-16.00. Stable
rainy indicates that the area will be light rain. From the data REFERENCES
compared with the BMKG weather forecast results, the results [1] Baste, P and Dighe , D “ Low Cost Wheater Monitoring Station Using
are valid or in accordance with the weather forecast data Raspberry PI”, International Research Journal of Engineering and
obtained. The test result shown in Fig 3. The BMKG data for Technology (IRJET) Vol. 4, Issue 05, May 2017.
yogyakarta wheater prediction shown in Fig 4. [2] Hazain, FA. and Soewito, B, “The Development of Automatic Wheater
Station Data Logger by Microcontroller Netduino”, International Journal
of Software Engineering and its Apllication (IJSEIA), Vol. 8 No. 9, 2014,
pp 159-170.
[3] Iswanto and Muhammad, H.”Wheater Montoring System with Remote
Radio Frequency Wireless Communication”, International Journal of
Embedded System and Application (IJESA), Vol. 2 No. 3 September 2012
[4] Patil, M., Pachpande, S.R., Chaudari, JP., and Rane, K.P., “Study of
Literature on Wheater Monitoring System” International Journal of
Computer Application, Vol. 153, No. 3 November 2016
[5] Soe, L, Lwin, K and Tun, H, Implementation of Microcontroller Based
Sensing Unit in Transmitter for Wireless Weather Station, International
Journal of Science, Engineering and Technology Research (IJSETR),
Volume 3, Issue 6, June 2014.
Authorized licensed use limited to: Universiti Tun Hussein Onn Malaysia. Downloaded on June 11,2024 at 12:38:44 UTC from IEEE Xplore. Restrictions apply.