Abstract

The presence of illicit discharges in sewerage systems generates an important impact in wastewater treatment plants and the ecosystem. In this paper, we present two prototypes for monitoring the presence of solids in wastewater and to study the effect of the water height. The prototypes are based on color and infrared LEDs and two photosensors located in the prototypes at 0° and 180° degrees. When the photosensor is located at 180°, all color LEDs present a good range of output voltage (approximately 5 V to 0 V) and good R2. However, for the typical concentration of solids in wastewater, the prototypes do not work correctly. When the photosensor is located in the prototypes the LEDs, yellow, red, and white have a good operation with voltage differences of 1.73 V, 1.76 V, and 1.13 V in P1 and 1.58 V, 1.84 V, and 1.35 V in P2, respectively. We calculate the mathematical model with the heights and solid concentration. The mathematical models which do not consider height present good R2. In conclusion, when the photosensor is located in the prototype, the height does not have an important effect and can detect the illicit discharge of solids. When the photosensor is located at 180°, it can be used for water with important changes in solid concentrations.

1. Introduction

As the world is becoming more and more technologically advanced, it is becoming more polluted as well. New products lead to new contaminants and more waste. The industrialization of cities has always been associated with a higher pollution level. Human activities generate different types of waste which can be classified in solids, liquids, and gasses. The global trend is to increase the productivity, to move forward the economy. Many times, the underlying consequence said development has is a deterioration of the environmental quality [1]. This is a price which has been paid in the past; nevertheless, it is one we should strive towards never paying again. Not if we want the world to be as it has been so far.

Water is an indispensable resource for life [2]. Humanity needs clean water for many activities, from food production use to domestic use, covering industrial use as well. Therefore, it is important to keep water free of pollutants. All water used by humans ends up at the sea, which is a sink for contaminants. Therefore, we need to make sure water gets to the ocean as clean as it would be had it never been used. This is not an easy task to accomplish taking into account the great amount of water which is used every day in our society. Pollution comes from many places, from the big companies which create tons of waste [3], to the small house in which the owner uses soap with phosphates [4]. The most important aspect of waste treatment is the control and correct monitoring of the pollutants. Knowing their origin site and the process through which they are treated is a key in order to correctly manage them.

The astounding percentage of global wastewater which is released to the environment without treatment is an 80% [2]. In Europe, wastewater is treated within the activity that has generated it until achieving sufficient quality to be discharged into the public sewer or to the environment [5]. However, illicit discharge can be produced in the sewerage. Iloms et al. [6] demonstrated that industrial discharge in the sewerage had a negative effect on the wastewater treatment plant (WWTP) outflow in Vaal, South Africa. An example of the problem on the law in sewerage is presented in the report of Toronto Water. In 2018, they detect 664 notices of violation of sewer by-law [7]. In the Valencia region, the public entity for wastewater depuration detected 3503 incidents related to high load discharges. In most cases, the person responsible for the spills was not detected [8].

Therefore, the bigger problem is not the pollution itself. It is the illicit discharges which are detrimental for the environment. WWTP are designed to work within established pollution thresholds [9]. These thresholds are calculated taking into account the size of the population the WWTP is catering to. They are not prepared for a sudden peak of pollution, which is what happens whenever there is an illegal discharge into the sewage system [10]. When it happens, the water coming out of the WWTP is not fully treated, it still has pollutants. Therefore, that water is not safe to be released back into the environment. An illicit discharge could not only cause an isolated accident; some WWTP use processes done by bacteria. Pollutant levels higher than the threshold could disrupt the ecosystem created for those bacteria, thus causing a major problem for the WWTP treatment process. There have been some attempts to create frameworks for the management of these discharges [11].

Nowadays, the most used techniques for the detection of these illicit discharges involve the detection before they reach the WWTP. The early detection, in the sewage or in storm drains, is the best regarded method. In order to identify an illicit discharge, several techniques can be employed. They can be divided in four groups: (i) sensory methods, (ii) temperature, (iii) chemical parameters, and (iv) microbiological parameters [12]. Among those different approaches, both temperature and microbiological parameters are nonconservative parameters. Moreover, microbiological parameter techniques are still under development. Furthermore, chemical parameters can be expensive to measure. Sensory methods, as well as temperature, are low-cost options. The disadvantage sensory methods present are difficulty to detect low concentrations of pollutants. Among some unusual methods which have been proposed for, the tracking of illicit discharges is the scent detection by dogs in storm drains [13].

In this paper, we propose a sensor for monitoring the concentration of solids based on absorbance and reflectance. It could detect illicit discharged based on the changes of solid concentrations. Clear water has determined reflectance and absorbance levels, which change due to the different concentrations of matter. We present a prototype composed of a PVC pipe armed with light-emitting diodes (LEDs) with a photodiode and a light decreasing resistance (LDR). In addition, a LDR and photodiode are located in 180° of the prototype. The LDR/photodiode changes their resistance according to the light that affects them. This depends on reflectance and absorbance from the light emitted by the LEDs. The prototype was tested with different configurations for the LED lights, different positions, and different types of LEDs. Moreover, those configurations were tested at different heights and using different concentrations in order to calibrate it. The experiments were conducted using static water to facilitate the creation of the conditions needed to test the prototypes.

This paper is structured as follows. Section 2 present some works related to the topic at hand, as well as some works describing the state-of-the-art within the WWTP community. The proposed sensor is presented in Section 3. In Section 4, the experiences proposed to develop the sensor are exposed. The materials needed for said tests are determined in the same section. The results are described in detail in Section 5. Finally, Section 6 deals with the conclusion, as well as stating some future work.

In this section, some investigation related to the study conducted for this paper is shown. Some of the papers presented deal with the detection of discharges in stormwater systems or sewage systems. Moreover, the utility of wireless sensor networks (WSN) for water monitoring is presented. The design of similar sensors to the one presented in this paper is shown as well.

Yin et al. [14] investigated the use of 52 chemical markers in order to identify domestic and industrial flows entering the storm drains. Sodium, potassium, chloride, acesulfame, clarithromycin, and isomaltooligosaccharide presented better results for waters coming from the toilet. Meanwhile, glycerol and teanina proved to work better for the tracking in waters coming from other domestic uses. They proved the use of markers as a low-cost option to find misconnected wastewater entries.

Hauser et al. [15] tested the effectiveness of chloride, ammonia, pH, and conductivity electrodes for the detection of illicit discharges. They first used static water, for which pH, conductivity, and chloride electrodes showed the best results. Next, they recreated the conditions in which real-life measures would be taken. The results showed those electrodes presented the ability to distinguish between different waste discharges.

Rocher et al. [16] used conductivity to detect illicit discharges. They used a system composed of two coils. One of them was powered with a sinus wave while the other was induced by the electromagnetic field generated by the first coil. The coils were encapsulated to prevent water damage. Moreover, the conductivity changes were recorded, and an alarm was generated using a Flyport. Different configurations for the coils were tested, one of the prototypes showed a low relative error, and a high voltage difference between the samples 0 and 40 g/l of the table salt.

Mikosz [17] used a computer simulation to estimate the maximum pollution load a WWTP could treat. This was done calculating the relationship between required biomass concentration and chemical oxygen demand load as a function of process temperature. Depending on the temperature range, a range of biomass volumes which could be treated was calculated.

Faustine et al. [18] developed a WSN prototype for monitoring the water quality within Lake Victoria Basin. The system uses several water quality sensors, an Arduino microcontroller, and a wireless network connection module. It is able to detect real-time changes in dissolved oxygen, electrical conductivity, temperature, and pH levels. The information can be displayed through mobile platforms and a web-based portal. This is a key in order to act in time and take the appropriate measures when there are irregularities.

Parameswari and Moses [19] used Internet of Things (IoT) to create a WSN endowed with sensing nodes to monitor water quality. They implemented a system to alert the end-user when the pollution levels where too high using SMS. Similarly, Simitha et al. [20] created an IoT-based WSN system to monitor water quality in a Smart City context. Using a LoRa module based on LoRaWAN protocol, they were able to create a low-cost, low-power, and long-range approach to the issue at hand.

Parra et al. [21] developed a turbidity sensor similar to the one proposed in this paper. Their prototype was designed for fish farms and used four different LEDs. They used a photodiode and a photoresistor, and their sensing elements were located at 180° of the light sources. Not only did they manage to detect the changes in turbidity, using the red light, they were able to characterize its origin as well.

As stated before, the type of measures which present less disadvantages comparing to the advantages are sensory methods [12]. Some of the studies presented on this section relied on them, some did not. The main advantage sensory methods present is lower expenses than other methods. One of the key disadvantages presented by the papers shown here is the high cost of the equipment used for the monitoring. Moreover, water can damage the sensors if they are in contact with it. This is not a problem when determining reflectance and absorbance.

The effectiveness of LEDs for the detection of solids has already been proved [21], and it is a low-cost option. The prototype presented in this paper uses different LEDs and a photodiode to determine the color changes in water after a discharge. The objective is to determine the changes in concentration based on the reflectance, the absorbance, or a combination of both. Unlike other papers, we study the effect of the height in our sensor. With this, we can determine if it is necessary to use level sensors within the sewer. Our goal is to place the sensor outside the sewer to avoid problems with obstructions in the sensor.

3. Proposal

In this section, we present the proposed sensor for monitoring the presence of illicit/uncontrolled discharges in the sewerage. We present the physical characteristics of our sensors, the cost of the hardware components needed to develop a prototype with a microcontroller, and finally, the algorithm used to detect the measurable parameters. Although, the principal aim of this sensor is to continuously detect the presence of illicit discharges in sewerage systems, we do not discard the possibility of using this sensor to detect the presence of particles in liquids for other applications such as irrigation channels and industry. Our sensor is based on 6 LEDs where 5 of them emit light in the visible spectrum at different frequencies and the other one is an infrared LED. The result of emitting light through the sample of water is measured by an LDR and a photodiode. Those elements are placed at 0° and 180° with respect to the LEDs’ position.

3.1. Proposed Sensor

In this subsection, we describe the physical characteristics of our sensor as well as the hardware used to implement them.

We develop two prototypes where the difference between them is the position of the LEDs. This is done to test which one works better as a sensing method to detect illicit/uncontrolled waste. In prototype 1 (P1), the position of LEDs from left to right is white, yellow, blue, green, and red. In prototype 2 (P2), the order of position of LEDs is green, red, white, yellow, and blue. This involves changing the LEDs’ position: yellow in P1 by white in P2, yellow by red, blue by white, green by yellow, and finally, red by blue.

The prototypes are built using a 5 cm long piece of PVC pipe with a diameter of 5 cm and a thickness of 4 mm. The LEDs used to measure 10 mm for color LEDs (yellow, blue, green, red, and white) and 3 mm for infrared LEDs. The polarization voltage for the red and yellow LEDs is 1.8-2 V while this value increases up to 3-3.4 V for the white, green, and blue LEDs. Finally, the IR LED requires a polarization voltage of 1.5 V. The LDRs used have 5 mm diameters, and the photodiodes have diameters of 3 mm. In the two prototypes, there is an LDR and a photodiode in the structure of the prototype (0° degrees). Besides, there is an LDR and a photodiode located at 180° of the LEDs. Both prototypes share the LDR and photodiode at 180°. The model of the photodiode is the SFH 203 (3 mm), and the LDR used is NSL-19M51 (3 mm). In Figure 1(a), a picture of the two prototypes (P1 and P2) is shown.

The changes of resistance in the LDR are transformed into voltage with a voltage divider (Figure 1(b)). In the case of the photodiodes, we measure the voltage in the extreme of the resistor. The voltage divider is based on two resistances: a fixed-resistance and another which is the LDR/photodiode. The value of fixed resistances is calculated to maximize the voltage difference between the maximum and minimum values for LED. This is done for all the studied solid concentrations and heights. The equation that represents the operation of a voltage divider is Equation (1). In this equation, is the entering voltage in the voltage divider (in volts). is the output voltage after the first resistance (in volts), and is the value of the fixed resistance (in ohms). Finally, or is the resistance of the LDR or photodiode (in ohms).

The LDRs change their resistance when the light hits them. The LDR decreases its resistance when more light is received. The photodiode, when the light strikes, generates an electron–hole pair in the photodiode allowing the passage of electric current. The light travels from the LED to the sample and a part is reflected, another is absorbed and finally, a part comes out in the upper part of the water (Figure 2). In the case of the photodiode and the LDR located at 0°, we measure the light reflected by the sample (in the direction of the prototype). On the contrary, for the photodiode and the LDR located at 180°, we measure the light through the water column.

We locate the LDR and photodiode at 0° because this way it is easier to manufacture the sensor. In the literature, standard methods indicated that the nephelometer (instrument for monitoring turbidity) detector is located at 90° [22]. However, in this case, placing the photodetector at 90° is not possible due to the positioning of the sewerage pipe. Baird et al. [23] recollect information about the angles used in the photodetector of the nephelometer; these angles are from 0° to 180°. In some cases, there are more multiple photodetectors. We selected the 0° measurement angle to check its operation. It is expected that in real conditions problems arise due to the solids carried by the water. In future works, we want to add more photodetectors to improve the performance of the sensor.

3.2. Cost of our Proposal

In order to implement a commercial device, it is also required to add additional devices to collect and process the measured data. This subsection exposes how to design and connect those elements and the cost of our proposal. This price does not take into account the manufacturing cost of a chain production, i.e., we have only considered the material to develop one.

We inquired several electronic shops to know the average price of each component. Table 1 shows the list of components and elements required to develop a prototype as well as the average price of each one. As we commented before, our prototype requires 5 LEDs of different colors and an IR LED as light emitter sources. Two LDRs and two photodiodes, which are located at 0° and at 180°, taking as a reference the position of LEDs. Additionally, the sensor will be placed inside a small piece of circular PVC pipe. In order to limit the current thought those elements, several resistors are required. Finally, the voltage registered as a function of the received light should be processed by a microcontroller. Among the range of possible solutions, we can design an electronic board or use an already developed and commercial model. In our case, we decided to use an Arduino UNO WiFi Rev.2 which is based on the ATmega4809 8-bit microcontroller from Microchip and the ESP8266 WiFi module. The Arduino Uno WiFi is functionally the same as the Arduino Uno Rev.3, but with the addition of WiFi/Bluetooth connectivity and some other enhancements. This module has 14 digital input/output pins, 5 of which can be used as PWM outputs and 6 analog inputs with 10-bit analog-to-digital converters (ADC). This microcontroller has output pins that provide a of 5 V for powering the different LEDs and the LDRs or the photodiodes, respectively. The Arduino UNO WiFi Rev.2 can be powered by batteries. So, we decided to use a 5000 mAh USB Power Bank. Finally, the entire system is placed inside a waterproof plastic box to protect it from the environmental factors and possible damage from rodents. The total cost of our prototype is 72.34 euros. Figure 3 shows the connection of the different elements described before and required to develop the prototype.

In a future version, the inclusion of more sensors to measure other parameters can be considered. This can reduce the unit price of the system because the power bank and microcontroller can be shared with different sensors as in the case of [16] where the same microcontroller and power bank is used by the two different sensors. Additionally, the wireless interface will permit the possibility of including this node in a wireless sensor network.

Finally, it is important to bear in mind the effect of having a 10-bit ADC over the measures. According to the Arduino UNO specifications, the maximum voltage that an analog input can measure is 5 V while the maximum number of levels to be considered are 1024 (210, 10 being the number of bits of the ADC). This implies that the maximum error in reading will be 5 mV due to the effect of quantization by the ADC. So, if the maximum value of turbidity or suspected solids it is expected to measure with these prototypes is 10000 mg/l, the maximum error in turbidity will be ±9.8 mg/l.

3.3. Deployment Scheme

In this subsection, we analyze an example of deployment for our prototype in the sewerage. Due to the wide variety of sewerage conditions, other configurations may be better. For preventing the damage of environmental factors (animals mostly), the prototype should be encapsulated.

In the environment, the proposed deployment is composed of two parts. One part is under the pipe. In this part, the LEDs are located on a transparent part of the pipe (methacrylate for example). The second part of our proposed deployment is a waterproof box where the microcontroller, power bank, and resistances would be. We propose to place it on top of the pipe in an accessible location. However, it is necessary to study the location of the waterproof box according to the characteristics of the chosen place. The two parts are connected by copper wires which would be the ones used to power the LEDs. In Figure 4, we present our proposal for deployment. One problem of sensors in the environment is the damage they can cause to living beings. In this case, the sensor does not present a hazard for the species that live in the sewerage.

4. Test Bench

In this section, we explain the methodology used to obtain the data, the preparation of the samples, and the technological characteristics of the equipment employed for the measures.

4.1. Materials

In this subsection, we explain the materials used in the experiment. For preparing the samples, we select clay as a source of solids and dilute it in freshwater. We select clay to prevent sedimentation problems in the glass container. We prepare different concentrations (1 mg/l, 40 mg/l, 80 mg/l, 160 mg/l, 320 mg/l, 630 mg/l, 1250 mg/l, 2500 mg/l, 5000 mg/l, and 10000 mg/l of solids). The concentration of 80 mg/l, 320 mg/l, and 5000 mg/l are used for verification of the mathematical model. The rest of the concentration (1 mg/l, 40 mg/l, 160 mg/l, 630 mg/l, 1250 mg/l, 2500 mg/l, and 10000 mg/l of solids) are used to build the mathematical model. We are interested in knowing the range of our sensor, for this reason, we test them in low and high concentrations of solids. The typical value of solid concentration in wastewater is between 350 mg/l for low pollution levels and 1200 mg/l for highly polluted wastewater [24]. The concentrations tested are above and below that range. The different concentrations tested can be observed in Figure 5. For measuring the different samples, we use a jar inside which we put the samples. The height of the jar is 25 cm and its diameter is 13 cm; the glass of the jar has a thickness of 3 mm. The volume of the jar is 4 liters. In the jar, we locate marks for knowing the height of the water column. In Figure 6, the assembly can be observed.

We use two different prototypes, represented in Figure 1, and explained in Section 3.1. The LEDs of the two prototypes are powered with a voltage of 5 V obtained by a power supply model FAC-662B. Between the power supply and the LED, there is a resistance of 470 Ω with a tolerance of 5% for all LEDs.

4.2. Methodology

In this subsection, we explain the methodology used. First, we introduce the sample in the glass beaker at the solid concentration and height that we want to measure. The heights tested are 3 cm, 5 cm, 8 cm, 10 cm, 13 cm, 15 cm, 18 cm, and 20 cm. There are not typical values for the height of the water sheet since depends on multiple factors. Those factors include the diameter of the pipe, whether it is a separate sewer or not, the flow, etc. When the sample is introduced, we shake it. After the shake, the glass and the prototype are covered with a box to prevent the entry of light from the outside. In sewerage, the water is in movement which would prevent the effect of sedimentation.

Then, the different LEDs are powered sequentially in the order yellow, red, blue, green, white, and infrared. We wait 20 seconds to take the resistance measurement due to the delay that the LDRs have as standard. This process is replicated 3 times and we note the values of resistance. We measure the resistance of the LDRs with a tester (Tenma 72-2600 [25]). For the photodiode, we use an oscilloscope (TBS 1104 [26]) All measurements of P1 are carried out and then those of P2 are started. All the measurements for the different heights for the same turbidity are carried out before moving on to the next one.

For the transformation of resistance to in Equation (1), the is 5 V. We selected 5 V because it is a typical voltage of the outputs of microcontrollers and the voltage that we power the LEDs. RLDR is the different resistances measured with the tester. With regard to , we want to use the resistance that maximizes the difference between the minimum and maximum of . This is done to improve the accuracy of the solid concentration measurement. In this process, we have used the Solver tool [27] in excel to search for the for each LED in the different heights. Once calculated, the values for the different heights have been averaged and the for each LED has been obtained.

To determine the mathematical model, we use the Statgraphics [28] and Eureqa software [29]. We use Statgraphics for the data of LDR/photodiode in 0. This is a popular software for statistical analysis. The Eureqa software is used in the case of the LDR in 180°. This is a software to search mathematical models from a data set. The use of Statgraphics in the case of the LDR/photodiode at 0° is due to the height having a less significant effect than in the case of 180°. That is why specific software is not necessary. To calculate the best mathematical model, we look for the one that offers the highest R2 among the different models offered by Statgraphics. This model will relate the concentration of solids to the voltage. Once the model is obtained, the data will be linearized. Afterwards, selecting the option of regression models, we will obtain the R2 taking into account the height and the concentration of solids or only the height.

5. Results and Discussions

In this section, we present the results of our prototypes. We tested them in different concentrations of solids and for different heights. We tested the effect of different heights due to the daily variations on the amount of water carried by the sewer system. The height of the water will affect the amount of light that the water absorbs and reflects.

5.1. Results LDR 180°

In this subsection, we analyze when the LDR is located at the top of the glass (180°). The values of the photodiode located at 180 are analyzed in Section 5.3. We calculate the to obtain the maximum voltage difference (Table 2). Nevertheless, these resistance values are not the ones which are used as the standard resistance; we select them as those close to the theoretical value. In Figures 716, we can observe the values of obtained. In all color cases, we can observe an exponential increase in the voltage with the increase of solids and water height.

Concerning the output voltage in a concentration of 1 mg/l of solids, it is in the range of 0.63 V to 0.09 V. The output voltage is near 4.5 V when the concentration of solids or the height of water does not allow light to shine on the LDR. In these cases, the resistance of the LDR is 20 MΩ according to the datasheet of the component. The average for P1 and P2 in the 1 mg/l concentration is 0.49 V and 0.25 V in yellow, in red it is 0.44 V and 0.33 V, in the case of blue is 0.36 V and 0.28 V, 0.18 V and 0.20 V in green light, and finally, 0.2 V and 0.15 V in the white LED. In the two prototypes, for a concentration of 160 mg/l of solids, the two prototypes start to fail at the highest of the heights tested. The typical concentration of solids in wastewater polluted weakly is 350 mg/l [24]. Accordingly, the LDR in the top of the pipe presents a measuring gap in pipes with diameters longer than 20 cm. The is related to the turbidity in an increasing exponential way. In general, we have observed that for lower concentrations the water tends to increase (or keep stable) the values and then they rise more abruptly from approximately 10 cm. We believe that this is because the water redirects the light at an angle that favors the illumination of the LDR from those heights. Concerning the highest concentrations, an exponential increase in the values with height has been observed.

In Figures 7 and 8, the values for the yellow LED are shown. The average in 1 mg/l is 0.97 V and 0.62 V for P1 and P2, respectively. The resistances are 20,000 kΩ in the concentration of 10,000 mg/l and 3 cm, as well as for the concentration of 2,500 mg/l and 5 cm or 8 cm. In 10 cm and 13 cm, this happens for concentrations of 1,250 mg/l. Finally, for concentrations of 630 mg/l, it happens for the rest of the tested heights. Concerning the range, the two prototypes do not present differences. Regarding height, an exponential increase is observed in concentrations greater than or equal to 80 mg/l. For 1 mg/l and 40 mg/l, we observe that the values remain stable up to 10 cm. From that point, they begin to increase the voltage for P1. For P2, no pattern is observed at these concentrations.

The values for the red LEDs are presented in Figures 9 and 10. The average of for 1 mg/l is 0.85 V for the P1 and 0.65 V for the P2. As in the previous case, the range of the two prototypes is the same. The maximum concentration that could be measured (less than 20,000 kΩ) is 5,000 mg/l for 3 cm. For the rest of the heights, the maximum has been found at 2,500 mg/l and 5 cm, 1,250 mg/l and 8 cm, and 10 cm, 13 cm, 15 cm, and 18 cm for 630 mg/l. Finally, for 20 cm, we have not been able to measure in concentrations greater than 160 mg/l. In this case, we see that concerning the height there is an exponential decrease starting on the 160 mg/l concentration.

Next, we analyze the blue LED (Figures 11 and 12). This one, together with the green LED are the ones with the worst ranges (resistance of the LDR change). This LED has a maximum of 2,500 mg/l in 3 cm, 630 mg/l in 5 cm, and in 8 cm and 10 cm, the maximum is 160 mg/l. For the rest of the tested heights, the maximum is 160 mg/l. For the concentration of 1 mg/l for P1, we observed an increase in . For the concentration of 1 mg/l for P2 and 40 mg/l for P1 and P2, a drop in voltage values is observed up to 10 cm. From this point on, an increase in the values is observed.

We show in Figures 13 and 14 the for the green LEDs. As in the previous case, its maximum measurement range is 2,500 mg/l in 3 cm. For 5 cm, it is 1,250 mg/l. In 8 cm and 10 cm, the maximum is 630 mg/l. 160 mg/l is the maximum in 13 cm, 15 cm, and 18 cm. Finally, in 20 cm, the maximum is 160 mg/l. In this case, the heights have different distribution according to solid concentration. For 1 mg/l, P1 reduces the from 3 cm to 8 cm. From this point, there is a linear increase in . In 40 mg/l, the same happens but up to a height of 13 cm. For 1 mg/l, P2 increases but does not seem to follow a trend. The same prototype in the concentration of 40 mg/l in the remains stable.

Finally, we analyze the last LED tested, the white one. Figures 15 and 16 present the values of for them. The heights and concentration levels for which the resistance of the LDR is the highest are 5 cm at 2,500 mg/l, 8 cm, 10 cm at 1,250 mg/l, and for the rest of the heights tested at 630 mg/l. As in the previous cases, it is observed that with 1 mg/l and 40 mg/l the values tend to decrease in the first heights tested and increase later. The concentration of 80 mg/l in P2 is observed in a cloud of points that tends to decrease. The rest of the concentrations show an exponential decrease.

For the LDR at 180°, it is obvious that the height has an important effect on the value of . We use the Statgraphics software [28] to determine if there are differences between the means of the different values. We obtain that there are no statistically significant differences between the means (with a value of 0.6874).

We have used the Eureqa software [29] again to calculate the best fit mathematical model. If we use all the concentration levels tested, the values of R2 are very poor. Therefore, we decide to eliminate the concentration with a resistance of 20,000 kΩ. With this modification, we got R2 values of 0.993, 0.998, 0.991, 0.998, and 0.996 for yellow, red, blue, green, and white, respectively, in P1. In P2, the R2 are 0.997, 0.993, 0.999, 0.999, and 0.9994 for yellow, red, blue, green, and white, respectively. These models are very complex, because of this, we select those models with a complexity lower than 20 (according to the Eureqa criteria) even though they have a lower R2. We obtain 0.990, 0.990, 0.990, 0.998, and 0.996 for yellow, red, blue, green, and white, respectively, in P1. 0.993, 0.92, 0.99, 0.999, and 0.9994 for yellow, red, blue, green, and white, respectively, in P2. This simplification of the model implies a reduction of the R2 of 0.047, but it greatly simplifies the calculations. This sensor presents an enormous change in the when the values of solids increase (especially in solids concentration above 40 mg/l and heights above 3 cm). These prototypes can be used for monitoring areas with fast changes in the concentration of solids, like, the decanters of a WWTP. In the decanters, the solids are accumulated in the lower part of the decanter (Sludge) and water comes out the top. Our sensor can be located in the decanter in the critical height of sludge to start the suction pumps so that it does not reach the critical height.

5.2. Results LDR 0°

In this section, we present the results of our prototypes (P1 and P2). We measured the resistance of the LDR and photodiode with a tester and transformed it to output voltage with Equation (1). We observed that the values of the resistances are different in the two cases. These differences can be caused by the distance between the LED and the LDR/photodiode.

The values of the fixed resistance can be observed in Table 3.

In Figures 1726, we can observe the values of the two prototypes for the different color LEDs, when the LDR is located at the same place as the LEDs. Except for the case of the blue LED in P2, the turbidity and have a positive and logarithmic function. In the different water heights, we observe that its evolution is not constant. In the sample with 1 mg/l of solids, the reduces until a height of 8 cm is reached in P1 and 10 cm in P2. We believe that this behaviour change is due to the reflection of light on the glass walls.

Now, we analyze the different LEDs. We start our analysis with the LEDs that have a poor performance for solid detection. We discard the use of blue and green. In the case of blue LEDs (Figures 17 and 18), the difference between the minimum and maximum concentrations tested is minimal. In P1, the difference is 0.30 V (averaged between the different heights in 1 and 10,000 mg/l of solids). The average for 1 mg/l is 2.49 V compared to 2.19 V for 10,000 mg/l. In P2, the average is 2.41 V for 1 mg/l and 2.58 V for 10,000 mg/l. Regarding the form of the function, we observe that in P1 the maximum values are reached for the concentration 2,500 mg/l. This is an unexpected result. It would be expected that once a maximum reflection of the light towards the LDR at 0° is reached, it would remain stable. Regarding P2, as we have previously stated, this one presents a strange shape. Finally, we observe a notable difference between the two prototypes, from the form of the function to the different values of .

Regarding the green LED (Figures 19 and 20) in the two prototypes, there is an important difference between them. In P1, the difference is 0.22 V. The average value for 1 mg/l is 2.51 V, and for 10,000 mg/l, it is 2.29 V. Whereas in P2, the difference is 1.22 V with voltage values of 3.04 V for 1 mg/l and 1.81 V for 10,000 mg/l. This difference may be due to the change of position of the LED in the prototypes. Therefore, it is not accurate enough and should not be considered for the development of our prototype. In addition, it is important to note 2 things. (i) This is the color with the greatest dispersion at the concentration for 1 mg/l. At first, it was believed that they would be incorrect values. But after repeating the experiment, it was confirmed that these values were correct. (ii) In prototype 2, between concentrations 1 mg/l, 40 mg/l, and 80 mg/l, there is a high dispersion between the values with 3 cm of the water column and the rest of the values.

With regard to the LEDs which have worked the best, they are the yellow, red, and white LEDs. These have a difference between 0 mg/l and 10,000 mg/l of 1.73 V, 1.76 V, and 1.13 V in P1 and 1.58 V, 1.84 V, and 1.35 V in P2 for the LEDs yellow, red, and white, respectively (Figures 2126). In all the cases we analyzed, the values between 1 mg/l and 40 mg/l are very similar. Therefore, we consider that the minimum concentration of solids that our sensor is capable of measuring is 40 mg/l.

In Figures 21 and 22, the values of the yellow LEDs in P1 and P2 are represented. The values of are 3.27 V and 3.43 V for 1 mg/l to 1.55 V, and 1.84 V for 10,000 mg/l (1.73 V and 1.58 V difference in P1 and P2, respectively). Regarding the range of higher concentrations tested, we see that in P1 the values stabilize after 2,500 mg/l and in P2 after 1,250 mg/l. Therefore, the measuring range will be from 40 mg/l to 2,5000 mg/l for P1 and will be shortened to 40 mg/l to 1,250 mg/l for P2. Equations (1) and (3) represent the mathematical model of the yellow LED in P1 and P2, respectively. The ranges of these models are 40 mg/l to 2,500 mg/l in P1 and 40 mg/l to 1,250 mg/l to P2. These solid models are not a function of heights since the difference of R2 is 0.0005 in P1 and 0.0002 in P2. These differences do not justify adding more complexity to the model. The values of R2 are 0.9963 in P1 and 0.9830.

In Figures 23 and 24, we can observe the values of in the red LED. In P1, the first thing that stands out is the great dispersion for 1 mg/l. The minimum value (for this concentration) is 2.58 V, and the maximum is 3.82 V. This dispersion does not carry over for the other concentrations. We believe that this dispersion only occurs in very transparent waters, which does not happen in the sewer. Therefore, we do not rule out the use of this LED. In addition, in P2, there exists dispersion for 1 mg/l (between 3.25 V and 3.57 V) but the range is not as large. In addition, we observe that the maximum value of is for 1,250 mg/l. After this value, a slight drop in the values is observed. The values of are 3.27 V and 1.51 V in P1 for 1 mg/l and 10,000 mg/l (1.76 V of difference). In P2, the values are 3.43 V and 1.59 V (1.84 V of difference). The lower threshold of these LEDs is 40 mg/l (as with the yellow LED). In the case of P1, the higher threshold is for 1,250 mg/l, and in P2, it is for 2,500 mg/l. From these concentrations on, the voltage difference remains stable. Finally, in P2, we observe that the voltage value for 40 mg/l and 3 cm is far from the rest of the points. Furthermore, for 160 mg/l, there is a dispersion of the values in P2 and for 40 mg/l in P1.

The mathematical models for the red LED in P1 and P2 are represented in Equations (4) and (5), respectively. The ranges of these models are 40 mg/l to 1,250 mg/l in P1 and 40 mg/l to 2,500 mg/l to P2. The values of R2 are 0.9887 in P1 and 0.9905 in P2. These solid models are not a function of heights since the difference of R2 is 0.0002 in P1 and 0.0015 in P2. These differences do not justify adding more complexity to the model. In addition, in the case of P2, the highest R2 is that of the model without taking into account the height.

The last LED analyzed is the white LED (Figures 25 and 26). In this case, it is striking that there does not seem to be a dispersion of the data according to the height in P1; nevertheless, it does exist in P2. For 1 mg/l in P1, the average is 2.94 V; for 10,000 mg/l, it is 1.81 V (difference of 1.13 V). The P2 has a of 3.22 V for 1 mg/l and 1.86 V for 10,000 mg/l (difference of 1.13 V). According to the range, both LEDs can differentiate for the range between 40 mg/l and 2,500 mg/l. Finally, the mathematical model is represented in Equations (6) and (7). The values of R2 are 0.9914 and 0.9794. As in the previous cases, when adding the height to the model, the difference of the R2 when adding the height to the mathematical model is minimal.

We have previously seen that there is no difference in the values of R2 when the height is added to the model. Now, we proceed to study if there is a statistical difference to check if there are significant differences between the height values. For this, we performed an ANOVA multifactorial analysis (confidence interval 95%, value greater than 0.05 for differences to exist) with the software Statgraphics [28]. The results of the ANOVA can be checked in Table 4. We can conclude that in most cases there is a statistically significant difference. Also except for the yellow LED and red LED in P2, the value for the other LEDs is lower than 0.0001. In the future, we will have to study if these differences are due to the change of position of the LEDs, the agitation of the sample, or some defect in the glass. Since it is observed that although the results between the different LEDs (except for green and blue) may be similar, there are some differences.

For these reasons, we determine that although the height has statistically significant differences, it does not affect the general function of the sensor. Therefore, it can be used in the sewer system without having to use other sensors to determine the height and more complex models that require more than one variable. The three LEDs obtain high R2 values. Therefore, these mathematical models are very well adapted to experimental values.

5.3. Results Photodiode 0° and 180°

In this subsection, we analyze the values of the infrared LED in 0° and 180°. First, we need to determine the best resistance in the circuit of the photodiode. In this case, we use an oscilloscope (TBS1104) for measuring the voltage in the resistance. Because the resistance of the circuit is high, the measurement of voltage in the tester can be affected due to the internal resistance of the tester not being high.

We test the maximum and minimum turbidity to determine the resistance. When the photodiode is located at 180°, we test at two heights (3 cm and 18 cm). This is due to the height having an important effect in the signal that the photodiode receives. In Figure 27, we can observe the voltage () in the extremes of resistance. In the case of a water column of 3 cm, the values of 1 mg/l are upper bounded approximately in 0.167 V. The value of 0.167 V is in the resistance of 8.2 MΩ. When the concentration of solids is 10000 mg/l, the values are bounded in 0.002 V. This means that the photodiode does not receive signals from the infrared LED. In the case of 18 cm, the maximum voltage is 0.004 V in the concentration of 1 mg/l and 0 in the maximum concentration tested. We discarded the use of the photodiode at 180° due to these bad results. Usually, the turbidity can measure in this angle. However, in our case, the distance between the infrared LED and photodiode is large. We discarded reducing this distance due to the distance between the emitting signal and the receptor being low, which can obstruct the water entry to the sensor. In the sewerage, the presence of hairs, solid materials, wipes, etc. is very common, which can cause obstructions.

When the photodiode is located at 0°, we test with a water height of 18 cm (Figure 28). The values of voltage are upper bounded in 0.67 V in the concentration of 10,000 mg/l and 0.4 V in the concentration of 1 mg/l. From the 8.2 MΩ resistance, it is observed that the bounded zone has been reached. It is chosen to place this resistance because it is the one that offers us the greatest difference between the two concentration levels with the least resistance. Placing a higher resistor can cause problems in the actual sensor development.

The results of the photodiode are shown in Figure 29 for P1 and Figure 30 for P2. In P1, the voltage is between 0.402 V in 1 mg/l and 0.68 V in 10,000 mg/l. In P2, the voltage is between 0.10 V in 1 mg/l and 0.34 V. The voltage difference is 0.28 V in P1 and 0.24 in P2. The two prototypes have the same traits; we think that these differences in voltage are due to the manufacturing process that is done by hand. We observe in the two prototypes that the increase of voltage increases with the concentration of solids. However, for the first points, the variation is low. The increase of voltage is produced from the concentration of 630 mg/l. For this reason, we think that with the current circuit this LED cannot be used for monitoring the concentration of solids. However, it could be used to verify the presence of illicit dumping. If a colored LED detected a high concentration of solids, the infrared LED could light to confirm the possible presence of a spill. If In future works, we could improve the circuit to amplify the photodiode signal and thus improve its range of measurements. In addition, we could study the use of more luminous Infrared LED.

5.4. Verification

In this section, we analyze the mathematical models of our prototypes with the verification concentration levels of 80 mg/l, 320 mg/l, and 5,000 mg/l.

When the LDR is in 180°, the errors are present especially in the low concentrations and low heights, which is unacceptable for the sensor we are developing. Moreover, the error in low concentration levels (1 and 40 mg/l) and 3 cm of height is high. There are other turbidity and solids sensors that work with a photosensor in 180°. Possibly, our sensor presents these bad errors in comparison with the other sensors because the light pierces through two environments (water, and air). When the light changes from water to air, there is a refraction of light that has negatively affected the results obtained.

Regarding the LDR when at 0°, in Table 5, the relative and absolute errors of the models are shown. Previously, we determined that our prototypes could measure in a maximum concentration of 2,500 mg/l. For this reason, the concentration of 5,000 mg/l is not used to verify the functioning of the prototypes. The greatest error is in the red LED of P2 with a relative value of 49.2% and an absolute value of 174.8 mg/l. Generally, the red LEDs are the ones that have greater errors. Regarding yellow LED, P1 presents fewer errors than P2. Finally, for the white LEDs, P1 presents a relative error of 8.3% and 8.9% for concentration levels of 80 mg/l and 320 mg/l, and P2 presents values of 19.6% and 18.5% for the same concentrations.

The two prototypes for the different LEDs (yellow, red, and white) have similar values of R2 and operating ranges. As seen in Table 5, the errors in the verification of red LEDs are greater than for the other LEDs. Moreover, their values are similar to those of yellow LEDs. Red LEDs have a difference of 1.76 V and 1.84 V in P1 and P2, respectively, compared to the difference of 1.73 V and 1.58 V in yellow LEDs. Therefore, we discard the use of red LEDs. White LEDs present values of less than yellow LED (1.13 V and 1.35 V in P1 and P2, respectively). Even though the white LEDs have lower relative errors than the yellow ones, we consider that the best LED is yellow. Yellow LED has a greater voltage difference (greater sensitivity) than white LED, but similar errors. A commercial sensor for measuring turbidity is CUS50D. This sensor has a maximum error for monitoring the solids of 5% with a specified range of 0 mg/l to 25,000 mg/l [30]. Another commercial sensor is the OBS501 with a range of 0 NTU to 4,000 NTU and an accuracy of ±2% or 0.5 NTU (which is greater) [31]. Although these sensors are more precise, their cost is higher than that of our prototype. This prevents a large number of sensors from being located in the sewer, which is possible with our sensor. An example of a low-cost sensor is presented by Wang et al. [32]. The sensor has a 20% difference between the lecture from their prototype and the reference turbidity (HI 93703) in the range 0–1000 NTU. This value is similar to the maximum error that we have obtained.

6. Conclusion

In this paper, we developed two prototypes for monitoring the concentration of solids in sewerage. This was done to create a system capable of detecting illegal discharges in the sewerage. We studied two situations: when the LDR/photodiodes are at 0° and when they are at 180°. The infrared LED presented a voltage difference that was accentuated in high concentrations for the sewer system. Therefore, with the current design, it could be used to confirm a possible spill.

In the case of the 180° LDR, a significant voltage difference between the minimum and the maximum was achieved. For the concentration of 1 mg/l, the is approximately 3 V, which changed until reaching 0 V for the highest concentrations and heights. We consider that due to this limitation, this sensor would not be suitable for sewer monitoring. Nevertheless, it could be used to detect possible excesses in already treated wastewater.

In the case of the LDR at 0°, the LEDs yellow, red, and white presented voltage differences between the minimum value of and the maximum. The blue LEDs presented low voltage differences. Regarding the green LEDs, for P2, it offered a significant difference between the minimum and the maximum, which does not happen for P1. Therefore, we have ruled out the use of this LED for future prototypes. The yellow, red, and white LEDs presented the best voltage differences, which are 1.73 V, 1.76 V, and 1.13 V in P1 and 1.58 V, 1.84 V, and 1.35 V in P2, respectively. In this case, a greater dispersion of the results was observed for low concentrations of solids. Since these concentrations are unlikely to occur in wastewater, we believe this will not have a significant effect on our sensor. Finally, mathematical models that relate the with the concentration of solids were developed. It was seen that although height had a statistically significant effect, good R2 was achieved with models that do not include it. Taking into account the errors in the verification phase, we concluded that the best LED is the yellow one.

In future work, we will develop other prototypes to test if the green LED can be used to monitor the presence of solids. Furthermore, we will integrate this sensor in a real sewerage for detecting the presence of illicit discharge. In addition, this sensor can be combined with the one proposed in [33] to obtain a system capable to measures a broader range of turbidity values. Finally, this sensor can be completed with other low-cost sensors for detecting the presence of illicit discharges that do not change the solids in water.

Conflicts of Interest

The authors declare that they have no conflict of interest.

Acknowledgments

This work has been partially supported by the European Union through the ERANETMED (Euromediterranean Cooperation through ERANET joint activities and beyond) project ERANETMED3-227 SMARTWATIR, the “Ministerio de Educación, Cultura y Deporte”, through the “Ayudas para contratacion predoctoral de Formación del Profesorado Universitario FPU (Convocatoria 2016)” grant number FPU16/05540, and the Conselleria de Educación, Cultura y Deporte with the Subvenciones para la contratación de personal investigador en fase postdoctoral, grant number APOSTD/2019/04.