l £ > / D c ? n I / s i I O S ALUM AND LIME DOSING CONTROLLERS FOR WATER TREATMENT PLANT A dissertation submitted to the Department of Electrical Engineering, University of Moratuwa in partial fulfillment of the requirements for the degree of Master of Science LIBRARY UNIVERSITY O F MORATUWA, SRI L A N K A M O R A T U W A by L.P. HETTIARACHCHI £ 2 1 . 3 " o r \ . 3 Supervised by: Dr. Palitha Dasanayake Department of Electrical Engineering University of Moratuwa, Sri Lanka December 2007 University of Moratuwa 91205 9 1 2 0 5 DECLARATION The work submitted in this dissertation is the result of my own investigation, except where otherwise stated. It has not already been accepted for any degree, and is also not being concurrently submitted for any other degree. ....J&feg: L.P. Hettiarachchi Date: I endorse t te declaration by the candidate. Dr. 'alitha Dassanayake i CONTENTS Declaration Abstract Acknowledgement List of Figures List of Tables List of Principal Symbols 1 . I n t r o d u c t i o n 1.1 Background 1.2 Problem Background 1.3 Research Objectives 1.4 Organization of Dissertation 2. Literature Review 2.1 Historical Review 3. Research Design and Methodology 3.1 Introduction 3.2 Assumptions 3.3 Data Collection 3.4 Design of the System 3.5 Methodology of the Research 4. Research Findings 4.1 Introduction 4.2 Constructed Relationship 4.3 Development of The System 5. Conclusions and Recommendations 5.1 Conclusions, Remarks and Discussion 5.2 Recommendations for Future Research li References Appendices Appendix - A Appendix - B Appendix - C Appendix - D Abstract Many techniques are applied to the control of Alum and Lime commonly termed as coagulant dosing in a drinking water treatment plant. Coagulant dosing rate is non linear correlated to raw water parameters such as turbidity, conductivity, pH, temperature, etc. Manual method called Jar testing is used to decide the Alum and Lime dosage. However in practical situation, Jar testing is carried out maximum three times per day. But the parameters of water sources are continuously changing specially on rainy days. Therefore overdosing and underdosing of Alum and Lime are normally occurred. Excessive coagulant overdosing leads to increase treatment costs and human health problems, while underdosing leads to failure to meet the water quality targets and less efficient operation of the water treatment plant. It means that important requirement arises to automate the system with optimum coagulant dosage. The research is aimed to propose an alternative to the jar test allowing for an on line determination of optimal coagulant dosage from raw water characteristics and design a system for feeding Alum and Lime automatically with a monitoring display. The reasonable assumption made by this research is, except turbidity and pH value, other parameters are almost same throughout year. After analyzing thousand number of jar test results with corresponding turbidity values and pH value of incoming water, it was found turbidity value of raw water and the dosage of Alum has a relationship and pH value of raw water and the dosage of Lime has another relationship. Relationship of turbidity value of raw water and the dosage of Alum is second order polynomial. However pH value of raw water and the dosage of Lime have stepwise relationship. And also actual values of three hundred situations were taken and applied to check the validity of relationships and it is proved that the relationships which has obtained are well suited to develop the automation system. Next objective is designing of hardware and software part of controller of an automotive system to dose Alum and Lime using the relationship. PIC16F876 microcontroller is selected as the controller; it made the task easier. Since PIC16F876 has 8-bit with analogue to digital converters, it handled analogue output of turbidity sensor and pH sensor. In this project MAX 7219 display driver IC could be easily interfaced with microcontroller by using three wires (SDO, SDI and SCLK) and LOAD (CE) which is common today named as Serial Peripheral Interface (SPI).The PIC16F876 chip is in electrical erasable packaged version (FLASH), and it helped for programming several times for testing our object before implementing. IV Finally complete control and feeding system for Alum and Lime was designed. Value of turbidity was measured by a turbidity sensor. That value was taken to the microcontroller that decides the Alum dosage and changes the valve position using stepper motor accordingly. Either increment or decrement of the value of turbidity by 10 makes the changing of valve position in ADC. Either increment or decrement of the value of pH value by 0.1 makes the changing of valve position in LDC. Using MAX7219 IC current value of turbidity and current value of pH are displayed in ADC and LDC respectively. Key features of the system are simple relationships constructed to find optimum coagulant dosage and ability of handling practical situations of water treatment plants using automation system with microcontrollers. Acknowledgement My foremost duty is to express my sincere gratitude to my supervisor, Dr. Palitha Dassanayake, Senior Lecturer, University of Moratuwa, for his great insights, perspectives, guidance and sense of humor. My appreciation to the Professor H.Y.R. Perera, Head of Department of Electrical Engineering, Senior Lectures of Department of Electrical Engineering and Department of Mechanical Engineering for helping in various ways to clarify the things related to my academic works in time with excellent cooperation and guidance.. Sincere gratitude is also extended to the people who serve in the Department of Electrical Engineering office. The author extends sincere gratitude to Mrs. P.N.S. Yapa, Deputy General Manager (Greater Colombo), National Water Supply and Drainage Board who gave the permission to do the analysis at Ambatale Water Supply Scheme and also Mrs. Asha, Senior Chemist and all the staff members of the laboratory at Ambatale Water Supply Scheme who gave me assistance for data collection. Love and affection to my parents, Mr. and Mrs. Hettiarachchi, my husband, Chandana and my son, Ginura for their patience and understanding. Lastly, I should thank many individuals, friends and colleagues who have not been mentioned here personally in making this educational process a success. May be I could not have made it without your supports. VI List of Figures Figure Page 3-1: Layout Diagram of Ambatale Water Treatment Plant 11 3-2: Pin Configuration of PIC 16F876 16 3-3: Pin Configuration of MAX7219 18 3-4: Block Diagram of the System 20 4-1: Linear Relationship of Turbidity and Alum Dosage 25 4-2: Logarithmic Relationship of Turbidity and Alum Dosage 26 4-3: Second Order Polynomial Relationship of Turbidity and Alum Dosage 27 4-4: Power Relationship of Turbidity and Alum Dosage 28 4-5: Exponential Relationship of Turbidity and Alum Dosage 29 4-6: Third Order Polynomial Relationship of Turbidity and Alum Dosage 30 4-7: Fourth Order Polynomial Relationship of Turbidity and Alum Dosage 31 4-8: Fifth Order Polynomial Relationship of Turbidity and Alum Dosage 32 4-9: Sixth Order Polynomial Relationship of Turbidity and Alum Dosage 33 4-10: Relationship of pH value and Lime Dosage 38 4-11: System Diagram 40 4-12: Relationship of Amount of valve opened and Optimum Alum Dosage 42 4-13: Schematic Diagram of the Hardware 45 viii List of Tables Table P a g e 4-1: Details of R-Squared Value with Different Trend Lines 24 4-2: Details of Seasonal Variations 35 4-3: Details of Experimental Lime Dosage for Different pH Values 36 4-4: Requirement of Alum dosage for different pH values 37 4-5: The sequence of switching the windings of ADC 43 4-6: The sequence of switching the windings of LDC 44 viii List of Principal Symbols Table ANN - Artificial Neural Network FRBS - Fuzzy Rule Based System SCD - Streaming Current Detector ADC - Alum Dosing Controller LDC - Lime Dosing Controller A/D - Analogue to Digital SOM - Self Organizing Map UEGO - Universal Exhaust Gas Oxygen LCD - Liquid Crystal Display USB - Universal Serial Bus PLC - Programmable Logic Controllers PIC - Programmable Intelligent Computer IX