You are on page 1of 7

RESEARCH ARTICLE

Copyright © 2018 American Scientific Publishers Advanced Science Letters


All rights reserved
Printed in the United States of America
Vol. 24, 9509–9515, 2018

Mini Automatic Weather Station Development for


Android Based Weather Parameters Monitoring
Anwar Budianto1 ∗ , Yoiko Rashaki1 , and Ginaldi Ari Nugroho2
1
Polytechnic Institute of Nuclear Technology—National Nuclear Energy Agency (STTN-BATAN),
Jl. Babarsari, POB 6101 YKBB, 55281, Yogyakarta, Indonesia
2
Center for Atmospheric Science and Technology—National Institute for Aeronautics and Space (PSTA–LAPAN),
Jl. Dr. Junjunan no. 133, Bandung, 40173, Indonesia

Weather information is very useful for humans because the information can be used for various purposes of
their activities. One technology that can support these interests is with the Automatic Weather Station which is a
device designed for automatic data collection of weather and processed for easier observation. In this research,
a mini Automatic Weather Station will be developed using weather shield module as a sensor integrated with
microcontroller and Wifi module as data transmission medium to server. The results of this research show the
values of weather parameters on Android such as humidity (R 2 = 098), temperature (R 2 = 098), air pressure
(R 2 = 089), wind speed (R 2 = 0.56), and wind direction (R 2 = 083) are similar compared with other AWS
standard products owned by Davis.

Keywords: Weather,IP: 64.233.173.164


Automatic On: Android.
Weather Station, Thu, 27 Dec 2018 03:20:48
Copyright: American Scientific Publishers
Delivered by Ingenta

1. INTRODUCTION Utilization of microcontroller and some sensors can serve as


Weather is a state of air in a relatively narrow area in a relatively data acquisition tool by adding some supporting tools such as
short time. The elements that cause the formation of the weather data storage and communication tools then formed an automatic
are sunlight, air humidity, air pressure, temperature, wind speed, weather observation system or often called Automatic Weather
rainfall, and cloud.1 Observing the weather element is indispens- Station (AWS), having a portable size and low power consump-
able for the welfare of mankind. The observed weather element tion. AWS has long been developed in several countries, but the
will be the material for forecasting the weather in the future.2 price is still quite expensive, so it is still very limited to use
Continuous observation of weather elements is essential, for in Indonesia.5 The AWS is a device consisting of multiple inte-
instantaneous weather conditions, current and past weather obser- grated sensors used to measure weather parameters such as air
vation data can be used to predict future weather conditions, humidity, temperature, air pressure, light intensity, wind speed
which are necessary to support human activities. Observation of and wind direction, and automatic rainfall recorded.6
weather element in the form of temperature, air pressure, air Along with the development of an increasingly sophisticated
humidity, wind direction and speed, solar energy, and the amount era, and has been introduced a technology called Android, which
of rainfall to date is still mostly done manually where the results is the operating system on smartphones based on Java and XML.
are influenced by human error. Using automatic system, it will Android has better multitasking capabilities, as well as increas-
avoid errors caused by human.3 ingly affordable smartphone prices, and cause almost anyone do
An experience effort of installing an automatic weather sta- not get away again with the use of smartphones such as for com-
tion (AWS) over an Italian glacier had been done by gathering munication, social media, browsing, and others.7
sensor data in near real-time, and of controlling and program- The data transmission process is recommended to use a radio
ming the station remotely. Design choices, energy constraints and antenna that has a large gain for reduce the delay in receiving
power-aware programming of the station determined by harsh data. The data should be displayed not only on a computer system
environment were also discussed. The upgraded AWS provides operator alone but can be displayed on a webpage or a smart-
low-power connectivity from a remote location and was able to phone application in real-time, so that the results of system data
serve as a base station for a wireless sensor network working in can be monitored by the wider applications.8
the glacier.4 Center for Atmospheric Science and Technology (PSTA)
National Institute for Aeronautics and Space (LAPAN) at Ban-

Author to whom correspondence should be addressed. dung city has an automatic weather station (AWS) used to

Adv. Sci. Lett. Vol. 24, No. 12, 2018 1936-6612/2018/24/9509/007 doi:10.1166/asl.2018.13062 9509
RESEARCH ARTICLE Adv. Sci. Lett. 24, 9509–9515, 2018

Fig. 1. How MQTT work.

monitor weather parameters called mini AWS. By utilizing tech- On the D3 pin of Sparkfun is successively connected to D7 pin
nological developments and realizing the principle of energy sav- of WeMos, where D3 pin serves to enumerate wind speed param-
ing by minimizing the use of electricity, a mini AWS will be eters. Pin A0 serves to enumerate wind direction parameters.
developed using solar cell as its power supply, which later results But before being connected with WeMos, the A0 pin on Spark-
from measurement of weather parameters can be monitored and fun should be given a voltage divider circuit first. This is because
displayed on Android-based smartphone. the output voltage of the Sparkfun A0 pin is 5 V, while the
Components of the mini AWS consist of WeMos D1R2, working voltage of WeMos is 3.3 V. The power supply of this
weather shield modules that include temperature and humid- mini AWS comes from solar panels. Power captured from the
ity sensors as well as air pressure sensors, wind speed sensors, sun by solar panels will be connected to the Solar Charge Con-
IP: 64.233.173.164 On: Thu, 27 Dec 2018 03:20:48
wind direction sensors, solar cells, batteries and solar charge troller. This device will control the current charged to the battery
Copyright: American Scientific Publishers
controllers. Delivered bytoIngenta
avoid overcharging, i.e., when the voltage from the battery is
The MQTT protocol is a protocol that runs over the TCP/IP fully charged then the Solar Charge Controller will stop charging.
stack and which has a small data packet size with a low overhead
(minimum 2 bytes) resulting in a fairly small power consumption 2.2. Software Design
effect. This protocol is a type of agnostic data protocol, which The design of the software is divided into 2 (two) namely the
can transmit any data such as binary, text, even XML or JSON design of data processing and data viewer. For the workflow of
data and this protocol uses the subscribe model.7 The workings the data processing can be seen in Figure 3.
of MQTT are shown in Figure 1. Figure 3 shows the weather parameter detected by the sensor,
Android is an operating system developed for linux-based then the data is sent and processed by the data processor. For
mobile devices. Initially, the operating system was developed by programming from data processing system using Arduino IDE
Android Inc., which was then purchased by Google in 2005. software.
Android is a mobile Operating System (OS) that grows in the
middle of other OS that is growing today. Other OSs such as
Windows Mobile, i-Phone, Symbian, and many more also offer a
wealth of content and optimization running on existing hardware
devices.9

2. EXPERIMENTAL DETAILS
The tools used are divided into hardware and software. The hard-
ware used is Laptop and Android smartphone. The software used
are Arduino IDE, Android studio, and MQTT client. The mate-
rials used are components of mini AWS.

2.1. Hardware Design


In Figure 2 it can be seen that any pins of WeMos D1R2 are
connected to Sparkfun Weather Shield, RTC, as well as resources
from solar panels. For pin I/O sensors use SDA and SCL to
enumerate humidity, temperature, and air pressure parameters. Fig. 2. Schematic hardware Mini AWS.

9510
Adv. Sci. Lett. 24, 9509–9515, 2018 RESEARCH ARTICLE

Fig. 5. Testing of AWS Mini device.

2.3. System Testing


The mini AWS system testing is divided into 2 (two) kinds
namely the data processing device testing as well as the data
viewer application one.
Fig. 3. Flowchart of data processing software.
The aim of data processing device testing is to know the sen-
sors performance in the device which will be the value of 5
The design of the next software is designing the data viewer weather parameters such as humidity, temperature, air pressure,
which the workflow will be shown by Figure 4. After data is wind speed and wind direction and then will be compared with
processed by data processor, then data will be sent to MQTT AWS Davis device. This test is conducted for 25 hours at Ban-
server that is MQTT Client. The MQTT Client application can dung, starting the afternoon of July 6th, 2017 at 15:25 pm until
be easily downloaded and installed on smartphone via Google July 7th, 2017 at 17.00 pm.
Play Store. Figure 5 shows the mini AWS devices as well as AWS Davis
IP: 64.233.173.164 On: Thu,being tested.
27 Dec For testing
2018 03:20:48in the data viewer application is done
by testing the application
Copyright: American Scientific Publishers on Android smartphones with dif-
Delivered byferent
IngentaOS to ensure the application can run smoothly on the
smartphone.

Fig. 4. The workflow of the data viewer software. Fig. 6. Results of AWS Mini device design.

9511
RESEARCH ARTICLE Adv. Sci. Lett. 24, 9509–9515, 2018

Fig. 7. Comparison of humidity value between Mini AWS with AWS Davis.
Fig. 9. Comparison of air pressure values between AWS Mini with AWS
Davis.
3. RESULTS AND DISCUSSION viewer app. The test results are used as a basis for discussion to
Development of mini AWS for monitoring the Android weather-
IP: 64.233.173.164 On: Thu,ensure
27 Dec 2018 03:20:48
the results already obtained by comparing with the Davis
based parameters is done through several stages. After designing
Copyright: American Scientific Publishers
AWS standard performance. The mini AWS device constructed
of its systems and tools, then been tested the processingDelivered
data and byisIngenta
shown in Figure 6.

Fig. 8. Comparison of temperature values between Mini AWS with AWS Fig. 10. Comparison of wind speed values between AWS Mini with AWS
Davis. Davis.

9512
Adv. Sci. Lett. 24, 9509–9515, 2018 RESEARCH ARTICLE

3.1. Test Results of Data Processing Device


In testing the data processing device is done by comparing the
test result values of each parameter from mini AWS device with
AWS Davis standard device. The parameters that are compared
include humidity, temperature, air pressure, winds speed and
wind direction. The test was done by sampling time of AWS Mini
device measurement per 1 minute while AWS Davis device per
10 minutes. However, we had 14.3% data of mini AWS devices
that does not fit into the MQTT Client server, i.e., the 14.3% of
220 data is not logged into the server of the 1542 data. This is
due to the mini AWS device uses the data communication sys-
tem to the server via wifi Smartfren Andromax M3Z where the
network provider is less stable at certain hours. In addition, the
MQTT Client server is installed on a smartphone where the inter-
net network is also less stable. MQTT Client server itself in this
research in addition to data communication to the data viewer,
also serves as a database of Mini AWS system to store the values
of each parameter.
The results of comparison testing of humidity parameters
between mini AWS with AWS Davis will be shown in Figure 7,
having a correlation factor (R2  of 0.98. The result of comparison
testing temperature parameters between Mini AWS with AWS
Davis will be shown in Figure 8 having a correlation of 0.98. The
result of comparison testing of air pressure parameters between
Fig. 11. Comparison of wind direction value between Mini AWS with AWS Mini AWS with AWS Davis will be shown in Figure 9 a corre-
Davis. lation of 0.89. The results of comparison testing of wind speed

IP: 64.233.173.164 On: Thu, 27 Dec 2018 03:20:48


Copyright: American Scientific Publishers
Delivered by Ingenta

Fig. 12. Result display main menu android app.

9513
RESEARCH ARTICLE Adv. Sci. Lett. 24, 9509–9515, 2018

IP: 64.233.173.164 On: Thu, 27 Dec 2018 03:20:48


Copyright: American Scientific Publishers
Delivered by Ingenta
Fig. 13. Testing applications on some android version.

parameters between Mini AWS with AWS Davis will be shown speed and wind direction, and the amount of rainfall is equipped
in Figure 10 having of 0.56. This is due to the difference height with graph data and date and time. The test results from the main
placement of each wind sensors between the mini AWS with view of the application can be seen in Figure 12.
AWS Davis ones. The graph of the result of comparison test- Testing the weather parameter data viewer on the next Android
ing of wind direction parameter values between Mini AWS with app is done by testing the mini AWS application on the smart-
AWS Davis will be shown in Figure 11 having a correlation of phone by ensuring whether. The weather parameter data can be
0.83. The wind direction value is measured by 0 in the north received by the app by running the smartphone on several differ-
direction. ent Android versions as shown in Figure 13 and Table I.
Based on Figure 13 and Table I it can be seen that the appli-
3.2. Test Results of Data Viewer App cation works well and all features work properly.
Data viewer system in this research is mini AWS application on
Android smartphone. This application is used to monitor weather
4. CONCLUSION
parameter data sent by data processing device. In this application
A mini AWS has been successfully developed for Android-based
only use one main menu display and optional menu. In the main
monitoring for several weather parameters. The measurements
menu view there are 6 (six) Activity Tabs to represent each mea-
results have been similarly compared with the standard Davis
sured parameter such as humidity, temperature, air pressure, wind
AWS having each correlation factors (R2  for air humidity of
0.98, temperature of 0.98, air pressure of 0.89, and wind direction
Table I. Testing applications on multiple android versions. of 0.83. Meanwhile the wind speed, R2 is achieved of 0.56 due
to the difference height placement of each wind sensors between
Smartphone Version Results
the mini AWS with Davis AWS ones.
Samsung Galaxy S4 Mini 4.3 (Jellybean) Good running
Samsung Grand 2 4.4.2 (Kitkat) Good running Acknowledgments: The authors thank to the Center for
Oppo F1S 5.1 (Lollipop) Good running
Atmospheric Science and Technology of the National Institute
Smartfren Andromax A 5.1.1 (Lollipop) Good running
Xiaomi Redmi 4 6.1 (Marshmallow) Good running for Aeronautics and Space (PSTA-LAPAN) Bandung who sup-
ported the facilities for our research activities.

9514
Adv. Sci. Lett. 24, 9509–9515, 2018 RESEARCH ARTICLE

References and Notes 6. F. Fatahillah, Design of Android based CO2 Monitoring System for Troposfer
1. Royen, http://www.eventzero.org/pengertian-cuaca-dan-iklim-serta-unsur/ (2016). Surface, Final Report, STTN-BATAN Yogyakarta (2016).
2. M. S. Machfud, M. Sanjaya, and G. Ari, ALHAZEN Journal of Physics 2 (2016). 7. A. Budianto, H. Zulkarnaen, and G. A. Nugroho, Proc. of the Internat.
3. K. L. Toruan, Design of Mikrocontroler Based Automatic Weather Station (AWS) Symp. on 15th Anniv. of Equatorial Armosphere Radar (EAR), The Indone-
(in Indonesian), Thesis, Univ. of Indonesia, Depok (2009). sian National Institute of Aeronautic and Space (LAPAN), Jakarta (2016),
4. S. Abbatea, M. Avvenutia, L. Carturan, and D. Cesarinia, Procedia Computer pp. 173–188.
Science 19, 1190 (2013). 8. N. Sora, http://www.pengertianku.net/2015/01/pengertian-cuaca-dan-unsurnya-
5. G. S. Anggara, D. Aguzfino, F. Zubaidah, Y. Rashaki, and Y. Prabowo, Design of secara-leng-kap.html (2015).
Arduino and Matlab Based Mini Automatic Weather Station (AWS) (in Indone- 9. S. Hermawan, Easily Creating Android Apps, (in Indonesian), Andi Publisher,
sian), LAPAN Report (2016). Yogyakarta (2011).

Received: 13 September 2017. Accepted: 23 September 2017.

IP: 64.233.173.164 On: Thu, 27 Dec 2018 03:20:48


Copyright: American Scientific Publishers
Delivered by Ingenta

9515

You might also like