Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views22 pages

An Iot-Based Aquaculture Monitoring System Using Firebase: Wen-Tsai Sung, Indra Griha Tofik Isa and Sung-Jung Hsiao

The document presents an IoT-based aquaculture monitoring system utilizing Firebase to enhance fish pond management in Indonesia, where fisheries production reached 14.8 million tons in 2022. The system monitors water temperature, pH levels, and turbidity using integrated sensors, providing real-time data accessible via an Android app, with a low error rate and significant cost-effectiveness compared to traditional labor. This innovative approach aims to optimize aquaculture practices and improve fish cultivators' ability to manage pond conditions efficiently.
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)
6 views22 pages

An Iot-Based Aquaculture Monitoring System Using Firebase: Wen-Tsai Sung, Indra Griha Tofik Isa and Sung-Jung Hsiao

The document presents an IoT-based aquaculture monitoring system utilizing Firebase to enhance fish pond management in Indonesia, where fisheries production reached 14.8 million tons in 2022. The system monitors water temperature, pH levels, and turbidity using integrated sensors, providing real-time data accessible via an Android app, with a low error rate and significant cost-effectiveness compared to traditional labor. This innovative approach aims to optimize aquaculture practices and improve fish cultivators' ability to manage pond conditions efficiently.
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/ 22

Tech Science Press

DOI: 10.32604/cmc.2023.041022
Article

An IoT-Based Aquaculture Monitoring System Using Firebase


Wen-Tsai Sung1 , Indra Griha Tofik Isa1,2 and Sung-Jung Hsiao3, *

1
Department of Electrical Engineering, National Chin-Yi University of Technology, Taichung, 411030, Taiwan
2
Department of Informatics Management, Politeknik Negeri Sriwijaya, Palembang, 30139, Indonesia
3
Department of Information Technology, Takming University of Science and Technology, Taipei City, 11451, Taiwan
*Corresponding Author: Sung-Jung Hsiao. Email: [email protected]
Received: 07 April 2023; Accepted: 13 June 2023; Published: 30 August 2023

Abstract: Indonesia is a producer in the fisheries sector, with production


reaching 14.8 million tons in 2022. The production potential of the fisheries
sector can be optimally optimized through aquaculture management. One of
the most important issues in aquaculture management is how to efficiently
control the fish pond water conditions. IoT technology can be applied to
support a fish pond aquaculture monitoring system, especially for catfish
species (Siluriformes), in real-time and remotely. One of the technologies
that can provide this convenience is the IoT. The problem of this study is
how to integrate IoT devices with Firebase’s cloud data system to provide
reliable and precise data, which makes it easy for fish cultivators to monitor
fishpond conditions in real time and remotely. The IoT aquaculture fishpond
monitoring use 3 parameters: (1) water temperature; (2) pH water level; and (3)
turbidity level of pond water. IoT devices use temperature sensors, pH sensors,
and turbidity sensors, which are integrated with a microcontroller and Wi-Fi
module. Data from sensor readings are sent to the Firebase cloud via the Wi-Fi
module so that it can be accessed in real time by end users with an Android-
based mobile app. The findings are (1) the IoT-based aquaculture monitoring
system device has a low error rate in measuring temprature, pH, and turbidity
with a percentage of 1.75%, 1.94% and 9.78%, respectively. Overall, the total
average error of the three components is 4.49%; (2) in cost analysis, IoT-based
has a cost-effectiveness of 94.21% compared to labor costs. An IoT-based
aquaculture monitoring system using Firebase can be effectively used as a
technology for monitoring fish pond conditions in real-time and remotely
for fish cultivators that contribute to providing an IoT-based aquaculture
monitoring system that produces valid data, is precise, is easy to implement,
and is a low-cost system.

Keywords: Internet of Things; aquaculture technology; water monitoring


system; real-time database; aquaculture monitoring system

This work is licensed under a Creative Commons Attribution 4.0 International License,
which permits unrestricted use, distribution, and reproduction in any medium, provided
the original work is properly cited.
2180 CMC, 2023, vol.76, no.2

1 Introduction
Indonesia is an archipelagic country, and one of its economic supports is the fisheries sector.
Statistics Indonesia (BPS) stated that the production of the fisheries sector in Indonesia in 2022
reached 14.8 million tons [1]. This potential could be further increased with good management of
aquaculture, which starts with selecting seeds, monitoring pond water, providing good fish feed, and
the fish harvesting process [2]. The implementation of IoT technology could be an option in assisting
the management of aquaculture, especially in monitoring fish pond water. There are many fish species
in aquaculture of fresh water, including catfish (Siluriformes), which is a commodity in the fisheries
sector that has high economic value. The condition of pond water for catfish is an important issue
because catfish can grow optimally with the conditions of pond water temperature of 25°C∼30°C,
turbidity levels at 0∼50 Nephelometric Turbidity Unit (NTU), and pH levels between 6∼9 [3]. The IoT
control system can be implemented to monitor the condition of fish pond water so that fish cultivators
can find out as early as possible the quality of fish pond water. IoT integrates physical devices such
as sensors and actuators that are connected to the internet to produce data that becomes valuable
information for the users [4]. The process of processing data through the internet network provides
convenience for humans without the need for human-to-human or human-to-computer interaction
[5]. The IoT technology applied in this research is to build catfish pond water monitoring through 3
parameters: (1) pool water temperature; (2) pH pool water level; and (3) turbidity level of pond water.
IoT devices use temperature sensors, pH sensors, and turbidity sensors, which are integrated with a
microcontroller and Wi-Fi module.
In this study, the data from sensor readings are connected to real-time cloud data so that users
can directly access the current conditions of the fishpond. The IoT device, which consists of a pH
sensor, temperature sensor, and turbidity sensor that is integrated with a microcontroller and a Wi-Fi
module, sends sensor data to the cloud continuously. The gateway acts as a connector between the
IoT device and the real-time database so that data transmission occurs [6]. Real-time database hosted
on a cloud-based platform that uses Firebase. The data contained in Firebase is then distributed to
users to be accessible and provide the latest information about fishponds through an Android-based
mobile application. Fig. 1 visualizes the interconnection between IoT devices and Firebase real-time
databases.

Figure 1: IoT device and Firebase workflow

The related work in this study was conducted by Al-Mutairi et al. [7] who developed a smart
monitoring and management system in fish farming. The system uses a set of sensors with real-
time information from a mobile phone that is embedded in the tilapia fishpond. Javvaji et al. [8]
integrate a microcontroller with a set of sensors for monitoring aquaculture by detecting temperature,
dissolved oxygen, and pH sensors. Information from sensor readings is carried out in real time via the
Thingspeak server connected to an Android-based mobile device. While Tamim et al. [9] use the ESP-
12E as a microcontroller connector with a wireless network on an aquaculture system. The system
CMC, 2023, vol.76, no.2 2181

is carried out in real-time using the MIT Inventor app to see the condition of the fishpond, which
consists of the level of oxygen, temperature, and pH. In summary, Table 1 shows the analysis of the
research carried out with the previous study.

Table 1: Comparative analysis with previous studies


Research method Real-time data Data sensor Accuration testing Cost analysis
√ √ √
Al-Mutairi et al. [7] –
√ √
Javvaji et al. [8] – –
√ √ √
Tamim et al. [9] –
√ √ √ √
Proposed system

In this study, we used Firebase cloud system data, which can be accessed directly by fish cultivators,
to monitor real-time conditions of pH level, temperature, and turbidity. The system is built on Android
with a user-friendly interface. This study also measures the accuracy of the sensors implemented and
conducts a cost analysis of the efficiency of using the device. So this study contributes to developing
an aquaculture monitoring system that delivers data that is valid, precise, easy to implement, and
low-cost.

2 Literature Review
2.1 Internet of Things
The development of Internet of Things (IoT) technology has increasingly become an interesting
topic for discussion by researchers and in the industrial world. Fortino et al. [10] define IoT as a concept
that integrates “smart objects” with the internet so that it is possible for them to communicate with one
another. The IoT research field has been widely carried out in various aspects, Niaraki [11] categorizes
it into four categories: infrastructure applications, environmental applications, consumer applications,
and community applications. Meanwhile, the agriculture, plantation, and aquaculture sectors are
included in the industry category, which is part of infrastructure applications. In his paper, Niaraki
describes that IoT research implemented in the industry (agriculture, plantation, and aquaculture) has
experienced a rapid increase since 2019. IoT is part of the industrial revolution 4.0 where researchers
and practitioners collaborate with machine learning, big data and cloud computing, and Artificial
Intelligence/Machine Learning [12]. The IoT domain has expanded, and there is now the term Internet
of Underwater Things, which is a concept that integrates underwater autonomous vehicles (AUVs) and
underwater wireless sensor networks (UWSNs) supported by Internet services. In general, there are
3 main layers in IoUT, i.e., the application and service layer, the networking layer, and the physical
layer [13]. In the healthcare sector, IoT could be implemented in patient monitoring, increasing the
efficiency with real-time data and improving service performance through remote monitoring [14].
IoT can also be implemented in remote health monitoring, which is integrated into a wireless body
area network (WBAN) for monitoring critical patients [15]. The IoT development is combined with
machine learning (ML) as implemented by Bhoi et al. [16] for an environmental monitoring system
with features of carbon dioxide (CO2 ), humidity, temperature, and carbon monoxide (CO). In the
field of agrotechnology, IoT plays a role in monitoring and increasing food production by integrating
various sensors, actuators, and protocols as a tool of communication between the user and the system
[17]. The main focus of IoT research in agrotechnology is on sensors used in IoT, IoT controllers, IoT
communication standards, and IoT-based smart machinery [18]. While in the field of aquaculture,
2182 CMC, 2023, vol.76, no.2

which is also related to this study in IoT, in general, there are two challenges: the first is common
challenges that relate to how IoT devices interact with waters, while the second is specific challenges
that relate to species and accessibility with water aquaculture objects [19]. In this study, IoT is the basic
foundation of a system of communicating with users that has an impact on increasing fish productivity
through an aquaculture monitoring system.

2.2 Aquaculture Monitoring Water System


The production from aquaculture is increasing, so innovation and technology are needed to
support market needs. One of the technological implementations is the IoT in the Aquaculture
Monitoring Water System. Chiu et al. [20] integrate sensor devices and Wi-Fi modules to control water
quality, which is combined with deep learning random forest modeling to predict fish production
potential, with the result being a smart aquaculture monitoring device. The implementation of
temperature and pH sensors in the water monitoring system is carried out to see the actual conditions
that have an impact on fish growth, using an Arduino Mega 2560 and Wi-Fi Module ESP8266
[21]. IoT-based Smart Aquaculture System (ISAS) has been developed by Tsai et al. [22] to control
water quality automatically and replenish water to keep the growth of fish and shrimp stable. ISAS
can provide automatic feeding through fuzzy rules, and the result is a shrimp survival rate that has
increased by 33.3%. An AI buoy system combined with IoT has been developed to measure real-time
data on salinity, water temperature, dissolved oxygen, and velocity in a low-cost and easy-to-build
system [23]. The implementation of IoT in aquaculture provides benefits for fish cultivators to get
environmental conditions in real-time, remotely, and accurately [24]. Hawari et al. [25] developed an
IoT monitoring water system device with a background of climate and weather changes locally in
Malaysia, which have caused a decrease in fish production levels. A communication system built on
cloud portals and mobile devices that provide accurate and real-time information.

2.3 Microcontroller
A microcontroller is a component with a minimalist size that serves as a system controller [26].
Microcontrollers are an integral part of helping humans work; there are 250 billion microcontrollers
in electronic devices that are used daily [27]. Davis innovates the microcontroller as a low-cost dual-
polarity high-voltage controller, which provides a stable high-voltage output in both positive and
negative modes [28]. In the field of aquaculture technological innovation, microcontrollers are widely
used as part of system development [29]. In its development, the microcontroller not only integrates
sensors and actuators but furthermore can be integrated with cloud data and machine learning or deep
learning [30]. Saha et al. [31] describe in their paper a microcontroller that can be integrated with deep
learning to become an intelligent system. Whereas in this study, the role of the microcontroller is to
control data transfer and monitoring from sensor devices to an output that can be accessed by end
users.

3 Proposed System
3.1 System Architecture
The architectural system used in this study is represented in Fig. 2 below, where there are three
main layers: (1) the physical layer, which consists of sensors and microcontroller devices; (2) the
network layer, in the form of a Wi-Fi module that connects the physical layer with internet services;
and (3) the application layer, in the form of a mobile-based application that can be accessed by end
users to monitor the current conditions of the observed environment.
CMC, 2023, vol.76, no.2 2183

Figure 2: System architecture proposed

In Fig. 2 above, several sensors, i.e., a turbidity sensor, a pH sensor, and a temperature sensor, read
the environmental conditions of catfish pond water. The reading data from the sensors is received by
the microcontroller device and then sent to the data cloud via the Wi-Fi module as an accessibility
connection that connects physical layer devices with internet services. Real-time data is uploaded
to the cloud system and then accessed by end users via an Android-based application. End users
can see the current condition of catfish pond water in the form of temperature conditions, level of
turbidity, and level of pH (acidity or alkalinity). In Fig. 3, can be seen in detail the system flow of
the Firebase cloud data as a real-time data storage medium from sensors that can be accessed by
end users. IoT devices via Wi-Fi modules, communicate with cloud systems via the Message Queuing
Telemetry Transport (MQTT) protocol. The MQTT protocol is one of the communication protocols
that are commonly used for the IoT and uses standard ISO subscription publishing-based messages
that work in the Transmission Control Protocol/Internet Protocol (TCP/IP), which does not have a
special address either between the servers or with other connected devices. The MQTT protocol was
specifically designed for machine-to-machine communication [32].
MQTT works as a broker or server that has the function of filtering incoming messages and
distributing them to clients who are interested in receiving them. Each client can be a publisher
(message sender) or subscriber (recipient of messages). In this study, IoT devices work as clients
that publish data from sensors that are received and sent to brokers. The MQTT protocol forwards
real-time data to Firebase via a cloud gateway. Mobile applications for end users are developed
based on Android, which requires the Rest API as a link between cloud Firebase data and end
users. Rest stands for Representational State Transfer and is a type of software architecture. Rest
represents a set of constraints that must be followed when developing applications on the internet.
Application Programming Interface, or API, is a set of standards and protocols that integrate users
with applications so that users can access and use the application software functions. Through the Rest
API, developed applications can have well-organized interfaces and standardized procedures that are
easy to represent. This also facilitates communication between devices and users.
2184 CMC, 2023, vol.76, no.2

Figure 3: System of data cloud Firebase

3.2 Hardware
3.2.1 Arduino UNO R3
Arduino UNO R3 is the latest variant of the Arduino UNO and a microcontroller device based
on the IC ATMega 328. Fig. 4 represented the Arduino UNO that has 14 input and output pins, of
which 6 can be used for pulse width modulation (PWM) output and 6 other pins for analog input.
The 14 digital pins can be used as input or output via the pinMode(), digitalWrite(), and digitalRead()
commands. Arduino is very popular because of its ease of communicating with computers through the
Arduino Integrated Development Environment (IDE). The operating voltage in the pin is 5 volts and
it can work with input voltages between 7 and 12 volts. The DC on each input or output pin is 40 mA,
while the DC for the 3.3 V pin is 50 mA. The Arduino has 32 kB of flash memory on the ATMega328,
of which 2 kB is for SRAM and 1 kB is for EPROM. The reset button on the Arduino can be used to
reset the software running on the connected computer.

3.2.2 ESP 8266


ESP8266 is a microchip device that functions as a Wi-Fi module and can be connected to an
Arduino. It has embedded TCP/IP networking software. Memory capacity on the ESP8266 consists
of 32 kB for instruction RAM, 32 kB for instruction cache RAM, 16 kB for ETS system-data RAM,
and 80 kB for user-data RAM. There are 8 pins in the ESP8266 consisting of Ground (GND), Transmit
data out (TX), which is also GPIO1, General purpose input/output No. 2 (GPIO2), chip power-down
(CH_PD), General purpose input/output No. 0 (GPIO0), reset (RST), receive data in (RX), which is
also GPIO3, and voltage 3.3 V as shown by Fig. 5.

3.2.3 SEN 0189


The turbidity sensor is SEN 0189 and works on the principle of using light to detect suspended
particles in water. SEN 0189 is widely used to measure the quality of water, such as drinking water, tap
water, water in ponds, and river water. SEN 0189 can operate at a voltage of 5 VDC with a maximum
power of 40 mA. The operating temperature range of the SEN 0189 is 5°C∼90°C and it can detect
turbidity in water from 0∼1000 NTU [33]. SEN 0189 has 8 pinouts, as represented by Fig. 6.
CMC, 2023, vol.76, no.2 2185

Figure 4: Arduno UNO R3

Figure 5: ESP 8266

Figure 6: SEN 0189


2186 CMC, 2023, vol.76, no.2

3.2.4 SEN 0161


The type of pH sensor used is SEN 0161 as represented in Fig. 7, which is an analog pH meter.
SEN 0161 has a module power specification of 5 VDC and a pH measuring range of 0∼14 pH. SEN
0161 can operate at a temperature of 0°C∼60°C. The accuracy level of this device is +/− 0.1 pH (in
25°C) and has a response time of less than or equal to 1 min [34]. There are three pins: ground (GND),
VCC, and output (OUT). The use of SEN 0161 is generally used to determine water quality in the field
of aquaculture.

Figure 7: SEN 0161

3.2.5 RTD PT100


The type of sensor used to measure temperature is the RTD PT100. RTD stands for resistance
temperature detector. The RTD PT100 is made of platinum (PT) and can measure temperatures from
0°C to 100°C. RTD PT100 is made of water-resistant material, so it is very safe to use to measure water
temperature. Fig. 8 represents the RTD PT100 sensor which has 3 pins, consisting of VCC, output
(OUT), and ground (GND).

Figure 8: RTD PT100

3.3 Software
3.3.1 Firebase
Firebase is becoming a trend for software developers because of its reliability with “not only
structured query language” or “NoSQL” data structures that can accommodate a variety of data
with high volume characteristics, different sources, and multi-format data processing [35]. The data
presented in Firebase is real-time data with a very fast response time. Developers generally use
CMC, 2023, vol.76, no.2 2187

Firebase for authentication, cloud messaging, application programming interface (API) integration,
and database management [36]. Firebase is widely used by researchers as a data transfer medium
for IoT devices with user systems, such as in production natural parameter monitoring, which uses
Firebase for data processing [37]. Currently, Firebase has 6 main services: (1) Cloud messaging and
notifications; (2) Firebase authentication; (3) Firebase analytics; (4) Firebase real-time database; (5)
Firebase hosting, and (6) Firebase cloud. This study uses the Firebase real-time database service as a
communication tool between IoT devices and end users. Fig. 9 illustrated how Firebase connects the
IoT device to the end user.

Figure 9: IoT Device is connected to end user through Firebase

3.3.2 Android Studio


Android Studio is a software developed by Google as an integrated development environment
(IDE) for Android-based applications. The Android Studio programming language uses Java or Kotlin
for the logic structure and extensive mark-up language (XML) for the user interface display. Android
Studio is widely used by developers and researchers because it is an open-source platform based on
the stability of the Gradle feature used during the build system, the Android Virtual Device (emulator)
to execute run and debug applications, and support with several other software such as Google Cloud
Messaging and Google App Engine. Android Studio has three main modules: the Android App
Module, Library Module, and Google App Engine Module as shown in Fig. 10.

Figure 10: Android studio module

3.4 System Flowchart


Fig. 11 shows a flowchart of a system built with several processes. The first stage begins with
reading the data from the sensor in the fish pond. The data read is the value of temperature, the value
of pH, and the value of turbidity. The microcontroller receives data from the sensor device, and then the
Wi-Fi module connects the data to be stored on Firebase via the MQTT protocol. Next, the MQTT
2188 CMC, 2023, vol.76, no.2

protocol distributes data into Firebase as real-time data that can be accessed directly by end users
through Android-based applications.

Figure 11: System flowchart

4 Experiments
4.1 Data Collection
Data collection was carried out by testing IoT devices in catfish ponds with a time range of
06.00 a.m. to 08.00 p.m. and a break every 2 h. The data that appears on the mobile app is real-time
data from sensor readings accessed via Firebase. The dimensions of the fish pond are 5 m long, 3 m
wide, and 1.5 m deep. Fish pond environmental temperatures range from 25°C to 30°C with occasional
CMC, 2023, vol.76, no.2 2189

light rain. Data collection was carried out in as many as 8 categories of data collection time, as shown
in Table 2 below.

Table 2: Data collection time frame


No. Round data taken Specific time
1 1st round 06.00 a.m.
2 2nd round 08.00 a.m.
3 3rd round 10.00 a.m.
4 4th round Noon
5 5th round 02.00 p.m.
6 6th round 04.00 p.m.
7 7th round 06.00 p.m.
8 8th round 08.00 p.m.

Fig. 12 is a configuration of data collection where the sensor interacts directly with the fish pond.
Turbidity sensors, pH sensors, and temperature sensors are connected directly to the microcontroller
via a connector so that the data can be read by the microcontroller. The microcontroller is connected
to the Wi-Fi module device, and data can be uploaded to Firebase.

Figure 12: Configuration of data collection environment

Fig. 13 is the actual condition of the catfish ponds, where there are several fish ponds. However,
this study only focused on 1 fish pond, the orange line is the data collection area.

4.2 Measurement Tools


To test the accuracy of the data generated by the sensor in an IoT device, a test is needed by
comparing the output data from the sensor with data based on measurements of turbidity, pH,
2190 CMC, 2023, vol.76, no.2

and temperature measuring instruments. This study used a temperature measuring pen to measure
temperature, a portable turbidity meter to measure turbidity, and a digital pH meter to measure the
pH level, as shown in Table 3 below.

Area of Data
Collection

Figure 13: Actual catfish pond environment

Table 3: A measurement tool


No. Description The figure of measurement tool
1 Temperature measuring pen:
Power supply: 1.5 VDC
Temperature range: −50°C–300°C

2 Portable turbidity meter:


Turbidity range: 0–1100 NTU

3 Digital pH meter:
pH range: 0–14 pH

5 Results and Discussions


Sensor measurement results are presented in the mobile app as illustrated in Fig. 14, where there
is a main menu and a menu displaying sensor measurement results of real-time temperature, turbidity
level, and pH level values. Fig. 14a is the main menu display of the water monitoring system app, and
Fig. 14b is the sensor measurement results menu in real-time conditions. In the main menu, there are
two buttons: water control and settings. The water button opens the control menu page, which contains
the results of the real-time condition of fishpond monitoring, which consists of temperature, pH level,
and turbidity level. On the result menu page, apart from displaying the real-time conditions of the
fishpond, there is also a “back” button to return to the main menu.
CMC, 2023, vol.76, no.2 2191

(a) (b)

Figure 14: Mobile application user interface

The implementation of the fishpond real-time condition measurement can be seen in Fig. 15, with
data collection times at 06.00 a.m. and noon. In each figure, there is a change in the condition of the pH
level, temperature, and turbidity; at 06.00 a.m., the pH level was 7.0, the temperature was 25.3°C, and
the turbidity was 19.9. Whereas at noon, the three parameters experienced an increase with values of
7.0, 27.9°C, and 21.1, respectively. Likewise, in Fig. 16, the data was taken at 02.00 p.m. and 06.00 p.m.,
with real-time data at 02.00 p.m. pH level of 7.00, temperature of 27.7°C, and turbidity of 21.1, while
at 06.00 p.m. it decreased with values of 6.8, 25.2°C, and 20.5, respectively. Conditions read by IoT
devices are real-time data with dynamic data conditions. This provides convenience and economic
impact for users, especially fish cultivators. To provide solutions in aquaculture monitoring systems
that are efficient, precise, and remotely accessible.
Real-time data is processed in the system using Firebase cloud data, as represented in Fig. 17. The
results of sensor readings on the fishpond are uploaded to Firebase to become real-time data with
conditions of pH, temperature, and turbidity.
2192 CMC, 2023, vol.76, no.2

06.00 a.m. 12.00 p.m (noon)

Figure 15: Condition results at 06.00 a.m (left side) and noon (right side)

02.00 p.m. 06.00 p.m

Figure 16: Condition results at 02.00 p.m (left side) and 06.00 p.m (right side)
CMC, 2023, vol.76, no.2 2193

Figure 17: Firebase real-time data condition

5.1 Temperature Measurement Results Analysis


Table 4 shows the measurement results of IoT devices and measurement tools, which consist of 8
specific time categories and are measured in Celsius (C). The highest measurement results for both IoT
devices and measurement tools are at noon. When compared between the results of these two devices,
the gap is not too high, while the highest measurement gap is in the time range at 06.00 am, where
there is a 1.1°C difference between the results of measurements using measurement tools (24.2°C) and
the results of IoT device measurements (25.3°C). As for the gap measurements at other specific times
are less than 1°C, and if it is averaged, the gap between IoT devices and measurement tools is 0.4°C.

Table 4: Temperature measurement result


No. Specific time IoT device result Measurement tool The Gap between IoT
(in Celcius) result (in Celcius) device and measurement
tool (in Celcius)
1 06.00 a.m. 25.3 24.2 1.1
2 08.00 a.m. 25.3 25.8 0.5
3 10.00 a.m. 26.2 25.9 0.3
4 Noon 27.9 28.0 0.1
5 02.00 p.m. 27.7 27.6 0.1
6 04.00 p.m. 26.0 26.3 0.3
7 06.00 p.m. 25.5 24.9 0.6
8 08.00 p.m. 25.2 24.7 0.5

Visually, in Fig. 18, it can be seen that the gap between the IoT device (blue line) and the
measurement results (red line) is not that significant. Between 10.00 a.m. and 12.00 p.m., both devices
detected an increase in temperature and a decrease in temperature between 02.00 p.m. to 08.00 p.m.
2194 CMC, 2023, vol.76, no.2

29.0

28.0

27.0

26.0
IoT Device Result
25.0

24.0
Measurement Tool
Result
23.0

22.0

06.00 PM
06.00 AM

08.00 AM

10.00 AM

12.00 PM

02.00 PM

04.00 PM

08.00 PM
Figure 18: Graphic of the temperature measurement result

5.2 pH Measurement Result Analysis


The measurement results of IoT devices and measurement tools for pH levels show a gap less than
or equal to 0.3, as shown in Table 5. The highest gap at noon was 0.3, where IoT devices showed a pH
value of 7.0, and measurement tools showed a pH value of 7.3. The highest accuracy in data collection
was at 04.00 PM and 08.00 PM where both devices show a pH value of 7.0.

Table 5: pH level measurement result


No. Specific time IoT devices result Measurement tool The gap between IoT
(in pH Scale) result (in pH Scale) device and measurement
tool (in pH Scale)
1 06.00 a.m. 7.0 6.8 0.2
2 08.00 a.m. 7.1 7.0 0.1
3 10.00 a.m. 7.1 7.0 0.1
4 Noon 7.0 7.3 0.3
5 02.00 p.m. 7.0 7.2 0.2
6 04.00 p.m. 7.0 7.0 0.0
7 06.00 p.m. 6.8 7.0 0.2
8 08.00 p.m. 7.0 7.0 0.0

Fig. 19 is a graphic of the pH measurement result where at noon there was an increase in the pH
level based on the measurement tool result. This was because at that hour it was time for fish feeding,
so it increased the pH level in the pond. While the measurement results of IoT devices at 12.00 p.m.
and 02.00 p.m. did not change, and had a gap of 0.3 lower than the results of the measurement tool.

5.3 Analysis Turbidity Measurement Result


Turbidity level measurements were carried out using the Nephelometric Turbidity Unit (NTU).
In Table 6, it can be seen that the turbidity measurement results through the IoT device produce
the measurement values below through the measuring instrument. The highest gap between the two
CMC, 2023, vol.76, no.2 2195

devices occurred between 08.00 a.m. and 10.00 a.m. with a value of 2.8 NTU. In aggregate, the average
gap between IoT Devices and Measurement Tools is 2.2 NTU.
7.4

7.3

7.2

7.1

7 IoT Device Result(pH


Scale)
6.9

6.8 Measurement Tool


Result (pH Scale)
6.7

6.6

6.5
06.00 AM

08.00 AM

10.00 AM

12.00 PM

02.00 PM

04.00 PM

06.00 PM

08.00 PM
Figure 19: Graphic of the pH measurement result

Table 6: Turbidity measurement result


No. Specific time IoT device result Measurement tool result The gap between IoT
(in NTU scale) (in NTU scale) device and measurement
tool (in NTU Scale)
1 06.00 a.m. 19.9 22.3 2.4
2 08.00 a.m. 19.6 22.4 2.8
3 10.00 a.m. 20.3 23.1 2.8
4 Noon 21.1 23.4 2.3
5 02.00 p.m. 21.1 23.2 2.1
6 04.00 p.m. 21.2 22.8 1.6
7 06.00 p.m. 20.5 22.4 1.9
8 08.00 p.m. 20.5 22.4 1.9

The graphical visualization is shown in Fig. 20 where the blue line shows the data generated by
the IoT device and the red line shows the data generated by the measurement tool. In both devices
there was an increase in turbidity at 12.00 p.m. and 02.00 p.m, this was because at that time it was the
fish feeding schedule that increased the turbidity level in fish ponds.

5.4 Analysis of Error Percentage


The error percentage calculation is performed by finding the absolute difference between the
expected value (νE) which is the value resulting from the measurement tool result and the actual value
observed (νA) which is the result of IoT devices, Eq. (1) is the percentage error formulation
νA − νE
∂= × 100% (1)
νE
2196 CMC, 2023, vol.76, no.2

24

23

22

21
IoT Device Result
20
Measurement Tool
19
Result
18

17 06.00 AM

08.00 AM

10.00 AM

12.00 PM

04.00 PM

06.00 PM

08.00 PM
02.00 PM
Figure 20: Graphic of the turbidity measurement result

Based on the results of calculating the error percentage which refers to the measurement results of
IoT devices and measurement tools in Tables 3–5, the resulting average error percentage is represented
in Table 7.

Table 7: Error percentage result


No. Specific time Temperature error pH error percentage Turbidity error
percentage percentage
1 06.00 a.m. 4.63% 2.94% 10.76%
2 08.00 a.m. 1.90% 1.43% 12.50%
3 10.00 a.m. 1.04% 1.43% 12.12%
4 Noon 0.50% 4.11% 9.83%
5 02.00 p.m. 0.51% 2.78% 9.05%
6 04.00 p.m. 0.99% 0.00% 7.02%
7 06.00 p.m. 2.41% 2.86% 8.48%
8 08.00 p.m. 2.02% 0.00% 8.48%
Average 1.75% 1.94% 9.78%

Table 7 above results in an average temperature error percentage of 1.75%; this indicates that the
accuracy value of the temperature data generated by the IoT device is 98.25% (which is taken from
100% minus 1.75%). The pH error percentage shows 1.94%, which indicates an accuracy percentage of
98.06%. Meanwhile, the turbidity error percentage shows 9.78% or an accurate value of 90.22%. Of the
three error percentage results above, the overall average error between temperature error percentage,
pH error percentage, and turbidity error results in a percentage of 4.49%. From the percentage error,
the level of accuracy can be measured with the Eq. (2):
A = 100% − ∂ (2)

where A is the percentage of accuracy with a 100% formulation minus ∂. ∂ is the average error
percentage of 4.49%. So the results of formulation produce an accuracy percentage of 95.51%.
CMC, 2023, vol.76, no.2 2197

5.5 Cost Analysis


Cost analysis is carried out by conducting a comparative analysis using a labor-based. The
elements that are calculated in the IoT device consist of (a) the use of electric power in units of watts
and (b) the prediction of maintenance costs in one month. The electricity cost charged is standard in
Indonesia at Indonesian Rupiah (IDR) 1,352 kilowatt-hours (kWh). Based on the conditions of the
IoT device, the maximum consumption of electric power is 20 watts with full-day or 24-h usage. The
consumption of electric power is 20 watts, so it is necessary to convert the unit cost of electricity into
watts per hour (Wh). So the parameters used in the calculation is IDR 1.352 Wh. The formula used
to calculate the daily electricity load is maximum power consumption multiplied by the number of
hours of use, multiplied by the cost of electricity (IDR 1.352 Wh). In this case, 20 watts × 24 h × IDR
1.352 Wh results in a daily cost of IDR 648.96 for device usage. If calculated for a month (30 days),
it generates IDR 19,468.8 for costs charged to IoT devices. However, using an IoT device requires
additional maintenance costs; in this case, the maintenance charge for the device is IDR 50,000 per
month. Meanwhile, for the use of daily labor, the standard cost in Indonesia is IDR 40,000 per day
with a work duration of 1 to 2 h. If calculated for one month (30 days), it will generate a cost of IDR
1,200,000. Table 8 shows a comparison of the monthly costs incurred between the IoT device and the
daily labor-based one.

Table 8: Cost analysis comparison between IoT device and the labor-based
Parameter Daily cost in Monthly cost Maintenance in Total in IDR
IDR (30 days) in IDR IDR
IoT device – 20 Watt 648.96 19,468.8 50,000 69,468.8
– 24 h
– IDR 1.352 Wh
Labor-based Labor cost 40,000 1,200,000 – 1,200,000
IDR 40,000

In Table 8 above, it can be seen that there is a significant difference between aquaculture
monitoring using IoT devices and labor-based, wherein monthly usage for IoT devices, taking into
account maintenance costs, results in a cost of IDR 69,468.8. While labor-based, the total monthly
fee is IDR 1,200,000. In terms of monthly cost effectiveness, IoT device-based aquaculture has a very
high advantage when compared to labor-based. This can be calculated by the difference between labor-
based and IoT devices which results in IDR 1,130,531. This means that the effective cost of IDR
69,468.8 (IoT device) is IDR 1,130,531 (labor-based), which is less than IDR 1,200,000. In terms of
percentage, the effective value formula is divided by the original value (labor-based = IDR 1,200,000)
and multiplied by 100% to produce 94.21%. So, the effective cost of IoT devices is 94.21% when
compared to labor-based costs.

6 Conclusions
The application of IoT technology in the aquaculture area can make it beneficial for fish
cultivators to monitor real-time conditions where several fish species are highly dependent on water
conditions, including catfish (Siluriformes). This research has implemented an IoT device to monitor
the condition of fish ponds with three parameters: temperature, pH level, and turbidity level. The
technology is integrated with Firebase cloud data, which can be accessed directly in real-time via
2198 CMC, 2023, vol.76, no.2

Android-based mobile apps for end users. From the results of IoT-based aquaculture monitoring
system testing compared to measurement tools, through data collection that is divided into 8-time
categories, it produces an average error for the temperature of 1.75%, the average error for pH level
of 1.94%, and an average error for turbidity level of 9.78%. Overall the total average error of the
three components is 4.49%, and at this level, the accuracy can be calculated as 100% minus 4.49%,
resulting in an accuracy level of 95.51%. Meanwhile in cost analysis, where a comparative analysis
was carried out between IoT device-based and labor-based aquaculture monitoring, the percentage
of IoT device cost-effectiveness was 94.21% compared to labor-based. This shows that IoT devices
are a low-cost technology to be implemented in an aquaculture monitoring system. So that this IoT-
based aquaculture monitoring system can be effectively used as a technology in monitoring fish pond
conditions in real-time and remotely for fish cultivators that contribute to providing an IoT-based
aquaculture monitoring system that produces data that is valid, precise, easy to implement, and low-
cost. As a further development, the integration of aquaculture can be carried out with several physical
sensors that can observe fish activities, such as hungry fish conditions, as well as water conditions
with other parameters such as dissolved oxygen (DO) or water conductivity sensors. In addition,
this study can be combined with machine learning to produce not only real-time conditions but also
recommendations for fish pond conditions, whether normal or not, whether fish are hungry or not, as
well as other possible parameters that can be processed to provide decision recommendations.

Acknowledgement: This research was supported by the Department of Electrical Engineering at the
National Chin-Yi University of Technology. The authors would like to thank the National Chin-Yi
University of Technology, Takming University of Science and Technology, Taiwan, for supporting this
research.

Funding Statement: The authors received no specific funding for this study.

Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding the
present study.

References
[1] BPS Statistics Indonesia, Statistical Yearbook of Indonesia 2022. Jakarta, Indonesia: BPS-Statistics
Indonesia, 2022. [Online]. Available: https://www.bps.go.id/publication/2020/04/29/e9011b3155d45d70823
c141f/statistik-indonesia-2020.html
[2] S. Jaiswal, K. D. Rasal, T. Chandra, R. Praba, M. A. Iquebal et al., “Proteomics in fish health and
aquaculture productivity management: Status and future perspectives,” Aquaculture, vol. 566, no. 739159,
pp. 1–22, 2023.
[3] H. Kartikaningsih, Y. Yahya, D. Setijawati and H. I. Fathoni, “The behavior of catfish traders on the food
safety perspective in Malang markets, Indonesia,” Biodiversitas, vol. 23, no. 5, pp. 2270–2275, 2022.
[4] Q. F. Hasan, “Internet of Things concept,” in Internet of Things A—Z: Technologies and Application,
1st ed. New Jersey, USA: John Wiley & Sons, pp. 7, 2018.
[5] W. T. Sung and F. N. Fadillah, “Water quality monitoring using physiochemical sensors,” in Proc. Int. Symp.
on Computer, Consumer and Control (IS3C), Taichung, Taiwan, pp. 440–443, 2020.
[6] G. J. R. Kumar and K. Zaki, “IoT based system for monitoring and control of industrial process using real-
time firebase database,” in Proc. 3rd Int. Conf. in Cimputational and Experimental Method in Mechanical
Engineering, Greater Noida, India, pp. 020110-1–020110-6, 2021.
[7] A. W. Al-Mutairi and K. M. Al-Aubidy, “IoT-based smart monitoring and management system for fish
farming,” Bulletin of Electrical Engineering and Informatics, vol. 12, no. 3, pp. 1435–1446, 2023.
CMC, 2023, vol.76, no.2 2199

[8] K. S. S. Javvaji and Md. A. Hussain, “Prototype of aquaculture using IoT technologies,” in Proc. 11th Int.
Conf. on Computing and Networking Technology (ICCNT), Kharagpur, India, pp. 1–4, 2020.
[9] A. T. Tamim, H. Begum, S. A. Shachcho, M. M. Khan, B. Yeboah-Akowuah et al., “Development of IoT
based fish monitoring system for aquaculture,” Intelligent Automation & Soft Computing, vol. 32, no. 1, pp.
55–71, 2022.
[10] G. Fortino and P. Trunfio, Internet of Things Based on Smart Objects: Technology, Middle-
ware, and Applications. Switzerland: Springer, 2014. [Online]. Available: https://link.springer.com/
book/10.1007/978-3-319-00491-4
[11] A. S. Niaraki, “Internet of Thing (IoT) review of review: Bibliometric overview since its foundation,” Future
Generation Computer System, vol. 143, no. 5, pp. 361–377, 2023.
[12] Z. Jan, F. Ahamed, W. Mayer, N. Patel and G. Grossman, “Artificial intelligence for industry 4.0: Systematic
review of applications, challenges, and opportunities,” Expert System With Application, vol. 216, no.
119456, pp. 1–21, 2023.
[13] E. S. Ali, R. A. Saeed, I. K. Eltahir and O. O. Khalifa, “A systematic review on energy efficiency in the
Internet of Underwater Things (IoUT): Recent approaches and research gaps,” Journal of Network and
Computer Applications, vol. 213, no. 103594, pp. 1–22, 2023.
[14] A. Rejeb, K. Rejeb, H. Treiblmaier, A. Appolloni, S. Alghamdi et al., “The Internet of Things (IoT) in
healthcare: Taking stock and moving forward,” Internet of Things, vol. 22, no. 100721, pp. 1–23, 2023.
[15] F. Aadil, B. Mehmood, N. Ul Hasan, S. Lim, S. Ejaz et al., “Remote health monitoring using IoT-based
smart wireless body area network,” Computers, Materials & Continua, vol. 68, no. 2, pp. 2499–2513, 2021.
[16] S. K. Bhoi, S. K. Panda, K. K. Jena, K. S. Sahoo, N. Z. Jhanjhi et al., “IoT-EMS: An Internet of Things
based environment monitoring system in volunteer computing environment,” Intelligent Automation & Soft
Computing, vol. 32, no. 3, pp. 1493–1507, 2022.
[17] A. N. Fajar, R. Jayadi, J. Halim and B. Robertson, “Mobile application for agrotechnology systems using
Internet of Things (IoT),” Journal of System and Management Science, vol. 12, no. 3, pp. 104–116, 2022.
[18] V. R. Pathmudi, N. Khatri, S. Kumar, A. S. H. Abdul-Qawy and A. K. Vyas, “A systematic review of IoT
technologies and their constituents for smart and sustainable agriculture applications,” Scientific African,
vol. 19, no. e01577, pp. 1–14, 2023.
[19] H. Rastegari, F. Nadi, S. S. Lam, M. Ikhwanuddin, N. A. Kasan et al., “Internet of Things in aquaculture:
A review of the challenges and potential solutions based on current and future trends,” Smart Agriculture
Technology, vol. 4, no. 100187, pp. 1–11, 2023.
[20] M. C. Chiu, W. M. Yan, S. A. Bhat and N. F. Huang, “Development of smart aquaculture farm management
system using IoT and AI-based surrogate models,” Journal of Agriculture and Food Research, vol. 9, no.
100357, pp. 1–11, 2022.
[21] L. P. Rahayu, B. A. Kindhi, C. D. Pradika, F. I. Adhim, C. W. Priananda et al., “Design of pH control system
and water recirculation in aquaponic cultivation using mamdani fuzzy logic control,” in Proc. ICAMIMIA,
Surabaya, Indonesia, pp. 287–292, 2021.
[22] K. L. Tsai, L. W. Chen, L. J. Yang, H. Shiu and H. W. Chen, “IoT based smart aquaculture system with
automatic aerating and water quality monitoring,” Journal of Internet Technology, vol. 23, no. 1, pp. 177–
184, 2022.
[23] H. Y. Lu, C. Y. Cheng, S. C. Cheng, Y. H. Cheng, W. C. Lo et al., “A low-cost AI buoy system for monitoring
water quality at offshore aquaculture cages,” Sensors, vol. 22, no. 4078, pp. 1–15, 2022.
[24] L. B. Chen, Y. H. Liu, X. R. Huang, W. H. Chen and W. C. Wang, “Design and implementation of a smart
seawater aquarium system based on Artificial Intelligence of Things technology,” IEEE Sensors Journal,
vol. 22, no. 20, pp. 19908–19918, 2022.
[25] H. F. Hawari and M. A. Hazwan, “Development of Iot monitoring system for aquaculture application,”
in Proc. GEOCOST, Sarawak, Malaysia, pp. 330–334, 2022.
[26] S. R. Rizvi, “Using CMOS integrated-circuit,” in Microcontroller Programming—An Introduction, 1st ed.
Boca Raton, US: CRC Press Taylor & Francis Group, pp. 204–207, 2012.
2200 CMC, 2023, vol.76, no.2

[27] R. Immonen and T. Hämäläinen, “Tiny machine learning for resource-constrained microcontrollers,”
Journal of Sensors, vol. 2022, no. 7437023, pp. 1–11, 2022.
[28] E. J. Davis and B. H. Clowers, “Low-cost arduino controlled dual-polarity high voltage power supply,”
HardwareX , vol. 13, no. e00382, pp. 1–14, 2023.
[29] A. Kamboj, P. Garg, D. Bansal, A. Sankar and M. Bukya, “Development of android app-based portable
water quality testing device using arduino,” in Proc. ICRITO, Noida, India, pp. 1–4, 2021.
[30] N. Elbeheiry and R. S. Balog, “Technologies driving the shift to smart farming: A review,” IEEE Sensor
Journal, vol. 23, no. 3, pp. 1752–1769, 2022.
[31] S. S. Saha, S. S. Sandha and M. Srivastava, “Machine learning for microcontroller-class hardware: A
review,” IEEE Sensor Journal, vol. 22, no. 22, pp. 21362–21390, 2022.
[32] T. K. Boppana and P. Bagade, “GAN-AE: An unsupervised intrusion detection system for MQTT
networks,” Engineering Applications of Artificial Intelligence, vol. 119, no. 105805, pp. 1–12, 2023.
[33] W. L. Hakim, L. Hasanah, B. Mulyanti and A. Aminudin, “Characterization of turbidity water sensor
SEN0189 on the changes of total suspended solids in the water,” Journal of Physics: Conference Series, vol.
1280, no. 2, pp. 1–8, 2019.
[34] R. Seetharaman, N. Nivetha, S. V. Dakshin, K. Anandan and R. R. Sreeja, “Arduino based system for
domestic waste water management using pH sensor,” in Proc. I-SMAC, Dharan, Nepal, pp. 352–355, 2022.
[35] A. B. Semma, M. Ali, M. Saerozi, M. Mansur and K. Kusrini, “Cloud computing: Google firebase firestore
optimization analysis,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 29, no. 3,
pp. 1719–1728, 2023.
[36] M. S. Aman Khan, A. R. Farabi and A. Iqbal, “What do firebase developers discuss about? An empirical
study on stack overflow posts,” in Proc. NSysS, Cox’s Bazar, Bangladesh, pp. 65–74, 2022.
[37] U. Ramani, R. Binisha, P. Rajasekaran, M. Vignesh, P. Malini et al., “Enhancement of embedded controller
firebase database labview interactive IoT based production natural parameters monitoring,” in Proc.
ICAISS, Trichy, India, pp. 1192–1197, 2023.

You might also like