TDS Measurement for Water Purity

Introduction

This experiment shows how to measure the Total Dissolved Solids (TDS) in water to assess its purity using a TDS sensor.

TDS Sensor

Components Needed

Circuit Setup

  1. Connect the TDS sensor’s VCC and GND pins to the 5V and GND on the Arduino.
  2. Connect the sensor's output pin to an analog input pin (e.g., A0) on the Arduino.

The TDS sensor measures the concentration of dissolved solids in water, which is an indicator of water purity.

TDS Sensor Circuit Setup

Code for TDS Measurement

Upload the following code to your Arduino to measure TDS levels:


const int tdsPin = A0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int tdsValue = analogRead(tdsPin);
  Serial.print("TDS Level: ");
  Serial.println(tdsValue);
  delay(1000);
}
            

Explanation

The TDS sensor measures the electrical conductivity of water, which is proportional to the concentration of dissolved solids. The Arduino processes this signal and provides the TDS level.

Troubleshooting