research article a low-cost sensor for detecting illicit

16
Research Article A Low-Cost Sensor for Detecting Illicit Discharge in Sewerage Javier Rocher , 1 Mar Parra , 1 Lorena Parra , 1,2 Sandra Sendra , 1 Jaime Lloret , 1 and Jesús Mengual 3 1 Instituto de Investigación para la Gestión Integrada de zonas Costeras, Universitat Politècnica de València, C/Paranimf, 1. 46730. Grao de Gandia Valencia, Spain 2 IMIDRA, Finca El Encin, A-2, Km 38, 2 28800 Alcalá de Henares, Madrid, Spain 3 Instituto Universitario de Ingeniería del Agua y del Medio Ambiente, Universitat Politècnica de València, Camino de Vera s/n, Valencia, Spain Correspondence should be addressed to Jaime Lloret; [email protected] Received 8 December 2020; Revised 15 February 2021; Accepted 22 February 2021; Published 11 March 2021 Academic Editor: Carlos Michel Copyright © 2021 Javier Rocher et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. 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 eect 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 dierences 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 eect 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 prod- ucts lead to new contaminants and more waste. The industri- alization of cities has always been associated with a higher pollution level. Human activities generate dierent types of waste which can be classied in solids, liquids, and gasses. The global trend is to increase the productivity, to move for- ward 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. There- fore, it is important to keep water free of pollutants. All water used by humans ends up at the sea, which is a sink for con- taminants. 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 impor- tant aspect of waste treatment is the control and correct mon- itoring 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 sucient quality to be discharged Hindawi Journal of Sensors Volume 2021, Article ID 6650157, 16 pages https://doi.org/10.1155/2021/6650157

Upload: others

Post on 08-Nov-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Research Article A Low-Cost Sensor for Detecting Illicit

Research ArticleA Low-Cost Sensor for Detecting Illicit Discharge in Sewerage

Javier Rocher ,1 Mar Parra ,1 Lorena Parra ,1,2 Sandra Sendra ,1 Jaime Lloret ,1

and Jesús Mengual 3

1Instituto de Investigación para la Gestión Integrada de zonas Costeras, Universitat Politècnica de València, C/Paranimf,1. 46730. Grao de Gandia Valencia, Spain2IMIDRA, Finca “El Encin”, A-2, Km 38, 2 28800 Alcalá de Henares, Madrid, Spain3Instituto Universitario de Ingeniería del Agua y del Medio Ambiente, Universitat Politècnica de València, Camino de Vera s/n,Valencia, Spain

Correspondence should be addressed to Jaime Lloret; [email protected]

Received 8 December 2020; Revised 15 February 2021; Accepted 22 February 2021; Published 11 March 2021

Academic Editor: Carlos Michel

Copyright © 2021 Javier Rocher et al. This is an open access article distributed under the Creative Commons Attribution License,which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

The presence of illicit discharges in sewerage systems generates an important impact in wastewater treatment plants and theecosystem. In this paper, we present two prototypes for monitoring the presence of solids in wastewater and to study the effectof 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 5V to 0V) and good R2. However, for the typical concentration of solids in wastewater, the prototypes do notwork correctly. When the photosensor is located in the prototypes the LEDs, yellow, red, and white have a good operation withvoltage differences of 1.73V, 1.76V, and 1.13V in P1 and 1.58V, 1.84V, and 1.35V in P2, respectively. We calculate themathematical model with the heights and solid concentration. The mathematical models which do not consider height presentgood R2. In conclusion, when the photosensor is located in the prototype, the height does not have an important effect and candetect the illicit discharge of solids. When the photosensor is located at 180°, it can be used for water with important changes insolid concentrations.

1. Introduction

As the world is becoming more and more technologicallyadvanced, it is becoming more polluted as well. New prod-ucts lead to new contaminants and more waste. The industri-alization of cities has always been associated with a higherpollution level. Human activities generate different types ofwaste which can be classified in solids, liquids, and gasses.The global trend is to increase the productivity, to move for-ward the economy. Many times, the underlying consequencesaid development has is a deterioration of the environmentalquality [1]. This is a price which has been paid in the past;nevertheless, it is one we should strive towards never payingagain. Not if we want the world to be as it has been so far.

Water is an indispensable resource for life [2]. Humanityneeds clean water for many activities, from food productionuse to domestic use, covering industrial use as well. There-

fore, it is important to keep water free of pollutants. All waterused by humans ends up at the sea, which is a sink for con-taminants. Therefore, we need to make sure water gets tothe ocean as clean as it would be had it never been used. Thisis not an easy task to accomplish taking into account thegreat amount of water which is used every day in our society.Pollution comes from many places, from the big companieswhich create tons of waste [3], to the small house in whichthe owner uses soap with phosphates [4]. The most impor-tant aspect of waste treatment is the control and correct mon-itoring of the pollutants. Knowing their origin site and theprocess through which they are treated is a key in order tocorrectly manage them.

The astounding percentage of global wastewater which isreleased to the environment without treatment is an 80% [2].In Europe, wastewater is treated within the activity that hasgenerated it until achieving sufficient quality to be discharged

HindawiJournal of SensorsVolume 2021, Article ID 6650157, 16 pageshttps://doi.org/10.1155/2021/6650157

Page 2: Research Article A Low-Cost Sensor for Detecting Illicit

into the public sewer or to the environment [5]. However,illicit discharge can be produced in the sewerage. Ilomset al. [6] demonstrated that industrial discharge in the sewer-age had a negative effect on the wastewater treatment plant(WWTP) outflow in Vaal, South Africa. An example of theproblem on the law in sewerage is presented in the reportof Toronto Water. In 2018, they detect 664 notices of viola-tion of sewer by-law [7]. In the Valencia region, the publicentity for wastewater depuration detected 3503 incidentsrelated to high load discharges. In most cases, the personresponsible for the spills was not detected [8].

Therefore, the bigger problem is not the pollution itself. Itis the illicit discharges which are detrimental for the environ-ment. WWTP are designed to work within established pollu-tion thresholds [9]. These thresholds are calculated takinginto account the size of the population theWWTP is cateringto. They are not prepared for a sudden peak of pollution,which is what happens whenever there is an illegal dischargeinto the sewage system [10]. When it happens, the watercoming out of the WWTP is not fully treated, it still has pol-lutants. Therefore, that water is not safe to be released backinto the environment. An illicit discharge could not onlycause an isolated accident; some WWTP use processes doneby bacteria. Pollutant levels higher than the threshold coulddisrupt the ecosystem created for those bacteria, thus causinga major problem for the WWTP treatment process. Therehave been some attempts to create frameworks for the man-agement of these discharges [11].

Nowadays, the most used techniques for the detection ofthese illicit discharges involve the detection before they reachthe WWTP. The early detection, in the sewage or in stormdrains, is the best regarded method. In order to identify anillicit discharge, several techniques can be employed. Theycan be divided in four groups: (i) sensory methods, (ii) tem-perature, (iii) chemical parameters, and (iv) microbiologicalparameters [12]. Among those different approaches, bothtemperature and microbiological parameters are nonconser-vative parameters. Moreover, microbiological parametertechniques are still under development. Furthermore, chem-ical parameters can be expensive to measure. Sensorymethods, as well as temperature, are low-cost options. Thedisadvantage sensory methods present are difficulty to detectlow concentrations of pollutants. Among some unusualmethods which have been proposed for, the tracking of illicitdischarges is the scent detection by dogs in storm drains [13].

In this paper, we propose a sensor for monitoring theconcentration of solids based on absorbance and reflectance.It could detect illicit discharged based on the changes of solidconcentrations. Clear water has determined reflectance andabsorbance levels, which change due to the different concen-trations of matter. We present a prototype composed of aPVC pipe armed with light-emitting diodes (LEDs) with aphotodiode and a light decreasing resistance (LDR). In addi-tion, a LDR and photodiode are located in 180° of the proto-type. The LDR/photodiode changes their resistanceaccording to the light that affects them. This depends onreflectance and absorbance from the light emitted by theLEDs. The prototype was tested with different configurationsfor the LED lights, different positions, and different types of

LEDs. Moreover, those configurations were tested at differentheights and using different concentrations in order to cali-brate it. The experiments were conducted using static waterto facilitate the creation of the conditions needed to test theprototypes.

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

2. Related Work

In this section, some investigation related to the study con-ducted for this paper is shown. Some of the papers presenteddeal with the detection of discharges in stormwater systemsor sewage systems. Moreover, the utility of wireless sensornetworks (WSN) for water monitoring is presented. Thedesign of similar sensors to the one presented in this paperis shown as well.

Yin et al. [14] investigated the use of 52 chemical markersin order to identify domestic and industrial flows entering thestorm drains. Sodium, potassium, chloride, acesulfame, clar-ithromycin, and isomaltooligosaccharide presented betterresults for waters coming from the toilet. Meanwhile, glyceroland teanina proved to work better for the tracking in waterscoming from other domestic uses. They proved the use ofmarkers as a low-cost option to find misconnected wastewa-ter entries.

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

Rocher et al. [16] used conductivity to detect illicit dis-charges. They used a system composed of two coils. One ofthem was powered with a sinus wave while the other wasinduced by the electromagnetic field generated by the firstcoil. The coils were encapsulated to prevent water damage.Moreover, the conductivity changes were recorded, and analarm was generated using a Flyport. Different configurationsfor the coils were tested, one of the prototypes showed a lowrelative error, and a high voltage difference between the sam-ples 0 and 40 g/l of the table salt.

Mikosz [17] used a computer simulation to estimate themaximum pollution load a WWTP could treat. This wasdone calculating the relationship between required biomassconcentration and chemical oxygen demand load as a func-tion of process temperature. Depending on the temperaturerange, a range of biomass volumes which could be treatedwas calculated.

2 Journal of Sensors

Page 3: Research Article A Low-Cost Sensor for Detecting Illicit

Faustine et al. [18] developed a WSN prototype for mon-itoring the water quality within Lake Victoria Basin. The sys-tem uses several water quality sensors, an Arduinomicrocontroller, and a wireless network connection module.It is able to detect real-time changes in dissolved oxygen,electrical conductivity, temperature, and pH levels. Theinformation can be displayed through mobile platforms anda web-based portal. This is a key in order to act in time andtake 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 mon-itor water quality. They implemented a system to alert theend-user when the pollution levels where too high usingSMS. Similarly, Simitha et al. [20] created an IoT-basedWSN system to monitor water quality in a Smart City con-text. 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 tothe one proposed in this paper. Their prototype was designedfor fish farms and used four different LEDs. They used a pho-todiode and a photoresistor, and their sensing elements werelocated at 180° of the light sources. Not only did they manageto detect the changes in turbidity, using the red light, theywere able to characterize its origin as well.

As stated before, the type of measures which present lessdisadvantages comparing to the advantages are sensorymethods [12]. Some of the studies presented on this sectionrelied on them, some did not. The main advantage sensorymethods present is lower expenses than other methods.One of the key disadvantages presented by the papers shownhere is the high cost of the equipment used for the monitor-ing. Moreover, water can damage the sensors if they are incontact with it. This is not a problem when determiningreflectance and absorbance.

The effectiveness of LEDs for the detection of solids hasalready been proved [21], and it is a low-cost option. Theprototype presented in this paper uses different LEDs and aphotodiode to determine the color changes in water after adischarge. The objective is to determine the changes in con-centration based on the reflectance, the absorbance, or acombination of both. Unlike other papers, we study the effectof the height in our sensor. With this, we can determine if it isnecessary to use level sensors within the sewer. Our goal is toplace the sensor outside the sewer to avoid problems withobstructions in the sensor.

3. Proposal

In this section, we present the proposed sensor for monitor-ing the presence of illicit/uncontrolled discharges in the sew-erage. We present the physical characteristics of our sensors,the cost of the hardware components needed to develop aprototype with a microcontroller, and finally, the algorithmused to detect the measurable parameters. Although, theprincipal aim of this sensor is to continuously detect the pres-ence of illicit discharges in sewerage systems, we do not dis-card the possibility of using this sensor to detect thepresence of particles in liquids for other applications such

as irrigation channels and industry. Our sensor is based on6 LEDs where 5 of them emit light in the visible spectrumat different frequencies and the other one is an infraredLED. The result of emitting light through the sample of wateris measured by an LDR and a photodiode. Those elementsare placed at 0° and 180° with respect to the LEDs’ position.

3.1. Proposed Sensor. In this subsection, we describe the phys-ical characteristics of our sensor as well as the hardware usedto implement them.

We develop two prototypes where the difference betweenthem is the position of the LEDs. This is done to test whichone works better as a sensing method to detect illicit/uncon-trolled waste. In prototype 1 (P1), the position of LEDs fromleft to right is white, yellow, blue, green, and red. In prototype2 (P2), the order of position of LEDs is green, red, white, yel-low, and blue. This involves changing the LEDs’ position: yel-low in P1 by white in P2, yellow by red, blue by white, greenby yellow, and finally, red by blue.

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

The changes of resistance in the LDR are transformedinto voltage with a voltage divider (Figure 1(b)). In the caseof the photodiodes, we measure the voltage in the extremeof the resistor. The voltage divider is based on two resis-tances: a fixed-resistance and another which is the LDR/pho-todiode. The value of fixed resistances is calculated tomaximize the voltage difference between the maximum andminimum values for LED. This is done for all the studiedsolid concentrations and heights. The equation that repre-sents the operation of a voltage divider is Equation (1). In thisequation, V in is the entering voltage in the voltage divider (involts). Vout is the output voltage after the first resistance (involts), and Rcircuit is the value of the fixed resistance (inohms). Finally, RLDR or RPhotodiode is the resistance of theLDR or photodiode (in ohms).

Vout Vð Þ =V in Vð Þ ∗ RLDRRLDR + Rcircuit

: ð1Þ

The LDRs change their resistance when the light hitsthem. The LDR decreases its resistance when more light isreceived. The photodiode, when the light strikes, generatesan electron–hole pair in the photodiode allowing the passageof electric current. The light travels from the LED to the

3Journal of Sensors

Page 4: Research Article A Low-Cost Sensor for Detecting Illicit

sample and a part is reflected, another is absorbed and finally,a part comes out in the upper part of the water (Figure 2). Inthe case of the photodiode and the LDR located at 0°, we mea-sure the light reflected by the sample (in the direction of theprototype). On the contrary, for the photodiode and the LDRlocated at 180°, we measure the light through the watercolumn.

We locate the LDR and photodiode at 0° because this wayit is easier to manufacture the sensor. In the literature, stan-dard methods indicated that the nephelometer (instrumentfor monitoring turbidity) detector is located at 90° [22]. How-ever, in this case, placing the photodetector at 90° is not pos-sible due to the positioning of the sewerage pipe. Baird et al.[23] recollect information about the angles used in the photo-detector of the nephelometer; these angles are from 0° to 180°.In some cases, there are more multiple photodetectors. Weselected the 0° measurement angle to check its operation. Itis expected that in real conditions problems arise due to thesolids carried by the water. In future works, we want to addmore photodetectors to improve the performance of thesensor.

3.2. Cost of our Proposal. In order to implement a commercialdevice, it is also required to add additional devices to collectand process the measured data. This subsection exposeshow to design and connect those elements and the cost ofour proposal. This price does not take into account themanufacturing cost of a chain production, i.e., we have onlyconsidered the material to develop one.

We inquired several electronic shops to know the averageprice of each component. Table 1 shows the list of compo-nents and elements required to develop a prototype as wellas the average price of each one. As we commented before,our prototype requires 5 LEDs of different colors and an IRLED as light emitter sources. Two LDRs and two photodi-odes, which are located at 0° and at 180°, taking as a referencethe position of LEDs. Additionally, the sensor will be placed

inside a small piece of circular PVC pipe. In order to limitthe current thought those elements, several resistors arerequired. Finally, the voltage registered as a function of thereceived light should be processed by a microcontroller.Among the range of possible solutions, we can design an elec-tronic board or use an already developed and commercialmodel. In our case, we decided to use an Arduino UNOWiFiRev.2 which is based on the ATmega4809 8-bit microcon-troller from Microchip and the ESP8266 WiFi module. TheArduino Uno WiFi is functionally the same as the ArduinoUno Rev.3, but with the addition of WiFi/Bluetooth connec-tivity and some other enhancements. This module has 14digital input/output pins, 5 of which can be used as PWMoutputs and 6 analog inputs with 10-bit analog-to-digitalconverters (ADC). This microcontroller has output pins thatprovide a Vout of 5V for powering the different LEDs and theLDRs or the photodiodes, respectively. The Arduino UNOWiFi Rev.2 can be powered by batteries. So, we decided touse a 5000mAh USB Power Bank. Finally, the entire systemis placed inside a waterproof plastic box to protect it fromthe environmental factors and possible damage from rodents.The total cost of our prototype is 72.34 euros. Figure 3 showsthe connection of the different elements described before andrequired to develop the prototype.

In a future version, the inclusion of more sensors to mea-sure other parameters can be considered. This can reduce theunit price of the system because the power bank and micro-controller can be shared with different sensors as in the caseof [16] where the same microcontroller and power bank isused by the two different sensors. Additionally, the wirelessinterface will permit the possibility of including this nodein a wireless sensor network.

Finally, it is important to bear in mind the effect of havinga 10-bit ADC over the measures. According to the ArduinoUNO specifications, the maximum voltage that an analoginput can measure is 5V while the maximum number oflevels to be considered are 1024 (210, 10 being the number

P1 P2

(a)

Rcircuit

GND

RLDR or

RPhotodiode

Vin

Vout

(b)

Figure 1: (a) Picture of the prototypes. (b) Electronic scheme of a voltage divider.

4 Journal of Sensors

Page 5: Research Article A Low-Cost Sensor for Detecting Illicit

of bits of the ADC). This implies that the maximum error inreading will be 5mV due to the effect of quantization by theADC. So, if the maximum value of turbidity or suspectedsolids it is expected to measure with these prototypes is10000mg/l, the maximum error in turbidity will be±9.8mg/l.

3.3. Deployment Scheme. In this subsection, we analyze anexample of deployment for our prototype in the sewerage.Due to the wide variety of sewerage conditions, other config-urations may be better. For preventing the damage of envi-ronmental factors (animals mostly), the prototype shouldbe encapsulated.

In the environment, the proposed deployment is com-posed of two parts. One part is under the pipe. In this part,the LEDs are located on a transparent part of the pipe (meth-acrylate for example). The second part of our proposeddeployment is a waterproof box where the microcontroller,power bank, and resistances would be. We propose to placeit on top of the pipe in an accessible location. However, it isnecessary to study the location of the waterproof box accord-ing to the characteristics of the chosen place. The two partsare connected by copper wires which would be the ones usedto power the LEDs. In Figure 4, we present our proposal fordeployment. One problem of sensors in the environment isthe damage they can cause to living beings. In this case, thesensor does not present a hazard for the species that live inthe sewerage.

4. Test Bench

In this section, we explain the methodology used to obtainthe data, the preparation of the samples, and the technologi-cal characteristics of the equipment employed for themeasures.

4.1. Materials. In this subsection, we explain the materialsused in the experiment. For preparing the samples, we selectclay as a source of solids and dilute it in freshwater. We selectclay to prevent sedimentation problems in the glass con-tainer. We prepare different concentrations (1mg/l, 40mg/l,80mg/l, 160mg/l, 320mg/l, 630mg/l, 1250mg/l, 2500mg/l,

5000mg/l, and 10000mg/l of solids). The concentration of80mg/l, 320mg/l, and 5000mg/l are used for verification ofthe mathematical model. The rest of the concentration(1mg/l, 40mg/l, 160mg/l, 630mg/l, 1250mg/l, 2500mg/l,and 10000mg/l of solids) are used to build the mathematicalmodel. We are interested in knowing the range of our sensor,for this reason, we test them in low and high concentrationsof solids. The typical value of solid concentration in wastewa-ter is between 350mg/l for low pollution levels and 1200mg/lfor highly polluted wastewater [24]. The concentrationstested are above and below that range. The different concen-trations tested can be observed in Figure 5. For measuring thedifferent samples, we use a jar inside which we put the sam-ples. The height of the jar is 25 cm and its diameter is13 cm; the glass of the jar has a thickness of 3mm. The vol-ume of the jar is 4 liters. In the jar, we locate marks for know-ing the height of the water column. In Figure 6, the assemblycan be observed.

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

4.2. Methodology. In this subsection, we explain the method-ology used. First, we introduce the sample in the glass beakerat the solid concentration and height that we want to mea-sure. 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 forthe height of the water sheet since depends on multiple fac-tors. Those factors include the diameter of the pipe, whetherit is a separate sewer or not, the flow, etc. When the sample isintroduced, we shake it. After the shake, the glass and theprototype are covered with a box to prevent the entry of lightfrom the outside. In sewerage, the water is in movementwhich would prevent the effect of sedimentation.

Then, the different LEDs are powered sequentially in theorder yellow, red, blue, green, white, and infrared. We wait 20seconds to take the resistance measurement due to the delaythat the LDRs have as standard. This process is replicated 3times and we note the values of resistance. We measure theresistance 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 ofP2 are started. All the measurements for the different heightsfor the same turbidity are carried out before moving on to thenext one.

For the transformation of resistance to Vout in Equation(1), the V in is 5V. We selected 5V because it is a typical volt-age of the outputs of microcontrollers and the voltage that wepower the LEDs. RLDR is the different resistances measuredwith the tester. With regard to Rcircuit, we want to use theresistance that maximizes the difference between the mini-mum and maximum of Vout. This is done to improve theaccuracy of the solid concentration measurement. In thisprocess, we have used the Solver tool [27] in excel to searchfor the Rcircuit for each LED in the different heights. Once

Water

Light

LDR

Photodiode

LED

Scattered light

Figure 2: Physical operation.

5Journal of Sensors

Page 6: Research Article A Low-Cost Sensor for Detecting Illicit

calculated, the Rcircuit values for the different heights havebeen averaged and the Rcircuit for each LED has beenobtained.

To determine the mathematical model, we use the Stat-graphics [28] and Eureqa software [29]. We use Statgraphicsfor the data of LDR/photodiode in 0. This is a popular soft-ware for statistical analysis. The Eureqa software is used inthe case of the LDR in 180°. This is a software to search math-ematical models from a data set. The use of Statgraphics inthe case of the LDR/photodiode at 0° is due to the height hav-ing a less significant effect than in the case of 180°. That iswhy specific software is not necessary. To calculate the bestmathematical model, we look for the one that offers the high-est R2 among the different models offered by Statgraphics.

This model will relate the concentration of solids to the volt-age. Once the model is obtained, the data will be linearized.Afterwards, selecting the option of regression models, we willobtain the R2 taking into account the height and the concen-tration of solids or only the height.

5. Results and Discussions

In this section, we present the results of our prototypes. Wetested them in different concentrations of solids and for dif-ferent heights. We tested the effect of different heights dueto the daily variations on the amount of water carried bythe sewer system. The height of the water will affect theamount of light that the water absorbs and reflects.

5.1. Results LDR 180°. In this subsection, we analyze when theLDR is located at the top of the glass (180°). The values of thephotodiode located at 180 are analyzed in Section 5.3. Wecalculate the Rcircuit to obtain the maximum voltage differ-ence (Table 2). Nevertheless, these resistance values are notthe ones which are used as the standard resistance; we selectthem as those close to the theoretical value. In Figures 7–16,we can observe the values of Vout obtained. In all color cases,we can observe an exponential increase in the voltage withthe increase of solids and water height.

Concerning the output voltage in a concentration of1mg/l of solids, it is in the range of 0.63V to 0.09V. The out-put voltage is near 4.5V when the concentration of solids orthe height of water does not allow light to shine on the LDR.In these cases, the resistance of the LDR is 20MΩ accordingto the datasheet of the component. The average Vout for P1and P2 in the 1mg/l concentration is 0.49V and 0.25V inyellow, in red it is 0.44V and 0.33V, in the case of blue is0.36V and 0.28V, 0.18V and 0.20V in green light, andfinally, 0.2V and 0.15V in the white LED. In the two proto-types, for a concentration of 160mg/l of solids, the two pro-totypes start to fail at the highest of the heights tested. Thetypical concentration of solids in wastewater polluted weaklyis 350mg/l [24]. Accordingly, the LDR in the top of the pipepresents a measuring gap in pipes with diameters longer than20 cm. The Vout is related to the turbidity in an increasingexponential way. In general, we have observed that for lowerconcentrations the water tends to increase (or keep stable)the Vout values and then they rise more abruptly fromapproximately 10 cm. We believe that this is because thewater redirects the light at an angle that favors the illumina-tion of the LDR from those heights. Concerning the highestconcentrations, an exponential increase in the Vout valueswith height has been observed.

In Figures 7 and 8, the values for the yellow LED areshown. The average Vout in 1mg/l is 0.97V and 0.62V for

Table 1: Prices of the main components.

Component Cost (€) Component Cost (€) Component Cost (€)

2 SFH 203 (photodiode) 1.08 1 powerbank 5000mah 15.00 2 NSL-19M51 (LDR) 1.88

1 infrared LED 0.73 12 resistance 0.48 PVC 1.00

5 color LEDs 0.75 Microcontroller 47.00 Waterproof box 5.00

Red BlueGreen

YellowWhite

IR

LDR

UNO Rev.3+WiFi

IR Photodiode

Figure 3: Connection diagram of our prototype.

Prototype

Sewerage

Waste water

Asphalt

Waterproof box

Figure 4: Proposal deployment.

6 Journal of Sensors

Page 7: Research Article A Low-Cost Sensor for Detecting Illicit

P1 and P2, respectively. The resistances are 20,000 kΩ in theconcentration of 10,000mg/l and 3 cm, as well as for the con-centration of 2,500mg/l and 5 cm or 8 cm. In 10 cm and13 cm, this happens for concentrations of 1,250mg/l. Finally,for concentrations of 630mg/l, it happens for the rest of thetested heights. Concerning the range, the two prototypes donot present differences. Regarding height, an exponentialincrease is observed in concentrations greater than or equalto 80mg/l. For 1mg/l and 40mg/l, we observe that the Voutvalues remain stable up to 10 cm. From that point, they beginto increase the voltage for P1. For P2, no pattern is observedat these concentrations.

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

Next, we analyze the blue LED (Figures 11 and 12). Thisone, together with the green LED are the ones with the worstranges (resistance of the LDR change). This LED has a max-imum of 2,500mg/l in 3 cm, 630mg/l in 5 cm, and in 8 cmand 10 cm, the maximum is 160mg/l. For the rest of thetested heights, the maximum is 160mg/l. For the concentra-tion of 1mg/l for P1, we observed an increase in Vout. For theconcentration of 1mg/l for P2 and 40mg/l for P1 and P2, adrop in voltage values is observed up to 10 cm. From thispoint on, an increase in the values is observed.

We show in Figures 13 and 14 the Vout for the greenLEDs. As in the previous case, its maximum measurementrange is 2,500mg/l in 3 cm. For 5 cm, it is 1,250mg/l. In8 cm and 10 cm, the maximum is 630mg/l. 160mg/l is the

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 10000 mg/l

Figure 5: Tested samples.

Figure 6: Assembly.

Table 2: Resistance in voltage divider in LDR top mathematical andstandard.

ColorP1_top(kΩ)

P2_top(kΩ)

P1_top standard(kΩ)

P2_top standard(kΩ)

Yellow 2177.5 1026.5 2200 1000

Red 1807.0 1432.9 1800 1500

Blue 1343.8 1308.4 1200 1500

Green 767.6 818.3 820 820

White 738.6 575.0 680 560

0.00.51.01.52.02.53.03.54.04.55.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 7: Prototype 1, yellow LED, and LDR 180°.

7Journal of Sensors

Page 8: Research Article A Low-Cost Sensor for Detecting Illicit

maximum in 13 cm, 15 cm, and 18 cm. Finally, in 20 cm, themaximum is 160mg/l. In this case, the heights have differentdistribution according to solid concentration. For 1mg/l, P1reduces theVout from 3 cm to 8 cm. From this point, there is alinear increase in Vout. In 40mg/l, the same happens but upto a height of 13 cm. For 1mg/l, P2 increases but does notseem to follow a trend. The same prototype in the concentra-tion of 40mg/l in the Vout remains stable.

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

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

We have used the Eureqa software [29] again to calculatethe best fit mathematical model. If we use all the concentra-tion levels tested, the values of R2 are very poor. Therefore,we decide to eliminate the concentration with a resistanceof 20,000 kΩ. With this modification, we got R2 values of0.993, 0.998, 0.991, 0.998, and 0.996 for yellow, red, blue,green, and white, respectively, in P1. In P2, the R2 are0.997, 0.993, 0.999, 0.999, and 0.9994 for yellow, red, blue,green, and white, respectively. These models are very com-plex, because of this, we select those models with a complex-ity lower than 20 (according to the Eureqa criteria) eventhough 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,

0.00.51.01.52.02.53.03.54.04.55.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 8: Prototype 2, yellow LED, and LDR 180°.

0.00.51.01.52.02.53.03.54.04.55.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 9: Prototype 1, red LED, and LDR 180°.

0.00.51.01.52.02.53.03.54.04.55.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 10: Prototype 2, red LED, and LDR 180°.

0.00.51.01.52.02.53.03.54.04.55.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 11: Prototype 1, blue LED, and LDR 180°.

8 Journal of Sensors

Page 9: Research Article A Low-Cost Sensor for Detecting Illicit

respectively, in P1. 0.993, 0.92, 0.99, 0.999, and 0.9994 for yel-low, red, blue, green, and white, respectively, in P2. This sim-plification of the model implies a reduction of the R2 of0.047, but it greatly simplifies the calculations. This sensorpresents an enormous change in the Vout when the valuesof solids increase (especially in solids concentration above40mg/l and heights above 3 cm). These prototypes can beused for monitoring areas with fast changes in the concentra-tion of solids, like, the decanters of a WWTP. In thedecanters, the solids are accumulated in the lower part ofthe decanter (Sludge) and water comes out the top. Our sen-sor can be located in the decanter in the critical height ofsludge to start the suction pumps so that it does not reachthe critical height.

5.2. Results LDR 0°. In this section, we present the results ofour prototypes (P1 and P2). We measured the resistance ofthe LDR and photodiode with a tester and transformed it tooutput voltage with Equation (1). We observed that thevalues of the resistances are different in the two cases. Thesedifferences can be caused by the distance between the LEDand the LDR/photodiode.

The values of the fixed resistance can be observed inTable 3.

In Figures 17–26, we can observe the values of the twoprototypes for the different color LEDs, when the LDR islocated at the same place as the LEDs. Except for the caseof the blue LED in P2, the turbidity and Vout have a positiveand logarithmic function. In the different water heights, weobserve that its evolution is not constant. In the sample with1mg/l of solids, the Vout reduces until a height of 8 cm isreached in P1 and 10 cm in P2.We believe that this behaviourchange is due to the reflection of light on the glass walls.

Now, we analyze the different LEDs. We start our analy-sis with the LEDs that have a poor performance for soliddetection. We discard the use of blue and green. In the caseof blue LEDs (Figures 17 and 18), the difference betweenthe minimum and maximum concentrations tested is mini-mal. In P1, the difference is 0.30V (averaged between the

0.00.51.01.52.02.53.03.54.04.55.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 12: Prototype 2, blue LED, and LDR 180°.

0.00.51.01.52.02.53.03.54.04.55.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 13: Prototype 1, green LED, and LDR 180°.

0.00.51.01.52.02.53.03.54.04.55.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 14: Prototype 2, green LED, and LDR 180°.

0.00.51.01.52.02.53.03.54.04.55.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 15: Prototype 1, white LED, and LDR 180°.

9Journal of Sensors

Page 10: Research Article A Low-Cost Sensor for Detecting Illicit

different heights in 1 and 10,000mg/l of solids). The averageVout for 1mg/l is 2.49V compared to 2.19V for 10,000mg/l.In P2, the average Vout is 2.41V for 1mg/l and 2.58V for10,000mg/l. Regarding the form of the function, we observethat in P1 the maximum values are reached for the concen-tration 2,500mg/l. This is an unexpected result. It would beexpected that once a maximum reflection of the light towardsthe LDR at 0° is reached, it would remain stable. Regarding

P2, as we have previously stated, this one presents a strangeshape. Finally, we observe a notable difference between thetwo prototypes, from the form of the function to the differentvalues of Vout.

Regarding the green LED (Figures 19 and 20) in the twoprototypes, there is an important difference between them. InP1, the difference is 0.22V. The average Vout value for 1mg/lis 2.51V, and for 10,000mg/l, it is 2.29V. Whereas in P2, thedifference is 1.22V with voltage values of 3.04V for 1mg/land 1.81V for 10,000mg/l. This difference may be due tothe change of position of the LED in the prototypes. There-fore, it is not accurate enough and should not be consideredfor the development of our prototype. In addition, it isimportant to note 2 things. (i) This is the color with the great-est dispersion at the concentration for 1mg/l. At first, it wasbelieved that they would be incorrect values. But after repeat-ing the experiment, it was confirmed that these values werecorrect. (ii) In prototype 2, between concentrations 1mg/l,40mg/l, and 80mg/l, there is a high dispersion between thevalues with 3 cm of the water column and the rest of thevalues.

With regard to the LEDs which have worked the best,they are the yellow, red, and white LEDs. These have a differ-ence between 0mg/l and 10,000mg/l of 1.73V, 1.76V, and1.13V in P1 and 1.58V, 1.84V, and 1.35V in P2 for the LEDsyellow, red, and white, respectively (Figures 21–26). In all thecases we analyzed, the Vout values between 1mg/l and40mg/l are very similar. Therefore, we consider that the min-imum concentration of solids that our sensor is capable ofmeasuring is 40mg/l.

In Figures 21 and 22, the values of the yellow LEDs in P1and P2 are represented. The values of Vout are 3.27V and3.43V for 1mg/l to 1.55V, and 1.84V for 10,000mg/l(1.73V and 1.58V difference in P1 and P2, respectively).Regarding the range of higher concentrations tested, we seethat in P1 the values stabilize after 2,500mg/l and in P2 after1,250mg/l. Therefore, the measuring range will be from40mg/l to 2,5000mg/l for P1 and will be shortened to

0.0

1.0

2.0

3.0

4.0

5.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 16: Prototype 2, white LED, and LDR 180°.

Table 3: Resistance in voltage divider in LDR down.

ColorP1_down(kΩ)

P2_down(kΩ)

P1_downstandard (kΩ)

P2_downstandard (kΩ)

Yellow 112.9 139.2 120 120

Red 648.9 49.6 680 47

Blue 42.5 328.1 47 330

Green 76.3 56.9 82 56

White 10.8 19.5 12 18

1.5

2.0

2.5

3.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 17: Prototype 1, blue LED, and LDR 0°.

1.5

2.0

2.5

3.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 18: Prototype 2, blue LED, and LDR 0°.

10 Journal of Sensors

Page 11: Research Article A Low-Cost Sensor for Detecting Illicit

40mg/l to 1,250mg/l for P2. Equations (1) and (3) representthe mathematical model of the yellow LED in P1 and P2,respectively. The ranges of these models are 40mg/l to2,500mg/l in P1 and 40mg/l to 1,250mg/l to P2. These solidmodels are not a function of heights since the difference of R2is 0.0005 in P1 and 0.0002 in P2. These differences do not jus-tify adding more complexity to the model. The values of R2are 0.9963 in P1 and 0.9830.

In Figures 23 and 24, we can observe the values of Vout inthe red LED. In P1, the first thing that stands out is the greatdispersion for 1mg/l. The minimum value (for this concen-tration) is 2.58V, and the maximum is 3.82V. This disper-sion does not carry over for the other concentrations. Webelieve that this dispersion only occurs in very transparentwaters, which does not happen in the sewer. Therefore, wedo not rule out the use of this LED. In addition, in P2, thereexists dispersion for 1mg/l (between 3.25V and 3.57V) butthe range is not as large. In addition, we observe that themaximum value of Vout is for 1,250mg/l. After this value, aslight drop in the values is observed. The values of Vout are3.27V and 1.51V in P1 for 1mg/l and 10,000mg/l (1.76Vof difference). In P2, the values are 3.43V and 1.59V(1.84V of difference). The lower threshold of these LEDs is40mg/l (as with the yellow LED). In the case of P1, the higherthreshold is for 1,250mg/l, and in P2, it is for 2,500mg/l.From these concentrations on, the voltage difference remainsstable. Finally, in P2, we observe that the voltage value for40mg/l and 3 cm is far from the rest of the points. Further-more, for 160mg/l, there is a dispersion of the values in P2and for 40mg/l in P1.

The mathematical models for the red LED in P1 and P2 arerepresented in Equations (4) and (5), respectively. The ranges ofthese models are 40mg/l to 1,250mg/l in P1 and 40mg/l to2,500mg/l to P2. The values of R2 are 0.9887 in P1 and0.9905 in P2. These solid models are not a function of heightssince the difference of R2 is 0.0002 in P1 and 0.0015 in P2.These differences do not justify adding more complexity tothe model. In addition, in the case of P2, the highest R2 is thatof the model without taking into account the height.

1.5

2.0

2.5

3.5

3.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 19: Prototype 1, green LED, and LDR 0°.

1.5

2.0

2.5

3.5

3.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 20: Prototype 2, green LED, and LDR 0°.

1.0

1.5

2.0

2.5

3.5

3.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 21: Prototype 1, yellow LED, and LDR 0°.

1.0

1.5

2.0

2.5

3.5

3.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 22: Prototype 2, yellow LED, and LDR 0°.

11Journal of Sensors

Page 12: Research Article A Low-Cost Sensor for Detecting Illicit

The last LED analyzed is the white LED (Figures 25 and26). In this case, it is striking that there does not seem to bea dispersion of the data according to the height in P1; never-theless, it does exist in P2. For 1mg/l in P1, the average is2.94V; for 10,000mg/l, it is 1.81V (difference of 1.13V).The P2 has a Vout of 3.22V for 1mg/l and 1.86V for10,000mg/l (difference of 1.13V). According to the range,both LEDs can differentiate for the range between 40mg/land 2,500mg/l. Finally, the mathematical model is repre-sented in Equations (6) and (7). The values of R2 are0.9914 and 0.9794. As in the previous cases, when addingthe height to the model, the difference of the R2 when addingthe height to the mathematical model is minimal.

Solids mg/lð Þ = −39:3278 + 151:496Voutyellow1 Vð Þ

!2

, ð2Þ

Solids mg/lð Þ = e15:3912−6:18087ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiVoutyellow2 Vð Þ

p, ð3Þ

Solids mg/lð Þ = −9:3713 + 58:8425Voutred1 Vð Þ

� �2, ð4Þ

Solids mg/lð Þ = −40:0554 + 161:361Voutred1 Vð Þ

� �2: ð5Þ

We have previously seen that there is no difference in thevalues of R2 when the height is added to the model. Now, weproceed to study if there is a statistical difference to check ifthere are significant differences between the height values.For this, we performed an ANOVA multifactorial analysis(confidence interval 95%, p value greater than 0.05 for differ-ences to exist) with the software Statgraphics [28]. The resultsof the ANOVA can be checked in Table 4. We can concludethat in most cases there is a statistically significant difference.Also except for the yellow LED and red LED in P2, the pvalue for the other LEDs is lower than 0.0001. In the future,we will have to study if these differences are due to the changeof position of the LEDs, the agitation of the sample, or somedefect in the glass. Since it is observed that although the

1.5

1.0

2.0

2.5

4.0

3.5

3.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 23: Prototype 1, red LED, and LDR 0°.

1.0

1.5

2.0

2.5

3.5

3.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 24: Prototype 2, red LED, and LDR 0°.

1.5

2.0

2.5

3.5

3.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 25: Prototype 1, white LED, and LDR 0°.

1.5

2.0

2.5

3.5

3.0

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 26: Prototype 2, white LED, and LDR 0°.

12 Journal of Sensors

Page 13: Research Article A Low-Cost Sensor for Detecting Illicit

results between the different LEDs (except for green andblue) may be similar, there are some differences.

Solids mg/lð Þ = − = :0554 + 161:361Voutwhite2 Vð Þ

� �2, ð6Þ

Solids mg/lð Þ = e12:2156−7:07235∗ln Voutwhite2ð Vð Þ: ð7ÞFor these reasons, we determine that although the height

has statistically significant differences, it does not affect thegeneral function of the sensor. Therefore, it can be used in

the sewer system without having to use other sensors todetermine the height and more complex models that requiremore than one variable. The three LEDs obtain high R2values. Therefore, these mathematical models are very welladapted to experimental values.

5.3. Results Photodiode 0° and 180°. In this subsection, weanalyze the values of the infrared LED in 0° and 180°. First,we need to determine the best resistance in the circuit ofthe 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 measurementof voltage in the tester can be affected due to the internalresistance of the tester not being high.

We test the maximum and minimum turbidity to deter-mine the resistance. When the photodiode is located at180°, we test at two heights (3 cm and 18 cm). This is due tothe height having an important effect in the signal that thephotodiode receives. In Figure 27, we can observe the voltage

Table 4: ANOVA height in LDR 0°.

Color p value P1 down p value P2 down

Yellow ≤0.0001 0.0002

Red ≤0.0001 0.0002

Blue ≤0.0001 ≤0.0001Green ≤0.0001 ≤0.0001White ≤0.0001 ≤0.0001

0

0.03

0.06

0.09

0.12

0.15

0.18

0 10000 20000 30000 40000 50000

V out

(V)

Resistance (kΩ)

1 mg/l in 3 cm 10000 mg/l in 3 cm1 mg/l in 18 cm 10000 mg/l in 18 cm

Figure 27: Voltage in resistance photodiode at 180°.

0

0.2

0.1

0.3

0.4

0.5

0.6

0.7

0 10000 20000 30000 40000 50000

V out

(V)

Resistance (kΩ)

1 mg/l in 18 cm10000 mg/l in 18 cm

Figure 28: Voltage in resistance photodiode at 0°.

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 29: Prototype 1 infrared LED.

0.05

0.15

0.2

0.25

0.3

0.35

0.4

3 5 8 10 13 15 18 20

V out

(V)

Height (cm)

140160630

1250250010000 (mg/l)

Figure 30: Prototype 2 infrared LED.

13Journal of Sensors

Page 14: Research Article A Low-Cost Sensor for Detecting Illicit

(Vout) in the extremes of resistance. In the case of a water col-umn of 3 cm, the values of 1mg/l are upper bounded approx-imately in 0.167V. The value of 0.167V is in the resistance of8.2MΩ. When the concentration of solids is 10000mg/l, thevalues are bounded in 0.002V. This means that the photodi-ode does not receive signals from the infrared LED. In thecase of 18 cm, the maximum voltage is 0.004V in the concen-tration of 1mg/l and 0 in the maximum concentration tested.We discarded the use of the photodiode at 180° due to thesebad results. Usually, the turbidity can measure in this angle.However, in our case, the distance between the infraredLED and photodiode is large. We discarded reducing this dis-tance due to the distance between the emitting signal and thereceptor being low, which can obstruct the water entry to thesensor. 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 waterheight of 18 cm (Figure 28). The values of voltage are upperbounded in 0.67V in the concentration of 10,000mg/l and0.4V in the concentration of 1mg/l. From the 8.2MΩ resis-tance, it is observed that the bounded zone has been reached.It is chosen to place this resistance because it is the one thatoffers us the greatest difference between the two concentra-tion levels with the least resistance. Placing a higher resistorcan cause problems in the actual sensor development.

The results of the photodiode are shown in Figure 29 forP1 and Figure 30 for P2. In P1, the voltage is between 0.402Vin 1mg/l and 0.68V in 10,000mg/l. In P2, the voltage isbetween 0.10V in 1mg/l and 0.34V. The voltage differenceis 0.28V in P1 and 0.24 in P2. The two prototypes have thesame traits; we think that these differences in voltage aredue to the manufacturing process that is done by hand. Weobserve in the two prototypes that the increase of voltageincreases with the concentration of solids. However, for thefirst points, the variation is low. The increase of voltage isproduced from the concentration of 630mg/l. For this rea-son, we think that with the current circuit this LED cannotbe used for monitoring the concentration of solids. However,it could be used to verify the presence of illicit dumping. If acolored LED detected a high concentration of solids, theinfrared LED could light to confirm the possible presenceof a spill. If In future works, we could improve the circuitto amplify the photodiode signal and thus improve its rangeof measurements. In addition, we could study the use of moreluminous Infrared LED.

5.4. Verification. In this section, we analyze the mathematicalmodels of our prototypes with the verification concentrationlevels of 80mg/l, 320mg/l, and 5,000mg/l.

When the LDR is in 180°, the errors are present especiallyin the low concentrations and low heights, which is unaccept-able for the sensor we are developing. Moreover, the error inlow concentration levels (1 and 40mg/l) and 3 cm of height ishigh. There are other turbidity and solids sensors that workwith a photosensor in 180°. Possibly, our sensor presentsthese bad errors in comparison with the other sensorsbecause the light pierces through two environments (water,and air). When the light changes from water to air, there isa refraction of light that has negatively affected the resultsobtained.

Regarding the LDR when at 0°, in Table 5, the relative andabsolute errors of the models are shown. Previously, wedetermined that our prototypes could measure in a maxi-mum concentration of 2,500mg/l. For this reason, the con-centration of 5,000mg/l is not used to verify thefunctioning of the prototypes. The greatest error is in thered LED of P2 with a relative value of 49.2% and an absolutevalue of 174.8mg/l. Generally, the red LEDs are the ones thathave greater errors. Regarding yellow LED, P1 presents fewererrors than P2. Finally, for the white LEDs, P1 presents a rel-ative error of 8.3% and 8.9% for concentration levels of80mg/l and 320mg/l, and P2 presents values of 19.6% and18.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 LEDsare greater than for the other LEDs. Moreover, their Voutvalues are similar to those of yellow LEDs. Red LEDs have aVout difference of 1.76V and 1.84V in P1 and P2, respec-tively, compared to the difference of 1.73V and 1.58V in yel-low LEDs. Therefore, we discard the use of red LEDs. WhiteLEDs present values of less than yellow LED (1.13V and1.35V in P1 and P2, respectively). Even though the whiteLEDs have lower relative errors than the yellow ones, we con-sider that the best LED is yellow. Yellow LED has a greatervoltage difference (greater sensitivity) than white LED, butsimilar errors. A commercial sensor for measuring turbidityis CUS50D. This sensor has a maximum error for monitoringthe solids of 5% with a specified range of 0mg/l to25,000mg/l [30]. Another commercial sensor is the OBS501with a range of 0 NTU to 4,000 NTU and an accuracy of±2% or 0.5 NTU (which is greater) [31]. Although these sen-sors are more precise, their cost is higher than that of ourprototype. This prevents a large number of sensors frombeing 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 lecturefrom their prototype and the reference turbidity (HI 93703)

Table 5: Errors in the LDR 0°.

Solids (mg/l) Yellow P1 Yellow P2 Red P1 Red P2 White P1 White P2

Relative error (%)80 9.2 19.3 17.2 19.5 8.3 19.6

320 13.5 4.9 15.4 54.6 8.9 18.5

Absolute error (mg/l)80 7.4 15.5 13.8 15.6 6.6 15.7

320 43.4 15.7 49.2 174.8 28.6 59.1

14 Journal of Sensors

Page 15: Research Article A Low-Cost Sensor for Detecting Illicit

in the range 0–1000 NTU. This value is similar to the maxi-mum error that we have obtained.

6. Conclusion

In this paper, we developed two prototypes for monitoringthe concentration of solids in sewerage. This was done to cre-ate a system capable of detecting illegal discharges in the sew-erage. We studied two situations: when the LDR/photodiodesare at 0° and when they are at 180°. The infrared LED pre-sented a voltage difference that was accentuated in high con-centrations for the sewer system. Therefore, with the currentdesign, it could be used to confirm a possible spill.

In the case of the 180° LDR, a significant voltage differ-ence between the minimum and the maximum was achieved.For the concentration of 1mg/l, the Vout is approximately3V, which changed until reaching 0V for the highest con-centrations and heights. We consider that due to this limita-tion, this sensor would not be suitable for sewer monitoring.Nevertheless, it could be used to detect possible excesses inalready treated wastewater.

In the case of the LDR at 0°, the LEDs yellow, red, andwhite presented voltage differences between the minimumvalue of Vout and the maximum. The blue LEDs presentedlow voltage differences. Regarding the green LEDs, for P2, itoffered a significant difference between the minimum andthe 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 voltagedifferences, which are 1.73V, 1.76V, and 1.13V in P1 and1.58V, 1.84V, and 1.35V in P2, respectively. In this case, agreater dispersion of the results was observed for low concen-trations of solids. Since these concentrations are unlikely tooccur in wastewater, we believe this will not have a significanteffect on our sensor. Finally, mathematical models that relatethe Vout with the concentration of solids were developed. Itwas seen that although height had a statistically significanteffect, good R2 was achieved with models that do not includeit. Taking into account the errors in the verification phase, weconcluded that the best LED is the yellow one.

In future work, we will develop other prototypes to test ifthe green LED can be used to monitor the presence of solids.Furthermore, we will integrate this sensor in a real seweragefor detecting the presence of illicit discharge. In addition, thissensor can be combined with the one proposed in [33] toobtain a system capable to measures a broader range of tur-bidity values. Finally, this sensor can be completed with otherlow-cost sensors for detecting the presence of illicit dis-charges 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 EuropeanUnion through the ERANETMED (EuromediterraneanCooperation through ERANET joint activities and beyond)

project ERANETMED3-227 SMARTWATIR, the “Minis-terio de Educación, Cultura y Deporte”, through the “Ayudaspara contratacion predoctoral de Formación del ProfesoradoUniversitario FPU (Convocatoria 2016)” grant numberFPU16/05540, and the Conselleria de Educación, Cultura yDeporte with the Subvenciones para la contratación de per-sonal investigador en fase postdoctoral, grant numberAPOSTD/2019/04.

References

[1] Y. H. Cao, J. X. You, and H. C. Liu, “Optimal environmentalregulation intensity of manufacturing technology innovationin view of pollution heterogeneity,” Sustainability, vol. 9,no. 7, p. 1240, 2017.

[2] UNESCO, World Water Development Report 2020, UnitedNations Educational, Scientific and Cultural Organization,Paris, 2020.

[3] E. Garrido, D. Camacho-Muñoz, J. Martín et al., “Monitoringof emerging pollutants in Guadiamar River basin (South ofSpain): analytical method, spatial distribution and environ-mental risk assessment,” Environmental Science and PollutionResearch, vol. 23, no. 24, pp. 25127–25144, 2016.

[4] S. A. Mousavi and F. Khodadoost, “Effects of detergents onnatural ecosystems and wastewater treatment processes: areview,” Environmental Science and Pollution Research,vol. 26, no. 26, pp. 26439–26448, 2019.

[5] European Council, “Directive 91/271/EEC of 21 May 1991concerning urban waste-water treatment,” 1991.

[6] E. Iloms, O. O. Ololade, H. J. O. Ogola, and R. Selvarajan,“Investigating industrial effluent impact on municipal waste-water treatment plant in Vaal, South Africa,” InternationalJournal of Environmental Research and Public Health,vol. 17, no. 3, p. 1096, 2020.

[7] Toronto Water, “Sewers and water supply by-laws 2018 com-pliance and enforcement annual report and report on the Lav-ender Creek water quality assessment,” 2019.

[8] EPSAR, Memoria De Entidad Pública De Saneamiento DeMemoria De Gestión, EPSAR, 2019.

[9] UNESCO, Wastewater Management: A UN-Water AnalyticalBrief, United Nations Educational, Scientific and CulturalOrganization, New York, 2016.

[10] E. Brown, D. Caraco, and R. Pitt, Illicit Discharge Detectionand Elimination: A Guidance Manual for Program Develop-ment and Technical Assessments, Water Permits Division,Office of Water and Wastewater, US Environmental Protec-tion Agency, 2004.

[11] M. Aulinas, P. Tolchinsky, C. Turon, M. Poch, and U. Cortés,“Argumentation-based framework for industrial wastewaterdischarges management,” Engineering Applications of Artifi-cial Intelligence, vol. 25, no. 2, pp. 317–325, 2012.

[12] O. Panasiuk, A. Hedström, J. Marsalek, R. M. Ashley, andM. Viklander, “Contamination of stormwater by wastewater:a review of detection methods,” Journal of EnvironmentalManagement, vol. 152, pp. 241–250, 2015.

[13] L. C. van de Werfhorst, J. L. S. Murray, S. Reynolds,K. Reynolds, and P. A. Holden, “Canine scent detection andmicrobial source tracking of human waste contamination instorm drains,” Water Environment Research, vol. 86, no. 6,pp. 550–558, 2014.

15Journal of Sensors

Page 16: Research Article A Low-Cost Sensor for Detecting Illicit

[14] H. Yin, M. Xie, L. Zhang et al., “Identification of sewagemarkers to indicate sources of contamination: low cost optionsfor misconnected non-stormwater source tracking in storm-water systems,” Science of the Total Environment, vol. 648,pp. 125–134, 2019.

[15] F. M. Hauser, T. Metzner, T. Rößler, M. Pütz, and S. Krause,“Real-time wastewater monitoring as tool to detect clandestinewaste discharges into the sewage system,” EnvironmentalForensics, vol. 20, no. 1, pp. 13–25, 2019.

[16] J. Rocher, D. A. Basterrechea, M. Taha, M. Parra, and J. Lloret,“Water conductivity sensor based on coils to detect illegaldumpings in smart cities,” in 2019 Fourth International Con-ference on Fog and Mobile Edge Computing (FMEC), Rome,Italy, June 2019.

[17] J. Mikosz, “Determination of permissible industrial pollutionload at a municipal wastewater treatment plant,” InternationalJournal of Environmental Science and Technology, vol. 12,no. 3, pp. 827–836, 2015.

[18] A. Faustine, A. N. Mvuma, H. J. Mongi, M. C. Gabriel, A. J.Tenge, and S. B. Kucel, “Wireless sensor networks for waterquality monitoring and control within Lake Victoria Basin:prototype development,” Wireless Sensor Network, vol. 6,no. 12, pp. 281–290, 2014.

[19] M. Parameswari and M. B. Moses, “Efficient analysis of waterquality measurement reporting system using IOT based sys-tem in WSN,” Cluster Computing, vol. 22, Supplement 5,pp. 12193–12201, 2019.

[20] K. M. Simitha and M. S. S. Raj, “IoT and WSN based waterquality monitoring system,” in 2019 3rd International confer-ence on Electronics, Communication and Aerospace Technology(ICECA), Coimbatore, India, June 2019.

[21] L. Parra, J. Rocher, J. Escrivá, and J. Lloret, “Design and devel-opment of low cost smart turbidity sensor for water qualitymonitoring in fish farms,” Aquacultural Engineering, vol. 81,pp. 10–18, 2018.

[22] FAO, “Wastewater characteristics and effluent quality param-eters,” August 2020, http://www.fao.org/3/t0551e/t0551e03.htm.

[23] R. Baird, A. D. Eaton, E. W. Rice, and L. Bridgewater, “2130.turbidity,” in Standard Methods for the Examination of Waterand Wastewater, American Public Health Association, Amer-ican Water Works Associarion, Water Environment Federa-tion, Washington, Dc, 2017.

[24] M. Jonasz and G. R. Fournier, “Measurements of light scatter-ing by particles in water,” in Light Scattering by Particles inWater, M. Jonasz and G. R. Fournier, Eds., pp. 145–265, Elser-vier, 2007.

[25] TENMA, 2020, August 2020, http://www.farnell.com/datasheets/1993717.pdf?_ga=2.177994341.1755120939.1591014303-1928794037.1591014303.

[26] TBS1104, 2020, August 2020, https://es.farnell.com/tektronix/tbs1104/oscilloscope-4ch-100mhz-1gsps/dp/2347634.

[27] “Define and solve a problem by using Solver,” August 2020,https://support.microsoft.com/en-us/office/define-and-solve-a-problem-by-using-solver-5d1a388f-079d-43ac-a7eb-f63e45925040.

[28] Statgraphics, 2020, August 2020, https://www.statgraphics.com/.

[29] EUREQA, 2020, August 2020, https://www.datarobot.com/nutonian/.

[30] Endress+Hauser, 2020, August 2020, https://portal.endress.com/wa001/dla/5001112/2043/000/00/TI01395CEN_0118.pdf.

[31] Campbell, 2020, August 2020, https://www.campbellsci.es/obs501.

[32] Y. Wang, S. M. S. M. Rajib, C. Collins, and B. Grieve, “Low-cost turbidity sensor for low-power wireless monitoring offresh-water courses,” IEEE Sensors Journal, vol. 18, no. 11,pp. 4689–4696, 2018.

[33] J. Rocher, S. Sendra, L. Parra, J. Lloret, and L. Shu, “Low costsensor to measure solid concentrations in wastewater,” inIECON 2018 - 44th Annual Conference of the IEEE IndustrialElectronics Society, pp. 5234–5239, Washington, DC, USA,October 2018.

16 Journal of Sensors