• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Water Quality Test Circuit using Arduino and Turbidity Sensor

Water Quality Test Circuit using Arduino and Turbidity Sensor

Last updated on 11 September 2025 by Admin-Lavi Leave a Comment

Water looks clean but can hide dirt we cannot see.

Tiny dust, clay and silt make water cloudy.

This cloudy thing is called turbidity.

More turbidity means more dirt and bad water.

Less turbidity means clean and safe water.

This project uses Arduino and turbidity sensor to check water.

It shows result on LCD and color lights.

This article shows working, coding and how to build it.

Circuit Coding:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);

int sensorPin = A0;
int red = 2;
int green = 3;
int blue = 4;

void setup() {
lcd.init();
lcd.backlight();
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
pinMode(blue, OUTPUT);
}

void loop() {
int value = analogRead(sensorPin);
float voltage = (value / 1023.0) * 5.0;
lcd.setCursor(0,0);
lcd.print("Turbidity:");
lcd.setCursor(0,1);
lcd.print(voltage);
lcd.print(" V");

if(voltage > 4.0){
digitalWrite(red, HIGH);
digitalWrite(green, LOW);
digitalWrite(blue, LOW);
}
else if(voltage > 2.5){
digitalWrite(red, LOW);
digitalWrite(green, LOW);
digitalWrite(blue, HIGH);
}
else{
digitalWrite(red, LOW);
digitalWrite(green, HIGH);
digitalWrite(blue, LOW);
}
delay(1000);
}

Coding Explanation:

  • Add LCD library.
  • Set sensor pin as A0.
  • Set RGB LED pins as D2, D3, D4.
  • In setups start LCD.
  • Turn ON LCD backlight.
  • Set RGB pins as output.
  • In loop read sensor value from A0.
  • Change value to voltage.
  • Show voltage on LCD.
  • If voltage > 4.0 then red LED will be ON.
  • Else if voltage > 2.5 then blue LED will be ON.
  • Else green LED will be ON.
  • Wait 1 second.
  • Loop runs again.
  • Arduino keeps checking water.

Circuit Working:

Water Quality Test Circuit Diagram using Arduino and Turbidity Sensor

Parts List:

ComponentQuantity
Resistor
220Ω 1/4 watt3
Semiconductors
Arduino Uno1
Turbidity Sensor Module1
SPI/I2C Serial 16×2 Character LCD Backpack1
RGB LED (Common Cathode)1

Turbidity sensor has IR LED and photodiode inside.

Clear water lets more light pass.

Dirty water blocks light.

Sensor gives analog output voltage.

Arduino reads this from A0.

Arduino shows value on LCD through I2C.

RGB LED gives quick visual signal.

For each LED pins resistor R1 to R3 are connected to limit the current flowing through it.

LCD and RGB LED connect to digital pins.

Put sensor in water.

Arduino reads analog value.

When water is clean then voltage is low.

When water is dirty then voltage goes high.

Arduino checks voltage and changes LED color.

LCD shows the voltage.

Through this user can know water quality.

Formulas:

Below is the general formula for Water Quality Test Circuit using Arduino and Turbidity Sensor:

Voltage = (AnalogValue / 1023) * 5

Example: if AnalogValue = 820 then

Voltage = (820/1023)*5 = 4.00V

Higher voltage means more turbidity

Lower voltage means less turbidity

How to Build:

To build a Water Quality Test Circuit using Arduino and Turbidity Sensor follow the below steps for connections:

  • Gather all parts as shown in circuit diagram.
  • Turbidity sensor 5V go to Arduino 5V.
  • Turbidity sensor GND go to Arduino GND.
  • Turbidity sensor analog pin go to Arduino A0.
  • Connect LCD VCC to Arduino 5V.
  • Connect LCD GND to Arduino GND.
  • Connect LCD SDA to Arduino A4.
  • Connect LCD SCL to Arduino A5.
  • Connect RGB LED common cathode to Arduino GND.
  • Connect RGB LED Red pin to Arduino D2.
  • Connect RGB LED Green pin to Arduino D3.
  • Connect RGB LED Blue pin to Arduino D4.
  • And cathode pin 2 of RGB LED connect to GND
  • Add resistors R1 to R3 220Ω in series with each LED pin (R, G, B)

Conclusion:

This project for Water Quality Test Circuit using Arduino and Turbidity Sensor is easy and with low cost.

It checks water quality using turbidity sensor.

Arduino shows result on LCD and color lights.

It helps to know clean or dirty water.

Useful for home, school and lab use.

References:

Measuring Water Quality using Arduino and Turbidity
Sensor

Filed Under: Arduino Projects, Indicator Circuits, Sensors and Detectors

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Arduino with Non Contact Liquid Sensor Circuit

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • Alarm Circuits (33)
  • Amplifier Circuits (67)
  • Arduino Projects (39)
  • Audio Circuits (95)
  • Automobile Circuits (19)
  • Battery Charger Circuits (48)
  • Free Energy (13)
  • Heater and Temperature Controllers (10)
  • High Voltage (1)
  • Indicator Circuits (39)
  • Inverter Circuits (13)
  • LDR Circuits (15)
  • LED and Lamps (116)
  • Meters and Testers (28)
  • Motor Controllers (18)
  • Oscillator Circuits (34)
  • Power Supply Circuits (92)
  • Remote Control Circuits (6)
  • Security and Protection (25)
  • Sensors and Detectors (86)
  • Solar Circuits (17)
  • Timer Circuits (30)
  • Transistor Circuits (57)
  • Transmitter Circuit (12)
  • Tutorials (5)
  • Water Level Controller (4)

Recent Posts

  • Water Quality Test Circuit using Arduino and Turbidity Sensor
  • Arduino with Non Contact Liquid Sensor Circuit
  • Arduino Piano Music Keyboard with Memory Circuit
  • Sound Sensor Circuit using IC LM393
  • Sound Sensor Direction Circuit using Arduino

Recent Comments

  1. Admin-Lavi on Constant Voltage, Constant Current Battery Charger Circuit
  2. Bill on Constant Voltage, Constant Current Battery Charger Circuit
  3. Admin-Lavi on Long Range FM Transmitter Circuit (2km)
  4. Sina on Long Range FM Transmitter Circuit (2km)
  5. Admin-Lavi on Long Range FM Transmitter Circuit (2km)

Copyright © 2025 | New Circuit Ideas