원시데이터 수집 시스템
선정목록으로

A Low-Cost pH Sensor for Real-Time Monitoring of Aquaculture Systems in a Multi-Layer Wireless Sensor Network

관련 수소연료전지 · (5) 연료전지용 수분제어장치(가습기)

기본 정보

저자
  1. Binta Mohammed Adib Zeta — Department of Electrical and Electronic Engineering, United International University, Dhaka 1212, Bangladesh
  2. S. M. Nazrul Alam — Department of Electrical and Electronic Engineering, United International University, Dhaka 1212, Bangladesh
  3. Gazi M. E. Rahman — Department of Electrical and Electronic Engineering, United International University, Dhaka 1212, Bangladesh
  4. Khawza I. Ahmed — Department of Electrical and Electronic Engineering, United International University, Dhaka 1212, Bangladesh|||Department of Electrical and Electronic Engineering, Green University of Bangladesh, Narayanganj 1461, Bangladesh
DOI
10.3390/s25092824
저널
Sensors
발행년도
2025
발행기관
Multidisciplinary Digital Publishing Institute
피인용수
0
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.3390/s25092824
토픽
Analytical Chemistry and Sensors
OpenAlex ID
W4409966948

평가 내용

관련도
관련
사업분야
수소연료전지 · (5) 연료전지용 수분제어장치(가습기)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '수소연료전지 > 연료전지용 수분제어장치(가습기)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

For aquaculture systems, pH is the prime quality indicator and is highly related to other water quality indicators like ammonia and ammonium ions. The available pH sensors using chemical references are not suitable for continuous in situ monitoring of aquaculture systems due to their frequent calibration requirement and high cost. This research develops a pH sensor with temperature compensation implementing a machine learning (ML) algorithm. Unlike traditional methods, this sensor utilizes electronic calibration, eliminating the need for chemical calibration and ongoing maintenance efforts. The application of this low-cost sensor is particularly well suited for in situ aquaculture scenarios, where multiple local sensor nodes operate under the control of a master node. The test results of the developed sensor show an improved sensitivity from 0.288 µA/pH to 0.316 µA/pH compared to the available pH sensors. Additionally, the response time has been improved from 1 s to 125 ms, showcasing the suitability of this pH sensor for real-time water quality monitoring of aquaculture applications.

본문 57,871자

본문 펼치기
_Article_ # A Low-Cost pH Sensor for Real-Time Monitoring of Aquaculture Systems in a Multi-Layer Wireless Sensor Network Binta Mohammed Adib Zeta <sup>1</sup> , Sifat U. Alam <sup>1</sup> , Gazi M. A. Ehsan Ur Rahman <sup>1</sup> and Khawza Iftekhar Uddin Ahmed <sup>1,2,</sup> * 1 Department of Electrical and Electronic Engineering, United International University, Dhaka 1212, Bangladesh; bzeta173013@bseee.uiu.ac.bd (B.M.A.Z.); salam171048@bseee.uiu.ac.bd (S.U.A.); erahman.uiu@gmail.com (G.M.A.E.U.R.) 2 Department of Electrical and Electronic Engineering, Green University of Bangladesh, Narayanganj 1461, Bangladesh * Correspondence: khawza@eee.uiu.ac.bd Abstract: For aquaculture systems, pH is the prime quality indicator and is highly related to other water quality indicators like ammonia and ammonium ions. The available pH sensors using chemical references are not suitable for continuous in situ monitoring of aquaculture systems due to their frequent calibration requirement and high cost. This research develops a pH sensor with temperature compensation implementing a machine learning (ML) algorithm. Unlike traditional methods, this sensor utilizes electronic calibration, eliminating the need for chemical calibration and ongoing maintenance efforts. The application of this low-cost sensor is particularly well suited for in situ aquaculture scenarios, where multiple local sensor nodes operate under the control of a master node. The test results of the developed sensor show an improved sensitivity from 0.288 µA/pH to 0.316 µA/pH compared to the available pH sensors. Additionally, the response time has been improved from 1 s to 125 ms, showcasing the suitability of this pH sensor for real-time water quality monitoring of aquaculture applications. Keywords: aquaculture; pH sensor; electrode; temperature compensation Received: 6 February 2025 Revised: 22 March 2025 Accepted: 28 March 2025 Published: 30 April 2025 Citation: Zeta, B.M.A.; Alam, S.U.; Rahman, G.M.A.E.U.; Ahmed, K.I.U. A Low-Cost pH Sensor for Real-Time Monitoring of Aquaculture Systems in a Multi-Layer Wireless Sensor Network. _Sensors_ 2025, _25_, 2824. [https://doi.org/10.3390/s25092824](https://doi.org/10.3390/s25092824) Copyright: © 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license [(https://creativecommons.org/](https://creativecommons.org/licenses/by/4.0/) [licenses/by/4.0/).](https://creativecommons.org/licenses/by/4.0/) 1. Introduction Because of the increasing global population, we need environmentally friendly methods for food production. Biofloc fish farming provides a reliable and eco-friendly solution, and has become popular among fish farmers [1]. The success of fish production in aquaculture systems depends on water quality, which includes pH, ammonia, dissolved oxygen (DO), total dissolved solids (TDS), and chloride [2]. To keep fish healthy in a Biofloc tank, it’s crucial to monitor these factors consistently. However, many available sensors require costly equipment and manual operation, and sometimes they provide inaccurate readings due to calibration issues [3]. Therefore, we aim to create cost-effective IoT sensors for real-time monitoring of the key water quality parameters. Integrating existing sensors in an IoT sensor node posed challenges due to compatibility issues. To overcome this, we have developed a new pH sensor that seamlessly interfaces with the real-time IoT sensor node, complete with temperature compensation. pH stands out as a crucial water quality indicator, reflecting various other parameters, such as alkalinity, CO2, dissolved oxygen (DO), total dissolved solids (TDS), biochemical oxygen demand (BOD), chloride, ammonia, and ammonium ions in aquatic environments [4]. Additionally, pH plays a role in solubility reactions, metal concentration, and chemical processes such as oxidation and reduction [5]. _Sensors_ 2025, _25_, 2824 2 of 21 Figure 1 outlines the proposed setup for an aquaculture system, where sensors are placed at different depths within a Biofloc tank for effective data collection. Through the sensor nodes at different depths, the control node obtains pH data from the tank. After that, the multipoint data are compressed and processed at the control node. Figure 2 presents the potential architecture of a smart aquaculture system. Sensor nodes are connected to a local control node wirelessly through LoRa links, which serves as the concentrator. All the sensor nodes form a local Wireless Sensor Network (WSN) with the concentrator. The concentrator collects data from the sensor nodes and transmits them to the remote server located in the IoT cloud via the collocated LoRa-IoT gateway. Users can access these data anytime, anywhere, using a smart phone application. Additionally, users can obtain data locally from the concentrator when the WSN has limited or no internet access to ensure continuous data transmission to the IoT server. Figure 1. Multiple sensors in a Biofloc tank at different depth and position communicating with a local control node. Figure 2. System architecture with multi depth sensor nodes and control node, along with WSN-GWIoT-User application. The pH level measurement in aqueous media can be categorized in various criteria, such as intelligence, application, and operating principles as illustrated in Figure 3. _Sensors_ 2025, _25_, 2824 3 of 21 Figure 3. Classification of pH sensors based on three different perspectives. Based on its construction and operating principle, the pH-sensing method can be divided into three groups: potentiometric, photometric, and colorimetric. The most widely used pH sensors are based on potentiometric methods specifically using the glass electrode pH method [6]. This type of pH sensor uses a glass electrode filled with a Potassium Chloride (KCl) solution of a known pH and a reference electrode. However, the reference electrode is susceptible to corrosion during oxidation, leading to a decline in accuracy over time. Consequently, despite its popularity, this method presents challenges related to the need for frequent calibration. Electrochemical potentiometric pH sensors use two electrodes to directly monitor electrochemical reactions in order to determine the pH of biological samples [7]. The photometric method of measuring pH relies on expensive and complex glass or plastic optical fiber [8] to stimulate the compounds in the pH sensor and detect light emission. Conversely, the colorimetric method employs budget-friendly indicator dyes such as litmus or phenolphthalein, visually altering the color to indicate different pH levels without relying on any mathematical equation [9]. Nevertheless, this approach proves its limitations for in situ and real-time pH monitoring applications such as aquaculture. There are two types of pH sensing based on the application: in situ and in-lab. While in-lab sensors provide more accurate results compared to their in situ counterparts, in situ sensors are better suited for real-time monitoring of aquaculture systems. Intelligent sensor nodes integrate temperature-compensation algorithm making it better suited for Biofloc application. Conversely, the uncompensated sensors involve inaccuracy in pH values with the fluctuations of temperature [10]. These available sensors pose challenges when deployed in aquaculture settings, attributed to their extended response times, restricted sensitivity, and stability issues. Furthermore, their design hinders seamless integration with other devices such as with wireless sensor nodes. These limitations underscore the need for the development of sensors that align with the required criteria. The primary contribution of this work is the development of an affordable, temperaturecompensated pH sensor to enable electronic calibration and in situ application for real-time monitoring of water quality in Biofloc environments. In our approach, multiple sensors are integrated into a local WSN through LoRa. This facilitates instantaneous data retrieval for effective management and ensures long-term data availability for future research, as well as comprehensive analysis of Biofloc environment parameters, including yield and quality. To enhance the sensor’s accuracy and stability, a lightweight Machine Learning (ML) algorithm has been incorporated at the sensor node. This algorithm serves the dual purpose of temperature compensation and multipoint data compression. The strategic use _Sensors_ 2025, _25_, 2824 4 of 21 of LoRa technology and the lightweight ML algorithm is focused on achieving low energy consumption within the local WSN, thereby extending the overall lifespan. 2. Related Works The recent literature related to the development of pH sensors and their applications in a WSN is reviewed. Development of electrode-based sensors is found suitable for wireless sensing applications aided by various compensation and compression algorithms. Yuqi Chen and Richard Compton in [11] have developed a bespoke calibration-free pH sensor using an in situ modified iridium electrode for applications in seawater. The electrochemical behavior of an iridium wire in air-saturated synthetic seawater is investigated, and the formation of pH-sensitive surface layers is observed. However, they do not concentrate on temperature compensation of pH measurement. Riedel et al. in [12] demonstrate an ISFET-based agricultural sensing system for water and soil, focusing mainly on drift compensation and offset correction mechanisms. However, they do not consider enough the response time, sensitivity, flexibility of sensing elements, and disposal options. Zhang et al. in [13] demonstrate a miniaturized pH sensor utilizing an assemblyfree ball lens on a tapered multimode optical fiber (TMMF), offering the potential to revolutionize pH sensing in biochemical applications. They provide improved signal collection efficiency, which tackles the ongoing problems caused by low signal-to-noise ratios. Though effective, it’s a costly solution for aquaculture applications. Swelling action of the polyvinyl alcohol (PVA)/polyacrylic acid (PAA) hydrogen sensing sheet is used in [14] to generate optical path modulation at different pH solutions. In addition to the complex structure, this photometric pH sensor is not suitable for integration in a wireless sensor node for real-time applications. Wang et al. in [15] have developed a micro electro mechanical system (MEMS) of three electrodes to measure the temperature and pH focusing on better temperature compensation. Machine Learning (ML) algorithms were utilized to overcome issues related to the size of the electrode and stability at high temperature. However, they do not concentrate on issues like corrosion of the electrode due to the chemical reactions with water-based substances. 3. Technical Background _3.1._ _pH Measurement_ Various methods are employed for pH measurement depending on the application. The colorimetric approach involves immersing an indicator in the test solution, and the resulting color change is matched to a specific color representing a particular pH. In the photometric method, a photodiode and LED detect luminescence in the pH sensor by stimulating its components. However, both colorimetric and photometric methods have limited applications due to their structural constraints and lower accuracy. Among the electrode-based potentiometric pH measurements, the glass electrode method, using a glass electrode and a reference electrode, measures the voltage between the two electrodes to determine solution pH. The antimony electrode method uses a polished antimony rod to gauge pH by comparing potential differences with a reference electrode. The semiconductor electrode method utilizes a semiconductor device to measure ion concentration fluctuations in a solution, detecting changes in current flowing through the transistor. Platinum black is applied to the platinum wire or plate to create a hydrogen electrode, immersed in the test solution, and charged with electricity until saturated with hydrogen gas. The potential difference between the platinum black electrode and the silver chloride electrode is then measured to get the pH. _Sensors_ 2025, _25_, 2824 5 of 21 _3.2._ _Temperature Compensation of pH_ The Nernst equation establishes a connection between pH and temperature [16]. In a solution, the concentration of hydrogen ions can change with the temperature fluctuations. Table 1 illustrates the impact of temperature increases on pH values [17]. Specifically, the pH value increases for acidic solutions when the temperature increases. Conversely, for neutral or alkaline solutions, the pH value decreases as the temperature increases. To ensure accurate readings, it is essential to correct the pH values for temperature variations. Temperature compensation is employed to adjust the pH at the measurement temperature to the pH at a reference temperature of 25 <sup>_◦_</sup> C. Table 1. Temperature to pH relationships. Temperature ( <sup>_◦_</sup> C) pH 4.01 pH 7 pH 10.01 <u>0</u> <u>4.01</u> <u>7.12</u> <u>10.32</u> <u>10</u> <u>4</u> <u>7.06</u> <u>10.18</u> <u>20</u> <u>4</u> <u>7.02</u> <u>10.06</u> <u>25</u> <u>4</u> <u>7.01</u> <u>10.02</u> <u>30</u> <u>4.01</u> <u>6.98</u> <u>9.97</u> <u>40</u> <u>4.03</u> <u>6.97</u> <u>9.89</u> 50 4.06 6.97 9.83 _3.3._ _Biofloc Fish Farming_ Biofloc is an eco-friendly fish farming technique designed to minimize environmental impact, founded on the principles of in situ microbial growth and flocculation. This system ensures water quality by maintaining a higher Carbon-Nitrogen (C-N) ratio through additional carbohydrate supply. The composition of Biofloc includes microorganisms like bacteria, algae, fungi, invertebrates, and detritus. The toxic nitrogen species immobilize more rapidly in Biofloc making water quality preservation a key aspect. Table 2 summarizes the specifications of a Biofloc system. A Biofloc farm typically comprises multiple tanks, each 4 m in diameter, 1.5 m in height, and 1.2 m in depth, with a storage capacity of about 15,000 L of water per tank. Key water quality characteristics include pH within the range of 6.5 to 8.5, alkalinity, dissolved oxygen (DO) at 5 mg/L, temperature, total dissolved solids (TDS) at 600 ppm, ammonia at 0.5 ppm, and nitrate at 150 ppm. Biofloc systems are versatile and suitable for various types of aquatic life including: air-breathing fish such as Singhi, Magur, Pabda; those that do not breathe air like Common Carp, Rohu, and Milkfish; as well as shellfish like Vannamei and Tiger Shrimp [18]. Table 2. Specifications of a Biofloc a system. Parameters Specifications <u>Tank size</u> <u>Diameter 4 m; Height 1.5 m; Water depth 1.20 m</u> <u>Water holding capacity</u> <u>15,000 L/tank</u> pH, Alkalinity, Dissolved Oxygen, Temperature, TDS, Water quality parameters <u>Floc density-25–40 mg/L, Ammonia, Nitrite, Nitrate</u> <u>Survival (%)</u> <u>80</u> <u>Feeding frequency</u> <u>early stage 4 times per day, later 2 times per day</u> Types of species Air breathing, Non air-breathing, Shellfishes _Sensors_ 2025, _25_, 2824 6 of 21 _3.4._ _ML for Normalization, Calibration and Compression_ ML algorithms are employed for multipoint data compression, data normalization, and temperature compensation. This involves compressing multipoint data into single data points. Subsequently, the compressed dataset undergoes normalization to identify outliers and assess data quality. The processed dataset is then obtained by verifying the remedial measures applied to the normalized data. Once the dataset of predictor variables is selected from the entire dataset, the statistical analysis and residuals of the model are examined and fitted. Following further confirmation of corrective measures, a provisional final model is chosen. Subsequently, the model’s validity is assessed, and a predicted output dataset is generated. _3.5._ _LoRa for WSN_ LoRa is a low-power wide-area wireless network (LPWAN) technology that is increasingly used in wireless sensor networks (WSN). Data gathered from wireless sensors are wirelessly transmitted over LoRa to the IoT gateway and then to Cloud storage or a local server. LoRa has long-range and low energy consumption, which helps to increase WSN coverage and energy efficiency [19]. Therefore, use of LoRa in aquaculture applications will extend the overall system lifespan of sensor nodes powered by battery [20]. In Table 3 other parameters of various LPWAN technologies (LoRa, Sigfox, NB-IoT) are compared. The aforementioned parameters make it evident that NB-IOT’s high energy consumption makes it unsuitable for aquaculture applications. Considering bandwidth and data rate, LoRa is the optimal solution for aquaculture applications [21] over Sigfox. Table 3. Comparison among different LPWAN technologies. Specifications LoRa Sigfox NB-IoT 5 km (urban), 10 km (urban), 1 km (urban), Range <u>20 km (rural)</u> <u>40 km (rural)</u> <u>10 km (rural)</u> Energy 0.03/message Not available 0.13/message <u>consumption</u> 250 kHz and Bandwidth 100 Hz 200 kHz <u>125 kHz</u> <u>Maximum data rate</u> <u>50 kbps</u> <u>100 bps</u> <u>200 kbps</u> Maximum Unlimited 140 (UL), 4 (DL) Unlimited <u>messages/day</u> <u>Adaptive data rate</u> <u>Yes</u> <u>No</u> <u>No</u> Allow private Yes No No network 4. Proposed Solution To develop a low-cost, multi-point pH sensor setup for a highly dynamic Biofloc environment, several challenges have been addressed. This section explains how we approach certain problems and come up with solutions. _4.1._ _Features of Proposed Solution_ The main focus of this research is to develop a new pH sensor with temperature compensation and simplicity to integrate with an IoT sensor node for in situ applications. Other features as highlighted in Figure 4, such as sensitivity, response time, stability, and low cost are also taken into consideration. We have also concentrated on developing a local network of sensors at multiple depths. The Local network has a concentrator that _Sensors_ 2025, _25_, 2824 7 of 21 ~~collects data from the sensors wirelessly and transmits to the IoT server while acting as the~~ LoRa-IoT gateway. Figure 4. Features of proposed Solutions. _4.2._ _Construction of pH Sensor_ 4.2.1. Construction of Electrode Electrodes of a pH sensor are used to measure the generated voltage in a solution due to the change in Hydrogen ion (H+) concentration. In the proposed pH sensor, a biasing resistor replaces the reference electrode as used in glass-electrode system. Hence, the current in a pH neutral solution is determined by the resistor instead of a chemical of known pH. Among the various types of electrodes [22] a good sensing electrode has qualities including robustness, smoothness, high resistance, chemical neutrality, response time, durability, and temperature adjustment [23]. The selection of a suitable material, length, and relative position of the electrodes are important to ensure its reliability. We study the materials used as electrodes in commercially available pH sensors, including silver, silver chloride, platinum, chromium, and stainless steel. Characteristics as a pH sensing electrode such as biocompatibility, resistivity, corrosion resistance, electrode potential, and chemical reactions [24,25] led us to select the materials. Table 4 highlights the characteristics of gold (Au), silver (Ag), and chromium (Cr) as the shortlisted materials. Gold is found least active with other substances in water to generate oxides and is more durable, corrosion-resistant, and biocompatible than the other two materials. When used as a pH electrode, the flat surface of gold lowers the adherence of organic particles and microbes, reducing biofouling. This ensures consistent performance in biofouling-prone situations as well as making cleaning and maintenance easier. One major benefit of gold electrodes in saline environments is their great resistance to corrosion caused by chloride and their overall stability over a broad range of salinities. Long-term electrolysis was avoided by using a bipolar biasing current of the electrode. Gold-based electrodes can offer a long-lasting and efficient solution for dynamic aquaculture conditions by taking these considerations into account. Potential differences due to Hydrogen ion concentration between two electrodes made of these solutions. The potential difference is measured in mV scale and it is found decreasing below 0 V with the increase of pH and increasing above 0 V with the decreasing of pH. We found gold (Au) has a superior relationship between pH value and potential value compared to chromium (Cr) and silver (Ag). The pH potential depends on the surface area of the electrodes, therefore, different shapes, dimension and placement of the electrodes are monitored to get the optimum sensitivity. Figure 5 shows the sensitivity _Sensors_ 2025, _25_, 2824 8 of 21 of the gold-plated electrode for different lengths (6 mm, 9.5 mm, 8 mm and 10 mm) at <u>different pH values.</u> <u>The trend-line reliability (</u> _<u>R</u>_ <sup>_2_</sup> <u>) is shown for different polynomials to</u> find out the best pH to current relationship. Figure 5c depicts that the highest ( _R_ <sup>_2_</sup> = 0.9999) reliability is obtained for second order polynomial using the 8 mm long electrode. The 9.5 mm long electrode gives a similar ( _R_ <sup>_2_</sup> = 0.997) result for 3rd order polynomial. The longest (10 mm) and shortest (6 mm) are shown as less reliable even for 3rd or higher order polynomials. Based on the relations between current response and pH values, we selected an 8 mm long electrode as the pH sensor. Table 4. Comparison of selected materials. Oxide Material Durability Formation Corrosion Resistance pH and mV Biocompatibility Relation <u>Gold (Au)</u> <u>Very long</u> <u>No</u> <u>Very high</u> <u>Best</u> <u>Superior</u> <u>Silver (Ag)</u> <u>Long</u> <u>Sometimes</u> <u>Quite resistive</u> <u>Better</u> <u>Quite good</u> Unstable in Chromium (Cr) Less long Good Good Not that good oxygen Figure 5. Behavior of the probe at different lengths. ( a ) Current response of pH sensor when probe length is 6 mm. ( b ) Relation between current and pH when probe length is 9.5 mm. ( c ) Current response of the sensor when probe length is 8 mm. ( d ) Current and pH relation with 10 mm probe length. 4.2.2. Biasing for pH-Neutral Point To address calibration challenges in the glass-electrode setup, we opt for electronic biasing of the probe. Initially, we measure the current using a multimeter (Fluke 17B+, Fluke, Washington, DC, USA) of a chemically biased probe in a pH 7 reference solution, yielding 723 µA using reference electrode method. To achieve the same current across _Sensors_ 2025, _25_, 2824 9 of 21 our probe, we introduce a current limiting resistor to one of the electrodes. Using the same resistor, we measure currents across pH solutions ranging from 4 to 9, recalculating electrode linearity in a similar way to determining electrode length as shown in Figure 5. After testing with a _±_ 30% variation in resistor values, we settle on an optimal value of <u>33 kΩ.</u> <u>Figure 6 illustrates the electrode wiring diagram, including the current limiting</u> resistor, during current measurement to determine the best bias position and resistor value. Figure 6. Pattern and length variants of sensor electrodes. Sensor probe A has 8 mm round shape gold plating; B has 9.5 mm and C has 10 mm gold plating. _4.3._ _Working Principle of the Sensor_ pH denotes the concentration of hydrogen ions in a solution, represented logarithmically [26]. It is defined by Equation (1): (1) pH = _−log_ - _H_ <sup>+�</sup> Here, [ _H_ <sup>+</sup> ] is the equilibrium molar concentration of hydrogen ions (mol/L) in the solution. The Nernst equation, shown in Equation (2), calculates the concentration of hydrogen ions ( _H_ <sup>+</sup> ) and determines the potential difference between two electrodes in the potentiometric pH measurement method [27]: _E_ = <sup>_<u>RT</u>_</sup> _<u>nF</u>_ <sup>_<u>RT</u>_</sup> _<u>nF</u>_ <sup>_× log_</sup> <sup>_<u>C</u>_</sup> _<u>C</u>_ <sup><u>1</u></sup> <u>2</u> (2) <sup>_<u>C</u>_</sup> _<u>C</u>_ <sup><u>1</u></sup> <u>2</u> where, _E_ = potential difference in mV, _R_ = universal gas constant, _F_ = Faraday constant, _T_ = absolute temperature in kelvin (K), _n_ = number of charges of the measured ion, _C_ 1 = active ion concentration of reference solution, _C_ 2 = active ion concentration of the solution of unknown pH. The Nernst equation illustrates an inverse relationship between the voltage produced and pH. To elaborate, the detected voltage increases as pH decreases below 7, and decreases as pH exceeds 7. _4.4._ _Lab Setup of the Sensor_ To develop a fully electrical pH sensor suitable for IoT aquaculture applications without reliance on chemical solutions, we replace the reference electrode typically found in electrode-based pH sensors. As depicted in Figure 7. _<u>Sensors</u>_ <u>2025</u> <u>,</u> _<u>25</u>_ <u>, 2824</u> ~~10 of 21~~ Figure 7. Working principle of the sensor node. Our sensor’s electronic circuit incorporates a resistor in lieu of the traditional reference electrode. This approach utilizes a current limiter to measure pH, eliminating the need for chemical components in our sensor setup. In Figure 8a, our sensor node is depicted with a hardware block diagram showcasing our proposed pH sensor probe and pH sensing circuit. The sensor node comprises a microcontroller (STM32F401, STMicroelectronics, Geneva, Switzerland), a LoRa module with 433 MHz (SX1278, Semtech, Camarillo, CA, USA) for IoT connectivity, and a temperature sensor (DS18B20, Analog Devices Inc., Wilmington, MA, USA) for temperature compensation. The proposed pH sensor is developed on a printed circuit board (pHSensorV1.0, JLCPCB, Hong Kong, China) with a gold-plated finish using 2U” Electroless Nickel Immersion Gold (ENIG) surface treatment, optimizing trace width to 0.5 mm for enhanced conductivity. Sized at 40 _×_ 10 mm, the PCB includes a length of 8 mm. ( a ) ( b ) Figure 8. The lab setup of the sensor. ( a ) Hardware block diagram of the pH sensor with control circuit. ( b ) Schematic diagram of the sensor. _Sensors_ 2025, _25_, 2824 11 of 21 ~~ENIG-plate dedicated to collecting data from pH water solutions.~~ ~~Integration with the~~ main MCU is facilitated through an analog frontend that measures the current, converts it to voltage and amplifies it for the inbuilt ADC of the MCU. Figure 8b illustrates the schematic of our sensor node, detailing three ADC pins utilized for the pH sensor probe (A, B, C) and three digital pins employed for temperature sensors to gather data across various pH solutions. Temperature sensing utilizes the One Wire Communication Protocol (OWCP), while the LoRa module communicates via a 4-wire Serial Peripheral Interface (SPI) bus. _4.5._ _Data Collection and Processing_ In the proposed system, multiple sensor nodes gather pH data from the Biofloc tank. At the local concentrator (also acts as the local control node), these raw data undergo preprocessing, compression, and normalization to ensure accuracy. Subsequently, the data is categorized into training and test sets for training a linear regression model. After training, the model undergoes evaluation and fine-tuning to enhance performance. Once optimized, the model can predict pH values within the tank. The process is visualized in Figure 9. Figure 9. Data collection and processing block diagram. _4.6._ _Overview of System Architecture_ For IoT-based in situ monitoring of aquaculture, a control node along with multiple sensor nodes is used to establish a local network of sensors in a Biofloc tank. To obtain accurate data in the noisy environment of the Biofloc tank, local sensor nodes are positioned at various depths within the tank. Figure 10 demonstrates the system architecture utilized in our investigation. The control sensor node in the local network collects pH data from the local sensor nodes and transmits it via the LoRa-IoT gateway. A LoRa-IoT gateway in a cloud network is used for transmitting sensor data to the cloud server. Biofloc users access the application layer through their computer or smartphone application. _Sensors_ 2025, _25_, 2824 12 of 21 Figure 10. System Architecture of proposed solution where multiple sensor nodes are placed in different aquaculture systems. Control node collects sensor data and store the data to an IoT platform through a gateway. 5. Performance Analysis For IoT-based in situ monitoring of aquaculture, the proposed system employs a control node and multiple sensor nodes to establish a local network within the Biofloc operation area. Sensor nodes are strategically positioned at various depths to ensure accurate data collection in the midst of noisy environment of the tank. Figure 10 illustrates the proposed smart Biofloc architecture. The control sensor node within the local network gathers pH data from these sensors and transmits it via a LoRa-IoT gateway. The LoRa-IoT gateway functionality in the local control node forwards this data to a cloud server. Biofloc users can access the application layer through their computers or a smartphone application. _5.1._ _Current Response of pH Sensor_ The current response of pH sensor indicates how the current varies when the pH of a solution changes [28]. Figure 11a demonstrates how the current changes over time for a given pH value which is chosen from pH 4 to pH 9 with an increment of pH 1. Here, we consider pH values between 4 and 9 since aquaculture applications are well suited to this range. The measuring temperature is 25 <sup>_◦_</sup> C. When the pH is high, we observe that the electrode’s current decreases and for a given pH, the current remains to be stable to a fixed value with a minor variation over time. Figure 11b is obtained from Figure 11a by averaging all the current values at given pH where we observe an inverse nonlinear relationship between the current and pH. The best fit second-order polynomial that relates current to pH is found to be _I_ = 0.0655pH <sup>2</sup> _−_ 1.2337pH + 8.1022 (3) with _R_ <sup>2</sup> = 0.9999 that shows a strong correlation. _Sensors_ 2025, _25_, 2824 <u>13 of 21</u> ( a ) ( b ) Figure 11. Relationship between current and pH. ( a ) Current response of the pH sensor at different pH values. ( b ) Current and pH relation with high linearity. _5.2._ _Temperature Compensation with ML Agorithm_ To develop a relationship between pH, temperature, and current, multiple linear regression is employed using TensorFlow. To verify the created regression model has the minimum sum of squared errors, the multiple linear regression analysis is approximated using the least squares approach [29]. A dataset is collected that has one dependent variable (pH) and two independent variables (temperature and current). The dataset is divided into two categories: testing and training. The training dataset is fitted to a multiple linear regression model. The test dataset is used to make predictions. Using the machine learning model, the following functional relation can be developed between the solution’s pH, temperature (T), and current (I) pH = _K_ 0 + _K_ 1 _T_ + _K_ 2 _I_ (4) where, Temperature in <sup>_◦_</sup> C and _I_ = Current value in micro-Ampere (µA). Metrics such as the coefficient of determination ( _R_ <sup>2</sup> ) value and squared error (SE) are used to assess the model. The output specifications of the multiple linear regression model, provides the following values of the coefficients. _K_ 0 = 10.376 _K_ 1 = 0.0637 _K_ 2 = _−_ 0.1858 Table 5 presents a sample of the training data out of the total of 2924 observations for the regression model consisting of current values observed at given pH and temperature of reference solution. Using a separate set of test data of 1235 observations, the regression model achieves standard error = 0.3 and the _R_ <sup>_2_</sup> value = 0.94. This performance is reasonably accurate for the application of pH measurements in a dynamic Biofloc environment. The Figure 12a demonstrates how the current response of the pH sensor changes due to change in temperature. When the temperature increases with an increment of 5 <sup>_◦_</sup> C, current response shifts upward which captures the temperature effect in pH measurement causing errors in the pH readings without any temperature compensation. In aquaculture environments, where temperature fluctuations are common, the model continuously monitors and compensates for these changes, ensuring long-term accuracy. In Figure 12b the obtained values of pH 6 and 8 at different temperature with our temperature compensated _Sensors_ 2025, _25_, 2824 14 of 21 sensor are compared with the values of a commercial pH meter. Figure 12b also shows how the output reading of the proposed pH meter continuously indicates pH 6 as a result of the adjustment when the temperature varies. Taking temperature variations into account, this finding suggests that, in comparison to its commercially available counterpart, the proposed novel low-cost designed sensor with temperature compensation offers comparable accuracy. Therefore, we can claim that the temperature compensated sensor provides good accuracy and efficient temperature adjustment at a commercial level resulting in the decreased variance in pH measurements. This characteristic is important in various applications where precise pH measurement is essential, ensuring that the sensor’s performance is reliable even under varying temperature conditions. Table 5. Training data of multiple linear regression model. pH Temperature ( <sup>_◦_</sup> C) Current (µA) <u>4</u> <u>18.97</u> <u>4.04</u> <u>4</u> <u>20.00</u> <u>4.09</u> <u>4</u> <u>24.03</u> <u>4.20</u> <u>4</u> <u>28.49</u> <u>4.35</u> <u>5</u> <u>20.16</u> <u>3.45</u> <u>5</u> <u>24.02</u> <u>3.54</u> <u>5</u> <u>29.50</u> <u>3.61</u> <u>6</u> <u>22.60</u> <u>3.06</u> <u>6</u> <u>27.10</u> <u>3.11</u> <u>6</u> <u>35.71</u> <u>3.35</u> <u>6</u> <u>38.88</u> <u>3.53</u> <u>7</u> <u>18.02</u> <u>2.48</u> <u>7</u> <u>22.46</u> <u>2.60</u> <u>7</u> <u>25.81</u> <u>2.70</u> <u>7</u> <u>30.03</u> <u>2.84</u> <u>8</u> <u>16.50</u> <u>2.11</u> <u>8</u> <u>23.70</u> <u>2.42</u> <u>8</u> <u>32.28</u> <u>2.65</u> <u>9</u> <u>20.00</u> <u>2.44</u> 9 36.80 2.62 _5.3._ _Response Time_ One of the important quality indicators of a pH sensor is the response time. To evaluate the response time of our pH sensor, a pH 4 solution is considered for testing at a controlled temperature of 25 <sup>_◦_</sup> C. The resultant current-time variation is illustrated in Figure 13a, where it is evident that the sensor takes approximately 125 ms to reach 90% of its steady-state reading. Subsequently, as shown in Figure 13b, a different experimental condition involving a change in the pH of the solution from pH 5 to pH 4, the dynamic response time of the sensor is examined. Here, a dynamic response time of 320 ms is observed. This finding underscores the sensor’s ability to swiftly and accurately adapt to variations in pH, making it a suitable tool for real-time monitoring and control applications. These results affirm the effectiveness and efficiency of the proposed pH sensor in responding to dynamic changes in pH levels. _Sensors_ 2025, _25_, 2824 15 of 21 ( a ) ( b ) Figure 12. Temperature compensation of the pH sensor. ( a ) Different pH values at different temperature without temperature compensation ( b ) Measured pH with respect to temperature using our temperature compensated pH sensor and a commercial pH meter. ( a ) ( b ) Figure 13. Response time of the sensor. ( a ) Response time of the pH sensor when pH is 4 ( b ) Dynamic response time with alternation of pH. The sensor’s response time ensures consistent performance across a range of conditions. The robust construction and optimized materials of the sensor contribute to its ability to deliver accurate and timely measurements, making it well suited for dynamic environments. _5.4._ _Sensitivity_ Another performance indicator is the pH sensor’s sensitivity, or the slope of its current response curve [30]. The current response of this sensor is displayed as a second-order non-linear equation in Figure 11b. To obtain the sensitivity, we therefore take the derivative of that equation. At a constant temperature of 25 <sup>_◦_</sup> C, we obtain different sensitivities for different pH values. The sensitivity values in µA/pH for various pH solutions are displayed in Figure 14. _Sensors_ 2025, _25_, 2824 16 of 21 Figure 14. Sensitivity of the sensor for different pH values at 25 <sup>_◦_</sup> C. pH and sensitivity have a linear relationship with a negative correlation. Thus, the following formula can be used to determine the sensor’s sensitivity. _I_ = _−_ ( _m_ _×_ pH) + _C_ (5) where, _I_ = sensitivity in µA/pH, _m_ = slope of the straight line, _C_ = constant as y-intercept The values of _m_ and _C_, as determined by curve fitting, are _m_ = _−_ 0.131 and _C_ = 1.2337. ISFET and ZnO sensors offer higher sensitivity while they are significantly more expensive to produce and maintain [31]. The proposed sensor strikes a balance between improved sensitivity and cost-effectiveness, making it a more practical and accessible solution for applications like aquaculture, where affordability and reliability are critical considerations. The trade-offs between sensor sensitivity and long-term stability are a key consideration in designing pH sensors for aquaculture monitoring. High sensitivity is crucial for detecting subtle changes in water quality, while long-term stability ensures reliable operation with minimal maintenance. By optimizing material selection and incorporating protective measures, a balance is achieved that meets the practical demands of aquaculture environments. _5.5._ _Stability_ Stability is another performance parameter that determines output precision. Here, we would like to assess the long-term stability and performance of a pH sensor, a factor that reflects the reliability of pH measurements. The use of bipolar biasing current through the electrode will make it more tolerable to the electrolysis/electroplating effect, hence maintaining physical properties unchanged for a long time, however, regular cleaning is still recommended to counteract the effects of dissolved organic matter. Regular cleaning, antifouling coatings, or the use of mechanical wipers can help maintain electrode performance. Gold’s smooth surface also makes it easier to clean compared to rougher materials. Robust materials like gold, along with bipolar biasing current is resist corrosion and fouling. Designing electrodes with smooth surfaces minimizes fouling sites. Use wipers, brushes, or ultrasonic cleaning systems to periodically remove fouling agents from the electrode surface. A conventional reference electrode relies on an internal electrolyte (KCl) and a redox couple (Ag/AgCl), both of which can become contaminated or depleted over time, resulting _Sensors_ 2025, _25_, 2824 17 of 21 in instability. Long-term stability is improved by removing the necessity for the chemical system by incorporating the buffer solution’s electrochemical analogy to a known currentlimiting resistor. Additionally, reference electrodes are fragile and prone to damage in harsh environments like aquaculture, whereas a biasing resistor is more robust and less likely to degrade, further enhancing stability. Due to changes in the electrolyte concentration or junction blockage, the voltage at the liquid junction of conventional reference electrodes can fluctuate. A biasing resistor, which does not require a liquid junction, can reduce the fluctuation. By substituting a biasing resistor for a traditional reference electrode, drifts caused by the mechanical and chemical constraints of the reference electrode can be minimized and long-term stability enhanced. To capture the notion of stability, a meticulous and extended observation is conducted, involving the measurement of pH values across three distinct solutions, each with pH values of 6, 7, and 8. These measurements were consistently recorded over two days. This extended observation period is essential for validating the sensor’s consistent performance over time. Figure 15 illustrates the outcome of this analysis based on two days of observations. The median and standard deviation of current values of pH 6, 7, and 8 are measured based on the data taken over each day to check the stability. It is evident that the median and the standard deviation of the current values remains to be the same for each of the observed days. This observation provides the evidence that the sensor maintains a consistent level of performance throughout the experiment, ensuring stable and reliable pH measurements over time. Figure 15. Stability of the sensor; Measured median and standard deviation values of pH 6,7 and 8 over two days. The stability tests were conducted for pH 6, 7, and 8 because these values represent the optimal and most relevant pH range for a Biofloc aquaculture environment. In Biofloc systems, maintaining pH within this range is critical for the health and survival of fish, as extreme pH conditions (such as pH 4 or 9) can cause stress or even death to aquatic organisms. Since the sensor is designed for practical aquaculture applications, its performance was validated under conditions that reflect real-world operational requirements. Testing within the pH 6–8 range ensures the sensor’s reliability and accuracy in environments where maintaining stable water quality is essential for fish health and system productivity. Extreme pH conditions, while theoretically important, are not typically encountered in well-managed Biofloc systems, making the chosen range both practical and scientifically justified. _5.6._ _Comparative Evaluation_ This subsection compares the sensor properties and performance parameters of our study with the works mentioned in the related work section. Table 6 presents a comparison _Sensors_ 2025, _25_, 2824 18 of 21 of the significant features of all the works discussed. Although our work is based on in situ application, we also consider in-lab, online or remote monitoring of pH for a wide range of comparisons, summarized in this table. For most of the works, accuracy is not quantified clearly. The measurable pH range of our sensor spans from pH 4 to pH 9 (pH buffer solution, Zhengzhou Wollen Instrument Equipment Co., Ltd., Zhengzhou, China), which aligns with the optimal pH range for Biofloc fish farming. Our work is based on the electrical current limiter approach which is simple and easy to use compared to MEMS, ISFET, optical fiber electrode or any other electrode types. Compared to all other works our sensor’s response time is improved by 4 times. Sensitivity is also improved significantly. There is limited information available in the literature regarding the actual cost management of existing sensors. However, we have provided a comparison of the technologies used, which offers insights into the potential costs of the sensors listed in the comparison table, relative to the proposed sensor. Furthermore, we conducted an analysis of industrial-level pH meters and found that temperature-compensated pH meters are generally more expensive [32]. In contrast, the calibration-free design and simple construction of the proposed pH sensor make it a more affordable and cost-effective solution for aquaculture applications. Table 7 presents a comparative view of the limitations of existing pH sensors along with the solutions of the proposed work. Table 6. Output comparison among proposed work and references. Features Proposed Work [15] [13] [12] [11] <u>Monitoring Type</u> <u>In situ</u> <u>In situ</u> <u>Not available</u> <u>Real time</u> <u>In situ</u> Biofloc Biochemical Uses Drinking water <u>aquaculture</u> <u>applications</u> Agricultural <u>applications</u> Sea water <u>monitoring</u> <u>Accuracy</u> <u>Good</u> <u>Good</u> <u>Good</u> <u>Good</u> <u>Good</u> <u>pH range</u> <u>4–9</u> <u>Not available</u> <u>6–8</u> <u>Not available</u> <u>0–14</u> Metal oxide micro electrode Technology/Process <sup>Electrical current</sup> MEMS limiter Tapered Multimode <u>Optical Fiber</u> ISFET based sensing <u>Response Time</u> <u>125 ms</u> <u><4 s</u> <u>0.5 s</u> <u>Not available</u> <u>Not available</u> 1001.57 70.1 _±_ 1.4 Sensitivity 0.316 µA/pH 0.288 mA/pH 55 mv/pH <u>counts/pH</u> <u>mv/pH</u> <u>Cost</u> <u>Low</u> <u>Not available</u> <u>Not available</u> <u>Not available</u> <u>Not available</u> Power Low Not available Low Not available Not available <u>Consumption</u> Stability High High High Low High Table 7. Comparison among limitations of existing sensors and the solutions of proposed work. Types of pH Sensors Limitations of the Existing Sensors Solutions of the Proposed Sensor Traditional potentiometric pH <u>sensors</u> Different electrode material-based pH sensors Inaccuracies due to biofouling and Resistive to biofouling and corrosion electrode corrosion Frequent calibrations and <u>maintenance</u> No need for calibration and frequent <u>maintenance</u> _Sensors_ 2025, _25_, 2824 19 of 21 Table 7. _Cont._ Types of pH Sensors Limitations of the Existing Sensors Solutions of the Proposed Sensor Integrated with IoT based systems for remote monitoring and real time <u>data collection</u> Simple construction with current limiting approach Temperature compensation reduces inaccuracies Optical Fiber pH sensors ISFET/IGFET based pH sensors Temperature uncompensated pH sensors Sometimes cannot be implemented with IoT based systems for remote <u>monitoring</u> Need daily calibration, complex design and costly solutions for <u>aquaculture</u> No compensation for temperature fluctuations 6. Conclusions A low-cost, temperature-compensated electronic calibration-based pH sensor for in situ aquaculture applications was presented in this paper. Temperature compensation was achieved by a machine learning algorithm to eliminate temperature-related errors. Electronic calibration is achieved by applying a current limiting approach to the sensor which eliminates maintenance and calibration problems of the pH sensor. A full architecture of how a user can remotely access the pH data of a local sensor network is also proposed. The proposed designed sensor demonstrates a reaction time of 125 ms and sensitivity of 0.316 µA/pH with a satisfactory stability. Therefore, the outcomes of these performance parameters ensure the suitability of this sensor for real time monitoring of aquaculture applications. In the long term, we intend to develop a multi-sensor system for complete monitoring of other water quality parameters of a Biofloc tank. Enabling compensation for nonlinearities in sensor response across the Biofloc tank with various chemical and biological compositions is another long-term objective. Author Contributions: Conceptualization, G.M.A.E.U.R., S.U.A. and B.M.A.Z.; methodology, S.U.A., G.M.A.E.U.R. and B.M.A.Z.; software, S.U.A., G.M.A.E.U.R. and B.M.A.Z.; validation, B.M.A.Z., S.U.A., G.M.A.E.U.R. and K.I.U.A.; formal analysis, B.M.A.Z., S.U.A. and G.M.A.E.U.R.; investigation, S.U.A., B.M.A.Z. and G.M.A.E.U.R.; resources, G.M.A.E.U.R. and K.I.U.A.; data curation, G.M.A.E.U.R., B.M.A.Z. and S.U.A.; writing—original draft preparation, B.M.A.Z. and S.U.A.; writing—review and editing, G.M.A.E.U.R. and K.I.U.A.; visualization, G.M.A.E.U.R., B.M.A.Z. and S.U.A.; supervision, K.I.U.A. and G.M.A.E.U.R.; project administration, K.I.U.A.; funding acquisition, K.I.U.A. All authors have read and agreed to the published version of the manuscript. Funding: This research was funded by Institute of Advance Research (IAR), United International University, Dhaka, Bangladesh, grant number UIU/IAR/02/2021/SE/29. Institutional Review Board Statement: Not applicable. Informed Consent Statement: Not applicable. Data Availability Statement: Data are contained within the article. Conflicts of Interest: The authors declare no conflicts of interest. References 1. Halim, M.A.; Nahar, S.; Nabi, M.M. Biofloc Technology in Aquaculture and Its Potentiality: A Review. _Int._ _J. Fish._ _Aquat._ _Stud._ 2019, _7_, 260–266. 2. Yu, Y.B.; Choi, J.H.; Lee, J.H.; Jo, A.H.; Lee, K.M.; Kim, J.H. Biofloc Technology in Fish Aquaculture: A Review. _Antioxidants_ 2023, _12_, 398. [[CrossRef] [PubMed]](https://doi.org/10.3390/antiox12020398) 3. Vivaldi, F.; Salvo, P.; Poma, N.; Bonini, A.; Biagini, D.; Del Noce, L.; Melai, B.; Lisi, F.; Di Francesco, F. Recent Advances in Optical, Electrochemical and Field Effect PH Sensors. _Chemosensors_ 2021, _9_, 33. [[CrossRef]](https://doi.org/10.3390/chemosensors9020033) _Sensors_ 2025, _25_, 2824 20 of 21 4. Saalidong, B.M.; Aram, S.A.; Otu, S.; Lartey, P.O. Examining the Dynamics of the Relationship between Water PH and Other Water Quality Parameters in Ground and Surface Water Systems. _PLoS ONE_ 2022, _17_, e0262117. [[CrossRef]](https://doi.org/10.1371/journal.pone.0262117) 5. Schmidt, J.; Ithuralde, R.E. A New Teaching Laboratory Experiment to Address the Effect of PH on Solubility. _Chem._ _Educ._ 2017, _22_, 70–72. 6. Kawaguchi, S.; Nomoto, R.; Sato, H.; Takarada, T.; Chang, Y.H.; Kawarada, H. PH Measurement at Elevated Temperature with Vessel Gate and Oxygen-Terminated Diamond Solution Gate Field Effect Transistors. _Sensors_ 2022, _22_, 1807. [[CrossRef]](https://doi.org/10.3390/s22051807) 7. Manjakkal, L.; Dervin, S.; Dahiya, R. Flexible Potentiometric PH Sensors for Wearable Systems. _RSC Adv._ 2020, _10_, 8594–8617. [[CrossRef] [PubMed]](https://doi.org/10.1039/D0RA00016G) 8. Pereira, J.M.; Mendes, J.P.; Dias, B.; de Almeida, J.M.M.M.; Coelho, L.C.C. Optical PH Sensor Based on a Long-Period Fiber Grating Coated with a Polymeric Layer-by-Layer Electrostatic Self-Assembled Nanofilm. _Sensors_ 2024, _24_, 1662. [[CrossRef]](https://doi.org/10.3390/s24051662) 9. PH Indicators—Chemistry LibreTexts. Available online: [https://chem.libretexts.org/Bookshelves/Physical_and_Theoretical_](https://chem.libretexts.org/Bookshelves/Physical_and_Theoretical_Chemistry_Textbook_Maps/Supplemental_Modules_%0x28Physical_and_Theoretical_Chemistry%0x29/Acids_and_Bases/Acid_and_Base_Indicators/PH_Indicators) [Chemistry_Textbook_Maps/Supplemental_Modules_(Physical_and_Theoretical_Chemistry)/Acids_and_Bases/Acid_and_](https://chem.libretexts.org/Bookshelves/Physical_and_Theoretical_Chemistry_Textbook_Maps/Supplemental_Modules_%0x28Physical_and_Theoretical_Chemistry%0x29/Acids_and_Bases/Acid_and_Base_Indicators/PH_Indicators) [Base_Indicators/PH_Indicators (accessed on 10 September 2023).](https://chem.libretexts.org/Bookshelves/Physical_and_Theoretical_Chemistry_Textbook_Maps/Supplemental_Modules_%0x28Physical_and_Theoretical_Chemistry%0x29/Acids_and_Bases/Acid_and_Base_Indicators/PH_Indicators) 10. Shafigh, P.; Loh, P.-Y. Solution Temperature Compensation Factor for the Measured PH Value of Cement-Based Materials. _J. Eng._ 2025, _2025_, 5558600. [[CrossRef]](https://doi.org/10.1155/je/5558600) 11. Chen, Y.; Compton, R. A Calibration-Free PH Sensor Using an In-Situ Modified Ir Electrode for Bespoke Application in Seawater. _Sensors_ 2022, _22_, 3286. [[CrossRef]](https://doi.org/10.3390/s22093286) 12. Riedel, V.; Hinck, S.; Peiter, E.; Ruckelshausen, A. Handling of Ion-Selective Field-Effect Transistors (ISFETs) on Automatic Measurements in Agricultural Applications Under Real-Field Conditions. _Electronics_ 2024, _13_, 4958. [[CrossRef]](https://doi.org/10.3390/electronics13244958) 13. Zhang, B.; Mumtaz, F.; Roman, M.; Alla, D.R.; Gerald II, R.E.; Huang, J. Miniaturized Fluorescence PH Sensor with Assembly Free Ball Lens on a Tapered Multimode Optical Fiber. _Opt._ _Express_ 2024, _32_, 4228. [[CrossRef] [PubMed]](https://doi.org/10.1364/oe.511190) 14. Zheng, Y.; Chen, L.H.; Dong, X.; Yang, J.; Long, H.Y.; So, P.L.; Chan, C.C. Miniature PH Optical Fiber Sensor Based on Fabry-Perot Interferometer. _IEEE J. Sel._ _Top._ _Quantum Electron._ 2016, _22_, 331–335. [[CrossRef]](https://doi.org/10.1109/JSTQE.2015.2497438) 15. Wang, X.; Sun, L.; Wang, T.; Shi, Y. Temperature-Compensated PH Microelectrode Array Sensors Based on CopperOxide/Polyaniline Modification. _IEEE Sens._ _J._ 2020, _20_, 14598–14606. [[CrossRef]](https://doi.org/10.1109/JSEN.2020.3010709) 16. Madeira, G.D.M.; Hugo, H.J.; Faleiros, M.C.; Mulato, M. Model Improvement for Super-Nernstian PH Sensors: The Effect of Surface Hydration. _J. Mater._ _Sci._ 2021, _56_, 2738–2747. [[CrossRef]](https://doi.org/10.1007/s10853-020-05412-w) 17. How Does Temperature Affect PH? Available online: [https://www.westlab.com/blog/how-does-temperature-affect-ph (ac-](https://www.westlab.com/blog/how-does-temperature-affect-ph) cessed on 26 March 2024). 18. Recent Trends in Aquaculture Biofloc Fish Culture. National Fisheries Development Board. [Available online: https://nfdb.gov.in/](https://nfdb.gov.in/) (accessed on 23 March 2025). 19. Loubany, A.; Lahoud, S.; Samhat, A.E.; El Helou, M. Improving Energy Efficiency in LoRaWAN Networks with Multiple Gateways. _Sensors_ 2023, _23_, 5315. [[CrossRef] [PubMed]](https://doi.org/10.3390/s23115315) 20. Pires, L.M.; Gomes, J. River Water Quality Monitoring Using LoRa-Based IoT. _Designs_ 2024, _8_, 127. [[CrossRef]](https://doi.org/10.3390/designs8060127) 21. Ahmed, M.A.; Gallardo, J.L.; Zuniga, M.D.; Pedraza, M.A.; Carvajal, G.; Jara, N.; Carvajal, R. LoRa Based IoT Platform for Remote Monitoring of Large-Scale Agriculture Farms in Chile. _Sensors_ 2022, _22_, 2824. [[CrossRef]](https://doi.org/10.3390/s22082824) 22. Medina-Bailon, C.; Kumar, N.; Dhar, R.P.S.; Todorova, I.; Lenoble, D.; Georgiev, V.P.; García, C.P. Comprehensive Analytical Modelling of an Absolute PH Sensor. _Sensors_ 2021, _21_, 5190. [[CrossRef]](https://doi.org/10.3390/s21155190) 23. Ma, Y.; Deng, Y.; Xie, C.; Zhang, B.; Shen, B.; Zhang, M.; Yin, L.; Liu, X.; van der Spiegel, J. A Review of Electrochemical Electrodes and Readout Interface Designs for Biosensors. _IEEE Open J. Solid-State Circuits Soc._ 2022, _3_, 76–88. [[CrossRef]](https://doi.org/10.1109/OJSSCS.2022.3221924) 24. Silver and Gold—Comparison—Properties—Material Properties. Available online: [https://material-properties.org/silver-and-](https://material-properties.org/silver-and-gold-comparison-properties/) [gold-comparison-properties/ (accessed on 10 September 2023).](https://material-properties.org/silver-and-gold-comparison-properties/) 25. Chromium—Strength—Hardness—Elasticity—Crystal Structure. Available online: [https://material-properties.org/chromium-](https://material-properties.org/chromium-mechanical-properties-strength-hardness-crystal-structure/) [mechanical-properties-strength-hardness-crystal-structure/ (accessed on 10 September 2023).](https://material-properties.org/chromium-mechanical-properties-strength-hardness-crystal-structure/) 26. Gomori, G. Preparation of Buffers for Use in Enzyme Studies. In _Handbook of Biochemistry and Molecular Biology_, 4th ed.; CRC Press: Boca Raton, FL, USA, 2010; pp. 721–724. ISBN 9781466515154. 27. Ciobanu, M.; Wilburn, J.P.; Krim, M.L.; Cliffel, D.E. Fundamentals. In _Handbook of Electrochemistry_ ; Elsevier: Amsterdam, The Netherlands, 2007. [[CrossRef]](https://doi.org/10.1016/B978-044451958-0.50002-1) 28. Potapowicz, J.; Szumi´nska, D.; Szopi´nska, M.; Czapiewski, S.; Polkowska, Z. Electrical Conductivity and PH in Surface Water as Tool for Identification of Chemical Diversity. _Ecol._ _Chem._ _Eng._ _S_ 2020, _27_, 95–111. [[CrossRef]](https://doi.org/10.2478/eces-2020-0006) 29. Pento´s, K.; Mbah, J.T.; Pieczarka, K.; Niedbała, G.; Wojciechowski, T. Evaluation of Multiple Linear Regression and Machine Learning Approaches to Predict Soil Compaction and Shear Stress Based on Electrical Parameters. _Appl._ _Sci._ 2022, _12_, 8791. [[CrossRef]](https://doi.org/10.3390/app12178791) 30. Kim, Y.U.; Cho, W.J. Smart PH Sensing: A Self-Sensitivity Programmable Platform with Multi-Functional Charge-Trap-Flash ISFET Technology. _Sensors_ 2024, _24_, 1017. [[CrossRef] [PubMed]](https://doi.org/10.3390/s24031017) _Sensors_ 2025, _25_, 2824 21 of 21 31. Cao, S.; Sun, P.; Xiao, G.; Tang, Q.; Sun, X.; Zhao, H.; Zhao, S.; Lu, H.; Yue, Z. ISFET-Based Sensors for (Bio)Chemical Applications: A Review. _Electrochem._ _Sci._ _Adv._ 2023, _3_, e2100207. [[CrossRef]](https://doi.org/10.1002/elsa.202100207) 32. Digital PH Controller with Temperature Compensation 4.5~8.5 pH Adjustable PH Control Range Dual Relay Output Easy Plug and Play Operation PH Measurement for Aquarium, Hydroponics System: Amazon.Com: Industrial & Scientific. Available online: [https://www.amazon.com/Controller-Temperature-Compensation-Measurement-Hydroponics/dp/B0CRH74PNZ](https://www.amazon.com/Controller-Temperature-Compensation-Measurement-Hydroponics/dp/B0CRH74PNZ) (accessed on 21 March 2025). Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

섹션 본문 132문단 · 63,959자

(제목 없음)

1For aquaculture systems, pH is the prime quality indicator and is highly related to other water quality indicators like ammonia and ammonium ions.The available pH sensors using chemical references are not suitable for continuous in situ monitoring of aquaculture systems due to their frequent calibration requirement and high cost.This research develops a pH sensor with temperature compensation implementing a machine learning (ML) algorithm.Unlike traditional methods, this sensor utilizes electronic calibration, eliminating the need for chemical calibration and ongoing maintenance efforts.The application of this low-cost sensor is particularly well suited for in situ aquaculture scenarios, where multiple local sensor nodes operate under the control of a master node.The test results of the developed sensor show an improved sensitivity from 0.288 µA/pH to 0.316 µA/pH compared to the available pH sensors.Additionally, the response time has been improved from 1 s to 125 ms, showcasing the suitability of this pH sensor for real-time water quality monitoring of aquaculture applications.

Introduction

2Because of the increasing global population, we need environmentally friendly methods for food production.Biofloc fish farming provides a reliable and eco-friendly solution, and has become popular among fish farmers [1].The success of fish production in aquaculture systems depends on water quality, which includes pH, ammonia, dissolved oxygen (DO), total dissolved solids (TDS), and chloride [2].To keep fish healthy in a Biofloc tank, it's crucial to monitor these factors consistently.However, many available sensors require costly equipment and manual operation, and sometimes they provide inaccurate readings due to calibration issues [3].Therefore, we aim to create cost-effective IoT sensors for real-time monitoring of the key water quality parameters.Integrating existing sensors in an IoT sensor node posed challenges due to compatibility issues.To overcome this, we have developed a new pH sensor that seamlessly interfaces with the real-time IoT sensor node, complete with temperature compensation.pH stands out as a crucial water quality indicator, reflecting various other parameters, such as alkalinity, CO 2 , dissolved oxygen (DO), total dissolved solids (TDS), biochemical oxygen demand (BOD), chloride, ammonia, and ammonium ions in aquatic environments [4].Additionally, pH plays a role in solubility reactions, metal concentration, and chemical processes such as oxidation and reduction [5].

3Figure 1 outlines the proposed setup for an aquaculture system, where sensors are placed at different depths within a Biofloc tank for effective data collection.Through the sensor nodes at different depths, the control node obtains pH data from the tank.After that, the multipoint data are compressed and processed at the control node.Figure 2 presents the potential architecture of a smart aquaculture system.Sensor nodes are connected to a local control node wirelessly through LoRa links, which serves as the concentrator.All the sensor nodes form a local Wireless Sensor Network (WSN) with the concentrator.The concentrator collects data from the sensor nodes and transmits them to the remote server located in the IoT cloud via the collocated LoRa-IoT gateway.Users can access these data anytime, anywhere, using a smart phone application.Additionally, users can obtain data locally from the concentrator when the WSN has limited or no internet access to ensure continuous data transmission to the IoT server.

4oxygen (DO), total dissolved solids (TDS), biochemical oxygen demand (BOD), chloride, ammonia, and ammonium ions in aquatic environments [4].Additionally, pH plays a role in solubility reactions, metal concentration, and chemical processes such as oxidation and reduction [5]. Figure 1 outlines the proposed setup for an aquaculture system, where sensors are placed at different depths within a Biofloc tank for effective data collection.Through the sensor nodes at different depths, the control node obtains pH data from the tank.After that, the multipoint data are compressed and processed at the control node.Figure 2 presents the potential architecture of a smart aquaculture system.Sensor nodes are connected to a local control node wirelessly through LoRa links, which serves as the concentrator.All the sensor nodes form a local Wireless Sensor Network (WSN) with the concentrator.The concentrator collects data from the sensor nodes and transmits them to the remote server located in the IoT cloud via the collocated LoRa-IoT gateway.Users can access these data anytime, anywhere, using a smart phone application.Additionally, users can obtain data locally from the concentrator when the WSN has limited or no internet access to ensure continuous data transmission to the IoT server.The pH level measurement in aqueous media can be categorized in various criteria, such as intelligence, application, and operating principles as illustrated in Figure 3. oxygen (DO), total dissolved solids (TDS), biochemical oxygen demand (BOD), chloride, ammonia, and ammonium ions in aquatic environments [4].Additionally, pH plays a role in solubility reactions, metal concentration, and chemical processes such as oxidation and reduction [5]. Figure 1 outlines the proposed setup for an aquaculture system, where sensors are placed at different depths within a Biofloc tank for effective data collection.Through the sensor nodes at different depths, the control node obtains pH data from the tank.After that, the multipoint data are compressed and processed at the control node.Figure 2 presents the potential architecture of a smart aquaculture system.Sensor nodes are connected to a local control node wirelessly through LoRa links, which serves as the concentrator.All the sensor nodes form a local Wireless Sensor Network (WSN) with the concentrator.The concentrator collects data from the sensor nodes and transmits them to the remote server located in the IoT cloud via the collocated LoRa-IoT gateway.Users can access these data anytime, anywhere, using a smart phone application.Additionally, users can obtain data locally from the concentrator when the WSN has limited or no internet access to ensure continuous data transmission to the IoT server.The pH level measurement in aqueous media can be categorized in various criteria, such as intelligence, application, and operating principles as illustrated in Figure 3.The pH level measurement in aqueous media can be categorized in various criteria, such as intelligence, application, and operating principles as illustrated in Figure 3. ent pH levels without relying on any mathematical equation [9].Nevertheless, this approach proves its limitations for in situ and real-time pH monitoring applications such as aquaculture.There are two types of pH sensing based on the application: in situ and in-lab.While in-lab sensors provide more accurate results compared to their in situ counterparts, in situ sensors are better suited for real-time monitoring of aquaculture systems.Intelligent sensor nodes integrate temperature-compensation algorithm making it better suited for Biofloc application.Conversely, the uncompensated sensors involve inaccuracy in pH values with the fluctuations of temperature [10].

5These available sensors pose challenges when deployed in aquaculture settings, attributed to their extended response times, restricted sensitivity, and stability issues.Furthermore, their design hinders seamless integration with other devices such as with wireless sensor nodes.These limitations underscore the need for the development of sensors that align with the required criteria.

6The primary contribution of this work is the development of an affordable, temperature-compensated pH sensor to enable electronic calibration and in situ application for real-time monitoring of water quality in Biofloc environments.In our approach, multiple sensors are integrated into a local WSN through LoRa.This facilitates instantaneous data retrieval for effective management and ensures long-term data availability for future research, as well as comprehensive analysis of Biofloc environment parameters, including yield and quality.Based on its construction and operating principle, the pH-sensing method can be divided into three groups: potentiometric, photometric, and colorimetric.The most widely used pH sensors are based on potentiometric methods specifically using the glass electrode pH method [6].This type of pH sensor uses a glass electrode filled with a Potassium Chloride (KCl) solution of a known pH and a reference electrode.However, the reference electrode is susceptible to corrosion during oxidation, leading to a decline in accuracy over time.Consequently, despite its popularity, this method presents challenges related to the need for frequent calibration.Electrochemical potentiometric pH sensors use two electrodes to directly monitor electrochemical reactions in order to determine the pH of biological samples [7].The photometric method of measuring pH relies on expensive and complex glass or plastic optical fiber [8] to stimulate the compounds in the pH sensor and detect light emission.Conversely, the colorimetric method employs budget-friendly indicator dyes such as litmus or phenolphthalein, visually altering the color to indicate different pH levels without relying on any mathematical equation [9].Nevertheless, this approach proves its limitations for in situ and real-time pH monitoring applications such as aquaculture.

7There are two types of pH sensing based on the application: in situ and in-lab.While in-lab sensors provide more accurate results compared to their in situ counterparts, in situ sensors are better suited for real-time monitoring of aquaculture systems.Intelligent sensor nodes integrate temperature-compensation algorithm making it better suited for Biofloc application.Conversely, the uncompensated sensors involve inaccuracy in pH values with the fluctuations of temperature [10].

8These available sensors pose challenges when deployed in aquaculture settings, attributed to their extended response times, restricted sensitivity, and stability issues.Furthermore, their design hinders seamless integration with other devices such as with wireless sensor nodes.These limitations underscore the need for the development of sensors that align with the required criteria.

9The primary contribution of this work is the development of an affordable, temperaturecompensated pH sensor to enable electronic calibration and in situ application for real-time monitoring of water quality in Biofloc environments.In our approach, multiple sensors are integrated into a local WSN through LoRa.This facilitates instantaneous data retrieval for effective management and ensures long-term data availability for future research, as well as comprehensive analysis of Biofloc environment parameters, including yield and quality.

10To enhance the sensor's accuracy and stability, a lightweight Machine Learning (ML) algorithm has been incorporated at the sensor node.This algorithm serves the dual purpose of temperature compensation and multipoint data compression.The strategic use of LoRa technology and the lightweight ML algorithm is focused on achieving low energy consumption within the local WSN, thereby extending the overall lifespan.

Related Works

11The recent literature related to the development of pH sensors and their applications in a WSN is reviewed.Development of electrode-based sensors is found suitable for wireless sensing applications aided by various compensation and compression algorithms.

12Yuqi Chen and Richard Compton in [11] have developed a bespoke calibration-free pH sensor using an in situ modified iridium electrode for applications in seawater.The electrochemical behavior of an iridium wire in air-saturated synthetic seawater is investigated, and the formation of pH-sensitive surface layers is observed.However, they do not concentrate on temperature compensation of pH measurement.

13Riedel et al. in [12] demonstrate an ISFET-based agricultural sensing system for water and soil, focusing mainly on drift compensation and offset correction mechanisms.However, they do not consider enough the response time, sensitivity, flexibility of sensing elements, and disposal options.

14Zhang et al. in [13] demonstrate a miniaturized pH sensor utilizing an assemblyfree ball lens on a tapered multimode optical fiber (TMMF), offering the potential to revolutionize pH sensing in biochemical applications.They provide improved signal collection efficiency, which tackles the ongoing problems caused by low signal-to-noise ratios.Though effective, it's a costly solution for aquaculture applications.

15Swelling action of the polyvinyl alcohol (PVA)/polyacrylic acid (PAA) hydrogen sensing sheet is used in [14] to generate optical path modulation at different pH solutions.In addition to the complex structure, this photometric pH sensor is not suitable for integration in a wireless sensor node for real-time applications.

16Wang et al. in [15] have developed a micro electro mechanical system (MEMS) of three electrodes to measure the temperature and pH focusing on better temperature compensation.Machine Learning (ML) algorithms were utilized to overcome issues related to the size of the electrode and stability at high temperature.However, they do not concentrate on issues like corrosion of the electrode due to the chemical reactions with water-based substances.

pH Measurement

17Various methods are employed for pH measurement depending on the application.The colorimetric approach involves immersing an indicator in the test solution, and the resulting color change is matched to a specific color representing a particular pH.In the photometric method, a photodiode and LED detect luminescence in the pH sensor by stimulating its components.However, both colorimetric and photometric methods have limited applications due to their structural constraints and lower accuracy.Among the electrode-based potentiometric pH measurements, the glass electrode method, using a glass electrode and a reference electrode, measures the voltage between the two electrodes to determine solution pH.The antimony electrode method uses a polished antimony rod to gauge pH by comparing potential differences with a reference electrode.

18The semiconductor electrode method utilizes a semiconductor device to measure ion concentration fluctuations in a solution, detecting changes in current flowing through the transistor.Platinum black is applied to the platinum wire or plate to create a hydrogen electrode, immersed in the test solution, and charged with electricity until saturated with hydrogen gas.The potential difference between the platinum black electrode and the silver chloride electrode is then measured to get the pH.

Temperature Compensation of pH

19The Nernst equation establishes a connection between pH and temperature [16].In a solution, the concentration of hydrogen ions can change with the temperature fluctuations.Table 1 illustrates the impact of temperature increases on pH values [17].Specifically, the pH value increases for acidic solutions when the temperature increases.Conversely, for neutral or alkaline solutions, the pH value decreases as the temperature increases.To ensure accurate readings, it is essential to correct the pH values for temperature variations.Temperature compensation is employed to adjust the pH at the measurement temperature to the pH at a reference temperature of 25 • C.

Biofloc Fish Farming

20Biofloc is an eco-friendly fish farming technique designed to minimize environmental impact, founded on the principles of in situ microbial growth and flocculation.This system ensures water quality by maintaining a higher Carbon-Nitrogen (C-N) ratio through additional carbohydrate supply.The composition of Biofloc includes microorganisms like bacteria, algae, fungi, invertebrates, and detritus.The toxic nitrogen species immobilize more rapidly in Biofloc making water quality preservation a key aspect.

21Table 2 summarizes the specifications of a Biofloc system.A Biofloc farm typically comprises multiple tanks, each 4 m in diameter, 1.5 m in height, and 1.2 m in depth, with a storage capacity of about 15,000 L of water per tank.Key water quality characteristics include pH within the range of 6.5 to 8.5, alkalinity, dissolved oxygen (DO) at 5 mg/L, temperature, total dissolved solids (TDS) at 600 ppm, ammonia at 0.5 ppm, and nitrate at 150 ppm.Biofloc systems are versatile and suitable for various types of aquatic life including: air-breathing fish such as Singhi, Magur, Pabda; those that do not breathe air like Common Carp, Rohu, and Milkfish; as well as shellfish like Vannamei and Tiger Shrimp [18].

ML for Normalization, Calibration and Compression

22ML algorithms are employed for multipoint data compression, data normalization, and temperature compensation.This involves compressing multipoint data into single data points.Subsequently, the compressed dataset undergoes normalization to identify outliers and assess data quality.The processed dataset is then obtained by verifying the remedial measures applied to the normalized data.Once the dataset of predictor variables is selected from the entire dataset, the statistical analysis and residuals of the model are examined and fitted.Following further confirmation of corrective measures, a provisional final model is chosen.Subsequently, the model's validity is assessed, and a predicted output dataset is generated.

LoRa for WSN

23LoRa is a low-power wide-area wireless network (LPWAN) technology that is increasingly used in wireless sensor networks (WSN).Data gathered from wireless sensors are wirelessly transmitted over LoRa to the IoT gateway and then to Cloud storage or a local server.LoRa has long-range and low energy consumption, which helps to increase WSN coverage and energy efficiency [19].Therefore, use of LoRa in aquaculture applications will extend the overall system lifespan of sensor nodes powered by battery [20].In Table 3 other parameters of various LPWAN technologies (LoRa, Sigfox, NB-IoT) are compared.The aforementioned parameters make it evident that NB-IOT's high energy consumption makes it unsuitable for aquaculture applications.Considering bandwidth and data rate, LoRa is the optimal solution for aquaculture applications [21] over Sigfox.

Proposed Solution

24To develop a low-cost, multi-point pH sensor setup for a highly dynamic Biofloc environment, several challenges have been addressed.This section explains how we approach certain problems and come up with solutions.

Features of Proposed Solution

25The main focus of this research is to develop a new pH sensor with temperature compensation and simplicity to integrate with an IoT sensor node for in situ applications.

26Other features as highlighted in Figure 4, such as sensitivity, response time, stability, and low cost are also taken into consideration.We have also concentrated on developing a local network of sensors at multiple depths.The Local network has a concentrator that collects data from the sensors wirelessly and transmits to the IoT server while acting as the LoRa-IoT gateway.

27Sensors 2025, 25, x FOR PEER REVIEW

Construction of Electrode

28Electrodes of a pH sensor are used to measure the generated voltage in a s due to the change in Hydrogen ion (H+) concentration.In the proposed pH senso asing resistor replaces the reference electrode as used in glass-electrode system.the current in a pH neutral solution is determined by the resistor instead of a chem known pH.Among the various types of electrodes [22] a good sensing electrode ha ities including robustness, smoothness, high resistance, chemical neutrality, re time, durability, and temperature adjustment [23].The selection of a suitable m length, and relative position of the electrodes are important to ensure its reliability

29We study the materials used as electrodes in commercially available pH sens cluding silver, silver chloride, platinum, chromium, and stainless steel.Character a pH sensing electrode such as biocompatibility, resistivity, corrosion resistance, el potential, and chemical reactions [24,25] led us to select the materials.

30Table 4 highlights the characteristics of gold (Au), silver (Ag), and chromium the shortlisted materials.Gold is found least active with other substances in water erate oxides and is more durable, corrosion-resistant, and biocompatible than th two materials.When used as a pH electrode, the flat surface of gold lowers the adh of organic particles and microbes, reducing biofouling.This ensures consistent mance in biofouling-prone situations as well as making cleaning and maintenance One major benefit of gold electrodes in saline environments is their great resist corrosion caused by chloride and their overall stability over a broad range of sa Long-term electrolysis was avoided by using a bipolar biasing current of the ele Gold-based electrodes can offer a long-lasting and efficient solution for dynamic a ture conditions by taking these considerations into account.

Construction of pH Sensor 4.2.1. Construction of Electrode

31Electrodes of a pH sensor are used to measure the generated voltage in a solution due to the change in Hydrogen ion (H+) concentration.In the proposed pH sensor, a biasing resistor replaces the reference electrode as used in glass-electrode system.Hence, the current in a pH neutral solution is determined by the resistor instead of a chemical of known pH.Among the various types of electrodes [22] a good sensing electrode has qualities including robustness, smoothness, high resistance, chemical neutrality, response time, durability, and temperature adjustment [23].The selection of a suitable material, length, and relative position of the electrodes are important to ensure its reliability.

32We study the materials used as electrodes in commercially available pH sensors, including silver, silver chloride, platinum, chromium, and stainless steel.Characteristics as a pH sensing electrode such as biocompatibility, resistivity, corrosion resistance, electrode potential, and chemical reactions [24,25] led us to select the materials.

33Table 4 highlights the characteristics of gold (Au), silver (Ag), and chromium (Cr) as the shortlisted materials.Gold is found least active with other substances in water to generate oxides and is more durable, corrosion-resistant, and biocompatible than the other two materials.When used as a pH electrode, the flat surface of gold lowers the adherence of organic particles and microbes, reducing biofouling.This ensures consistent performance in biofouling-prone situations as well as making cleaning and maintenance easier.One major benefit of gold electrodes in saline environments is their great resistance to corrosion caused by chloride and their overall stability over a broad range of salinities.Long-term electrolysis was avoided by using a bipolar biasing current of the electrode.Gold-based electrodes can offer a long-lasting and efficient solution for dynamic aquaculture conditions by taking these considerations into account.

34Potential differences due to Hydrogen ion concentration between two electrodes made of these solutions.The potential difference is measured in mV scale and it is found decreasing below 0 V with the increase of pH and increasing above 0 V with the decreasing of pH.We found gold (Au) has a superior relationship between pH value and potential value compared to chromium (Cr) and silver (Ag).The pH potential depends on the surface area of the electrodes, therefore, different shapes, dimension and placement of the electrodes are monitored to get the optimum sensitivity.Figure 5 shows the sensitivity of the gold-plated electrode for different lengths (6 mm, 9.5 mm, 8 mm and 10 mm) at different pH values.The trend-line reliability (R 2 ) is shown for different polynomials to find out the best pH to current relationship.Figure 5c depicts that the highest (R 2 = 0.9999) reliability is obtained for second order polynomial using the 8 mm long electrode.The 9.5 mm long electrode gives a similar (R 2 = 0.997) result for 3rd order polynomial.The longest (10 mm) and shortest (6 mm) are shown as less reliable even for 3rd or higher order polynomials.Based on the relations between current response and pH values, we selected an 8 mm long electrode as the pH sensor.potential value compared to chromium (Cr) and silver (Ag).The pH potential depends the surface area of the electrodes, therefore, different shapes, dimension and placemen the electrodes are monitored to get the optimum sensitivity.Figure 5 shows the sensitiv of the gold-plated electrode for different lengths (6 mm, 9.5 mm, 8 mm and 10 mm different pH values.The trend-line reliability (R 2 ) is shown for different polynomials find out the best pH to current relationship.Figure 5c depicts that the highest (R 2 = 0.99 reliability is obtained for second order polynomial using the 8 mm long electrode.The mm long electrode gives a similar (R 2 = 0.997) result for 3rd order polynomial.The long (10 mm) and shortest (6 mm) are shown as less reliable even for 3rd or higher order po nomials.Based on the relations between current response and pH values, we selected 8 mm long electrode as the pH sensor.

Biasing for pH-Neutral Point

35To address calibration challenges in the glass-electrode setup, we opt for electro biasing of the probe.Initially, we measure the current using a multimeter (Fluke 17 Fluke, Washington, DC, USA) of a chemically biased probe in a pH 7 reference soluti yielding 723 µA using reference electrode method.To achieve the same current across probe, we introduce a current limiting resistor to one of the electrodes.Using the sa

36To address calibration challenges in the glass-electrode setup, we opt for electronic biasing of the probe.Initially, we measure the current using a multimeter (Fluke 17B+, Fluke, Washington, DC, USA) of a chemically biased probe in a pH 7 reference solution, yielding 723 µA using reference electrode method.To achieve the same current across Sensors 2025, 25, 2824 9 of 21 our probe, we introduce a current limiting resistor to one of the electrodes.Using the same resistor, we measure currents across pH solutions ranging from 4 to 9, recalculating electrode linearity in a similar way to determining electrode length as shown in Figure 5.After testing with a ±30% variation in resistor values, we settle on an optimal value of 33 kΩ. Figure 6 illustrates the electrode wiring diagram, including the current limiting resistor, during current measurement to determine the best bias position and resistor value.

Working Principle of the Sensor

37pH denotes the concentration of hydrogen ions in a solution, represented logarithmically [26].It is defined by Equation (1):

38Here, [H + ] is the equilibrium molar concentration of hydrogen ions (mol/L) in the solution.The Nernst equation, shown in Equation ( 2), calculates the concentration of hydrogen ions (H + ) and determines the potential difference between two electrodes in the potentiometric pH measurement method [27]:

39where, E = potential difference in mV, R = universal gas constant, F = Faraday constant, T = absolute temperature in kelvin (K), n = number of charges of the measured ion, C1 = active ion concentration of reference solution, C2 = active ion concentration of the solution of unknown pH.The Nernst equation illustrates an inverse relationship between the voltage produced and pH.To elaborate, the detected voltage increases as pH decreases below 7, and decreases as pH exceeds 7.

Lab Setup of the Sensor

40To develop a fully electrical pH sensor suitable for IoT aquaculture applications without reliance on chemical solutions, we replace the reference electrode typically found in electrode-based pH sensors.As depicted in Figure 7.

41Here, [H + ] is the equilibrium molar concentration of hydrogen ions (mol/L) in the solution.The Nernst equation, shown in Equation ( 2), calculates the concentration of hydrogen ions (H + ) and determines the potential difference between two electrodes in the potentiometric pH measurement method [27]:

42where, E = potential difference in mV, R = universal gas constant, F = Faraday constant, T = absolute temperature in kelvin (K), n = number of charges of the measured ion, C1 = active ion concentration of reference solution, C2 = active ion concentration of the solution of unknown pH.The Nernst equation illustrates an inverse relationship between the voltage produced and pH.To elaborate, the detected voltage increases as pH decreases below 7, and decreases as pH exceeds 7.

43To develop a fully electrical pH sensor suitable for IoT aquaculture applications without reliance on chemical solutions, we replace the reference electrode typically found in electrode-based pH sensors.As depicted in Figure 7.Our sensor's electronic circuit incorporates a resistor in lieu of the traditional ref ence electrode.This approach utilizes a current limiter to measure pH, eliminating need for chemical components in our sensor setup.

44In Figure 8a, our sensor node is depicted with a hardware block diagram showcas our proposed pH sensor probe and pH sensing circuit.The sensor node comprises a m crocontroller (STM32F401, STMicroelectronics, Geneva, Switzerland), a LoRa mod with 433 MHz (SX1278, Semtech, Camarillo, CA, USA) for IoT connectivity, and a temp ature sensor (DS18B20, Analog Devices Inc., Wilmington, MA, USA) for temperature co pensation.The proposed pH sensor is developed on a printed circuit board (pHS sorV1.0,JLCPCB, Hong Kong, China) with a gold-plated finish using 2U" Electrol Nickel Immersion Gold (ENIG) surface treatment, optimizing trace width to 0.5 mm enhanced conductivity.Sized at 40 × 10 mm, the PCB includes a length of 8 mm.ENIG-plate dedicated to collecting data from pH water solutions.Integration w Our sensor's electronic circuit incorporates a resistor in lieu of the traditional reference electrode.This approach utilizes a current limiter to measure pH, eliminating the need for chemical components in our sensor setup.

45In Figure 8a, our sensor node is depicted with a hardware block diagram showcasing our proposed pH sensor probe and pH sensing circuit.The sensor node comprises a microcontroller (STM32F401, STMicroelectronics, Geneva, Switzerland), a LoRa module with 433 MHz (SX1278, Semtech, Camarillo, CA, USA) for IoT connectivity, and a temperature sensor (DS18B20, Analog Devices Inc., Wilmington, MA, USA) for temperature compensation.The proposed pH sensor is developed on a printed circuit board (pHSensorV1.0,JLCPCB, Hong Kong, China) with a gold-plated finish using 2U" Electroless Nickel Immersion Gold (ENIG) surface treatment, optimizing trace width to 0.5 mm for enhanced conductivity.Sized at 40 × 10 mm, the PCB includes a length of 8 mm.Our sensor's electronic circuit incorporates a resistor in lieu of the traditional reference electrode.This approach utilizes a current limiter to measure pH, eliminating the need for chemical components in our sensor setup.

46In Figure 8a, our sensor node is depicted with a hardware block diagram showcasing our proposed pH sensor probe and pH sensing circuit.The sensor node comprises a microcontroller (STM32F401, STMicroelectronics, Geneva, Switzerland), a LoRa module with 433 MHz (SX1278, Semtech, Camarillo, CA, USA) for IoT connectivity, and a temperature sensor (DS18B20, Analog Devices Inc., Wilmington, MA, USA) for temperature compensation.The proposed pH sensor is developed on a printed circuit board (pHSen-sorV1.0,JLCPCB, Hong Kong, China) with a gold-plated finish using 2U" Electroless Nickel Immersion Gold (ENIG) surface treatment, optimizing trace width to 0.5 mm for enhanced conductivity.Sized at 40 × 10 mm, the PCB includes a length of 8 mm.ENIG-plate dedicated to collecting data from pH water solutions.Integration with the main MCU is facilitated through an analog frontend that measures the current, converts it to voltage and amplifies it for the inbuilt ADC of the MCU.ENIG-plate dedicated to collecting data from pH water solutions.Integration with the main MCU is facilitated through an analog frontend that measures the current, converts it to voltage and amplifies it for the inbuilt ADC of the MCU.

47Figure 8b illustrates the schematic of our sensor node, detailing three ADC pins utilized for the pH sensor probe (A, B, C) and three digital pins employed for temperature sensors to gather data across various pH solutions.Temperature sensing utilizes the One Wire Communication Protocol (OWCP), while the LoRa module communicates via a 4-wire Serial Peripheral Interface (SPI) bus.

Data Collection and Processing

48In the proposed system, multiple sensor nodes gather pH data from the Biofloc tank.At the local concentrator (also acts as the local control node), these raw data undergo preprocessing, compression, and normalization to ensure accuracy.Subsequently, the data is categorized into training and test sets for training a linear regression model.After training, the model undergoes evaluation and fine-tuning to enhance performance.Once optimized, the model can predict pH values within the tank.The process is visualized in Figure 9. Figure 8b illustrates the schematic of our sensor node, detailing three ADC pins utilized for the pH sensor probe (A, B, C) and three digital pins employed for temperature sensors to gather data across various pH solutions.Temperature sensing utilizes the One Wire Communication Protocol (OWCP), while the LoRa module communicates via a 4wire Serial Peripheral Interface (SPI) bus.

Overview of System Architecture

49For IoT-based in situ monitoring of aquaculture, a control node along with multiple sensor nodes is used to establish a local network of sensors in a Biofloc tank.To obtain accurate data in the noisy environment of the Biofloc tank, local sensor nodes are positioned at various depths within the tank.Figure 10 demonstrates the system architecture utilized in our investigation.The control sensor node in the local network collects pH data from the local sensor nodes and transmits it via the LoRa-IoT gateway.A LoRa-IoT gateway in a cloud network is used for transmitting sensor data to the cloud server.Biofloc users access the application layer through their computer or smartphone application.

50For IoT-based in situ monitoring of aquaculture, a control node along with multiple sensor nodes is used to establish a local network of sensors in a Biofloc tank.To obtain accurate data in the noisy environment of the Biofloc tank, local sensor nodes are positioned at various depths within the tank.Figure 10 demonstrates the system architecture utilized in our investigation.The control sensor node in the local network collects pH data from the local sensor nodes and transmits it via the LoRa-IoT gateway.A LoRa-IoT gateway in a cloud network is used for transmitting sensor data to the cloud server.Biofloc users access the application layer through their computer or smartphone application.

Performance Analysis

51For IoT-based in situ monitoring of aquaculture, the proposed system employs a control node and multiple sensor nodes to establish a local network within the Biofloc operation area.Sensor nodes are strategically positioned at various depths to ensure accurate data collection in the midst of noisy environment of the tank.Figure 10 illustrates the proposed smart Biofloc architecture.The control sensor node within the local network gathers pH data from these sensors and transmits it via a LoRa-IoT gateway.The LoRa-IoT gateway functionality in the local control node forwards this data to a cloud server.Biofloc users can access the application layer through their computers or a smartphone application.

Current Response of pH Sensor

52The current response of pH sensor indicates how the current varies when the pH of a solution changes [28].Figure 11a demonstrates how the current changes over time for a given pH value which is chosen from pH 4 to pH 9 with an increment of pH 1. Here, we consider pH values between 4 and 9 since aquaculture applications are well suited to this range.The measuring temperature is 25 °C.When the pH is high, we observe that the electrode's current decreases and for a given pH, the current remains to be stable to a fixed value with a minor variation over time.Figure 11b is obtained from Figure 11a by averaging all the current values at given pH where we observe an inverse nonlinear relationship between the current and pH.The best fit second-order polynomial that relates current to pH is found to be

53with = 0.9999 that shows a strong correlation.

Performance Analysis

54For IoT-based in situ monitoring of aquaculture, the proposed system employs a control node and multiple sensor nodes to establish a local network within the Biofloc operation area.Sensor nodes are strategically positioned at various depths to ensure accurate data collection in the midst of noisy environment of the tank.Figure 10 illustrates the proposed smart Biofloc architecture.The control sensor node within the local network gathers pH data from these sensors and transmits it via a LoRa-IoT gateway.The LoRa-IoT gateway functionality in the local control node forwards this data to a cloud server.Biofloc users can access the application layer through their computers or a smartphone application.

Current Response of pH Sensor

55The current response of pH sensor indicates how the current varies when the pH of a solution changes [28].Figure 11a demonstrates how the current changes over time for a given pH value which is chosen from pH 4 to pH 9 with an increment of pH 1. Here, we consider pH values between 4 and 9 since aquaculture applications are well suited to this range.The measuring temperature is 25 • C. When the pH is high, we observe that the electrode's current decreases and for a given pH, the current remains to be stable to a fixed value with a minor variation over time.Figure 11b is obtained from Figure 11a by averaging all the current values at given pH where we observe an inverse nonlinear relationship between the current and pH.The best fit second-order polynomial that relates current to pH is found to be

56with R 2 = 0.9999 that shows a strong correlation.

Temperature Compensation with ML Agorithm

57To develop a relationship between pH, temperature, and current, multiple linear regression is employed using TensorFlow.To verify the created regression model has the minimum sum of squared errors, the multiple linear regression analysis is approximated using the least squares approach [29].A dataset is collected that has one dependent variable (pH) and two independent variables (temperature and current).Table 5 presents a sample of the training data out of the total of 2924 observations for the regression model consisting of current values observed at given pH and temperature of reference solution.Using a separate set of test data of 1235 observations, the regression model achieves standard error = 0.3 and the R 2 value = 0.94.This performance is reasonably accurate for the application of pH measurements in a dynamic Biofloc environment.

58The Figure 12a demonstrates how the current response of the pH sensor changes due to change in temperature.When the temperature increases with an increment of 5 °C, current response shifts upward which captures the temperature effect in pH measurement causing errors in the pH readings without any temperature compensation.In aquaculture environments, where temperature fluctuations are common, the model continuously monitors and compensates for these changes, ensuring long-term accuracy.In Figure 12b

59To develop a relationship between pH, temperature, and current, multiple linear regression is employed using TensorFlow.To verify the created regression model has the minimum sum of squared errors, the multiple linear regression analysis is approximated using the least squares approach [29].A dataset is collected that has one dependent variable (pH) and two independent variables (temperature and current).The dataset is divided into two categories: testing and training.The training dataset is fitted to a multiple linear regression model.The test dataset is used to make predictions.Using the machine learning model, the following functional relation can be developed between the solution's pH, temperature (T), and current (I)

60where, Temperature in • C and I = Current value in micro-Ampere (µA).Metrics such as the coefficient of determination (R 2 ) value and squared error (SE) are used to assess the model.The output specifications of the multiple linear regression model, provides the following values of the coefficients.K 0 = 10.376

61Table 5 presents a sample of the training data out of the total of 2924 observations for the regression model consisting of current values observed at given pH and temperature of reference solution.Using a separate set of test data of 1235 observations, the regression model achieves standard error = 0.3 and the R 2 value = 0.94.This performance is reasonably accurate for the application of pH measurements in a dynamic Biofloc environment.

62The Figure 12a demonstrates how the current response of the pH sensor changes due to change in temperature.When the temperature increases with an increment of 5 • C, current response shifts upward which captures the temperature effect in pH measurement causing errors in the pH readings without any temperature compensation.In aquaculture environments, where temperature fluctuations are common, the model continuously monitors and compensates for these changes, ensuring long-term accuracy.In Figure 12b the obtained values of pH 6 and 8 at different temperature with our temperature compensated sensor are compared with the values of a commercial pH meter.Figure 12b also shows how the output reading of the proposed pH meter continuously indicates pH 6 as a result of the adjustment when the temperature varies.Taking temperature variations into account, this finding suggests that, in comparison to its commercially available counterpart, the proposed novel low-cost designed sensor with temperature compensation offers comparable accuracy.Therefore, we can claim that the temperature compensated sensor provides good accuracy and efficient temperature adjustment at a commercial level resulting in the decreased variance in pH measurements.This characteristic is important in various applications where precise pH measurement is essential, ensuring that the sensor's performance is reliable even under varying temperature conditions.

Response Time

63One of the important quality indicators of a pH sensor is the response time.To evaluate the response time of our pH sensor, a pH 4 solution is considered for testing at a controlled temperature of 25 • C. The resultant current-time variation is illustrated in Figure 13a, where it is evident that the sensor takes approximately 125 ms to reach 90% of its steady-state reading.Subsequently, as shown in Figure 13b, a different experimental condition involving a change in the pH of the solution from pH 5 to pH 4, the dynamic response time of the sensor is examined.Here, a dynamic response time of 320 ms is observed.This finding underscores the sensor's ability to swiftly and accurately adapt to variations in pH, making it a suitable tool for real-time monitoring and control applications.These results affirm the effectiveness and efficiency of the proposed pH sensor in responding to dynamic changes in pH levels.

64One of the important quality indicators of a pH sensor is the response time.To evaluate the response time of our pH sensor, a pH 4 solution is considered for testing at a controlled temperature of 25 °C.The resultant current-time variation is illustrated in Figure 13a, where it is evident that the sensor takes approximately 125 ms to reach 90% of its steady-state reading.Subsequently, as shown in Figure 13b, a different experimental condition involving a change in the pH of the solution from pH 5 to pH 4, the dynamic response time of the sensor is examined.Here, a dynamic response time of 320 ms is observed.This finding underscores the sensor's ability to swiftly and accurately adapt to variations in pH, making it a suitable tool for real-time monitoring and control applications.These results affirm the effectiveness and efficiency of the proposed pH sensor in responding to dynamic changes in pH levels.The sensor's response time ensures consistent performance across a range of conditions.The robust construction and optimized materials of the sensor contribute to its ability to deliver accurate and timely measurements, making it well suited for dynamic environments.

Sensitivity

65Another performance indicator is the pH sensor's sensitivity, or the slope of its current response curve [30].The current response of this sensor is displayed as a secondorder non-linear equation in Figure 11b.To obtain the sensitivity, we therefore take the derivative of that equation.At a constant temperature of 25 °C, we obtain different sensitivities for different pH values.The sensitivity values in µA/pH for various pH solutions are displayed in Figure 14.

66pH and sensitivity have a linear relationship with a negative correlation.Thus, the following formula can be used to determine the sensor's sensitivity.

67where, I = sensitivity in µA/pH, The sensor's response time ensures consistent performance across a range of conditions.The robust construction and optimized materials of the sensor contribute to its ability to deliver accurate and timely measurements, making it well suited for dynamic environments.

68Another performance indicator is the pH sensor's sensitivity, or the slope of its current response curve [30].The current response of this sensor is displayed as a second-order non-linear equation in Figure 11b.To obtain the sensitivity, we therefore take the derivative of that equation.At a constant temperature of 25 ISFET and ZnO sensors offer higher sensitivity while they are significantly more expensive to produce and maintain [31].The proposed sensor strikes a balance between improved sensitivity and cost-effectiveness, making it a more practical and accessible solution for applications like aquaculture, where affordability and reliability are critical considerations.

69The trade-offs between sensor sensitivity and long-term stability are a key consideration in designing pH sensors for aquaculture monitoring.High sensitivity is crucial for detecting subtle changes in water quality, while long-term stability ensures reliable operation with minimal maintenance.By optimizing material selection and incorporating protective measures, a balance is achieved that meets the practical demands of aquaculture environments.

Stability

70Stability is another performance parameter that determines output precision.Here, we would like to assess the long-term stability and performance of a pH sensor, a factor that reflects the reliability of pH measurements.The use of bipolar biasing current through the electrode will make it more tolerable to the electrolysis/electroplating effect, hence maintaining physical properties unchanged for a long time, however, regular cleaning is still recommended to counteract the effects of dissolved organic matter.Regular cleaning, anti-fouling coatings, or the use of mechanical wipers can help maintain electrode performance.Gold's smooth surface also makes it easier to clean compared to rougher materials.

71Robust materials like gold, along with bipolar biasing current is resist corrosion and fouling.Designing electrodes with smooth surfaces minimizes fouling sites.Use wipers, brushes, or ultrasonic cleaning systems to periodically remove fouling agents from the electrode surface.

72A conventional reference electrode relies on an internal electrolyte (KCl) and a redox couple (Ag/AgCl), both of which can become contaminated or depleted over time, resulting in instability.Long-term stability is improved by removing the necessity for the chemical system by incorporating the buffer solution's electrochemical analogy to a known current-limiting resistor.Additionally, reference electrodes are fragile and prone to damage ISFET and ZnO sensors offer higher sensitivity while they are significantly more expensive to produce and maintain [31].The proposed sensor strikes a balance between improved sensitivity and cost-effectiveness, making it a more practical and accessible solution for applications like aquaculture, where affordability and reliability are critical considerations.

73The trade-offs between sensor sensitivity and long-term stability are a key consideration in designing pH sensors for aquaculture monitoring.High sensitivity is crucial for detecting subtle changes in water quality, while long-term stability ensures reliable operation with minimal maintenance.By optimizing material selection and incorporating protective measures, a balance is achieved that meets the practical demands of aquaculture environments.

74Stability is another performance parameter that determines output precision.Here, we would like to assess the long-term stability and performance of a pH sensor, a factor that reflects the reliability of pH measurements.The use of bipolar biasing current through the electrode will make it more tolerable to the electrolysis/electroplating effect, hence maintaining physical properties unchanged for a long time, however, regular cleaning is still recommended to counteract the effects of dissolved organic matter.Regular cleaning, antifouling coatings, or the use of mechanical wipers can help maintain electrode performance.Gold's smooth surface also makes it easier to clean compared to rougher materials.

75Robust materials like gold, along with bipolar biasing current is resist corrosion and fouling.Designing electrodes with smooth surfaces minimizes fouling sites.Use wipers, brushes, or ultrasonic cleaning systems to periodically remove fouling agents from the electrode surface.

76A conventional reference electrode relies on an internal electrolyte (KCl) and a redox couple (Ag/AgCl), both of which can become contaminated or depleted over time, resulting in instability.Long-term stability is improved by removing the necessity for the chemical system by incorporating the buffer solution's electrochemical analogy to a known currentlimiting resistor.Additionally, reference electrodes are fragile and prone to damage in harsh environments like aquaculture, whereas a biasing resistor is more robust and less likely to degrade, further enhancing stability.

77Due to changes in the electrolyte concentration or junction blockage, the voltage at the liquid junction of conventional reference electrodes can fluctuate.A biasing resistor, which does not require a liquid junction, can reduce the fluctuation.By substituting a biasing resistor for a traditional reference electrode, drifts caused by the mechanical and chemical constraints of the reference electrode can be minimized and long-term stability enhanced.

78To capture the notion of stability, a meticulous and extended observation is conducted, involving the measurement of pH values across three distinct solutions, each with pH values of 6, 7, and 8.These measurements were consistently recorded over two days.This extended observation period is essential for validating the sensor's consistent performance over time.Figure 15 illustrates the outcome of this analysis based on two days of observations.The median and standard deviation of current values of pH 6, 7, and 8 are measured based on the data taken over each day to check the stability.It is evident that the median and the standard deviation of the current values remains to be the same for each of the observed days.This observation provides the evidence that the sensor maintains a consistent level of performance throughout the experiment, ensuring stable and reliable pH measurements over time.

79Sensors 2025, 25, x FOR PEER REVIEW 17 of 21 in harsh environments like aquaculture, whereas a biasing resistor is more robust and less likely to degrade, further enhancing stability.Due to changes in the electrolyte concentration or junction blockage, the voltage at the liquid junction of conventional reference electrodes can fluctuate.A biasing resistor, which does not require a liquid junction, can reduce the fluctuation.By substituting a biasing resistor for a traditional reference electrode, drifts caused by the mechanical and chemical constraints of the reference electrode can be minimized and long-term stability enhanced.

80To capture the notion of stability, a meticulous and extended observation is conducted, involving the measurement of pH values across three distinct solutions, each with pH values of 6, 7, and 8.These measurements were consistently recorded over two days.This extended observation period is essential for validating the sensor's consistent performance over time.Figure 15 illustrates the outcome of this analysis based on two days of observations.The median and standard deviation of current values of pH 6, 7, and 8 are measured based on the data taken over each day to check the stability.It is evident that the median and the standard deviation of the current values remains to be the same for each of the observed days.This observation provides the evidence that the sensor maintains a consistent level of performance throughout the experiment, ensuring stable and reliable pH measurements over time.The stability tests were conducted for pH 6, 7, and 8 because these values represent the optimal and most relevant pH range for a Biofloc aquaculture environment.In Biofloc systems, maintaining pH within this range is critical for the health and survival of fish, as extreme pH conditions (such as pH 4 or 9) can cause stress or even death to aquatic organisms.Since the sensor is designed for practical aquaculture applications, its performance was validated under conditions that reflect real-world operational requirements.Testing within the pH 6-8 range ensures the sensor's reliability and accuracy in environments where maintaining stable water quality is essential for fish health and system productivity.Extreme pH conditions, while theoretically important, are not typically encountered in well-managed Biofloc systems, making the chosen range both practical and scientifically justified.The stability tests were conducted for pH 6, 7, and 8 because these values represent the optimal and most relevant pH range for a Biofloc aquaculture environment.In Biofloc systems, maintaining pH within this range is critical for the health and survival of fish, as extreme pH conditions (such as pH 4 or 9) can cause stress or even death to aquatic organisms.Since the sensor is designed for practical aquaculture applications, its performance was validated under conditions that reflect real-world operational requirements.Testing within the pH 6-8 range ensures the sensor's reliability and accuracy in environments where maintaining stable water quality is essential for fish health and system productivity.Extreme pH conditions, while theoretically important, are not typically encountered in well-managed Biofloc systems, making the chosen range both practical and scientifically justified.

Comparative Evaluation

81This subsection compares the sensor properties and performance parameters of our study with the works mentioned in the related work section.Table 6 presents a comparison of the significant features of all the works discussed.Although our work is based on in situ application, we also consider in-lab, online or remote monitoring of pH for a wide range of comparisons, summarized in this table.For most of the works, accuracy is not quantified clearly.The measurable pH range of our sensor spans from pH 4 to pH 9 (pH buffer solution, Zhengzhou Wollen Instrument Equipment Co., Ltd., Zhengzhou, China), which aligns with the optimal pH range for Biofloc fish farming.Our work is based on the electrical current limiter approach which is simple and easy to use compared to MEMS, ISFET, optical fiber electrode or any other electrode types.Compared to all other works our sensor's response time is improved by 4 times.Sensitivity is also improved significantly.There is limited information available in the literature regarding the actual cost management of existing sensors.However, we have provided a comparison of the technologies used, which offers insights into the potential costs of the sensors listed in the comparison table, relative to the proposed sensor.Furthermore, we conducted an analysis of industrial-level pH meters and found that temperature-compensated pH meters are generally more expensive [32].In contrast, the calibration-free design and simple construction of the proposed pH sensor make it a more affordable and cost-effective solution for aquaculture applications.Table 7 presents a comparative view of the limitations of existing pH sensors along with the solutions of the proposed work.

Conclusions

82A low-cost, temperature-compensated electronic calibration-based pH sensor for in situ aquaculture applications was presented in this paper.Temperature compensation was achieved by a machine learning algorithm to eliminate temperature-related errors.Electronic calibration is achieved by applying a current limiting approach to the sensor which eliminates maintenance and calibration problems of the pH sensor.A full architecture of how a user can remotely access the pH data of a local sensor network is also proposed.The proposed designed sensor demonstrates a reaction time of 125 ms and sensitivity of 0.316 µA/pH with a satisfactory stability.Therefore, the outcomes of these performance parameters ensure the suitability of this sensor for real time monitoring of aquaculture applications.In the long term, we intend to develop a multi-sensor system for complete monitoring of other water quality parameters of a Biofloc tank.Enabling compensation for nonlinearities in sensor response across the Biofloc tank with various chemical and biological compositions is another long-term objective.

Figure 1 .

83Figure 1.Multiple sensors in a Biofloc tank at different depth and position communicating with a local control node.

Figure 2 .

84Figure 2. System architecture with multi depth sensor nodes and control node, along with WSN-GW-IoT-User application.

Figure 1 .

85Figure 1.Multiple sensors in a Biofloc tank at different depth and position communicating with a local control node.

86Figure 1.Multiple sensors in a Biofloc tank at different depth and position communicating with a local control node.

Figure 2 .

87Figure 2. System architecture with multi depth sensor nodes and control node, along with WSN-GW-IoT-User application.

88Figure 2. System architecture with multi depth sensor nodes and control node, along with WSN-GW-IoT-User application.

Figure 3 .

89Figure 3. Classification of pH sensors based on three different perspectives.

90Figure 3. Classification of pH sensors based on three different perspectives.

Figure 4 .

91Figure 4. Features of proposed Solutions.

92Figure 4. Features of proposed Solutions.

Figure 5 .

93Figure 5. Behavior of the probe at different lengths.(a) Current response of pH sensor when pr length is 6 mm.(b) Relation between current and pH when probe length is 9.5 mm.(c) Curr response of the sensor when probe length is 8 mm.(d) Current and pH relation with 10 mm pr length.

94Figure 5. Behavior of the probe at different lengths.(a) Current response of pH sensor when probe length is 6 mm.(b) Relation between current and pH when probe length is 9.5 mm.(c) Current response of the sensor when probe length is 8 mm.(d) Current and pH relation with 10 mm probe length.

Sensors 2025 , 21 Figure 6 .

95Figure 6.Pattern and length variants of sensor electrodes.Sensor probe A has 8 mm round shape gold plating; B has 9.5 mm and C has 10 mm gold plating.

Figure 6 .

96Figure 6.Pattern and length variants of sensor electrodes.Sensor probe A has 8 mm round shape gold plating; B has 9.5 mm and C has 10 mm gold plating.

4. 3 .

97Working Principle of the Sensor pH denotes the concentration of hydrogen ions in a solution, represented logarithmically [26].It is defined by Equation (1): pH = −log H +

Figure 7 .

98Figure 7. Working principle of the sensor node.

Figure 8 .

99Figure 8.The lab setup of the sensor.(a) Hardware block diagram of the pH sensor with con circuit.(b) Schematic diagram of the sensor.

Figure 7 .

100Figure 7. Working principle of the node.

Sensors 2025 , 21 Figure 7 .

101Figure 7. Working principle of the sensor node.

Figure 8 .

102Figure 8.The lab setup of the sensor.(a) Hardware block diagram of the pH sensor with control circuit.(b) Schematic diagram of the sensor.

103Figure 8.The lab setup of the sensor.(a) Hardware block diagram of the pH sensor with control circuit.(b) Schematic diagram of the sensor.

Sensors 2025 ,

10425, x FOR PEER REVIEW 11 of 21

105In the proposed system, multiple sensor nodes gather pH data from the Biofloc tank.At the local concentrator (also acts as the local control node), these raw data undergo preprocessing, compression, and normalization to ensure accuracy.Subsequently, the data is categorized into training and test sets for training a linear regression model.After training, the model undergoes evaluation and fine-tuning to enhance performance.Once optimized, the model can predict pH values within the tank.The process is visualized in Figure 9.

Figure 9 .

106Figure 9. Data collection and processing block diagram.

107Figure 9. Data collection and processing block diagram.

Figure 10 .

108Figure 10.System Architecture of proposed solution where multiple sensor nodes are placed in different aquaculture systems.Control node collects sensor data and store the data to an IoT platform through a gateway.

109Figure 10.System Architecture of proposed solution where multiple sensor nodes are placed in different aquaculture systems.Control node collects sensor data and store the data to an IoT platform through a gateway.

Figure 11 .

110Figure 11.Relationship between current and pH.(a) Current response of the pH sensor at different pH values.(b) Current and pH relation with high linearity.

111The dataset is divided into two categories: testing and training.The training dataset is fitted to a multiple linear regression model.The test dataset is used to make predictions.Using the machine learning model, the following functional relation can be developed between the solution's pH, temperature (T), and current (I) = + + (4) where, Temperature in °C and I = Current value in micro-Ampere (µA).Metrics such as the coefficient of determination ( ) value and squared error (SE) are used to assess the model.The output specifications of the multiple linear regression model, provides the following values of the coefficients.

112Figure 11.Relationship between current and pH.(a) Current response of the pH sensor at different pH values.(b) Current and pH relation with high linearity.

Figure 12 . 21 Figure 12 .

113Figure 12.Temperature compensation of the pH sensor.(a) Different pH values at different temperature without temperature compensation (b) Measured pH with respect to temperature using our temperature compensated pH sensor and a commercial pH meter.

Figure 13 .

114Figure 13.Response time of the sensor.(a) Response time of the pH sensor when pH is 4 (b) Dynamic response time with alternation of pH.

115Figure 13.Response time of the sensor.(a) Response time of the pH sensor when pH is 4 (b) Dynamic response time with alternation of pH.

m

116= slope of the straight line, C = constant as y-intercept The values of m and C, as determined by curve fitting, are m = −0.131and C = 1.2337.

Figure 14 .

117Figure 14.Sensitivity of the sensor for different pH values at 25 °C.

118Figure 14.Sensitivity of the sensor for different pH values at 25 • C.pH and sensitivity have a linear relationship with a negative correlation.Thus, the following formula can be used to determine the sensor's sensitivity.

Figure 15 .

119Figure 15.Stability of the sensor; Measured median and standard deviation values of pH 6,7 and 8 over two days.

120Figure 15.Stability of the sensor; Measured median and standard deviation values of pH 6,7 and 8 over two days.

Table 1 .

121Temperature to pH relationships.

Table 2 .

122Specifications of a Biofloc a system.

123Feeding frequencyearly stage 4 times per day, later 2 times per day Types of species Air breathing, Non air-breathing, Shellfishes

Table 3 .

124Comparison among different LPWAN technologies.

Table 4 .

125Comparison of selected materials.

126MaterialDurability Oxide Formation Corrosion Resistance pH and mV Relation Biocompa Gold (Au) Very long No Very high Best Super

127Comparison of selected materials.

Table 5 .

128Training data of multiple linear regression model.

129• C, we obtain different sensitivities for different pH values.The sensitivity values in µA/pH for various pH solutions are displayed in Figure14.

Table 6 .

130Output comparison among proposed work and references.

Table 7 .

131Comparison among limitations of existing sensors and the solutions of proposed work.

132Cont.

참고문헌 25건

  1. Miniature pH Optical Fiber Sensor Based on Fabry–Perot Interferometer IEEE Journal of Selected Topics in Quantum Electronics · IEEE Photonics Society · 2015 10.1109/jstqe.2015.2497438
  2. PREPARATION OF BUFFERS FOR USE IN ENZYME STUDIES CRC Press eBooks · Informa · 2010 10.1201/b10501-77
  3. A New Teaching Laboratory Experiment to Address the Effect of pH on Solubility The Chemical Educator · Springer Nature · 2017 10.1333/s00897172748a
  4. Flexible potentiometric pH sensors for wearable systems RSC Advances · Royal Society of Chemistry · 2020 10.1039/d0ra00016g
  5. Electrical Conductivity and pH in Surface Water as Tool for Identification of Chemical Diversity Ecological Chemistry and Engineering S · De Gruyter · 2020 10.2478/eces-2020-0006
  6. Temperature-Compensated pH Microelectrode Array Sensors Based on Copper-Oxide/Polyaniline Modification IEEE Sensors Journal · IEEE Sensors Council · 2020 10.1109/jsen.2020.3010709
  7. Model improvement for super-Nernstian pH sensors: the effect of surface hydration Journal of Materials Science · Springer Science+Business Media · 2020 10.1007/s10853-020-05412-w
  8. Recent Advances in Optical, Electrochemical and Field Effect pH Sensors Chemosensors · Multidisciplinary Digital Publishing Institute · 2021 10.3390/chemosensors9020033
  9. Comprehensive Analytical Modelling of an Absolute pH Sensor Sensors · Multidisciplinary Digital Publishing Institute · 2021 10.3390/s21155190
  10. Examining the dynamics of the relationship between water pH and other water quality parameters in ground and surface water systems PLoS ONE · Public Library of Science · 2022 10.1371/journal.pone.0262117
  11. pH Measurement at Elevated Temperature with Vessel Gate and Oxygen-Terminated Diamond Solution Gate Field Effect Transistors Sensors · Multidisciplinary Digital Publishing Institute · 2022 10.3390/s22051807
  12. ISFET‐based sensors for (bio)chemical applications: A review Electrochemical Science Advances · Wiley · 2022 10.1002/elsa.202100207
  13. LoRa Based IoT Platform for Remote Monitoring of Large-Scale Agriculture Farms in Chile Sensors · Multidisciplinary Digital Publishing Institute · 2022 10.3390/s22082824
  14. A Calibration-Free pH Sensor Using an In-Situ Modified Ir Electrode for Bespoke Application in Seawater Sensors · Multidisciplinary Digital Publishing Institute · 2022 10.3390/s22093286
  15. Fundamentals Elsevier eBooks · Elsevier BV · 2007 10.1016/b978-044451958-0.50002-1
  16. Evaluation of Multiple Linear Regression and Machine Learning Approaches to Predict Soil Compaction and Shear Stress Based on Electrical Parameters Applied Sciences · Multidisciplinary Digital Publishing Institute · 2022 10.3390/app12178791
  17. A Review of Electrochemical Electrodes and Readout Interface Designs for Biosensors IEEE Open Journal of the Solid-State Circuits Society · Institute of Electrical and Electronics Engineers · 2022 10.1109/ojsscs.2022.3221924
  18. Biofloc Technology in Fish Aquaculture: A Review Antioxidants · Multidisciplinary Digital Publishing Institute · 2023 10.3390/antiox12020398
  19. Improving Energy Efficiency in LoRaWAN Networks with Multiple Gateways Sensors · Multidisciplinary Digital Publishing Institute · 2023 10.3390/s23115315
  20. Miniaturized fluorescence pH sensor with assembly free ball lens on a tapered multimode optical fiber Optics Express · Optica Publishing Group · 2024 10.1364/oe.511190
  21. Smart pH Sensing: A Self-Sensitivity Programmable Platform with Multi-Functional Charge-Trap-Flash ISFET Technology Sensors · Multidisciplinary Digital Publishing Institute · 2024 10.3390/s24031017
  22. Optical pH Sensor Based on a Long-Period Fiber Grating Coated with a Polymeric Layer-by-Layer Electrostatic Self-Assembled Nanofilm Sensors · Multidisciplinary Digital Publishing Institute · 2024 10.3390/s24051662
  23. Rivers Water Quality Monitoring Using LoRa Based IoT Preprints.org · 2024 10.20944/preprints202410.2025.v1
  24. Handling of Ion-Selective Field-Effect Transistors (ISFETs) on Automatic Measurements in Agricultural Applications Under Real-Field Conditions Electronics · Multidisciplinary Digital Publishing Institute · 2024 10.3390/electronics13244958
  25. Solution Temperature Compensation Factor for the Measured pH Value of Cement‐Based Materials Journal of Engineering · Hindawi Publishing Corporation · 2025 10.1155/je/5558600