Development of An Internet of Things Bas
Development of An Internet of Things Bas
Corresponding Author:
Prisma Megantoro
Faculty of Advanced Technology and Multidiscipline, Universitas Airlangga
60115 Surabaya, Indonesia
Email: [email protected]
1. INTRODUCTION
Information about weather conditions is beneficial for any purpose [1]. Starting from disaster
management [2], agriculture [3], [4], traffic management, environmental learning [5], and finding out the
potential for renewable energy in a location. Weather parameters are wind speed and direction, air
temperature and humidity, rainfall, air pressure, and solar radiation. In addition, measuring air quality levels
is also very important, considering the effects of weather and climate change. Information about air quality
that various parties can access can also be used for environmental impact analysis for policymaking in the
environmental sector. In addition, the effect of clean air quality can also suppress the development of the
tourism sector. This is an example of Gili Iyang Island, Sumenep, Indonesia. The island, known as oxygen
island, has the second-highest oxygen level in the world, according to the Indonesian Institute of Aeronautics
and Space.
On the other hand, internet of things (IoT) technology is a new point in the science of long-distance
data transmission, commonly known as telemetry. This technology connects various devices and human
needs in an internet network [6], [7]. This allows everyone to access anything regardless of distance, as long
as it is connected to the internet [8]. internet of things technology is also commonly used for telemetry
purposes, especially for measuring the data of various fields, including weather and air quality data [9], [10].
Like some research that has been done before. Such as the intelligent weather station system based on the IoT
conducted by Huang et al. [11]. Mini weather stations with IoT mobile applications have also been proposed
by Gupta et al. [12]. A study on designing a low-cost weather station using a NodeMCU was conducted by
Singh et al. [13] and Wulandari et al. [14] have developed an IoT-based weather station for farm, also used a
Raspberry Pi board by Savic et al. [15]. There is also research on weather stations used for agricultural
purposes that have been done by Botero-Valencia et al. [16]. The assessment of weather conditions is also
helpful in determining the potential of wind energy in Oman, described in the Al-Yahyai et al. [17].
Nsabagwa et al. [18] also aimed to design three generations of the automatic weather station prototype.
Previously, researchers had also developed a weather station device called AirFeel. AirFeel version 1 can
monitor weather conditions and levels of pollutant gases in the air (there are seven types of gases) [19]. The
device uses the ESP 32 devkit-C microcontroller board as a data collector and simultaneously uploads
datasets to the server.
Unlike previous studies, this AirFeel weather station device version has a different system topology.
The latest system uses two microcontroller boards, one for data acquisition and one for data communication.
The shield board is also separate, whereas the weather shield already has additional sensors. The new system
also has an oxygen sensor, a carbon dioxide sensor, a carbon monoxide sensor, and a solar cell used to
measure solar irradiation levels.
2. METHOD
As a result of previous research, the AirFeel weather station device was developed for version 4. In
the development of version 4, the system topology and the sensors used are very different. This research
consists of three parts, namely the design of field stations, database storage systems, and android-based
mobile applications.
A field station is a device used to retrieve weather and gas parameter data. The data obtained from
the sensors is processed and then sent to the database server. The sensors consist of a weather sensor and
three gas parameters. A 3-cup anemometer is used to measure speed, a wind vane is used to measure wind
direction, and a rain gauge is used to measure rainfall. The weather station sensor shield accesses the sensor
data power signal. Where in the shield is suitable for the Arduino Uno board [20] and an SHT11 sensor to
Development of an internet of things-based weather station device embedded with … (Prisma Megantoro)
1124 ISSN: 2088-8708
measure temperature and humidity, as well as a BMP280 sensor to measure barometric pressure, these data
are collected by the weather shield and then sent to the board microcontroller 1 via serial communication.
The carbon dioxide (CO2) sensor module and carbon monoxide (CO) sensor module have output as an analog
signal, so it is read by the external analog to digital converter (ADC). Also, the solar cell has voltage and
current output measured by a direct current (DC) voltage current sensor i.e. INA219. Then external ADC,
INA219, and the oxygen (O2) sensor module are accessed directly by board microcontroller 1 via inter-
integrated circuit (I2C) communication. On board microcontroller 1, all data obtained from air sensors and
weather shields are processed and combined into one dataset. Then the data set is sent serially to the
microcontroller board 2 and parsed again with the time and date data downloaded from the network time
protocol (NTP) server. The complete dataset consists of sensor data, date, and time, then sent to the real-time
database. Data transmission uses a 4G internet connection from a mobile Wi-Fi router (MiFi). In addition, the
dataset is also saved to the secure digital (SD) Card via serial peripheral interface (SPI) communication.
At the base station, datasets have been stored in real-time in the cloud database. The dataset can be
accessed by mini server computing devices used as data servers from AirFeel devices. In addition, the dataset
can also be accessed with an android-based smartphone with the AirFeel application. Thus, the dataset can be
viewed and monitored in real time via an android application with a good interface design.
Int J Elec & Comp Eng, Vol. 14, No. 1, February 2024: 1122-1134
Int J Elec & Comp Eng ISSN: 2088-8708 1125
3. IMPLEMENTATION
3.1. Field station system
All sensors, microcontrollers, and routers are placed in the field for measurement. As shown in
Figure 3, the testing location is in Universitas Airlangga, Kampus C, Surabaya, Indonesia. The latitude and
longitude coordinates are -7.266260 and 112.785307, respectively.
The aluminum box protects the field station’s components shown in Figure 3(a), which protects the
electronics from heat, rain, and animals (such as insects). Electrical equipment for the mini-PV system in the
form of solar charge controller (SCC) and batteries to supply the electrical energy needed by the customized
weather station system is also placed safely in the panel box. A digital timer is used to reset the weather
station system at a set time, i.e., three times a week.
The anemometer is a vertical windmill with three scoop-shaped grids that can catch the wind, as
shown in Figure 3(b). The vertical turbine type can take in the wind from all directions. A wind vane is used
to measure the direction of the wind. This wind vane is shaped like a rocket and has a wide fin on its back.
This fin allows the wind vane to rotate as the wind flows. The reading of the irradiation level of the sun is
using a mini solar cell.
(a) (b)
Figure 3. Customized weather station field system, (a) controller and gas sensors setup, (b) anemometer,
wind vane, rain gauge, and solar cell sensor probe set up on the field
Unlike previous research, this research uses a different gas concentration reading concept with the
deployment of the O2 measurement on the Gravity DFROBOT oxygen sensor module that is designed based
on an electrochemical principle and can support I2C output, calibrated in air, and can accurately measure
oxygen concentration in the outside air. Moreover, the CO2 reading also uses a sensor module from Gravity
DFROBOT. The sensor has an onboard MG-811 gas sensor, which is highly sensitive to CO2 and less
dependent on humidity and temperature. Also, for reading CO, it uses the DFROBOT sensor module. The
sensor uses MQ7, an easy-to-use CO detector that is reliable for detecting CO concentration in the air within
a precision range from 20 to 2,000 ppm.
Development of an internet of things-based weather station device embedded with … (Prisma Megantoro)
1126 ISSN: 2088-8708
(a) (b)
Figure 4. Workflow diagram of firmware programs; (a) microcontroller board 1 Arduino Uno and
(b) microcontroller board 2 Wemos D1 Mini ESP8266
3.3. Database
Field devices upload data sets every minute. The data is then saved to the real-time database. This
database storage is temporary, not permanent, so the dataset will always be replaced by data later. In the
Android application, data will be updated every 2 minutes. During this period, the application requests data
access data from the real-time database. In the smartphone application, datasets are stored for a limited time.
Datasets for application will be deleted in 24 hours.
Int J Elec & Comp Eng, Vol. 14, No. 1, February 2024: 1122-1134
Int J Elec & Comp Eng ISSN: 2088-8708 1127
A Python-based application is also made to create a more complete database. The program in this
desktop application requests data from the Firebase real-time database every 5 minutes. The dataset that has
been received is then stored on the Raspberry Pi 4B minicomputer memory. The results of receiving the
dataset are stored in a .csv file format. Thus, complete data access can be retrieved from the database on this
Raspberry Pi memory. In addition to the Android applications and mini-computer databases, the dataset is
stored on the SD Card for backing up.
Figure 5. UI real-time display on AirFeel application; (a) main menu, (b) sub-menu for CO monitoring,
(c) sub-menu for wind rose, and (d) sub-menu for field device location
where 𝑉𝑐𝑜2 is CO2 sensor output, 𝐴𝐷𝐶𝑠𝑎𝑚𝑝𝑙𝑖𝑛𝑔 is sampling value from ADC integer, 𝑉𝑟𝑒𝑓 is voltage reference
𝑉 2
for a sensor such as 5 V, and 𝑀𝑎𝑥_𝐴𝐷𝐶 is the maximum value of 15-bit ADC. If, the value of, 𝑐𝑜 ⁄𝐷𝐶
𝑔𝑎𝑖𝑛
Development of an internet of things-based weather station device embedded with … (Prisma Megantoro)
1128 ISSN: 2088-8708
greater or equal to the zero-point voltage (𝑉𝑧𝑒𝑟𝑜_𝑝𝑜𝑖𝑛𝑡 ) such as 0.220 V which define the output of the sensor
in volts when the concentration of CO2 is 400 ppm. Then define the curve as an array as (2):
𝑉𝑟𝑒𝑎𝑐𝑡𝑖𝑜𝑛
𝐶𝑂2𝑐𝑢𝑟𝑣𝑒 = [2.602 𝑉𝑧𝑒𝑟𝑜𝑝𝑜𝑖𝑛𝑡 ( ⁄(2.603 − 3))] (2)
where 𝑉𝑟𝑒𝑎𝑐𝑡𝑖𝑜𝑛 is the voltage drop of the sensor when transferring the sensor from air into 1,000 ppm CO2,
such as 0.030 V. Then the real value of CO2 in percentage will be calculated as (3):
𝑉𝑐𝑜2
⁄𝐷𝐶 𝑉𝑧𝑒𝑟𝑜
𝑔𝑎𝑖𝑛− 𝑝𝑜𝑖𝑛𝑡
( 𝑉 )
( 𝑟𝑒𝑎𝑐𝑡𝑖𝑜𝑛⁄(2.603−3))+2.602
𝐶𝑂2(%) = 10 (3)
where 𝐷𝐶𝑔𝑎𝑖𝑛 is equal to 13.5. Then conversion for the CO sensor by giving (4). External ADC reads the CO
sensor on channel number 0.
𝐴𝐷𝐶𝑟𝑒𝑎𝑑 𝑥 𝑉𝑟𝑒𝑓
𝑉𝑐𝑜 = (4)
𝑀𝑎𝑥_𝐴𝐷𝐶
where 𝑉𝑐𝑜 is the output voltage from the sensor and, 𝐴𝐷𝐶𝑟𝑒𝑎𝑑 is ADC reading on channel number 0.
Int J Elec & Comp Eng, Vol. 14, No. 1, February 2024: 1122-1134
Int J Elec & Comp Eng ISSN: 2088-8708 1129
(a) (b)
Figure 6. Weather data recorded on January 24 hours on January 16th, 2023; (a) wind rose, (b) solar
irradiation level and wind speed
Development of an internet of things-based weather station device embedded with … (Prisma Megantoro)
1130 ISSN: 2088-8708
The chart of O2 gas in the upper subplot shows that O2 concentration on that day is not too
fluctuating. The range of O2 values measured between 21.2% to 22.0%. The O2 value indicates that air
quality in the location is in good condition. The chart of CO2 in the center subplot shows that the CO2 value
measured between 907 to 1,404 ppm. It indicates that the CO2 concentration on that day is too polluted. It
was because the location for testing the system is outside, near the main road inside the campus area. Figure
7 shows the measurement readings for gas concentration. Gases measured are O2, CO2, and CO stored in the
SD Card module for 24 hours on January 6th, 2023.
Then the bottom chart of the CO value is measured between 4 to 7 ppm. The average CO
concentration outside did not affect the body's condition and respiration. The O2 and CO reading is unstable
because the sensor has not had good repeatability when programmed in the Arduino Uno microcontroller board.
Figure 7. The O2, CO2, and CO dataset was recorded 24 hours on January 6th, 2023
Figure 8. Air gas concentration (O2, CO2, and CO) measured in location between January to February 2023
Int J Elec & Comp Eng, Vol. 14, No. 1, February 2024: 1122-1134
Int J Elec & Comp Eng ISSN: 2088-8708 1131
Besides that, the measurement of CO2 (MQ811 sensor) and CO (MQ7 sensor) are somewhat
fluctuating in those days. It can be caused by air pollution, considering the location of this system test is near
the main road, with lots of vehicles passing by, especially on weekdays. Otherwise, the CO2 and CO
concentration decreases during the weekend.
Figure 9 also shows the weather parameters measured by the AirFeel weather station system. The
dataset obtained from SD card storage of the AirFeel version 4 system has done to be analyzed. This system
successfully records all sensor readings every 1 minute.
The weather parameter was recorded in 16 parameters, such as gas concentration and weather
condition. The weather condition reading in Figure 9 shows the system has a consistent measurement system
with coherent accuracy and precision. The data obtained are compared to secondary data from
accuweather.com at the exact date and time, and they are appropriate.
4. CONCLUSION
The design of a weather station system and gas concentration reading was successfully made to
monitor actual weather and air quality condition. The laboratory scale test shows that the measurement of each
gas sensor has coherent accuracy and repeatable measurement results. The test results show changes in the gas
concentration value considered by the standardized measurement device. On the field test, the system also
indicates that all three gas sensors have higher than 85% accuracy, such as +95% for DFR O2 sensor reading,
+88% for DFR MQ811 O2 sensor reading, and +93% for DFR MQ7 CO2 sensor reading. The Airfeel monitor
android-based application is beneficial for monitoring all sensor readings in all field station devices by
requesting data to Firebase database every 2 minutes. With its second version, the mobile application can store
temporary data on users’ smart gadgets and has a location monitor by GPS. An online database server has also
been created using a Raspberry Pi 4 B device with a Python-based database program. This database program
requests data from the same Firebase Database, then stores it in a database array on its read-only memory
(ROM) storage. This AirFeel version 4 weather station system can be activated 24 hours long by electricity
supplied from a mini-PV system. The weather station system and its mobile Wi-Fi router, which has 1.95 Watts
total power consumption, can be satisfied with a 50 Wp solar panel and a 12 V 9 Ah deep cycle battery. So, this
system can be applied reliably in a remote area, for instance, a remote or small island.
ACKNOWLEDGEMENTS
We are grateful to Universitas Airlangga, Indonesia collaborates with Management and Science
University, Malaysia for providing Research Collaboration Program (UNAIR-MSU) in 2023. We also thank
the Faculty of Advanced and Multidisciplinary Technology also Research Center for New and Renewable
Energy, Universitas Airlangga, for supporting this research.
Development of an internet of things-based weather station device embedded with … (Prisma Megantoro)
1132 ISSN: 2088-8708
REFERENCES
[1] A. H. Hendrawan et al., “Monitoring the environmental temperature using Arduino and Telegram,” Journal of Robotics and
Control (JRC), vol. 1, no. 3, pp. 96–101, 2020, doi: 10.18196/jrc.1321.
[2] A. N. N. Chamim, D. C. Hardyanto, and K. T. Putra, “Web-based flood hazard monitoring,” Journal of Robotics and Control
(JRC), vol. 2, no. 5, pp. 373–379, 2021, doi: 10.18196/jrc.25110.
[3] K. Sekaran, M. N. Meqdad, P. Kumar, S. Rajan, and S. Kadry, “Smart agriculture management system using internet of things,”
Telkomnika (Telecommunication Computing Electronics and Control), vol. 18, no. 3, pp. 1275–1284, 2020, doi:
10.12928/TELKOMNIKA.v18i3.14029.
[4] P. Megantoro et al., “Instrumentation system for data acquisition and monitoring of hydroponic farming using ESP32 via Google
Firebase,” Indonesian Journal of Electrical Engineering and Computer Science (IJEECS), vol. 27, no. 1, p. 52, 2022, doi:
10.11591/ijeecs.v27.i1.pp52-61.
[5] J. Kim, D. Minagawa, D. Saito, S. Hoshina, and K. Kanda, “Development of KOSEN weather station and provision of weather
information to farmers,” Sensors, vol. 22, no. 6, 2022, doi: 10.3390/s22062108.
[6] P. Visconti, N. I. Giannoccaro, R. de Fazio, S. Strazzella, and D. Cafagna, “IoT-oriented software platform applied to sensors-
based farming facility with smartphone farmer app,” Bulletin of Electrical Engineering and Informatics (BEEI), vol. 9, no. 3,
pp. 1095–1105, 2020, doi: 10.11591/eei.v9i3.2177.
[7] I. Dunaieva et al., “Review of automatized meteorological stations use for agricultural purposes,” IOP Conference Series: Earth
and Environmental Science, vol. 937, no. 3, 2021, doi: 10.1088/1755-1315/937/3/032097.
[8] A. Hemmati and A. M. Rahmani, “The internet of autonomous things applications: A taxonomy, technologies, and future
directions,” Internet of Things (Netherlands), vol. 20, no. November, p. 100635, 2022, doi: 10.1016/j.iot.2022.100635.
[9] C. Hermanu, H. Maghfiroh, H. P. Santoso, Z. Arifin, and C. Harsito, “Dual mode system of smart home based on internet of
things,” Journal of Robotics and Control (JRC), vol. 3, no. 1, pp. 26–31, 2022, doi: 10.18196/jrc.v3i1.10961.
[10] P. Chougale, V. Yadav, A. Gaikwad, B. Student, and Vidyapeeth, “Firebase -overview and usage,” Journal of Engineering and
Technology Management, no. 12, pp. 2582–5208, 2022.
[11] F. Huang, Z. Guo, and Y. Lyu, “Design of intelligent automatic weather station based on internet of things,” 2021 15th IEEE
International Conference on Electronic Measurement and Instruments, ICEMI 2021, pp. 344–348, 2021, doi:
10.1109/ICEMI52946.2021.9679614.
[12] A. Gupta, A. Tripathi, R. Coutinho, R. Rodrigues, and P. Raut, “Smart sustainable mini weather station,” IEEE Region 10
Humanitarian Technology Conference, R10-HTC, vol. 2021-Septe, pp. 6–10, 2021, doi: 10.1109/R10-HTC53172.2021.9641672.
[13] D. K. Singh, H. Jerath, and P. Raja, “Low cost IoT enabled weather station,” Proceedings of International Conference on
Computation, Automation and Knowledge Management, ICCAKM 2020, pp. 31–37, 2020, doi:
10.1109/ICCAKM46823.2020.9051454.
[14] W. Wulandari, S. Wahjuni, W. M. Nouval, and A. R. Akbar, “Development of automatic weather station monitoring system for
broiler chicken coop,” 2021 IEEE Bombay Section Signature Conference, IBSSC 2021, 2021, doi:
10.1109/IBSSC53889.2021.9673271.
[15] T. Savic and M. Radonjic, “One approach to weather station design based on Raspberry Pi platform,” 2015 23rd
Telecommunications Forum, TELFOR 2015, pp. 623–626, 2016, doi: 10.1109/TELFOR.2015.7377544.
[16] J. S. Botero-Valencia, M. Mejia-Herrera, and J. M. Pearce, “Low cost climate station for smart agriculture applications with
photovoltaic energy and wireless communication,” HardwareX, vol. 11, p. e00296, 2022, doi: 10.1016/j.ohx.2022.e00296.
[17] S. AL-Yahyai, Y. Charabi, A. Gastli, and S. Al-Alawi, “Assessment of wind energy potential locations in Oman using data from
existing weather stations,” Renewable and Sustainable Energy Reviews, vol. 14, no. 5, pp. 1428–1436, 2010, doi:
10.1016/j.rser.2010.01.008.
[18] M. Nsabagwa, M. Byamukama, E. Kondela, and J. S. Otim, “Towards a robust and affordable automatic weather station,”
Development Engineering, vol. 4, no. November 2018, p. 100040, 2019, doi: 10.1016/j.deveng.2018.100040.
[19] P. Megantoro, S. A. Aldhama, G. S. Prihandana, and P. Vigneshwaran, “IoT-based weather station with air quality measurement
using ESP32 for environmental aerial condition study,” Telkomnika (Telecommunication Computing Electronics and Control),
vol. 19, no. 4, pp. 1316–1325, 2021, doi: 10.12928/TELKOMNIKA.v19i4.18990.
[20] A. A. Aldujaili, M. Dauwed, A. Meri, and S. S. Abduljabbar, “Smart internet of things kindergarten garbage observation system
using Arduino Uno,” International Journal of Electrical and Computer Engineering, vol. 12, no. 6, pp. 6820–6828, 2022, doi:
10.11591/ijece.v12i6.pp6820-6828.
[21] P. Megantoro, H. F. A. Kusuma, S. A. Reina, A. Abror, L. J. Awalin, and Y. Afif, “Reliability and performance analysis of a mini
solar home system installed in Indonesian household,” Bulletin of Electrical Engineering and Informatics (BEEI), vol. 11, no. 1,
pp. 20–28, 2022, doi: 10.11591/eei.v11i1.3335.
[22] M. T. Maiza Henanda, H. H. Nuha, and E. Ariyanto, “Utilization of smart greenhouse to increase chrysanthemum growth in the
vegetative phase by monitoring using Firebase,” International Conference on Electrical Engineering, Computer Science and
Informatics (EECSI), vol. 2022-Octob, no. October, pp. 204–209, 2022, doi: 10.23919/EECSI56542.2022.9946632.
[23] H. Kimm and D. Flynn, “Android application for tracking pedestrian movements in realtime with Firebase,” Proceedings - 2022
IEEE Cloud Summit, Cloud Summit 2022, pp. 91–96, 2022, doi: 10.1109/CloudSummit54781.2022.00020.
[24] A. Hussain, A. Ahmed, H. Magsi, J. B. Soomro, S. S. H. Bukhari, and J. S. Ro, “Adaptive data length method for GPS signal
acquisition in weak to strong fading conditions,” Electronics (Switzerland), vol. 10, no. 14, pp. 1–19, 2021, doi:
10.3390/electronics10141735.
[25] Y. Apriani, W. A. Oktaviani, and I. M. Sofian, “Design and implementation of LoRa-based forest fire monitoring system,”
Journal of Robotics and Control (JRC), vol. 3, no. 3, pp. 236–243, 2022, doi: 10.18196/jrc.v3i3.14128.
[26] Y. Irawan, A. Febriani, R. Wahyuni, and Y. Devis, “Water quality measurement and filtering tools using Arduino Uno, PH sensor
and TDS meter sensor,” Journal of Robotics and Control (JRC), vol. 2, no. 5, 2021, doi: 10.18196/jrc.25107.
[27] M. N. A. Mohd Said, S. A. Jumaat, and C. R. A. Jawa, “Dual axis solar tracker with iot monitoring system using Arduino,”
International Journal of Power Electronics and Drive Systems, vol. 11, no. 1, pp. 451–458, 2020, doi:
10.11591/ijpeds.v11.i1.pp451-458.
[28] S. S. Binti Sarnin et al., “Liquefied petroleum gas monitoring and leakage detection system using NodeMCU ESP8266 and Wi-Fi
technology,” Indonesian Journal of Electrical Engineering and Computer Science (IJEECS), vol. 17, no. 1, pp. 166–174, 2019,
doi: 10.11591/ijeecs.v17.i1.pp166-174.
Int J Elec & Comp Eng, Vol. 14, No. 1, February 2024: 1122-1134
Int J Elec & Comp Eng ISSN: 2088-8708 1133
BIOGRAPHIES OF AUTHORS
Arya Dwi Kustiawan was born in Tuban, Indonesia 15 May 2003. After
studies in electrical engineering at Airlangga University in 2021. He is active in the research
of renewable energy, instrumentation, and microcontroller system as a part of
Instrumentation and Energy Research Community (IMERCY). He can be contacted at
email: [email protected].
Development of an internet of things-based weather station device embedded with … (Prisma Megantoro)
1134 ISSN: 2088-8708
Lilik Jamilatul Awalin was born in East Java, Indonesia, in 1977. She received
the Bachelor of Engineering degree in Electrical Engineering in 1999 from the University of
Widya Gama, Master of Engineering. degree in 2004 from the Institut Teknologi Sepuluh
Nopember, Indonesia and Ph.D. degree in 2014 from University of Malaya. She was a
senior lecturer in International College of UKL, Malaysia from 2015 to 2020. Currently, she
is Head of Section in Airlangga University, Indonesia. She can be contacted at email:
[email protected].
Int J Elec & Comp Eng, Vol. 14, No. 1, February 2024: 1122-1134