See discussions, stats, and author profiles for this publication at: [Link]
net/publication/379544428
Development of an IoT Based Water Quality Monitoring Device for Domestic
Fish Ponds
Article in ABUAD Journal of Engineering Research and Development (AJERD) · April 2024
DOI: 10.53982/ajerd.2024.0701.08-j
CITATIONS READS
0 178
3 authors, including:
Abayomi Babalola
Federal Polytechnic Ile-Oluji Nigeria
27 PUBLICATIONS 15 CITATIONS
SEE PROFILE
All content following this page was uploaded by Abayomi Babalola on 04 April 2024.
The user has requested enhancement of the downloaded file.
ABUAD Journal of Engineering Research and Development (AJERD)
ISSN (online): 2645-2685; ISSN (print): 2756-6811
Volume 7, Issue 1, 82-90
Development of an IoT Based Water Quality Monitoring Device for
Domestic Fish Ponds
Toju Esther BABALOLA1, Abayomi Danlami BABALOLA2, Adeomo Victor GOROTI2
1
Department of Water Resources Management and Agro-Met, Federal University Oye Ekiti, Ekiti State, Nigeria
[Link]@[Link]/abababalola@[Link]
2
Department of Computer Engineering Federal Polytechnic Ile-Oluji, Ondo State, Nigeria
gorotivictor@[Link]
Corresponding Author: abababalola@[Link], +2348037922368
Date Submitted: 20/01/2024
Date Accepted: 15/03/2024
Date Published: 01/04/2024
Abstract: This study focuses on developing an affordable IoT-based water quality monitoring system for domestic fish ponds. The
system aims to enable remote monitoring of critical water parameters, offering real-time data access through mobile or web interfaces.
It includes an alert system to notify the pond owners of any significant changes in water quality, allowing swift corrective action. The
initiative stems from challenges faced by aquaculture farmers due to insufficient knowledge about water pH levels. Understanding pH's
importance, especially within the optimal range of 6.5-9.0 for fish culture, is crucial for success. Tests conducted on the system's
performance in detecting various pH levels across different pond environments demonstrated its reliability in identifying low and
normal pH levels. However, anomalies were observed in detecting higher pH levels, indicating potential sensitivity limitations that need
further investigation for system refinement. While the system excelled in detecting low and normal pH levels accurately, improvements
are required for detecting higher pH thresholds to ensure comprehensive monitoring across diverse water conditions. This enhancement
is crucial for effective fish pond management and reducing losses for aquaculture farmers.
Keywords: pH levels, Thresholds, IoT-based, Optimal Range, Alert, Fishponds Sensitivity Limits.
1. INTRODUCTION
Fishes rely entirely on water for their bodily functions, making a thorough understanding of water's physical and
chemical properties essential for successful aquaculture. Aquaculture, or fish farming, involves the commercial production
of fish in enclosed areas within freshwater bodies. However, traditional farming methods often depend heavily on human
expertise for tasks such as feeding, water quality testing, and pond maintenance. These tasks can be labour-intensive, time-
consuming, and stressful for farmers. Moreover, deviations from expected practices may lead to changes in water pH
concentration, which can denature cellular membranes and harm fish. According to the Nigeria National Aquaculture
Strategy, pH values above 9.5 or below 4.5 are unsuitable for most aquatic organisms, posing a threat to their survival.
This underscores the importance of monitoring and managing water quality parameters effectively in aquaculture
operations [5]. The aim of the project is to develop a weather-sensitive intelligent pH management system for aquaculture
in Ile-Oluji/Okeigbo. Specific objectives include designing a low-cost IoT-based water quality monitoring device,
implementing wireless connectivity for remote monitoring and control, integrating an alert system for critical changes in
water quality parameters, validating the device's performance through field-testing, and evaluating its effectiveness across
different seasons. This project aims to enhance the efficiency and sustainability of aquaculture practices in the region.
2. LITERATURE REVIEW
Researchers have been enhancing water quality monitoring in farms. [1] Implemented a system featuring pH, dissolved
oxygen, and temperature sensors per water layer, accessible through web and mobile devices. While wired data transmission
boosts signal reliability, it has limitations in field coverage. Automation, particularly through IoT, has significantly
improved aquaculture, tackling conflicts between human activities and the environment. A notable innovation involves a
self-designed robotic arm streamlining monitoring tasks, ensuring reliability in assessing crucial water quality indicators.
Additionally, fishers receive mobile alerts about abnormal water conditions, aiding in preventing potential fish loss [2].
[6] developed a system with pH, dissolved oxygen, and temperature sensors per water layer, accessible via web/mobile
devices. Robotic arm maintenance ensures sensor reliability. In their design system, fishers receive mobile alerts for
abnormal water quality.
[Link] 82
[Link] Babalola et al.
Volume 7, Issue 1
2.1 The Concept of Water pH and Biological Functions
The pH scale, ranging from 0 to 14, measures the acidity or alkalinity of water or any solution [7]. It signifies the
concentration of hydrogen ions [H+], defined as the negative logarithm of pH [4]. pH significantly influences biochemical
processes like enzyme activity, ion uptake, and ammonia solubilization in water.
The Federal ministry of Agriculture and rural development [5] noted pH as an indicator of a solution's hydrogen ion
activity, revealing its acidic or alkaline nature. Pure water has a pH of 7, with values below 7 indicating acidity and above 7
indicating alkalinity. Groundwater typically falls between pH 6 and 8.5, while surface water ranges from 6.5 to 8.5. pH
measurements determine water corrosiveness and its potential hazards. pH plays a crucial role in aquatic ecosystems,
affecting chemical reactions and biological activities. Small pH changes alter the solubility and availability of contaminants
like copper and ammonia, impacting aquatic organisms and their exposure to harmful substances. While living organisms
maintain stable pH internally, the optimal drinking water pH ranges from 6 to 8.5.
Different pH ranges support diverse aquatic species, with the ideal range of 6.5-8 for most organisms [3]. Fluctuations
beyond pH 6.5-9 can stress species physiologically, affecting their growth, reproduction, and health. High or low pH levels,
if persistent, can lead to biodiversity decline and physiological stress in aquatic life. High pH, above 9.0, indicates alkaline
water, often caused by increased temperature, decreased oxygen solubility, or dissolution of basic salts. It affects
biodiversity, growth rates, and can heighten toxicity of certain chemicals like ammonia [6]. Low pH, typically between 6
and 6.5, stems from organic matter breakdown, metal presence (e.g., aluminum, copper), and acidifying elements in the
ground. Acidic oxides and chemical contamination also contribute to lowered pH. It harms aquatic life, causing gill damage,
growth issues, reproductive failure, and species replacement [6].
Ya’acob et al., [8] discussed the implementation of IoT technology in fish ponds to monitor water quality and fish
presence. The system employs pH and temperature sensors, an ultrasonic sensor for fish detection, NodeMCU ESP8266 as
the central controller, and Wi-Fi for communication. Results indicate high-quality water based on pH levels, temperature,
and fish presence. The system's efficiency reduces operating costs for farmers. The work is published in IOP Conf. Series:
Materials Science and Engineering, Volume 1176, under Creative Commons Attribution 3.0 license.
Chen et al., [9] addressed the challenges faced by fish farms in Taiwan due to typhoons and cold snaps, along with the
shortage of human resources. They propose a solution utilizing wireless transmission technology and various sensors to
monitor crucial parameters such as temperature, pH value, dissolved oxygen, water level, and sensor life expectancy in fish
farms. The integrated data is transmitted to mobile devices via the Internet of Things (IoT), allowing administrators to
remotely monitor water quality. Additionally, to address the limitations of pH sensors requiring human intervention for
measurements, the authors developed a robotic arm for automated measurement and maintenance. The system, comprising
control, measurement, server, and mobility components, operates continuously, effectively reducing losses and errors
associated with human intervention.
Adianda et al.,[10] presented a method for telemonitoring water quality in a koi fish hatchery using a mechanical
turbine approach based on a microcontroller. The study, conducted at UPT BBI Tlogowaru, focuses on maintaining water
quality by monitoring color turbidity and water flow through a gravity pipe, processed by an ESP32 microcontroller. The
turbine, driven by water flow, generates power to activate telemonitoring devices. After filtration, water enters the hatchery,
resulting in pH values of 6.8-7.2 and TDS of 257-282 ppm. System performance, with an average power consumption of
8.265 w/h, utilizes a MiFi network with QoS parameters showing low delay and packet loss. The authors emphasize the
convenience of website-based monitoring for users.
2.2 Overview of the Components
i. ATmega 328P microcontroller: An 8-bit, 28-pin AVR Microcontroller, pivotal for project control. It boasts 1KB
EEPROM, 2KB SRAM, 8 ADC pins (PA0-PA7), and three timers (2x 8-bit, 1x 16-bit) operating between 3.3V to
5.5V.
ii. pH sensor: A vital tool for precise acidity/alkalinity measurement in water and various sectors like pharmaceuticals,
power plants, and wastewater treatment.
iii. 12 V power supply: Converts incoming AC to a stable 12V DC output, widely used in electronics, automotive
systems, and appliances. Essential for device functionality, often equipped with protections like overvoltage and
overcurrent.
iv. DC-to-DC 12-Volt Converter: Crucial in regulating voltage levels, adjusting or stabilizing 12V DC input/output
efficiently. Found in various applications, including automotive systems and portable electronics.
v. Capacitor: Features temperature, capacitance, and voltage rating determining its use. Used to withstand high
charges in the system, often employing 25pf mica capacitors in design.
vi. Crystal Oscillator: An electronic oscillator utilizing mechanical resonance of a piezoelectric crystal to generate a
stable electrical signal with precise frequency. Common in frequency synthesizers, microprocessors, and TV
transmitters.
vii. Switch: Electrical device for connecting/disconnecting circuits, controlling electricity flow via movable electrical
contacts.
viii. GSM/GPRS Module: Utilizes SIM800L for GPRS and SMS data on quad-band GSM/GPRS network. Allows
voice calls, SMS, FM radio, and interfaces via UART port.
ix. DC Pumping Machine: Operates pumps using DC electrical power, employed in various pumping applications
[Link] 83
[Link] Babalola et al.
Volume 7, Issue 1
including agriculture, residential water supply, and industry.
x. Veroboard: Prototyping tool featuring a grid of holes with copper strips for circuit creation without soldering.
Versatile and fundamental in electronics prototyping.
Figure 1: ATmega328P microcontroller Figure 2: pH sensor
Figure 3: 12V power supply Figure 4: DC-to-DC 12-Volt converter
Figure 6: Capacitor
Figure 5: Switch
Figure7: Crystal oscillator
Figure 8: GSM/GPRS module
Figure 9: Dc Ppmping machine Figure 10: Veroboard
3. METHODOLOGY
[Link] 84
[Link] Babalola et al.
Volume 7, Issue 1
The system, powered by a 5-volt power bank, focuses on pH detection and neutralization. Using an ATmega328P
microcontroller and a pH sensor, it monitors pond pH levels. If above 9.5, it activates a 20-second DC pump cycle to
replace water for neutralization. Results are transmitted wirelessly via a GSM module. Components include the
microcontroller, pH sensor, switch, power bank, resistor, DC water pump, servo motor, LED, capacitor, crystal oscillator,
and Veroboard, forming the system's core elements.
3.1 Hardware implementation of the design
The system hardware includes essential components like the ATmega328P, pH sensor, LED, and DC Pumping
Machine, integrated on a Veroboard. The pH sensor, powered by a 12-volt DC source, communicates pH changes to the
microcontroller. To ensure compatibility with the system's 5-volt components like the microcontroller and digital circuits, a
DC-to-DC converter regulates power from 12 volts down to 5 volts. The block diagram detailing this setup is in Figure 14.
Figure 11: Block diagram of development of the IOT based integrated water quality monitoring device for domestic fish
ponds
The block diagram (Figure 11) illustrates the integration of key units;
i. Power supply unit: It provides a stable 5-volt voltage for the ATmega328P microcontroller. A 12-volt source is
regulated down to 5 volts through a voltage doubling method in the power bank module. A 330 Ω resistor is used for
LED operation based on calculated values.
ii. ATmega328P Microcontroller unit: The processing core of the pH detection system, interfacing with all its
components. Equipped with digital/analog I/O pins, programmable via Arduino IDE with specific pin assignments
for varied tasks.
iii. DC Pump Unit: Triggers a DC pumping machine based on pH conditions—activated if pH exceeds 9.5. Runs on 5
volts and flushes pond water for 20 seconds, refilling to normalize pH.
iv. pH Detection Unit: Utilizes a pH sensor with test, VCC, DOUT, and ground pins. Indicator LEDs (Red and Green)
display system status (working or pH detection). The red LED signals pH detection, while green indicates system
status.
v. Indicating Unit: Comprises LEDs (Green and Red) and a GSM module. LEDs indicate system status and pH
presence. The GSM module notifies users of pond status remotely via a smartphone.
3.2 Design Analysis
The circuit diagram, as shown in Figure 12, is designed using Proteus professional, version 7.9 software installed on
computer system which is run on a windows 10 Operating system. The simulated circuit diagram of design and the
diagrammatical representation is shown in Figure 12, The pH detection and neutralization system is powered on using 5-
volt DC that is regulated from a 12volts power source, the 5-volt regulated DC as required by the microcontroller, sensor,
and indicating unit. The ATmega328P microcontroller has already been designed to operate without the use of transformer.
While other components like DC Pumping machine require 5V and the LEDs need 2V.
To assemble the water pH monitoring system, begin by connecting the pH sensor to the ATmega 328P
Microcontroller. Attach the sensor's analog output to an analog input pin on the microcontroller, such as A0, and ensure
the proper connection of its power and ground pins. Next, integrate a switch into the circuit to control the power supply
from the 12-volt adapter, using a digital input pin on the microcontroller to read its status. Connect the 12-volt adapter to
the positive and negative rails of the veroboard to power the entire system. Employ resistors as needed for current
limiting or voltage division, placing them strategically in series or parallel with the respective components. Then, link the
DC water pump to a digital output pin on the microcontroller for operational control, ensuring compatibility between the
[Link] 85
[Link] Babalola et al.
Volume 7, Issue 1
pump's power requirements and the microcontroller's output capabilities. If necessary, incorporate a DC-to-DC converter
to regulate voltage for specific components, connecting its input to the 12-volt adapter and output to relevant components.
Utilize LEDs with current-limiting resistors connected to digital output pins to indicate system status or alerts. Place
capacitors across power and ground rails to stabilize voltage and filter noise in the circuit. Connect the crystal oscillator to
the microcontroller to provide precise timing signals, ensuring proper connections between the oscillator and the
microcontroller's clock pins. Finally, mount and interconnect all components securely on the veroboard, arranging them
in an organized manner to facilitate troubleshooting and maintenance. Connect the GSM/GPRS module to the
microcontroller using appropriate communication protocols, ensuring proper connections for power, ground, and data
lines between the module and the microcontroller.
Figure 12: Circuit diagram of the design system
3.3 Operation of the pH Detector and Neutralizer System
In the system, powering on via the switch activates the ATmega328P microcontroller, indicated by the green LED. This
LED signifies the system's operational status. While the system operates within normal pH levels, the red LED remains
inactive. However, when the pH sensor detects levels above 2.9, the microcontroller triggers the first DC pumping machine
for 20 seconds, removing excess pond water. Subsequently, the microcontroller activates the DC pump to introduce fresh
water for another 20 seconds, neutralizing the pond's pH. If the pH remains below 9.5, the system continuously monitors it.
The user receives updates remotely through the GSM module regarding the pond's status.
3.4 System Flow Chart
The flow chart step is as follows;
Step 1: Power on the system (Green LED ON).
Step 2: Checks for pH concentration
Step 3: If pH is detected from the fish pond
Step 3.1: Turn ON red LED, trigger the DC pumping machine
Step 4: Else
Step 5: Go back to steady state and recheck for after 5Mins
Step 6: Goto step 1
Hence, Figure 13 shows interior view of the design during testing state
[Link] 86
[Link] Babalola et al.
Volume 7, Issue 1
Figure 13: Flowchart of the IOT based integrated water quality monitoring device
Figure 14: Interior view of the design during testing state
3.5 The Design System is Evaluated Based on Several Parameters:
False Detection (FD): When the system detects a pH lower than 9.5 as needing further action.
True Detection (TD): When the system accurately detects a pH greater than 9.5, prompting necessary actions.
Unable to Detect (UD): When the system fails to trigger actions even at a pH value higher than 9.5.
Sensitivity (SE): Represents the system's responsiveness to changes in the input signal.
Specificity (SP): Indicates how well the system identifies a specific condition rather than a general one.
Accuracy: Measures the closeness between a measured value and its true value, as per the provided formula.
4. RESULT AND DISCUSSION
4.1 Result
The design system was tested on twenty (20) attempts for different fish ponds so as to be ascertained of the
functionality of the design system. FD, TD, UD, Accuracy and Sensitivity were calculated and reported. The table of result
[Link] 87
[Link] Babalola et al.
Volume 7, Issue 1
is as shown in Table1 to Table 4 and the pH value sent messages is as shown in Figure 15. The 1s and 0s used in the table
of result is used to represent the true and false result in the test carried out.
Table 1: Result of test on low pH of water. Table 2: Result of test on low pH of water
SN TD FD UD Ph Number of SN TD FD UD Ph Number of
Value Response Value Response
1 1 0 0 3.76 1 1 1 0 0 3.97 1
2 1 0 0 3.55 1 2 1 0 0 3.80 1
3 1 0 0 3.89 1 3 1 0 0 3.59 1
4 1 0 0 3.88 1 4 1 0 0 3.86 1
5 1 0 0 3.98 0 5 1 0 0 3.97 1
Table 3: Result of test on High pH of water. Table 4: Result of test on normal water
SN TD FD UD Ph Number of SN TD FD UD Ph Number of
Value Response Value Response
1 1 0 0 9.51 1 1 1 0 0 7.04 1
2 1 0 0 9.53 0 2 1 0 0 8.12 1
3 1 0 0 9.53 1 3 1 0 0 7.22 1
4 1 0 0 9.53 1 4 1 0 0 7.77 1
5 1 0 0 9.57 1 5 1 0 0 6.98 1
4.2 Pictorial Result of the pH Value
Figure 15 exhibits pH detection alerts sent promptly to users, showcasing real-time communication via IoT through the
GSM module for informed decision-making during monitoring.
4.3 Discussion of Results
The tests conducted on the design system to detect varying pH levels in different water conditions offer insightful
observations regarding its performance and efficacy. Table 1 demonstrates the system's robustness in identifying low pH
levels across diverse fish ponds. With a consistent sensitivity, specificity, and accuracy of 1.0, the system showcased
impeccable reliability in detecting low pH without any false detection or missed identifications. Furthermore, achieving a
100% response rate in each attempt highlights the system's prompt and accurate notification capabilities, ensuring timely
awareness of low pH concentrations. In Table 2, the system maintained its accuracy in low pH detection, albeit
encountering a singular instance (Attempt 5) where a higher pH value did not elicit a response. This anomaly suggests a
potential sensitivity limitation at higher pH thresholds, warranting further investigation to refine the system's performance
in such scenarios. Moving to Table 3, the system exhibited competent detection of high pH levels in fish ponds, albeit with
a slightly lower sensitivity of 0.75. Notably, a specific pH instance (9.53) revealed a response lapse, signalling a potential
sensitivity or alerting discrepancy that necessitates meticulous evaluation for system enhancement.
Conversely, Table 4 emphasized the system's reliability in identifying normal water pH levels with unwavering accuracy.
Consistent sensitivity, specificity, and a 100% response rate affirm its capability in precisely detecting and notifying
normal pH conditions without errors. In essence, while the system excels in detecting low and normal pH levels, the
discerned anomalies at specific pH thresholds, especially in high pH detection, call for a deeper examination to enhance
sensitivity and ensure comprehensive monitoring across diverse water conditions.
5. CONCLUSION
In aquaculture, water quality significantly influences fish health and farming success. Manual processes like water
testing, feeding schedules, and maintenance are labour-intensive and prone to errors, impacting fish health, especially
through pH level changes. To tackle these challenges, a technology-integrated system with pH sensors, an ATmega328P
Microcontroller, GSM/GPRS modules, and DC pumping machines was devised. This system monitors pH levels in fish
ponds and intervenes if pH exceeds 9.5. While it accurately detects low and normal pH levels (Tables 1 and 4), there are
sensitivity issues at specific pH thresholds (Tables 2 and 3), requiring further refinement. Despite this, the system has the
potential to revolutionize aquaculture by automating pH control. Continuous enhancements are crucial to ensure precise
monitoring across diverse water conditions, fostering sustainable and efficient fish farming practices.
[Link] 88
[Link] Babalola et al.
Volume 7, Issue 1
Figure 15: Pictorial result of the pH value sent to the user
REFERENCE
[1] Shareef, Z & Reddy, S.R.N. (2019). Design and wireless sensor Network Analysis of Water Quality Monitoring
System for Aquaculture. In Proceedings of the International Conference on Computing Methodologies and
Communication, Erode, India, 3(4), 405-408.
[2] Lee, P. G. (1998). The use of process control software for the monitoring and control of aquaculture systems. In
Proceedings of the Second International Conference on Recirculating Aquaculture, Roanoke, VA, USA, 48–58.
[3] World Health Organization. (2004). Health risks from drinking demineralized water, WHO. retrieved from
[Link]
[4] Dirisu, C. G., Mafiana, M. O. & Dirisu, G. B. (2016). Level of pH In Drinking Water of an Oil and Gas Producing
Community and Perceived Biological and Health Implications. European Journal of Basic and Applied Sciences 3(3),
53-60.
[5] Federal Ministry of Agriculture and Rural Development. (2008). Nigeria National Aquaculture Strategy.
[6] Lin, J. Y., Tsai, H. L. & Lyu, W. H. (2021). An Integrated Wireless Multi-Sensor System for Monitoring the Water
Quality of Aquaculture. Sensors. 1(2), 179-188.
[7] Water Research Net. (2016). pH in the Environment (Acccessed 3rd June 2016) retrieved from: [Link]
[Link]/[Link]/ph-in-the-environment.
[Link] 89
[Link] Babalola et al.
Volume 7, Issue 1
[8] Ya’acob, N., Dzulkefli, N. N. S. N., Yusof, A. L., Kassim, M., Naim, N. F., & Aris, S. S. M. (2021). Water Quality
Monitoring System for Fisheries using Internet of Things (IoT). IOP Conf. Series: Materials Science and Engineering,
1176(1), 012016. [Link]
[9] Chen, C.-H., Wu, Y.-C., Zhang, J.-X., & Chen, Y.-H. (2022). IoT-Based Fish Farm Water Quality Monitoring System.
Sensors, 22(17), 6700. [Link]
[10] Adianda, S. A., Arinie, F., & Imammuddien, A. M. (2022). Telemonitoring of Water Quality for Koi Fish Hatchery
Using Mechanical Turbine Method Based on Microcontroller. Journal of Applied Research and Technology, 12(2),
307. [Link]
[Link] 90
View publication stats