AQUAMAG: Smart Water Quality Monitoring through Internet of Things

One of the most fundamental needs of humanity is water. It is essential to provide clean water for human consumption. This research aims to design and build a functional water monitoring system to guarantee a safe water supply. Using the AQUAMAG device and web-based platform, the water quality is assessed in real time, and the current water status is monitored. There is a webpage for viewing all the recorded data from the database for analytical monitoring purposes. At the same time, the device sends a message notification to the user for the water condition update. The evaluation-based ISO 25010 standards showed end-users remarkably accepted the device attributed to the accurate turbidity and pH sensors. This water monitoring mechanism can help the user visualize if the water source is polluted or contaminated through a water quality test. With its efficient application and practicality, it has excellent potential for the community. Hence, a portable and user-friendly device that can be used within households and establishments as an alternative way of checking water quality before using it can be developed. Relatively, the study can raise awareness on water quality in the community through the developed device, which can also avoid illnesses caused by contaminated water.


Introduction
According to the World Health Organization (WHO), drinking contaminated water results in 485,000 deaths from diarrhea per year.Far worse, inadequate water quality monitoring contributes to the development of other water-related diseases like cholera, dysentery, polio, and others that have serious negative effects on human health (World Health Organization, 2022).While it is vital to regularly check the quality of the water, there are several factors limiting the capacity to test water quality.
The current situation in the Philippines shows that 91% of the estimated 100.7 million people have access to at least essential water services.However, regional primary water service access varies from 62% to 100% across the nation, making access extremely uneven (WEPA, 2003).In addition, both urban and rural areas frequently experience water pollution.
In fact, the Philippine Clean Water Act of 2004 (also known as Republic Act 9275), which aims to protect the nation's water bodies from contamination caused by land-based industry and commercial companies, is one environmental policy the government is pursuing to combat water pollution (Aquino et al., 2014).For instance, in Manolo Fortich, a municipality in the Northern Philippines, regular testing and water monitoring are being conducted by the Municipal Water District and Municipal Environment and Natural Resources Office to ensure good water quality.According to the critical individuals interviewed, they have no control over other elements that may impact the quality of the water when it enters the pipeline.Aside from the regular water testing, an adequate amount of chlorine is also added on a weekly basis.Therefore, to contribute to the fight against water pollution, water sanitation is vital in domestic and commercial spaces.
The establishments that engage in domestic and commercial usage of water need to have a clean water supply to meet the sanitation standards of the Department of Environment and Natural Resources (DENR).Because contaminated water can spread diseases, this act safeguards people's safety.Hence, the development of a portable and user-friendly device that applies Turbidity, pH, and ultrasonic sensors IoT (Internet of Things) as alternative way of water quality monitoring in the households and commercial establishments can give solutions to water sanitation concerns not only in the municipality of Manolo Fortich but in other rural and urban areas.

Literature review
All living creatures depend most heavily on water, so it is crucial to manage and conserve it now for future generations.At the same time, water contamination is a significant cause of diseases worldwide.This should not be ignored because diseases caused by contaminated water may be even more dangerous, as it has been proven that water-related diseases such as diarrhea, cholera, dysentery, polio, and others are caused by a lack of water quality monitoring, resulting to major health problems.Therefore, monitoring water quality is of utmost importance (Mohd Tarik et al., 2021).
The digital age has seen significant improvements in the handling of water.To ensure the containment and elimination of impurities, an Internet of Things (IoT)-based smart water monitoring system helped identify and analyze water quality in real time (Jan et al., 2021).In a similar study, the four distinct types of water were evaluated (river water, tap water, pond water, and lake water) using three different types of sensors (PH sensor, turbidity sensor, and flow sensor).Parameters from the water, such as water quality, water flow, and PH, were obtained using these sensors.Examining various water sources can determine if water is safe to use in various contexts.It is simple to determine if the water source is contaminated or polluted with this (Patil et al., 2015).Similarly, Texas Instruments developed an IoT (Internet of Things) based real-time water monitoring system to avoid water loss in water storage tanks and sump pumps.This system can quickly manipulate and analyze the water level utilizing IoT and cloud computing technologies.Additionally, because Internet of Thingsbased system is fully automated, it might save time and resources by doing away with manual water level monitoring (Supriya, 2020).A method for monitoring water quality with low-cost IoT sensors was also created using Embedded-C, and the written code is replicated using the Arduino IDE.It collects information on the immediate environment's pH, Turbidity, water level, temperature, and humidity (Pasika & Gandla, 2020).
Another design in the development of an IoT application with Visual Analytics for Water Consumption Monitoring is the assessment of water monitoring using a different method, which is done by tracking water usage with the use of an IoT platform with visual analytics.The researchers employed a visual analytics platform after processing data from a Hall Effect water flow sensor mounted to every faucet using a NodeMCU (Tasong & Abao, 2019).For those residing in Bangladesh's outlying areas, where there is a lack of safe drinking water, a microcontroller-based water quality monitoring system was created.The instrument, which was meticulously designed, is sensitive to a number of water properties, including temperature, Turbidity, and hydrogen potential.The pH was shown on the Liquid Crystal Digital (LCD) panel.Finally, sensor levels and errors are calculated by comparing each attribute value to the equipment (Dey et al., 2018).
Monitoring dams is highly significant in critical situations such as water overspill and water shortages.Water level monitoring and managing dams are possible using IoT and information technologies that deploy intelligent sensor networks based on existing systems (Akhila, 2018).Approximately 65-70% of water pollution is caused by residential sewage, with the rest originating from industrial sources such as tanneries, textile mills, food processing plants, distilleries, chemical, and metal companies, and solid waste dumped directly into rivers.This harms people's health, leisure time options, and the environment and results to financial consequences.According to the Philippines Environment Monitor, the yearly cost of water pollution's adverse economic effects is projected to be PHP67 billion (more than USD1.3Billion).The yearly economic cost, according to a World Bank analysis in terms of poor sanitation in the Philippines, is almost USD1.4 billion, which is one of the leading causes of pollution in urban waterbodies (Jalilov, 2018).All of these studies are crucial for laying the theoretical groundwork for creating AQUAMAG, a smart water monitoring device that can assess the water's purity using a turbidity sensor and its acidity or alkalinity using a pH sensor.The data are recorded in a database, and a short message service notification is sent to the end user.Additionally, the result is displayed on the device monitor.

Methodology
In this study, an agile development approach builds the project's hardware counterpart and develops the software application that comes with it.Agile methodology is an effective process for teams looking for a flexible product development approach (Eby, 2017).It gives a good overview of how the hardware works and allows the developers to maneuver the project, starting from hardware development to software development and improving both.Design.In this phase, there were two approaches taken in designing the AQUAMAG: one was visual design, and the other was the architectural structure of the application.The project manager convened the rest of the team at the first iteration and presented the requirements created during the prior stage.The team then debated the best strategy for achieving these objectives and suggested the tools required.The project designer also designed the user interface.It is critical to evaluate user interface and experience when they are done correctly and, more importantly, when they are not.The basic design is improved each time to incorporate the new functionality.connections to make the project work properly.The first water pump brings water into the main tank and into the water tank tester when the switch is turned on.Then, the sample water is tested using the pH and turbidity sensors.The ultrasonic sensor subsequently gets the water level from the main tank.The Ultrasonic, Turbidity, and pH sensors are all attached to the water tank.When the Ultrasonic sensor detects that the water level is low or full, the buzzer warns the users.The Turbidity sensor is triggered if Turbidity is detected.On the LCD, the pH sensor, which gauges the water's acidity or alkalinity, is also shown.If there are alarming outcomes regarding the water condition, Sim900A sends a message to alert the user that the water condition is at high risk.All gathered data are sent to the web page.
Figure 3 shows the block diagram that identifies the flow of information between the systems.The real-time water quality monitoring concept in an internet of things context is described.Numerous sensors (including pH, Turbidity, and ultrasonic) are shown in the schematic connected to the core controller and the relay module, buzzer, and SIM900A.The core controller accesses the sensor values and processes them to transmit data via the internet.Ultrasonic Sensor HC SR04-It is an electrical tool that uses ultrasonic sound waves to estimate a target object's distance.It then turns the reflected sound into an electrical signal.
The tank is measured, and its water content determined.
pH Sensor SEN0161 -The pH scale measures the proportion of free hydrogen and hydroxyl ions in water.Water that contains more free hydrogen ions is acidic, whereas more free hydroxyl ions make water more basic.Since chemicals in the water can alter pH, pH is a crucial sign of a chemical change in the water.This determines the alkalinity and acidity of the water in the tester.
SIM900A -This module provides information by sending warning messages to the user for the water status update.
LCD -The Liquid Crystal Display serves as the primary monitor where users can view the result of the water condition from the three sensors.
Buzzer -This device is used as a warning and alarm sound to signal users when the water tank is full or empty.
Water Tank Tester -This component acts as a tiny water tank in which the two sensors, pH and Turbidity, are placed for easy water monitoring of the water quality.This is a safety measure to protect the sensors from getting wet.
Water Pump -This water control device drains or removes the water that emerge from the water tank tester using pumping or evaporation.The developers interpreted the working design module into codes.They used a detailed software IDE to code the Arduino Uno R3 and the ESP8266 WiFi module and used the trial and error method to find the best suitable values for the limitations inputted to the source code to enable the water monitoring device to work as desired.These coding  The Hardware setup of AQUAMAG Device Figure 4 shows the overall hardware circuit connections of the device, starting from the Water pump 1.This is connected to the relay module, which is connected to Arduino Uno.All three sensors, the buzzer, the SIM900A, and the ESP8266 WiFi module are connected to the Arduino Uno.Water pump two disposes the water from the water tester tank.The project needs 12 volts power supply to power up the system.

Arduino
Test.In testing the system, the study selected 30 respondents, which are composed of 15 workers from the Manolo Fortich Water District and another 15 from City Environment and Natural Resources Office -Department of Environment and Natural Resources (CENRO-DENR), selected through purposive sampling.The ISO/IEC 25010 evaluation, which was broken down into 8 characteristics, was employed to ascertain the quality traits and properties of the software program.Functional suitability measures how well a system or product satisfies all necessary requirements when used under certain circumstances.
Performance Efficiency measures a system's performance concerning the number of resources it consumes when operating in a given environment.The degree to which a product, design, or element may share data with other goods, systems, or components and carry out its functions in the same software or hardware environment is referred to as Compatibility.Usability is the degree to which particular users can utilize a system or product to accomplish certain goals with productivity, usefulness, and satisfaction for a specific setting.Reliability is the extent to which a system, product, or component performs given functions for a particular duration under certain circumstances.Security is the degree to which a system or product secures data so that users, other systems, and products have the appropriate data access for their authorization levels and types.Maintainability means the effectiveness and efficiency with which a system or product may be fixed, enhanced, or modified to meet new needs and conditions.Portability is how easily and effectively a system, product, or component can be transferred from one operational or usage context to another, depending on its Portability (ISO 25000, 2021).Figure 5 shows the scale measurement of the acidity or alkalinity of the water with a value between 0-14.The calculation is an acidity balancing test or the alkaline content of the hydrogen ions in the water (Cloete et al., 2016).The source of pH natural for water is about 7. pH ranges from 6.5 to 9.5 can be considered safe water for drinking (Bande, 2016).The source of pH is low (0) for acidic and high ( 14) for alkaline solutions.Water begins to turn more acidic as the pH value falls below seven.Any value over seven indicates a higher alkaline level.Different pH sensors operate in various ways to gauge the water's quality.Measurements of the water's Turbidity are used to determine the intensity of infrared light reflected at a 90-degree traversing beam (ISO 7027 technique).

Displaying of Result
Figure 6 shows the interface of getting a water sample when the researchers conducted the testing while Figure 7 shows the actual reading of water status, getting the data to result using the pH, ultrasonic, and Turbidity sensors.Meanwhile, Figure 8 shows the data results that were sent through SMS after the device tested the water quality.It contains the acidity and turbidity level reading of the water sample.Figure 9 shows the ThingSpeak application with the actual result in graphical form of the water using the pH sensor from the different buffer solutions.ThingSpeak is an open data analytics platform for the internet of things devices to communicate with a programming application interface to keep and analyze the collected data.Release.In this phase, user training is conducted to make it easier for the users to use the device.This is done by providing a guide or user manual and giving them step-by-step directions on how it works.This Smart Water Quality Monitoring through the Internet of Things provides an alternative way of water quality and water level monitoring to those who need it at their convenience.This can be used primarily in isolated areas where local supply is scarce and water quality is still being determined.For the time being, this is used in the domestic, commercial space, and academic institutions within the Municipality of Manolo Fortich for further efficiency testing and more data analysis.This information can be used to improve the project prototype further if ever used on a more significant measure soon.The water quality testing was conducted on the water sample of the municipality during the 4-week testing using the AQUAMAG device.The municipal water source got a very safe water quality result, with 6.92 as the lowest and 7.17 as the highest.The overall mean for the water acidity testing is 7.02, which is safe for drinking.The Turbidity of the water tested was overall very clear, with results from 3.05 as the lowest and 3.32 as the highest.The overall mean of the water turbidity testing is 3.20 NTU, within the acceptable turbidity level of less than 5 NTU.The device was also tested with an acidic and dirty water sample by putting lime juice and mud in the sample water.It was able to determine that the sample water was acidic and dirty.the device gained a weighted mean of 3.60, which is verbally interpreted as "Strongly Agree" based on all the data gathered and processed.The Usability of the device gained a weighted mean of 3.47, which is interpreted as "Strongly Agree" since it is usable enough for actual implementation.The device's Reliability gained a weighted mean of 3.21 with an "Agree" verbal interpretation.The device is reliable in terms of consistent quality results.The Security of the device gained a weighted mean of 3.31, which is interpreted as "Strongly Agree."The Maintainability of the device gained a weighted mean of 3.24, which is verbally interpreted as "Agree" since it is easy to maintain.The Portability of the device gained a weighted mean of 3.24 and an "Agree" verbal interpretation for not requiring additional rework.

Findings and Discussion
Among the eight items, the Compatibility component garnered the highest mean value of 3.60, representing a verbal interpretation of "Strongly Agree."This indicates that the device is compatible because it meets the desired functional requirements, while the Reliability, among all indicators, obtained the lowest mean of 3.21.But in general, the device achieved a grand mean of 3.36, with the verbal interpretation of "Strongly Agree."This indicates that the device is deployable and highly acceptable.

Conclusion
Based on the result from the table representation of AQUAMAG device readings, testing, system evaluation, and numerous testing by the researchers, the system is commended and accepted by the representatives of Manolo Fortich Water District and Manolo Fortich CENRO-DENR.During the testing and system evaluation, it received high ratings from the user-respondents.This shows that the developed device could provide an alternative way of water testing and monitoring where the end-users can conveniently and efficiently do the testing through this portable device.The gathered information is substantial for the study to conclude that the AQUAMAG device is significant, accessible, and convenient for monitoring the water level and its quality.With its accessibility, users can view the data offline and online through LCD and SMS.In addition, the application interprets the data into simple words for the user to understand the details quickly.One of the possible additional features to the project for future research is the water level indicator using LED for the user to see if the water level is full or empty.Furthermore, adding a flow sensor to determine the user's water consumption is recommended.Users can also add an uninterruptible power supply (UPS), back up of a power supply and helps prevent system failure despite a power outage.

Figure 2
Figure 2 ISSN 2799-1601 (Print) 2799-161X (Online) | 7The central controller is an Arduino.Viewing of the sensor data is possible via the LCD and WiFi systems.It can also send message notifications for the update of data results.
Figure 3 Uno R3-This microcontroller serves as the device's brain, where all the different sensors' codes are put to command and give signals to determine the water level and condition of the water quality.ESP8266 D1 Mini -It served as both the voltage reader for the battery and the WiFi module to send information to the web page and database through a localized WiFi network.
microprocessors were done iteratively.The web page has its supporting HTML script encoded in the ESP8266 D1 Mini and is accessible through the localized WiFi by entering the Arduino IDE serial monitor's router IP address.To view the values stored in the database, a PHP script is executed through the use of the web browser on a computer where the localized database is also running.

Feedback.
Based on the comments and testing evaluation of the key persons from the Manolo Fortich Water District and Municipal Environment and Natural Resources Office -Department of Environment and Natural Resources (MENRO-DENR) who are experts in the field of water monitoring and testing, the device performance in testing the Turbidity and acidity level of the sample water is good.In terms of the functionality and usability of the device, it is very good and easy to use.The device is also commended as good in terms of being reliable in testing results.Portability is also commended as good, but further enhancement of the device size must be considered for better portability in transportation, especially in far-flung areas of the municipality.

Table 1
AQUAMAG Water Testing Result

Table 2
Performance Efficiency of the device got a weighted mean of 3.51 with a "Strongly Agree" verbal interpretation based on its efficiency in producing fast results.The Compatibility of ISSN 2799-1601 (Print) 2799-161X (Online) | 15