ANALYSIS OF THE MICROCONTROLLER-BASED ELECTROCOAGULATOR IN TREATING LAKE WATER

The Automatic Tubig Machine: A Microcontroller-Based Lake Water Treatment with Electrocoagulation is an integration of different ways of treating and purifying lake water from the Caliraya Lake emphasizing the performance of electrocoagulation in the whole process. Its main purpose is to treat water samples from different barangays surrounding Caliraya and Lumot Lake. The two adjacent lakes are strategically designed to gather water from the surrounding and use it to power the turbine, which generates electricity. The water from the lake is considered because the quality is deteriorating and needs some analysis.Aside from the sedimentary filters, electrocoagulation, reverse osmosis, and UV treatment are used in optimizing the quality of the water. The sedimentary filters are strategically designed and confined in a 3-inch diameter PVC piped for the natural horizontal flow of the water to be treated. The system is controlled using Arduino Mega especially in the control of the pump operation, sensors, and electro-coagulators. To avoid passivation on the aluminum pipes which are used as electrodes, the system is designed to change polarity every 30 seconds.The general water quality indicators such as pH level, turbidity, TDS, and coliform level are considered during the tests. The results were confirmed by the Department of Science and Technology (DOST). Treated water has had optimum value and is considered to be usable at homes and for cooking. The system is 92.66 % reliableand97.3% accurate.


ISSN: 2320-5407
Int. J. Adv. Res. 8 (10), 1007-1017 1008 4,500 billion m 3 today (or 4.5 thousand km 3 ). This is far above the current status of the world's clean water reserves.The figure shows a wide gap between the reserves and the demand relationship. In some point, it could be worse. The gap remains a threat for government and for the people who uses water in different work environment (Lee Addams, 2009). Sustainable Development Goals (SDG) #6 (UNDP, 2018) focuses on the production and maintenance of sustainable clean and sanitation, which callsparticipation of everyone, form the highest form of the government to the lowest rank in the society.
In the Philippines, the problem boils is more of the water quality rather than water quantity. The worse discipline among Filipinos and lack and/or weak enforcement of Government programs contribute to the exponential degradation of water quality.Destroying water sheds and river basins in exchange of infrastructures also contributes to decreasing water quality(Harry S. Pasimio, 2011). Cavinti is an upland municipality where several water resources can be found. It is situated in the foothills of the Sierra Madre mountain range. It is a 3 rd class municipality and belongs to the 4 th congressional district of the province. There are two adjacent man-made lakes in the municipality, the Caliraya lake, and the less publicized Lumot lake. The lakes are strategically designed to serve as a primary mover for the Hydropower plant located in Kalayaan. To maintain the water level, water from Laguna de Bay is pumped into the lake during summer, and water from Caliraya lake is pumped to Lumot lake to avoid water overflows. The lakes also house hundreds of private resorts and fishponds which make the water quality low.
The study focuses on the assessment of the microcontroller-based electrocoagulation, which is integrated into several filters as a means of increasing the quality of water from the lake. The study aims to find out which time interval optimizes the coagulation process in terms of time and water pH level increase.

Methodology:-
Prototype is the initial presentation of what exactly a product is. It is employed to help future builders and developers and build a system to be a basis of future designs(C. Melissa Mcclendon, 2012).Developers use the prototypes as patterns as they see the flaws and later improve the system.
The prototype is divided into three subsystems: the prefiltration, the electrocoagulation, and the final filtration system. There is no single water treatment that can remove pollutants (Woodford, 2019). There's always a need to integrate at least two of the several treatment methods. The block diagram shown in figure 1 presents the three subsystems, where the water will be treated.

1009
The input of the system is raw water which was taken from Caliraya and Lumot Lakes. The first process is to let the lake water pass through the pre-filtration process. The pre-filtration is made up of sedimentary filters using gravel, charcoal, and sand. The target is to remove foreign materials from the water and to avoid problems in the operation like clogging the pipes.It is a natural down flow of water utilizing gravity. With the use of ultrasonic sensors, the amount of water needed to be treated is monitored and controlled. The first unit is the combination of three sediments filter, confined in a 3-inch diameter Polyvinyl chloride (PVC) pipe, suspended on a chassis. Figure 2 shows the design of the sediment filters. The system is designed to use horizontal flow. Roughing filters filtering capacity rates ranges from 0.3 m/h to 1.5 m/h and typical gravel sizes range from 3 mm to 40 mm (Onyeka I.  The size, the length of the PVC is strategically designed taking considerations of the height, weight, and length of the pipe. For the volume of the filters: Where: V =Volume of the Filters (cm 3 ) Length = length of the pipe (cm) Area= cross-sectional area of the pipe (cm 2 ) d = diameter of the pipe (cm) The volume of the gravel is defined by the volume created by the pipe. That is V = Length x Area = 100cm x π x (7.5 cm/2) 2 = 4, 417.9 cm 3 . From the volume, the total weight of the gravel can be computed using the formula; W = V x 1.682 g/cm 3 . That is W = 7.43 kgs. For a 2-inch diameter pipe, the total weight is 3.3 kgs. For a 4-inch diameter pipe, the total weight will be 13.2 kgs. The proponent used a 3-inch diameter pipe taking regards to the total weight of the gravel. (https://www.aqua-calc.com/calculate, 2018).
The charcoal and sand have the same volume. That is V = 60 cm x π x (7.5 cm/2) 2 = 2,605.7 cm 3 . The weighted density of sand is 120 -130 lbs per ft 3 or 2.02 gms/cm 3 . Thus, the weight of the sand when using a 3-inch pipe will be, W = 5.48 kgs. Such amount of the gravel and sand was enough when the pipe is suspended in the air (Hirsch, 2017) The pre-filtration section is the part of the prototype that is used to lessen the amount of total suspended solids (TSS) and turbidity of the water. This process is known as adsorption. This section is made by interconnecting 3 pieces of 86 cm long, 8 cm diameter PVC pipe. The three pipes are horizontally oriented and are connected to the adjacent pipe through a connector (Nkwonta, Olufayo, Ochieng, Adeyemo, & Otieno, 2010). Each of the 86 cm long pipe is filled with different natural materials. The first subsection contains gravel, sized less (<) than 4 cubic cm (Ahmed M. Elhadidy, December 12, 2016). The second pipe is filled with wood charcoals (Nansubuga, 2015) and the third subsection is containing sands (Lee, Boe-Hansen, Musovic, Smets, & Albrechtsen, 2014). The pipes are put together horizontally. In each connector, there is a flattened PVC with several holes to prevent the mixing of the different materials and ease in dismantling the structures when changing the materials.
The second subsystem is the electro coagulator (EC). The EC is employed in the system to remove pollutants that are hard to remove. It works by cracking the molecular structures of the pollutants into smaller particles and separate them into the water under treatment through floatation.EC systems are typically constructed of plate electrodes and water flows through the space between the electrodes. There are several methods of how electrodes can be arranged in the EC system. Electrodes can be monopolar or bipolar. In the monopolar systems, all anodes are connected and similarly, all cathodes are also connected. In the bipolar systems the outermost electrodes are connected to a power source and current passes through the other electrodes, thus polarizing them. In the bipolar systems the side of the electrode facing the anode is negatively polarized and vice versa on the other side facing the cathode (Vepsäläinen, 2012). The system used is monopolar due to its lower operating cost. Alternating current (AC) is used to power electrocoagulation. DC practice result in the accumulation and formation of impermeable oxide at the cathode electrodes, and corrosion at the anode due to oxidation. This prevents the effective transfer of currents between the electrodes thus decreasing the efficiency of the treatment in due time. The difficulty of producing low voltage AC, makes the DC powered Electro coagulator popular. The electro coagulator is DC powered. It has two power sources; solar panel and the power from the service provider. A switch-mode power supply (SMPS) is used to power up the EC. To avoid passivation of the cathode electrode, the polarity of the electrodes is interchanged initially every 30 seconds. For optimization purposes, the time of polarity interchange is varied and observed to see what time interval optimized the operation. The target of the electrocoagulation is to increase the pH value of the water under treatment to 7.2. The most desirable pH value is 7.0, but the program reads the pH value every 5 seconds so it is set to 7.2 to ensure the right pH value is reached. One electrocoagulation process is initially set to 20 minutes. Once the pH value reaches 7.2, A pump will move the water on the EC container to the final filtration subsystem. The process will repeat if the water has not reached 7.2. The third and final subsystem is the final filtration. This is made up of membrane filters and Reverse osmosis.
Pumps are used to transfer water from one container to another. The first pump transfers the untreated water to the top of the prefiltration unit, which is suspended on the chassis. As the water naturally flows from one filter to another, a container is located at the exit of the third filter. Another pump transfers the pretreated water to a coagulation container. Once the water at the coagulation process reaches 7.2 pH, another pump will transfer the water to the final filtration. The sludge is left at the container and is manually removed.
The working prototype will be evaluated in terms of reliability and efficiency. Reliability is the measurement to which an assessment tool produces stable and consistent results. For this study, test-retest reliability is implemented. This is a type of reliability where a process to be evaluated is tested not only once and analyze the relationship of each result.
Reliability was the statistical tool applied for the treatment of data and information. The formula below was used to get the reliability from the expected result and the actual result: In terms of failure, the formula below can be used to determine reliability; = − Equation 5 Where: r(%) = reliability t = number of times sampled, number of samples λ = failure rate (f/n) f = total failure n = number of test =

Equation 6
The mean reliability indicated how reliable the entire system. The formula is: r = (Σx / n) Equation 7 Where: r = mean Σx = sum of all successful result n = number of data item Another tool for evaluation of the study is the efficiency. Evaluating the Efficiency concerns with the production of the output in relation to the process of the system. In practice, the outputs are compared with the inputs and the process to achieve the best result. Efficiency will be evaluated with the formula indicated below; The mean efficiency indicated how efficient the entire system is. The formula is: ƞ = (Σe / n) Equation 9 Where: ƞ = mean Σx = sum of all successful result n = number of data items  Table 1 shows the parameter that is to be evaluated to find the quality of the treated water. The parameters' value is evaluated by the Department of Science and Technology.

Results and Discussion:-
The water source is the Caliraya Lake, located in Lumban and Cavinti, Laguna. Adjacent to this lake is the Lumot Lake which is strategically designed to sustain the water at Caliraya Lake in the case when the water is low. Also, water from the Laguna the Bay is pumped to the Caliraya Lake which causes the water at the lake to be contaminated. Water samples tested where taken from four barangays since the type of utilization varies in different barangay.   Table 2 shows the result of the visual inspection for the reliability test in terms of water clarity and odor. The water from Brgy. Bukal has the lowest water quality since the samples were taken right behind residential houses. The water is stinky and muddy, oils are present on the water surface, and there are several animal manures in the water.Regardless of the sources of water samples, all results to crystal clear water. A laser pointer is also used to compare the water samples. Infrared is very much visible when directed across the untreated sample as shown in figure 5.a and in figure 5.b, it is not visible when directed towards the treated water.   Table 3 shows the limitation of the value set by the Philippine National Standards for Drinking Water series of 2017. Only the parameters taken by the proponent were enlisted.  Table 4 shows a summary of the result of the performance tests in terms of pH and TDS enhancement for 46 water samples, each with a volume of 8-10 liters. pH level increases as the water undergo electrocoagulation. The longer the exposure, the higher the pH level could be achieved. The effects on the pH change depend on the anode type (reactive or inert), current density, and electrolyte composition (Ali Ciblak, 2012). As electrocoagulation starts, white bubbles accumulate around the aluminum electrodes then to the entire water surface.
The result shows that the pH level of the raw water (untreated) ranges from 5.8 -6.7. At an average of 2 hours in coagulating the samples, the pH level of the treated water ranges from 7.6 -8.9. The natural pH level for lakes with a wide range of biodiversity ranges from 6.0 -7.0, while the level for drinking water should be between 7.0 -10.5. The TDS level of the sampled water is very low, especially in Brgy. Bukal with about an average of 25 ppm at the site where contaminants are evident. Water samples from Brgy. Inao-Awan, in which water is clear during the visual inspection and upon getting the samples, has the highest level of TDS in almost all areas of the barangay with an average of 70+ ppm. Although water with a TDS level less than 500 (<500) is still excellent in quality. As the water samples passed through the roughing filters (sand, gravel, and charcoal), the TDS level increases but still under 500 ppm which is the national standard for excellent water quality (see table 1). The TDS level of the treated water ranges from as low as 30ppm (with 20ppm as the initial) -146ppm (75 ppm is the initial).  Table 5 shows that from as high as 144 turbidity level, the level is reduced to less than 1 (< 1) for samples taken from Brgy. Bukal. This water sample has the lowest quality initially. From Brgy. West Talaongan, turbidity level 10 is reduced to less than 1 (< 1) after treating the sample with the system. As per EPA recommendations, systems that filter must ensure that the turbidity goes no higher than 1 (Oram, 2014), and 5 under PNSDW (see table1).   Table 7 shows the summary of testing the performance of the system of the Microcontroller-based Electrocoagulator in terms of the accuracy of the operation as distinguished by the subsystem and/or sub-operation. The coagulation process depends on some physical characteristics of the coagulator, such as the type of material used, the spacing between the pipes, the surface area of the pipe, volume of the water under treatment, pH level of the water, etc. Current density refers to the current induced per square unit of the conductor. As the water volume increases, the greater surface area of the coagulator is submerged in the water. From figure 40, the orientation of the coagulator can be seen inside the treatment tank. There are 4 aluminum pipes, each sized 30 cm long, with a cross-sectional dimension of 10 cm by 4.45 cm. The container is (27 X 22 X 29) cm big. For an 8 liter volume, only 12.5 cm of the pipes are submerged. For a 9-liter volume 14 cm of the length is submerged. Using the area formula, the total surface area submerged for 8 liters is 361.25 cm 2 , and 404.6 cm 2 for a 9-liter volume of water. The current density for 8 liters ranges from 5.7 A/cm 2 -9.92 A/cm 2 . That is about 1.6A -2.74A current induced. For 9 liters, current density ranges from 7.43 A/ cm 2 -12.57 A/cm 2 , which is equal to 1.84A -3.11A induced current. The The mean reliability of the device is taken from the individual reliability; that is the performance as observed using the infrared, pH enhancement, TDS and turbidity optimization, and the machine reliability in terms of failure.
The efficiency and accuracy are taken by the number of accurate operation over the total number of operation. The percentage of the removal of the fecal coliform is also considered to measure efficiency. Thus, + . + . = . %  Table 8 shows the performance of the system in optimizing the pH level of the treated water in various time of coagulation. The system is programmed to coagulate for 20 minutes and once the pH level has not reached 7.2 yet, it will take another 20 minutes until the desired level is achieved. The time was varied three times, 5 minutes, 10 minutes, and 15 minutes. For the 5-minute setting, the average pH after treatment was 7.55 at an average time of 80 minutes. The operation is exclusive of the other processes. It only covered the coagulation time. For the 10-minute setting, the average pH level was 7.76 at an average time of coagulation of 93.33 minutes. For the 15-minute setting, 7,81 is the average pH level at an average coagulation time of 105 minutes.
From the data gathered, it is seen that the system can perform coagulation at a lesser time but a lower pH optimization.  Table 21 shows the performance of the system in optimizing the pH level of the water using the electrocoagulation unit. The microcontroller is programmed to perform electrocoagulation for 20 minutes while changing the polarity of the electrodes every 30 seconds. This is to avoid the passivation of the electrodes on one side only (cathode). To determine the optimized time of electrocoagulation, the time to change is varied. From 30 seconds, it was changed to 25, 20, 15, 10, 1nd 5 seconds respectively while retaining the time of electrocoagulation. The 5-second setting has the fastest average time 33.33 average time for 3 operations. It has also the lowest pH level after treatment with 7.51. The 20 seconds set up had the longest coagulation treatment with an average of 80 minutes. The 15-second setting had the highest average pH level after treatment but it also had the highest average pH level before treatment. Setting the coagulation time to the lowest possible and the frequency of polarity change to the highest possible will have the best optimization of pH level but this will have the lowest value of pH level.

Conclusion and Recommendation:-
The analysis of the Microcontroller based electro coagulator in treating Lake water from Caliraya and Lumot lake wished to determine the effectivity of integrating electro coagulator with different filters to increase the quality of the water in terms of pH level, turbidity, TDS, and coliform removal. The device is also a microcontroller-based to control water flow and coagulation process. The settings of the program were changed to see which set has the best optimization on coagulation.
The first test done was visual and olfactory. All samples from four different barangays that surround the lakes have been crystal clear and free of odor after the process. The test was verified by the infrared light rays that are visible before treatment and cannot be seen after treatment. The turbidity level before treatment ranges from 10 NTU (Talaongan) -144 NTU (Bukal) and became <1 after treatment as per the DOST test result, using Merck SQ as per SQ Nova 60, Merck Manual. The standard turbidity level is 5 NTU.
The TDS level from all the sources ranges from 27 ppm (mg/l) to 92 ppm before treatment and resulted in 92-95 ppm. When water passes through roughing filters (gravel, and sand), minerals were added to the water. The standard TDS level for usable water should be 500 mg/l or less. The pH level ranges from 5.8-6.7 and increases to 7.6-8.9 after an average of 120 minutes of electrocoagulation utilizing 8 liters per batch, and using coagulation time of 20 minutes and 30 seconds of polarity change until the desired level is achieved.
The time of coagulation was initially set at 20 minutes per operation and was repeated until the desired level of pH level was achieved while the polarity was set to interchange every 30 seconds to avoid one-sided passivation. The settings were altered to see which settings optimized the process best. As with the coagulation time, the 5 minutes settings showed better optimization than the other time settings. The 5 seconds polarity interchange showed better optimization than the other polarization set up.
The whole analysis comes up with an average reliability of 92.66 % with four failed operations and an accuracy of 97.3 %.
With the optimization shown by the 5-second polarization interchange and 5-minute coagulation set up. Using DC coagulation is recommended as it matches AC coagulation with better current control.