Next Article in Journal
Trophic Status of Lake Niesłysz (Poland) and Related Factors
Previous Article in Journal
Measuring First Nations Engagement in Water Governance in Manitoba
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Automatic Rainwater Quality Monitoring System Using Low-Cost Technology

by
Luis Daniel Mejía-Ferreyra
1,
Liliana García-Romero
1,
Sonia Tatiana Sánchez-Quispe
1,*,
José Apolinar-Cortés
2 and
Julio César Orantes-Avalos
3
1
Faculty of Civil Engineering, Universidad Michoacana de San Nicolás de Hidalgo, Morelia 58030, Mexico
2
Faculty of Chemical Engineering, Universidad Michoacana de San Nicolás de Hidalgo, Morelia 58030, Mexico
3
Faculty of Biology, Universidad Michoacana de San Nicolás de Hidalgo, Morelia 58030, Mexico
*
Author to whom correspondence should be addressed.
Water 2024, 16(12), 1735; https://doi.org/10.3390/w16121735
Submission received: 23 May 2024 / Revised: 14 June 2024 / Accepted: 14 June 2024 / Published: 19 June 2024
(This article belongs to the Section Hydrology)

Abstract

:
Water quality monitoring serves diverse purposes, such as assessing water safety for drinking or agriculture. However, traditional methods are often time-consuming and costly. Additionally, assessing water quality on demand is not always feasible, and parameter variations are not consistently documented. With the advent of affordable equipment capable of efficient performance with minimal resources, remote monitoring sans physical access to the environment has become viable. This has led to reduced inspection and control costs. Understanding the applications, characteristics, and limitations of these devices is crucial for maximizing their benefits. Rainwater quality remains understudied in many areas, leaving its physical, chemical, and microbiological conditions unknown. These conditions are influenced by various atmospheric factors, including both human and natural activities. This research paper develops monitoring stations employing low-cost technology to assess rainwater quality in Morelia City. A prototype was developed based on low-cost technology implementation. Additionally, basic parameters measured include pH, total dissolved solids, turbidity, and temperature, utilizing an Arduino microcontroller for data processing. Data collected from these stations are transmitted via a Wi-Fi communication module to a web platform, enabling real-time visualization of measurements both spatially and temporally. Utilizing such a device offers several advantages compared to standard methods of assessing rainwater quality. It enables continuous measurements and provides a record of how rainwater quality is affected over time by human and natural activities.

1. Introduction

Rainwater harvesting is becoming a popular practice in developed urban areas. It involves collecting and treating rainwater for domestic use, including drinking if properly treated. This practice has several benefits, such as flood prevention and conservation of water sources [1]. One millimeter of rainfall per square meter is equivalent to one liter of water, indicating that the potential for rainwater harvesting is enormous. The use of rainwater as an alternative water source can help improve access to water for residents who lack reliable and efficient water supply, such as in the city of Morelia [2]. The city’s accelerated population growth towards the peripheries has created social, economic, and political issues regarding unequal access to water, the transience of service, contamination, poor infrastructure, and power dynamics over water [3].
The issues have spread to various sectors of the city, with the northern outskirts being one of the most affected areas, specifically the region known as La Aldea [4]. In this locality, there are old and overly exploited wells that extract water from the intermediate flow at the depth of the water table, which is between 150 m and 160 m [5]. Rainwater collected in catchment systems is often of lower quality and may not meet drinking water standards [6]. Studies indicate that rainfall is effective in absorbing and removing aerosol particles present in the atmosphere due to the “in-cloud” and “under-cloud” entrainment processes [7,8].
A study in Hebei province, North China [9], was conducted to determine the chemical composition of rainwater and its possible sources at three rural sites. The results suggested that rainwater has limited anion concentration due to the presence of HCO3 and organic acids [10,11]. The most abundant cation is calcium, followed by ammonium. The predominant anions are sulfate and nitrate, which aligns with other studies [12,13]. Additionally, the study [13] found high concentrations of the F ion, which could be due to the combustion of coal with high fluoride content.
A preliminary study was developed in Costa Rica [14], specifically in the Poas Volcano National Park, from May to October 2017 by the Laboratory of Atmospheric Chemistry of the National University. The quality parameters of the analyzed rainwater were pH, electrical conductivity, and anions (F, Cl, NO3 and SO42−). The obtained results were pH = 2.50, 15.48 ± 0.22 mg/L for F, 205.2 ± 3.3 mg/L for Cl, and 64.0 ± 1.4 mg/L for SO42−.
Finally, a recent study [15] warns that contamination levels in the hydrosphere exceed the recommended values for human safety. It states that water is full of polyfluoroalkylates and perfluoroalkylates (PFAS), which are artificial chemicals that have been produced since 1948. PFAS are indestructible compounds that repel water, grease, and dirt and are used in various applications such as rainwear and frying pans. They are highly fluorinated and, upon decomposition, are extremely difficult to remove from the environment. The effects of PFAS on human health can be severe, resulting in weakened immune systems and even cancer. According to research, the PFAS cycle in the planet’s hydrosphere means that PFAS levels in rainwater will be practically irreversible.
This study [14] recommends constantly monitoring rainwater in order to gather information on the influence of both natural and human sources of contamination on natural ecosystems. They suggest that the monitoring should cover a period of at least two years and involve analyzing a larger number of samples. Additionally, they emphasize the need to closely monitor the physicochemical composition of rainwater and fog water to establish links between rainwater and natural and human emissions. This will help to verify the impact of atmospheric pollutants on rainfall patterns and their effects on water supply for human consumption as well as on the flora and fauna of natural ecosystems.
Currently, it is possible to remotely monitor environmental conditions and record the data over time. Sensors designed for this purpose are widely available and can be adapted to measure different variables with varying levels of precision.
Recent studies have focused on developing low-cost devices using microcontrollers and sensors to monitor the physicochemical quality of water in real-time. These devices incorporate concepts such as Internet of Things (IoT) and Big Data, which are relevant to the current project. Several wireless water physicochemical sensor systems for real-time water quality monitoring have been designed and implemented in different parts of the world [16] after being developed a low-cost sensor system in Parkville, Australia to analyze temperature, pH, electrical conductivity, dissolved oxygen, and oxygen-reduction potential. The collected information was sent to a computer, processed, and stored in a structured query language (SQL) database. The results showed that the monitoring system could be considered reliable with proper calibration.
Similarly, a study [17] a sensor system was designed and developed in Pretoria, South Africa to measure physicochemical water quality parameters such as flow rate, temperature, pH, conductivity, and oxidation-reduction potential. All sensor data are wirelessly transmitted via a Wi-Fi network, processed, and analyzed in real-time. The system also notifies the user immediately and issues alerts when water quality parameters reach unsafe levels.
A low-cost water quality measurement device was developed in Amsterdam, Netherlands [18] to operate in rural Africa. The device measures parameters such as electrical conductivity, dissolved oxygen, pH, temperature, and turbidity. These parameters are then sent to a server via the GPRS network, and an online interface is utilized to display the sent data.
Another monitoring kit for water quality parameters was developed in New Jersey [19]. This kit uses low-cost sensors and an Arduino microcontroller to measure parameters such as temperature, total dissolved solids, pH, and turbidity. In addition, 3D printing was used to integrate the circuitry into a solid structure.
A study was conducted in Brunei [20] to determine whether an Arduino-based sensor system could be used to monitor the water quality of a river. They used a simple prototype that included a microcontroller and multiple connected sensors for weekly on-site testing at different times throughout the day. However, the system was found to be reliant on human assistance and was prone to data inaccuracies.
Additionally, an automatic hydrological information system was developed in the city of Morelia, Michoacan, Mexico [21]. This system consists of weather stations that use microcontrollers and low-cost sensors based on the Arduino platform to monitor meteorological variables in real time. The information collected by the stations is transmitted through the Wi-Fi network to the ThingSpeakserver, which allows users to visualize and download the data from a computer or a smartphone.
It has been observed that there is currently no device available in the market that can measure the quality of rainwater in real-time. Moreover, the professional equipment required to measure water quality parameters in the field is expensive and not affordable for most people. To address this issue, low-cost equipment was designed and developed that can measure basic parameters such as pH, total dissolved solids, turbidity, and temperature. The measurements are collected using an Arduino microcontroller manufactured by the company of the same name in Ivrea, Italy and a Wi-Fi ESP8266 communication module manufactured by Espressify Systems in Shangai, China. The collected data are then sent to a database and web platform, which allows for real-time visualization of the data in both spatial and temporal dimensions.

2. Case Study

The automatic hydrological information system (SAIH) [21], is now operational in Morelia. However, the SAIH weather stations were not in optimal conditions, so their location had to be improved (Figure 1). Moreover, the information collected by these stations was temporarily stored on the ThingSpeak website, which made it impossible to keep a historical record of the sensor data. This issue has been resolved, and now the information collected by the sensors is being stored in a database that was specifically developed for web hosting.
Water quality monitoring stations were developed to monitor rainwater in Morelia spatially and in real-time. These stations were placed throughout the city, ensuring their distribution in different quadrants of Morelia, and the responsibility of their maintenance was assigned to the SAIH team.
The constructed stations can be seen in Figure 2 and are located in various sectors of the city, such as the Torreon Nuevo station in the northwest, the Independencia station in the northeast, the Ciudad Universitaria (C.U.) station in the southwest, and the Lomas de las Americas Sur station in the southeast.

3. Methodology

Figure 3 presents the methodology used to develop a prototype for a real-time water quality monitoring system. It also describes each stage of the process.

3.1. Selection of Monitored Water Quality Parameters

When evaluating water quality, several variables must be taken into consideration. However, it is also important to consider the practicality of measuring certain variables.
A previous study [22] found that monitoring water parameters such as nitrate levels, free chlorine concentration, and dissolved oxygen is too expensive. These variables require frequent maintenance and calibration to ensure accurate readings over time, which is not feasible for a long-term, low-cost, real-time water quality monitoring system. Therefore, in this work, an alternative approach was developed that is both cost-effective and practical.
Water quality measurements that were time-consuming and did not provide accurate results had to be excluded. Instead of measuring biological factors like fecal coliform and total coliform contamination, turbidity was measured, which is more accessible even though it is more general. Additionally, electrical conductivity (EC) was used to represent contamination by dissolved hazardous substances since EC indirectly measures total dissolved solids (TDS). Finally, the pH level was also measured, which is an indicator of the degree of alkalinity or acidity. This is a critical factor when considering the toxicity of a water sample.

3.2. Analysis of Requirements

The following are the aspects that were considered and the selected options based on the challenges encountered by [23].
  • Power supply: The prototype will be connected to the SAIH stations and powered through the electrical network.
  • Connectivity: SAIH stations and the developed prototype connect to the internet wirelessly via Wi-Fi.
  • Visualization: SAIH stations display their information in real-time on a web page using ThingSpeak platform widgets. However, the free version only stores data for a month before deleting it. To overcome this limitation, a database was developed for this project on web hosting.
  • Operating conditions: The water quality sensors consist of a circuit and a probe. The probes are waterproof, but the circuits are not. To protect the circuits from the elements, a housing was designed to store them, while the probes were left exposed to collect and renew rainwater. The maintenance of probes due to corrosion or sensor replacement, estimating that this could potentially increase the total cost by 5%.

3.3. Design and Development

In this section, a draft of the prototype architecture is presented, which includes the connection of microcontrollers with sensors and the programming of microcontrollers.

3.3.1. Calibration

Calibration is the process of using a measurement standard to establish the relationship between the value displayed by the measuring instrument and the actual value.
In this project, each sensor was calibrated and validated to ensure its proper operation. The measurements given by the developed equipment were compared with standard calibration solutions. To calibrate each sensor, the procedure shown below was followed.
  • Clean the sensor probe with distilled water and dry it with a disposable tissue.
  • Correctly place the sensor inside the calibration standard solution.
  • Carry out the measurement.
  • Record the parameter value and the voltage read by the device.
  • Remove the probe from the calibration standard solution.
  • Repeat steps 1 to 5 10 times.
  • Calculate the relative error percentage using Equation (1). If it is greater than that guaranteed by the manufacturer, the sensor is calibrated.
  • Repeat steps 1 through 7 for each sensor.
R e l a t i v e   e r r o r   ( % ) = | E V A V A V | × 100 %
where E V is the experimental value measured with the sensor and A V is the accepted value of the calibration standard solution.

3.3.2. Validation

In the validation process, the information provided by the developed prototype is guaranteed to be accurate by comparing the readings of the developed prototype with commercial equipment.

3.3.3. Data Visualization

The website’s data visualization interface was developed using the following considerations and options were selected during its development [24].
  • Analysis of requirements: The monitoring stations were displayed on a map with markers to visualize them and show the latest information upon interaction.
  • Architecture and technology: A hosting provider was hired for platform development. A dynamic website was developed using web technologies such as HTML, PHP, JavaScript, and CSS. MySQL 8.0.17 was used as the database manager. A free Bootstrap web template (SB Admin 2) was used as a base [25] to develop the web application and mobile-first sites with a layout that adapts to the user’s screen [26].
  • Design of the logical and physical structure of the site: The main page contains the map with the monitoring stations. The site contains several sections with different functions, such as selecting consulted parameters in real-time, downloading data for a given period, and consulting data recorded on a specific time and date. Additionally, complementary pages such as Team and Contact were added.
  • Content creation: The platform’s content is primarily graphic, with more extensive text found in the Team and Contact tabs. The rest of the site contains short indications for the user or information on the indicators.
  • Graphic design: The interface features various shades of white, blue, gray, black, and green. White is used for the navigation bar, page background, and pop-up windows. Blue is used for some text, radio buttons, weather indicators, and real-time graphs. Gray is used for some text, station markers, indicator icons, and back buttons. Black is used for most text, and green is used for water quality indicators and some text. The default typography was retained from the Bootstrap template, and the sizes were adapted according to the device accessing the site. The indicator icons were obtained from the Font Awesome platform [27], which offers free icons that can be added to the website.
  • Creation of the static pages: The static pages include the Team and Contact pages, which will not change according to the database.
  • Creation of the dynamic pages: The dynamic page is the home page, where the station markers are displayed on the map. These markers change color based on the intensity of precipitation, and the magnitude of the indicators is updated in real-time.
  • Verification of the site’s operation: The page’s connection with the database was verified, ensuring that the most recent data was updated. The links within the site were also confirmed to redirect to the correct site. The site was tested on different browsers and devices, and the content was adjusted to fit the screen size. Finally, the site’s loading time was tested.
  • Start-up: After verifying the site’s operation locally, it was published on the web domain, making it accessible to the public.

3.3.4. Materials

We decided to use the Arduino platform to carry out the project. Below is a description of the platform, the microcontrollers, and the sensors.
A.
Arduino
The platform combines open-source software and free hardware microcontrollers to develop electronic products and projects. An Arduino board is a microcontroller that specializes in reading and requesting data from a wide range of sources to complete specific tasks that have been programmed. The coding language used in Arduino is relatively simple, and users can program the microcontroller to request data in a variety of ways, such as reporting it as a numerical value, turning on a light, moving a motor, or even sending a text message. Many people have used Arduino to build low-cost science projects, test the principles of chemistry and physics, or get started with programming and robotics [28].
B.
NodeMCU
In order for the device to transmit results to the user via the internet, a board was needed to facilitate communication between the device and a platform designed for the Internet of Things. The NodeMCU development board was chosen as an open source and has an integrated ESP8266 module that allows any microcontroller to connect to its Wi-Fi network. The board features a Wi-Fi module that connects the system to the internet, digital pins, an analog one for connecting various modules and sensors, an SoC (system on a chip) processor, and 16 GPIO (general-purpose input/output) lines. It is powered by 5 V [29].
C.
3D printing
Using 3D printing technology, it is now possible to embed electronics into solid structures. The concept of 3D printing was introduced in the 1980s by Chuck Hull, a physicist and engineer, and 3D printers create three-dimensional objects by depositing material one layer at a time in an additive manufacturing process using computer-aided design (CAD) models. This method of manufacturing results in less material wastage and lower energy consumption, making it an innovative and effective technology [30].
The electronic components are embedded into a specially designed object, which includes holes and openings for connecting the circuit parts, such as sensors and wires. The circuit is printed inside the solid structure rather than being externally wired, making the final product more compact and user-friendly.
D.
Sensors
A sensor is a device that receives information from a physical quantity or other disturbances in the environment and transforms it into another quantity, usually electrical, that can be quantified and manipulated. It consists of three main components: (1) the sensitive area contains the sensor system based on a given technology, (2) the processing circuitry converts the physical variable into an electrical variable, and (3) the signal output contains electronics that are connected to a control system [31].
Three basic water quality sensors were used for the project design. These sensors were purchased from a company called DFRobot established in the city of Chengdu, China, which specializes in electronics for robotics and advanced electronics projects on Arduino.
E.
pH sensor
The pH sensor uses a pair of electrodes to measure acidity levels. One electrode measures the electrical potential across a glass membrane that allows H+ ions to pass through, while the other electrode measures the electrical potential across a standard reference solution of KCl, which is a measure of the ionic activity of H+. This value can be converted into a pH value by taking the negative logarithm of the concentration of H+ (−log [H+]).
The sensor responds linearly, so the equation for converting the measured voltage to pH can be derived by taking two points. The general form is shown in Equation (2), where V represents the voltage (volts), and m (units of pH/volts) and b (units of pH) are obtained by calculating the linear equation where m while calibrating the sensor with buffer solutions of pH 4, 7, and 10.
p H = m × V + b
F.
Total dissolved solids sensor
The total dissolved solids (TDS) measurement indicates the number of milligrams of soluble solids that are dissolved in a liter of water. Most TDS meters display the value in mg/L (milligrams per liter). Typically, the greater the TDS value, the more soluble solids are present in the water, indicating that it is less clean.
Water mainly consists of dissolved matter, which includes minerals, salts, and anionic and cationic substances. However, it may also contain contaminants such as heavy metals and organic matter. A quick estimate of the dissolved solids content of a water sample can be obtained by measuring its electrolytic conductivity. This measurement indicates the ability of a sample to conduct electric current, which is related to the concentration of ionized substances in the water.
Electrical conductivity (EC) numerically expresses the ability of a solution to conduct an electric current. It is determined by several factors, such as the presence of ions, total concentration, mobility, valence, relative concentrations, and temperature. EC is important as it provides insight into the degree of mineralization of water. Electrolytes are substances that contain free ions and thus behave as electrical conductors. They can be acids, bases, or salts [32].
TDS sensors function by utilizing two or more probes that generate an electric current through the liquid solution in which they are submerged. The amount of current flowing between the probes is dependent on the ion concentration between them, which is also influenced by the potential difference between the probes [33].
The sensor produces a voltage output that can be translated into an EC reading. This reading can then be used to estimate the concentration of TDS in mg/L. Equation (3) demonstrates the relationship between voltage and electrical conductivity in μS/cm [34].
E C = 133.42 C V 25 3 225.86 C V 25 2 + 857.39 C V 25
where C V 25 is the value of the temperature compensated voltage (V), taking as a reference a temperature of 25 °C.
In a water sample, the presence of ionic species is usually insignificant in concentration. As a result, dissolved ions tend to have the same impact on conductivity readings. Therefore, EC can serve as a reliable measure of the TDS concentration in water. Typically, the TDS value is half of the electrical conductivity [35] as shown in Equation (4).
T D S = E C / 2
Equation (5). Correlation between electrical conductivity (EC) and total dissolved solids (TDS).
V = C V 25 ( 1 + α ( T T 0 ) )
where α is the temperature coefficient of resistance, T is the recorded temperature, and T 0 is the temperature at 25 °C.
The temperature coefficient can be theoretically obtained using the Nernst–Einstein and Stokes–Einstein proportionalities in the linearized approximation [36].
When EC and viscosity are applied together, they are proportionally related. This relationship can be used to reduce α to a constant of 0.02. The linear approximation maintains an error of less than 0.25 µS for a temperature range of 0 to 55 °C, which is the maximum temperature limit of the SDT sensor. Equation (6) can be reduced to the following.
CV 25 = V ( 1 + 0.02 ( T 25   ° C ) )
G.
Turbidity sensor
The front sensor is an optical device that consists of an LED (light emitter) and a phototransistor (light receiver). It operates based on the principle of transmittance. When light passes through a specific amount of water, the amount of light that passes through depends on the number of solids in the water. As the quantity of solids increases, the amount of light passing through the sample decreases, and the sensor measures the amount of light transmitted to determine the turbidity of the water. This measure is inversely related to nephelometric turbidity units (NTU), one of the most commonly used standards for measuring turbidity. The sensor manufacturer (DFRobot) provides Equation (7), which relates voltage to turbidity in NTU [37].
y = 1120.4 x 2 + 5742.3 x 4352.9

4. Discussion and Results

4.1. Selection of Monitored Water Quality Parameters

After conducting bibliographic research on similar works, the sensors listed in Table 1 were found on the market, where their characteristics, measurement ranges, and accuracy are also indicated.

4.2. Design and Development

An Arduino NANO board was utilized as a microcontroller to operate the prototype. The circuit diagram in Figure 4 displays the sensor connections to the Arduino board. A NodeMCU ESP8266 board is employed to connect the device to the internet. The Arduino NANO board transmits the data to the NodeMCU through a serial communication protocol, and the NodeMCU board transmits the data to the server database through an HTTP communication protocol.
The rainwater quality monitoring station (RQMS) has Wi-Fi connectivity and can communicate with a web server, as shown in Figure 5.
In order to protect the circuits from any weather-related damage and to preserve the water for further analysis by the sensors, housing was created using Fusion360, a free=license 3D CAD (computer-aided design) tool suitable for hobbies. The 3D model of the housing designed in isometry is demonstrated in Figure 6, while Figure 7 displays the operational prototype.

4.3. Calibration

The pH sensor was calibrated using three buffer solutions with pH values of 4, 7, and 10, as specified in NMX-AA-008-SCFI-2016 [38]. The measurement process involved cleaning the sensor probe with distilled water, drying it with a disposable handkerchief, and immersing it in the solution. After a few minutes, the measurement would stabilize, and the voltage value was recorded as soon as it stabilized (Table 2).
The plotted values indicate a linear relationship between pH and voltage due to the transducer in the sensor. Therefore, a line of best fit was obtained to give the best approximation to the data set. This is represented in Figure 8, and the equation for the line is given in Equation (8).
p H = 5.9981 V + 22.196
Equation (8) is valid for voltages above 1.3664 and below 3.7005. If the voltage exceeds this range, pH values will correspond to 14 and 0, respectively.
The TDS sensor operates using Equation (3), which explains the relationship between voltage and electrical conductivity. A standard NaCl conductivity solution with a concentration of 692 mg/L was employed to calibrate it, indicating a conductivity of 1413 µS/cm at 25 °C as stated in NMX-AA-093-SCFI-2000 [39]. A temperature probe is required for the TDS sensor to calibrate the voltage. The measurement process involved cleaning the TDS and temperature probes with deionized water, drying them with a tissue, inserting them into the solution, waiting for the reading to stabilize, and then recording the voltage values. The results are shown in Table 3.
The sensor readings closely match the value of the conductivity standard solution. To calibrate the voltage of each measurement, a voltage calibration coefficient was calculated using the function “goal seek” in Microsoft Excel 2019. Subsequently, this coefficient was multiplied with the voltage reading, resulting in an affected voltage, which was used in the equation shown in Table 4.
An average voltage calibration coefficient of 0.99775 was obtained. This value will be added to the programming.
The EC equation demonstrates a parabolic behavior, which is illustrated in Figure 9.
The manufacturer provided Equation (7) for calibrating the turbidity sensor. This equation establishes a relationship between voltage and turbidity and is only valid for voltages ranging from 2.5 to 4.2. The measurement range of the sensor is between zero and 3000.35 NTU, as shown in Figure 10.
The turbidity was measured at 500 NTU using a formazin standard solution, which was prepared according to the NMX-AA-038-SCFI-2001 [40] guidelines. The sensor was calibrated using different dilutions of the solution, with distilled water used as the zero value. Dilutions of 5, 10, 20, and 50 NTU were prepared, and their voltages were measured by the sensor and recorded in Table 5 along with the corresponding equation.
It is necessary to find a calibration coefficient that shows the correct values of turbidity, as the voltage values obtained are higher than the voltage limit established in the equation.
For every turbidity value, an average voltage was calculated. Table 6 shows the voltage calibration coefficients that were determined using the “goal seek” function in Excel. Each coefficient is multiplied by the voltage reading to obtain an affected voltage. The average voltage calibration coefficient is 0.98763.

4.4. Validation

The Thermo Scientific Orion portable multiparameter, which had been calibrated previously, was used to compare the measurements between commercial equipment and the low-cost one. A volume of 100 mL of deionized water was used, to which different concentrations of 0.01 M H2SO4 solution were added to lower its pH. The temperature was 23.4 °C, and the substances were stirred for one minute. Five paired measurements were taken for each concentration. The average data is shown in Table 7, and the relative error percentage was calculated using Equation (1).
To verify the accuracy of the TDS sensor, different volumes of 0.1 M NaCl solution at a temperature of 23.94 °C were measured, which were then made up to 100 mL with deionized water. The substances were mixed for one minute using a stirrer. Five paired measurements were performed for each concentration, and the relative errors were calculated using Equation (1). The average data is shown in Table 8.
For validation, the Formazan standards were measured five times each with the voltage calibration coefficient loaded in the programming code. The average data is shown in Table 9, and the relative error was calculated using Equation (1).
As can be seen, the percentage error of the sensors used is within ±10% acceptable margin set by the manufacturer.

4.5. Implementation of the Interface to Visualize the Data

The database was designed with the aim of accommodating more sensors in the future. Currently, there are two categories of variables: meteorological and environmental. The meteorological variables, such as temperature, humidity, precipitation, and precipitation intensity, are already being monitored by the SAIH. On the other hand, the environmental variables consist of pH, TDS, and turbidity.
Part of the web interface that has been developed locally is displayed in Figure 11.
After creating the database and web interface locally, they were migrated to web hosting. The Hostinger company was chosen as the hosting service provider due to their annual package offering 30 GB of storage and two databases for USD 24. In addition, a domain had to be purchased for real-time data consultation, which can be accessed through the following URL: http://saihumich.com (accessed on 9 August 2022). The annual cost of the domain is USD 10.
The development of this monitoring system cost USD 542, including materials, hosting, and web domain for four stations.

5. Conclusions

The developed monitoring system provides continuous and reliable remote measurements of rainwater quality at a significantly reduced cost, eliminating the need for expensive analytical equipment and on-site analysis.
Constant monitoring of rainwater quality can allow us to understand the physicochemical composition of rainwater and establish a correlation between rainwater and anthropogenic and natural emissions. It can also help us determine the impact of atmospheric pollutants on rainfall patterns.
Continuous monitoring of rainwater quality is essential for environmental authorities to provide real-time data, as well as protect and monitor pollution sources.
It is important to note that there may be measurement errors with low-cost devices due to various factors. However, these errors can be minimized through proper equipment maintenance and periodic sensor calibration.
Having a system with open-source hardware has the advantage of allowing the replacement of parts with other similar hardware without requiring contact with the product developers. Likewise, open-source software provides the flexibility to expand or reduce the monitored variables as needed.

Author Contributions

Conceptualization, L.D.M.-F. and S.T.S.-Q.; methodology L.D.M.-F. and S.T.S.-Q.; validation, J.A.-C. and J.C.O.-A.; formal analysis, L.D.M.-F. and L.G.-R.; investigation, L.D.M.-F.; resources, L.D.M.-F.; data curation, L.D.M.-F.; writing—original draft preparation, L.D.M.-F.; writing—review and editing, L.G.-R. and S.T.S.-Q.; visualization, L.G.-R. and S.T.S.-Q.; supervision, J.A.-C. and J.C.O.-A.; project administration, S.T.S.-Q.; funding acquisition, S.T.S.-Q. All authors have read and agreed to the published version of the manuscript.

Funding

The authors acknowledge the support from the Institute of Science, Technology and Innovation of Michoacán (ICTI -Instituto de Ciencia, Tecnología e Innovación de Michoacán) for its financial support through the project number “PICIR23-013-Sistema de alerta a la población ante inundaciones y precipitaciones extremas para la ciudad de Morelia, Michoacán”.

Data Availability Statement

Data is contained within the article.

Acknowledgments

The authors wish to thank the Universidad Michoacana de San Nicolás de Hidalgo (UMSNH) for providing the necessary facilities and laboratory equipment for the development of this study. The first and second authors wish to thank the National Council of Humanities, Science and Technology of Mexico (CONAHCyT-Consejo Nacional de Humanidades, Ciencias y Tecnologías de México) for the financial support of their postgraduate studies. Additionally, the authors acknowledge the support from the Institute of Science, Technology and Innovation of Michoacán (ICTI- Instituto de Ciencia, Tecnología e Innovación de Michoacán) for its financial support through the project “PICIR23-013”. Finally, we also value the anonymous reviewers and the editor for their constructive comments on the manuscript.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Krishna, H. The Texas Manual on Rainwater Harvestingo, 3rd ed.; Texas Water Development Board: Austin, TX, USA, 2005. [Google Scholar]
  2. Cambio de Michoacán Suministro Irregular de Agua Desde Este Jueves En 115 Colonias de Morelia. Available online: https://cambiodemichoacan.com.mx/2022/03/30/suministro-irregular-de-agua-desde-este-jueves-en-115-colonias-de-morelia/ (accessed on 30 March 2022).
  3. Morales Magaña, M. Flujos de Agua y Poder: La Gestión Del Agua Urbanizada En La Ciudad de Morelia, Michoacán. Ph.D. Thesis, Colegio de Michoacán, Zamora, Mexico, 2015. [Google Scholar]
  4. García-Estrada, L.; Hernández-Guerrero, J. Ciclo Hidrosocial y Acceso Al Agua En La Periferia de La Ciudad de Morelia, México: Estudio de Caso En La Aldea. Rev. Geográfica América Cent. 2020, 64, 245–273. [Google Scholar] [CrossRef]
  5. Garduño Monroy, V.H.; Giordano, N.; Ávila Olivera, J.A.; Hernández Madrigal, V.M.; Sámano Nateras, A.; Díaz Salmerón, J.E. Estudio Hidrogeológico Del Sistema Acuífero de Morelia, Michoacán, Para Una Correcta Planificación Del Territorio; Urbanización, Sociedad y Ambiente. Michoacán, México. UNAM Centro de Investigaciones en Geografía Ambiental: Morelia, Mexico, 2014; pp. 197–222. [Google Scholar]
  6. Ahmed, W.; Gardner, T.; Toze, S. Microbiological Quality of Roof-Harvested Rainwater and Health Risks: A Review. J. Environ. Qual. 2011, 40, 13–21. [Google Scholar] [CrossRef]
  7. Gillette, D.A.; Sinclair, P.C. Estimation of Suspension of Alkaline Material by Dust Devils in the United States. Atmos. Environ. 1990, 24, 1135–1142. [Google Scholar] [CrossRef]
  8. Rastogi, N.; Sarin, M.M. Chemical Characteristics of Individual Rain Events from a Semi-Arid Region in India: Three-Year Study. Atmos. Environ. 2005, 39, 3313–3323. [Google Scholar] [CrossRef]
  9. Wu, Y.; Xu, Z.; Liu, W.; Zhao, T.; Zhang, X.; Jiang, H.; Yu, C.; Zhou, L.; Zhou, X. Chemical Compositions of Precipitation at Three Non-Urban Sites of Hebei Province, North China: Influence of Terrestrial Sources on Ionic Composition. Atmos. Res. 2016, 181, 115–123. [Google Scholar] [CrossRef]
  10. Migliavacca, D.; Teixeira, E.C.; Wiegand, F.; Machado, A.C.M.; Sanchez, J. Atmospheric Precipitation and Chemical Composition of an Urban Site, Guaíba Hydrographic Basin, Brazil. Atmos. Environ. 2005, 39, 1829–1844. [Google Scholar] [CrossRef]
  11. Xu, Z.; Han, G. Chemical and Strontium Isotope Characterization of Rainwater in Beijing, China. Atmos. Environ. 2005, 43, 1954–1961. [Google Scholar] [CrossRef]
  12. Huang, D.Y.; Xu, Y.G.; Peng, P.; Zhang, H.H.; Lan, J.B. Chemical Composition and Seasonal Variation of Acid Deposition in Guangzhou, South China: Comparison with Precipitation in Other Major Chinese Cities. Environ. Pollut. 2009, 157, 35–41. [Google Scholar] [CrossRef]
  13. Larssen, T.; Semb, A.; Mulder, J.; Muniz, I.; Vogt, R.; Lydersen, E.; Angell, V.; Dagang, T.; Eilester, O.; Seip, H.M. Acid Deposition and Its Effects in China: An Overview. Environ. Sci. Policy 1999, 2, 9–24. [Google Scholar] [CrossRef]
  14. Bolaños, K.; Sibara, J.; Mora, J.; Umaña, D.; Cambronero, M.; Sandolval, L.; Martínez, M. Estudio Preliminar Sobre La Composición Atmosférica Del Agua de Lluvia En y Los Alrededores Del Parque Nacional Del Volcán Poás. In Memorias del I Congreso Internacional de Ciencias Exactas y Naturales de la Universidad Nacional, Costa Rica; Universidad Nacional: Heredia, Costa Rica, 2019; pp. 1–11. [Google Scholar]
  15. Cousins, I.T.; Johansson, J.H.; Salter, M.E.; Sha, B.; Scheringer, M. Outside the Safe Operating Space of a New Planetary Boundary for Per- and Polyfluoroalkyl Substances (PFAS). Environ. Sci. Technol. 2022, 56, 11172–11179. [Google Scholar] [CrossRef]
  16. Rao, A.S.; Marshall, S.; Gubbi, J.; Palaniswami, M.; Sinnott, R.; Pettigrove, V. Design of Low-Cost Autonomous Water Quality Monitoring System. In Proceedings of the 2013 International Conference on Advances in Computing, Communications and Informatics (ICACCI) 2013, Mysore, India, 22–25 August 2013; pp. 14–19. [Google Scholar]
  17. Cloete, N.A.; Malekian, R.; Nair, L. Design of Smart Sensors for Real-Time Water Quality Monitoring. IEEE Access 2016, 4, 3975–3990. [Google Scholar] [CrossRef]
  18. Oelen, A.; Van Aart, C.; De Boer, V. Measuring Surface Water Quality Using a Low-Cost Sensor Kit within the Context of Rural Africa. In Proceedings of the CEUR Workshop Proceedings, Amsterdam, The Netherlands, 27 May 2018; CEUR-WS: Aachen, Germany, 2018; Volume 2120. [Google Scholar]
  19. Malhotra, R.; Devaraj, H.; Baldwin, B.; Kolli, V.; Lehman, K.; Li, A.; Lin, C. Integrating Electronics with Solid Structures Using 3D Circuits. In Proceedings of the 2019 IEEE MIT Undergraduate Research Technology Conference (URTC), Cambridge, MA, USA, 11–13 October 2019; pp. 1–11. [Google Scholar]
  20. Hong, W.J.; Shamsuddin, N.; Abas, E.; Apong, R.A.; Masri, Z.; Suhaimi, H.; Gödeke, S.H.; Noh, M.N.A. Water Quality Monitoring with Arduino Based Sensors. Environments 2021, 8, 6. [Google Scholar] [CrossRef]
  21. Rodríguez Licea, D.; Sánchez Quispe, S.T.; Domínguez Mota, F.J. Sistema Automático de Información Hidrológica de Morelia; Michoacan University of Saint Nicholas of Hidalgo: Morelia, México, 2020. [Google Scholar]
  22. Lambrou, T.P.; Anastasiou, C.; Panayiotou, C.; Polycarpou, M. A Low-Cost Sensor Network for Real-Time Monitoring and Contamination Detection in Drinking Water Distribution Systems. IEEE Sens. J. 2014, 14, 2765–2772. [Google Scholar] [CrossRef]
  23. Pitula, K.; Dysart-Gale, D.; Radhakrishnan, T. Expanding the Boundaries of HCI: A Case Study in Requirements Engineering for ICT4D. Inf. Technol. Int. Dev. 2010, 6, 78–93. [Google Scholar]
  24. Luján Mora, S. Programación de Aplicaciones Web: Historia, Principios Básicos y Clientes Web; Editorial Club Universitario: Alicante, Spain, 2002. [Google Scholar]
  25. Start Bootstrap SB Admin 2—Free Bootstrap Admin Theme—Start Bootstrap. Available online: https://startbootstrap.com/theme/sb-admin-2 (accessed on 1 January 2024).
  26. Rockcontent Bootstrap: ¿qué Es, Para Qué Sirve y Cómo Instalarlo? Available online: https://rockcontent.com/es/blog/bootstrap/ (accessed on 15 January 2024).
  27. Zlatanov, N. Arduino and Open Source Computer Hardware and Software. IEEE Sens. J. 2015, 11, 10. [Google Scholar] [CrossRef]
  28. Arduino What Is Arduino? Available online: https://www.arduino.cc/en/Guide/Introduction (accessed on 1 January 2024).
  29. Negara, R.M.; Tulloh, R.; Hadiansyah, P.N.; Zahra, R.T. My Locker: Loaning Locker System Based on QR Code. Int. J. Eng. Adv. Technol. 2019, 9, 12–19. [Google Scholar] [CrossRef]
  30. Matulka, R.; Greene, M. How 3D Printers Work. Available online: https://www.energy.gov/articles/how-3d-printers-work (accessed on 1 January 2024).
  31. Balluff Cómo Funciona Un Sistema de Sensores. Available online: https://www.balluff.com/es-mx/mx/service/basics-of-automation/fundamentals-of-automation/basic-of-sensing/ (accessed on 1 February 2024).
  32. USEPA Conductivity. Available online: https://archive.epa.gov/water/archive/web/html/vms59.html (accessed on 1 February 2024).
  33. West, J.; Charlton, C.; Kaplan, K. Conductivity Meters. Available online: https://encyclopedia.che.engin.umich.edu (accessed on 1 February 2024).
  34. DFRobot Gravity: Analog TDS Sensor Meter for Arduino SKU SEN0244. Available online: https://www.dfrobot.com/product-1662.html (accessed on 1 March 2024).
  35. Omega Engineering Conductivity Meter. Available online: https://www.omega.co.uk/prodinfo/conductivity-meter.html (accessed on 1 February 2024).
  36. Aqion Temperature Compensation for Conductivity. Available online: https://www.aqion.de/site/112 (accessed on 1 March 2024).
  37. DFRobot Turbidity Sensor SKU SEN0189. Available online: https://wiki.dfrobot.com/Turbidity_sensor_SKU__SEN0189 (accessed on 1 May 2024).
  38. SINEC NMX-AA-008-SCFI-2016; Medición Del PH En Agua Naturales, Residuales y Residuales Tratadas. Secretaria de Economía: Gobierno de México, Mexico, 2016.
  39. SINEC NMX-AA-093-SCFI-2000; Determinación de La Contuctividad Electrolítica. Secretaria de Economía: Gobierno de México, Mexico, 2000.
  40. SINEC NMX-AA-038-SCFI-2001; Determinación de Turbiedad En Agua Naturales, Residuales y Residuales Tratadas. Secretaria de Economía: Gobierno de México, Mexico, 2001.
Figure 1. Location of the low-cost SAIH weather stations.
Figure 1. Location of the low-cost SAIH weather stations.
Water 16 01735 g001
Figure 2. Location of the rainwater quality monitoring stations (RQMS) in the city of Morelia.
Figure 2. Location of the rainwater quality monitoring stations (RQMS) in the city of Morelia.
Water 16 01735 g002
Figure 3. Proposed methodology for the development of the prototype.
Figure 3. Proposed methodology for the development of the prototype.
Water 16 01735 g003
Figure 4. Connection diagram of the rainwater quality monitoring prototype (own elaboration).
Figure 4. Connection diagram of the rainwater quality monitoring prototype (own elaboration).
Water 16 01735 g004
Figure 5. Architecture of the rainwater quality monitoring prototype (own elaboration).
Figure 5. Architecture of the rainwater quality monitoring prototype (own elaboration).
Water 16 01735 g005
Figure 6. Three-dimensional model integrating the circuits and rainwater quality sensors.
Figure 6. Three-dimensional model integrating the circuits and rainwater quality sensors.
Water 16 01735 g006
Figure 7. Three-dimensional model integrating the circuits of the rainwater quality sensors.
Figure 7. Three-dimensional model integrating the circuits of the rainwater quality sensors.
Water 16 01735 g007
Figure 8. Relationship between voltage and pH.
Figure 8. Relationship between voltage and pH.
Water 16 01735 g008
Figure 9. Relationship between voltage and EC using Equation (3).
Figure 9. Relationship between voltage and EC using Equation (3).
Water 16 01735 g009
Figure 10. Relationship between voltage and turbidity using Equation (7).
Figure 10. Relationship between voltage and turbidity using Equation (7).
Water 16 01735 g010
Figure 11. Web interface that was developed locally, the main page shows the spatially located monitoring stations and the recorded values of temperature, humidity, precipitation and precipitation intensity on the left side, and on the right side there is a color scale for the different precipitation intensities.
Figure 11. Web interface that was developed locally, the main page shows the spatially located monitoring stations and the recorded values of temperature, humidity, precipitation and precipitation intensity on the left side, and on the right side there is a color scale for the different precipitation intensities.
Water 16 01735 g011
Table 1. Specifications of water quality sensors selected for the prototype design.
Table 1. Specifications of water quality sensors selected for the prototype design.
SensorModelInput Voltage (V)Measuring RangeMeasuring AccuracyOperating Temperature (°C)Price (USD)
Analog TDS and EC sensorTDS Meter v13.3~5.50~1000 mg/L±10% (25 °C)0~55$32.50
Analog turbidity sensorSEN018950~1000 NTU±10%5~90$34.50
Analog pH sensorPH-4502C50~14±10%0~80$30.65
Digital water temperature sensorDS18B203.0~5.5−10~+85 °C±0.5 °C−55~+125$2.75
Table 2. Voltage values related to pH.
Table 2. Voltage values related to pH.
pHVoltage (V)Average Voltage (V)
43.0365, 3.0356, 3.0358, 3.0351, 3.0361, 3.0359, 3.0355, 3.0352, 3.0352, 3.03573.0357
72.5299, 2.5296, 2.5295, 2.5303, 2.5297, 2.5287, 2.5291, 2.5296, 2.5296, 2.52882.5295
102.0352, 2.0361, 2.0359, 2.0355, 2.0352, 2.0353, 2.0348, 2.0351, 2.0357, 2.03512.0354
Table 3. Electrical conductivity values measured with the 1413 µS/cm standard.
Table 3. Electrical conductivity values measured with the 1413 µS/cm standard.
Temperature (°C)Voltage (V)EC
(µS/cm)
23.941.74271423.2627
23.941.73651415.9561
23.931.73691416.3735
23.931.74101421.2037
23.951.73811417.8912
23.941.73771417.3677
23.961.73941419.3567
23.921.73611415.4971
23.941.73451413.6064
23.951.73601415.4216
Table 4. Voltage calibration coefficient for the TDS sensor.
Table 4. Voltage calibration coefficient for the TDS sensor.
Voltage Calibration CoefficientTemperature (°C)Read Voltage (V)Affected Voltage (V)EC (µS/cm)
0.995023.941.74271.73401413.0001
0.998623.941.73651.73401413.0001
0.998423.931.73691.73401413.0001
0.996023.931.74101.73401413.0001
0.997623.951.73811.73401413.0001
0.997923.941.73771.73401413.0001
0.996923.961.73941.73401413.0001
0.998823.921.73611.73401413.0001
0.999723.941.73451.73401413.0000
0.998823.951.73601.73401413.0001
Table 5. Voltage and turbidity relationship.
Table 5. Voltage and turbidity relationship.
0 NTU5 NTU10 NTU20 NTU50 NTU
Voltage (V)Turbidity (NTU)Voltage (V)Turbidity (NTU)Voltage (V)Turbidity (NTU)Voltage (V)Turbidity (NTU)Voltage (V)Turbidity (NTU)
4.2666−248.42504.2567−210.74114.2464−171.68754.2432−159.67084.2340−125.2497
4.2656−244.60784.2557−206.95494.2454−167.93354.2422−155.92674.2330−121.5342
4.2661−246.51614.2562−208.84774.2459−169.81024.2427−157.79794.2335−123.3911
4.2642−239.26754.2543−201.65804.2440−162.68164.2408−150.68854.2316−116.3360
4.2651−242.70014.2552−205.06264.2449−166.05734.2417−154.05514.2325−119.6769
4.2656−244.60784.2557−206.95494.2454−167.93354.2422−155.92624.2330−121.5337
4.2646−240.79294.2547−203.17094.2444−164.18174.2412−152.18464.2320−117.8206
4.2637−237.36144.2538−199.76734.2435−160.80704.2403−148.81894.2312−114.4807
4.2666−248.42504.2567−210.74114.2464−171.68754.2432−159.67014.2340−125.2489
4.2656−244.60784.2557−206.95494.2454−167.93354.2422−155.92624.2330−121.5337
Table 6. Voltage calibration coefficient for the turbidity sensor.
Table 6. Voltage calibration coefficient for the turbidity sensor.
Voltage Calibration CoefficientRead Voltage (V)Affected Voltage (V)Turbidity Standard (NTU)Arduino Turbidity (NTU)
0.98474.26544.200200.0000
0.98674.25554.198955.0000
0.98884.24524.1975109.9996
0.98894.24204.19482019.9996
0.98914.23284.18665049.9998
Table 7. Comparison of pH measurements.
Table 7. Comparison of pH measurements.
Aggregate Volume (mL)Concentration (M)pH ThermopH ArduinoDifference% Error
007.56807.60600.03800.5020
0.054.998 × 10−65.87606.06800.19203.2680
0.109.990 × 10−64.38604.56600.18004.1040
0.151.498 × 10−54.06604.25800.19204.7220
0.252.494 × 10−53.87604.06000.18404.7470
Table 8. Comparison of electrical conductivity measurements.
Table 8. Comparison of electrical conductivity measurements.
Aggregate Volume (mL)ConcentrationEC Thermo (µS/cm)CE Arduino (µS/cm)Difference% Error
005.03765.24280.20524.0730
0.10.000116.701017.15550.45452.7210
10.0010147.2650148.67721.41220.9590
100.01001417.33221411.60595.72630.4040
Table 9. Turbidity comparison between the formazin standard and the low-cost sensor.
Table 9. Turbidity comparison between the formazin standard and the low-cost sensor.
Turbidity Standard (NTU)Arduino Turbidity (NTU)Difference% Error
0−0.16450.1645-
54.79870.20134.0252
109.85900.14101.4096
2019.80800.19200.9600
5049.62120.37880.7575
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.

Share and Cite

MDPI and ACS Style

Mejía-Ferreyra, L.D.; García-Romero, L.; Sánchez-Quispe, S.T.; Apolinar-Cortés, J.; Orantes-Avalos, J.C. Automatic Rainwater Quality Monitoring System Using Low-Cost Technology. Water 2024, 16, 1735. https://doi.org/10.3390/w16121735

AMA Style

Mejía-Ferreyra LD, García-Romero L, Sánchez-Quispe ST, Apolinar-Cortés J, Orantes-Avalos JC. Automatic Rainwater Quality Monitoring System Using Low-Cost Technology. Water. 2024; 16(12):1735. https://doi.org/10.3390/w16121735

Chicago/Turabian Style

Mejía-Ferreyra, Luis Daniel, Liliana García-Romero, Sonia Tatiana Sánchez-Quispe, José Apolinar-Cortés, and Julio César Orantes-Avalos. 2024. "Automatic Rainwater Quality Monitoring System Using Low-Cost Technology" Water 16, no. 12: 1735. https://doi.org/10.3390/w16121735

APA Style

Mejía-Ferreyra, L. D., García-Romero, L., Sánchez-Quispe, S. T., Apolinar-Cortés, J., & Orantes-Avalos, J. C. (2024). Automatic Rainwater Quality Monitoring System Using Low-Cost Technology. Water, 16(12), 1735. https://doi.org/10.3390/w16121735

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop