Water Related

Water Quality Analyzer


Dhanalakshmi Pinisetti (Rajiv Gandhi University of Knowledge Technologies)

Apr 22, 2022 5174 views

Water Quality Analyzer

Water is a vital factor in human life and for the existence of other habitats. Easy access to safe water for drinking, domestic use, food and production is a civic health requirement. Therefore, maintaining a water quality balance is very essential for us. Otherwise, it causes serious health problems to humans. Water contamination has been studied as one of the leading causes of death and illness in the world. Many people die from contaminated water every year. One reason is that public and government ignorance and the absence of water quality checking systems cause severe medical issues.Water contamination is also a serious issue in industries, irrigation and aquaculture.

Traditionally, water quality detection is done manually when water samples are taken and sent to the laboratory, but this process requires a lot of time, cost, and human resources. These techniques do not provide real-time data. By considering these challenges, we have come up with an idea to design a Water quality analyzer to check the quality of the water used for different purposes.

The Process starts from taking the real time data from the water bodies using sensors and type of water need to be checked must be selected from the mobile app. FPGA Board processes the collected data and compares it with the standard data in order to assess the water quality.The quality parameters of the water and the quality of the water will be sent to the mobile app using IoT Technology. If the quality of the water is below the desired levels, an alert will be sent to the user. In this way we can have continuous real time water monitoring.

Demo Video

[URL: https://www.youtube.com/watch?v=nvQmHGYEz10]

Project Proposal

1. High-level project introduction and performance expectation

1.1. Introduction:

Clean water is one of the most important resources required to sustain life and the quality of drinking water plays a very important role in the well-being and health of human beings. Water supply to taps at urban homes and water sources available in more rural areas, is however, not necessarily safe for consumption. Even though it is the government’s responsibility to ensure that clean water is delivered to its citizens, ever aging infrastructure, which is poorly maintained, and continuous increase in population puts a strain on the supply of clean water. It is thus paramount to monitor the quality of water which will be used for consumption. Traditional water quality monitoring methods involve sampling and laboratory techniques. These methods however are time consuming and not very cost effective. Thus there is a need for a more extensive and efficient monitoring system.

Figure: System Design

Our design contains four parts. Those are Information, Decision making, Data transfer and Display Blocks. 

  • The information block consists of sensors which collect the values of different water  quality parameters from the water bodies and that collected data will be transferred to the FPGA board.

  • The Decision making block specifies the quality of water based on the type of water to be tested and the sensor data received from the information block.These values will be sent to the cloud.

  • Data transfer block acts as a communication channel between the board and the mobile application. Whatever the data that is sent to the cloud that will be transferred to the mobile application. So that the user can check different water quality parameters.

  • In the Display Block when the user selects the mode of application then it will display values of all the parameters of the respective block in the mobile application. If any parameter is out of the specific range then the user will get the alert.

1.2. Purpose of the Design:

Declining water Quality has become a global issue of concern as human population grows, industrial and agricultural activities expand, and climate change threatens to cause major alterations to the Hydrological cycle. Every year, more people die from unsafe water than from all forms of violence, including war. This is because of the lack of water quality checking. Water quality detection is done manually which takes a lot of time and cost also. So we have come up with this idea to design a water quality analyzer to check the quality of the water used in different areas like Drinking, Domestic purpose, Aquaculture, Industries and Agriculture using DE10 NANO -FPGA board.

1.3. Applications:

Our design has a wide range of applications in the fields that require water quality testing. Water quality analysis is required mainly for monitoring purposes. Some importance of such assessment includes:

  • To check whether the water quality is in compliance with the standards, and hence, suitable or not for the designated use.

  • To monitor the efficiency of a system, working for water quality maintenance.

  • To check whether upgradation / change of an existing system is required and to decide what changes should take place.

  • Water quality analysis is extremely necessary in the sectors of Public health especially for drinking water and for Industrial use.

  • We can further improve this to have a continuous monitoring of the water in all water bodies like rivers, lakes, canals, water tanks.

  • Based on the results after checking, we can develop a system to purify the water if needed.

  • This design can be used by the government for distributing safe water for drinking and domestic purposes in rural and urban areas.We can further increase the parameters for checking the water quality.

  • This design can be used by the farmers to check irrigation water quality.

  • This design can be used in the Aquaculture sector from which we can save lot of marine organisms.

  • This design can be used in Industrial sector mainly for food production.

  • We can use this design at schools, colleges, universities water supplying units where we can save innocent young generation.

1.4. Target users:

  • Governmental organizations for safe water distribution in rural and urban areas.

  • Agricultural areas for good crop yields.

  • Aquaculture for better growth of the fishes.

  • Industrial zones/areas.

  • High pollution vulnerable zones.

  • Places where there is acute poverty and less literacy rates etc.

1.5. Future Advancements:

  • Our main aim is to make automatic monitoring systems where ever we are going to use water quantities. Some of them are stated below:

    • Hydroponics.

    • Aquariums and Aquaculture systems.            

    • Swimming pools.

    • Water supplying units at schools, colleges and universities.

    • Drinking and domestic water supply at rural and urban areas.

    • Irrigation systems.

  • Based on the results after checking, we can develop a system to purify the water if needed.

1.6. Virtues of DE10 Nano FPGA and Azure Cloud in our project:

  • The DE10 Nano FPGA Board has two 2x20 pin GPIO expansion headers. Each header has 36 user pins connected directly to the Cyclone V SoC FPGA. We have used these GPIO pins for interfacing all the sensors to the FPGA Board.

  • We have used the FPGA Board for communicating the cloud with the sensors.

  • We have used the Storage Service in Microsoft Azure Cloud platform for storing the sensor data and sending the same data to the cloud.This makes the design accessible globally.


2. Block Diagram

3. Expected sustainability results, projected resource savings

  • The proposed design is expected to find the quality of water based on the type of water to be tested and display the real time data of the water quality parameters to the user. 

  • An alert will be sent to the user in case of any water contamination. Further it also finds which water quality  parameters are out of the range or not up to the standards. 

  • Water contamination is observed as one of the leading causes of death and illness in the world. This design is user friendly, unlike the traditional way of testing water at laboratories. From this we can reduce the risk of using contaminated water.

  • Our design can reduce the cost ,time consumption and human resources due to the absence of using laboratories for water quality checking purpose.

  • Our design makes the water quality testing easier and it’s also accessible to all the people. We can save a lot of innocent people, living creatures who are going to effect by water contamination.

4. Design Introduction

Water is an essential need for human survival and the quality of the water always affects human health. Water contamination leads to severe diseases. For that reason, we must monitor the quality of the water. So we have designed a low cost water quality monitoring system using DE10 NANO FPGA. The main aspect of this project is to test the water quality based on the user requirement and should intimate the quality of water to the user. For this the design flow is as follows

  • First of all we have to take the quantity of the quality parameters of the water. For that we have used Total Dissolved solids(TDS) sensor, Electrical Conductivity sensor, pH sensor, Dissolved Oxygen sensor, Temperature sensor. 

  • The data should be collected from the sensors and should be processed,  so we have used the DE10 Nano FPGA for this. All the sensors are connected to the DE10 Nano board via Arduino.

  • This collected sensor data and the quality of the water should be displayed to the user, so we have created a mobile application.

  • For establishing the communication between the FPGA and the mobile application, we have used Microsoft Azure Cloud.

Our design mainly focused on the following aspects : 

Drinking water

Domestic water

Irrigation water

Industrial water


Here are the details of all the components:

DE10 Nano Board

Turbidity sensor

Total Dissolved solids(TDS) sensor

Electrical Conductivity sensor

pH sensor

Dissolved Oxygen sensor

Temperature sensor


Figure: The placement of DE-10 nano board, arduino, sensors and mobile app.

5. Functional description and implementation

5.1 : Interfacing the sensors:


                       Figure: Interfacing sensors to the GPIO pins of  DE10 nano board via Arduino.


All the sensors are interfaced to the GPIO pins of the DE10 Nano board via arduino.The main task of the arduino is to multiplex the sensors and have to send the sensors data one by one to the FPGA board through the GPIO pins .

Turbidity sensor:

A turbidity sensor works by sending a light beam into the water to be tested. A light detector detects the amount of light that is reflected back at it. The more light that is detected, the more particles are present in the water. Voltage is generated at the output pins of the sensor based on the amount of light reflected. 





TDS Sensor:

Electrical conductivity of water is calculated by multiplying the voltage of TDS sensor with EC calibration value and dividing it by temperature coefficient.

               EC = (rawEC / temperatureCoefficient) * ecCalibration

The TDS sensor is based on the EC [electrical conductivity]. A TDS sensor  measures that EC level and then converts it to a TDS measurement.

TDS =( 133.42EC3-255.86EC2+857.39EC)0.5


Temperature sensor :

Temperature sensor is used for the accurate measurement of the Electrical Conductivity and Total Dissolved Solids



pH sensor:

The average of 10 voltage readings of the sensor is calculated and multiplied with 3.5 to get the final pH value.

pH value = 3.5*average voltage



Dissolved Oxygen Sensor: 

The Dissolved Oxygen in the water is calculated from the voltage of the sensor and the DO Table based on the temperature values from the temperature sensor.

5.2.Decision Making:

The main task of decision making is to determine the quality of the water and generate an alert based on the sensor values and the type of water to be tested in case of any abnormality. This process takes place on the FPGA Board. We have collected the data of the ranges of the quality parameters of the water (Turbidity, TDS, Conductivity, Temperature, pH, Dissolved Oxygen) used for different purposes (Drinking, Domestic, Agriculture, Industrial, Aquaculture).  

The quality of the water is determined by comparing the sensor values with the standard predefined values of the water.

  • If all the sensor values are within the range , it will indicate water is excellent to use.

  • If any one sensor is out of the range with small error, it will indicate water is good to use.

  • If any two sensors are out of the range with small errors, it will indicate water is fair to use.

  • If any of the quality parameters is out of range with a large error or more than two sensors are out of range with small errors, it is not suitable for the specific usage.

The following are the required ranges of the quality parameters of water for different purposes. These values are taken from the Indian Standards of different types of waters, World Health Organization (WHO) Standards and some of the standard organizations.






5.3. Data Transfer between FPGA and Cloud:

Data transfer is the crucial stage in this project.As the DE10 board has already taken the data from the sensors and made the decision by some algorithms ,the whole data or the values of those parameters and the decision needs to be displayed to the user.As it is not possible to transfer the data directly to the app from DE10 nano , we have used the Azure cloud as an intermediate for transferring the data.

There are two types of data transfer between FPGA and Mobile App via Azure cloud.

  1. Data transfer from Mobile to FPGA Board:The type of water to be tested will be selected by the user through mobile App and this selection will be sent to the cloud and this data will be retrieved on the board for decision making.

                                       Figure:  Selection data from mobile.

  1. Data transfer from FPGA to Mobile : All the sensor data and the decision made by the FPGA board will be sent to the cloud and this data will be retrieved in the mobile app in order to display them to the user.

             Figure: Sensor data and Decision from the FPGA board.

For this a storage account is created in the Microsoft Azure Cloud. In that a container is created for storing the data. Now the data from the FPGA board or App will be written to a file. And this file is sent to the Azure storage container that we have created.These files are accessed by the FPGA or App based on the requirement..

5.4. Displaying data on the Mobile App:          

We have created a mobile application to view the quality parameters of the water and the quality of the water based on the user’s requirement.

The app consists of 3 pages 

  1. User login : The user can login directly into the app by giving his name and phone number so as to maintain the data in the name of the user.

  2. Selection page (Type of Water usage) : This layout consists of five fields which are Drinking,Industrial,Aquaculture,Agriculture and Domestic.The user needs to select the type of water to be tested from the given five fields.This selection will be sent to the FPGA board for further process.

  3. Decision page (Values of the water parameters and Decision) : This layout consists of two blocks which are the decision block and parameter values display block.The parameter values and the decision statements obtained from the FPGA board will be retrieved and will be displayed in this page. 

6. Performance metrics, performance to expectation

  • We have collected different kinds of water from different sources like pond water ,waste water and raw and purified waters from water plant.

  • First we have tested the purified water which we have collected from RO plant.In our system we have selected the area of testing as drinking purpose and we got the result as “It is excellent to use” and for agricultural purpose it gave the results as “Average to use ” as some of the quality parameters are not with in the range.

  • Next we tested the waste water and our system gave the result as “Worst Better don’t use” for every purpose which we have mentioned above, because the ranges of all the parameters are out of range for every purpose of testing.

7. Sustainability results, resource savings achieved

  • We have tested different kinds of waters that are available in our surroundings. Our design is capable of  finding the quality of water based on the type of water to be tested and displaying the real time data of the water quality parameters to the user. 

  • Our system works based on the water quality, the proposed system gives the rating for five aspects like drinking, domestic, agriculture, aquaculture, and industrial. A notification alert is sent to the user if any water is out of the specific range. Further it also shows which water quality  parameters are out of the range in the app.

Resources savings:

  • By using our design we can reduce the cost and  time consumption.

  • Our design makes the water quality testing easier and it is also accessible to all the people.

  • We can save lives of  all living organisms who are going to take contaminated water.

8. Conclusion

Assessment of water quality is essential to check the suitability of a water source for the designated use. Several water quality parameters are assessed and compared with their standard values to determine the acceptability of the water to be used. After prolonged research, the procedures for the assessment of the water have been standardized. Our design is mainly useful for water quality testing and further it can be used for continuous water quality monitoring.


Please login to post a comment.