TechieYan Technologies

Water Quality Checking System

water quality checking system using Arduino project by techieYan Technologies

Abstract

This is the Arduino based water quality checking system project. All living things require water to survive, and it is not possible to live without it. One of the worst types of this environmental pollutant is water pollution. Whether it’s the water supply in our homes or the juices that are made by businesses and that we consume, the quality of the water that we consume has a significant impact on how long we live. Biological, chemical, radiological, and other aspects of the water are referred to as its quality. One of the main concerns for the developing economic system is water pollution. Due to rapid urbanization and industrialization, water quality is declining year over year, which results in water-borne illnesses and has a negative impact on turquoise culture. It is important to check the quality of the water because 65 percent of the country’s drinking water originates from underground sources. This water quality checking system envisioned system demonstrates a design and development of a low-cost system for real-time monitoring of water quality using Arduino.

Introduction

All living things require water as a necessity, and it is impossible to survive without it. Environmental pollution has grown to be a big issue as a result of industrialization and technological growth. One of the worst forms of environmental contamination is water pollution. Water quality is crucial to our survival. Any imbalance in water quality would have a negative impact on human health as well as the environment. In this water quality checking system project, The crucial water parameters are measured in this system using a sensor. According to past studies, the most important water parameter that typical users need to keep an eye on is our water pH level and a buzzer will be activated

Components Required

Hardware Requirements

  • Arduino Uno: Arduino Uno is a microcontroller from the Arduino Family. It was developed by Arduino. cc and is based on the Microchip ATmega328P microcontroller. Uno has 20 I/O pins, 6 are analog pins and 14 are digital pins.
Arduino of 20 I / O pins for water quality checking system

For more details,  pinout and datasheet, you can visit : https://docs.arduino.cc/hardware/uno-rev3

  • Ph sensor sen0161: ph sensor used to know the acidity and alkalinity of the water between the range of 0-14. Every ph sensor works differently to measure the quality of the water
  • turbidity sensorturbidity sensor is used to measure the cloudiness or haziness of the water
  • Buzzer: An Audio Signalling Device. Buzzers can be mechanical, electromechanical, or piezoelectric. It produces an alarming sound when triggered. Used in various applications like Game buzzers, Alarm Buzzers, Trains, etc.

Software Requirements

  • Arduino Ide: Arduino IDE (Integrated development environment) is software that is used to dump the program into boards. Arduino- IDE’s major use is to build electronics-related projects. Arduino is an open-source platform simple and easy-to-understand platform for coding.

HOW TO INSTALL ARDUINO IDE CLICK ON THE LINK :

http://techieyantechnologies.com/2022/10/installation-of-arduino-ide/

Block diagram

The block diagram describes the relationship between the input devices and output devices. Here, in this case, the input device is a ph  sensor  and turbidity sensor that sends the information to Arduino where the output is transmitted to specific devices such as  buzzer  and led these devices to receive the information from the Arduino which is given by input devices.

water quality checking system block diagram

Flow Chart

A flowchart is a diagram that shows a process’ individual steps in their proper order, similarly, the following flowchart tells about the steps involved in the project and the sequential flow of the code also.

So as it starts, first, it reads the sensor’s value if the sensor’s value is greater than the given condition then turns on the buzzer,  else it will be turned off.  

water quality checking system flow chart

*website used to make Flow Chart and Block Diagram :  https://www.lucidchart.com/pages/

Pin Wiring

Ph sensor sen0161 

The ph sensor has 3 pins GND, TX, and RX where GND is connected to the GND of the Arduino Uno. TX is connected to the RX of the Arduino Uno. RX is connected to the TX of the Arduino Uno.

ph sensor pin connection to Arduino of water quality checking system

Turbidity sensor

Turbidity sensor has 3 pins +5v, GND, and digital pin, here GND is connected to GND of Arduino UNO. VCC is connected to 5V of the Arduino Uno. The digital pin is connected to the D2 of the Arduino Uno.

water quality checking system turbidity sensor pin connections

Buzzer

The Buzzer has two pins, (positive)+v and Ground. We connect (positive)+v to pin 12 of Arduino Uno and Ground to GND(you can connect to any ground of Uno). Making pin 12 HIGH or LOW we can activate or deactivate the buzzer.

buzzer pin wiring of water quality monitor system

LED

LED has 2 pins. The led has two pins, (positive)+v and Ground. We connect (positive)+v to pin 11 of Arduino Uno and Ground to GND(you can connect to any ground of Uno). Making pin 11 HIGH or LOW we can activate or deactivate the led.

LED pin wiring to Arduino for water quality checking system

Circuit diagram

Note: make sure to take proper precautions while connecting the components.

water quality checking system circuit diagram to show the entire pin wiring

Working

The ph Sensor measures the acidity and alkalinity of the water and the turbidity sensor is used to know the hardness of the water if the values are greater than the given range then the buzzer and led will be turned on else it remains off.  Thus in this way, water quality checking system works.

Conclusion

Here, we detect the purity of the water by calculating the acidity, hardness, etc. so one can be careful about the drinking water. It also alerts if the value goes above a certain limit. In the future, we can connect this to IoT so that we can get real-time data and alert the concerned person through iot. Thus we built a successful water quality checking system project.

Working Code of water quality checking system

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
float calibration_value = 21.34;
int phval = 0; 
unsigned long int avgval; 
int buffer_arr[10],temp;
void setup() {
 
  Serial.begin(9600); //Baud rate: 9600
  lcd.init(); 
  lcd.begin(16, 2);
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("   Welcome ");
  lcd.setCursor(0, 1);
  delay(2000);
  lcd.clear();
}
void phsensor () {
 for(int i=0;i<10;i++) 
 { 
 buffer_arr[i]=analogRead(A0);
 delay(30);
 }
 for(int i=0;i<9;i++)
 {
 for(int j=i+1;j<10;j++)
 {
 if(buffer_arr[i]>buffer_arr[j])
 {
 temp=buffer_arr[i];
 buffer_arr[i]=buffer_arr[j];
 buffer_arr[j]=temp;
 }
 }
 }
 avgval=0;
 for(int i=2;i<8;i++)
 avgval+=buffer_arr[i];
 float volt=(float)avgval*5.0/1024/6;
 float ph_act = -5.70 * volt + calibration_value;
 lcd.setCursor(0, 0);
 lcd.print("pH Val:");
 lcd.setCursor(8, 0);
 lcd.print(ph_act);
 delay(1000);
}
 
void turbiditysensor() {
  int sensorValue = analogRead(A0);   // read the input on analog pin 0:
  float voltage = sensorValue         * (5.0 / 1024.0); // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  Serial.println(voltage);          // print out the value you read:
  delay(500);
}
void loop(){
  phsensor ();
  turbiditysensor();
  }

If You Face Any Issue Feel Free To Contact us Any Time.

+91 7075575787