💧 Introduction to TDS Sensor
A TDS Sensor (Total Dissolved Solids Sensor) is an electronic sensor used to measure the amount of dissolved substances in water.
These dissolved substances may include:
-
Salts
-
Minerals
-
Metals
-
Organic matter
-
Impurities
The sensor measures water purity and gives the result in:
PPM (Parts Per Million)
🔬 What is TDS?
TDS stands for:
Total Dissolved Solids
It represents the total concentration of dissolved particles in water.
Example:
If water contains 200 mg of dissolved solids in 1 liter of water,
then TDS = 200 ppm.
📊 TDS Water Quality Classification
| TDS Value (PPM) | Water Quality | Usage |
|---|---|---|
| 0 – 50 | Very Pure | RO / Distilled |
| 50 – 150 | Excellent | Drinking |
| 150 – 300 | Good | Drinking |
| 300 – 500 | Fair | Acceptable |
| 500 – 1000 | Poor | Not recommended |
| 1000+ | Unsafe | Harmful |
WHO recommended drinking water:
✔ Below 300 ppm
⚙ Working Principle of TDS Sensor
TDS sensor works on the principle of:
Electrical Conductivity
Explanation:
1️⃣ Pure water conducts very little electricity
2️⃣ Dissolved salts and minerals increase conductivity
3️⃣ More dissolved solids → More electrical conductivity
4️⃣ Sensor measures conductivity
5️⃣ Converts it into voltage
6️⃣ Microcontroller converts voltage into PPM value
🔌 Parts of Analog TDS Sensor Module
Most analog TDS modules consist of:
🔹 1️⃣ TDS Probe
-
Two electrodes
-
Placed in water
-
Measures conductivity
🔹 2️⃣ Signal Conditioning Board
-
Amplifies signal
-
Converts conductivity to analog voltage
-
Provides stable output
📌 Pin Configuration
| Pin | Function |
|---|---|
| VCC | Power (3.3V or 5V) |
| GND | Ground |
| AO | Analog Output |
AO gives voltage proportional to TDS value.
🧠 How ESP32 Uses TDS Sensor
1️⃣ ESP32 reads analog voltage (0–3.3V)
2️⃣ Converts ADC value (0–4095)
3️⃣ Applies calibration formula
4️⃣ Calculates TDS value in PPM
5️⃣ Displays on Serial / IoT Dashboard
📐 Basic TDS Calculation Formula
Typical formula used:
Voltage = ADC_Value × (3.3 / 4095)
TDS = (133.42 × V³ – 255.86 × V² + 857.39 × V) × 0.5
Where:
V = Sensor output voltage
This formula converts voltage to TDS (ppm).
🌍 Applications of TDS Sensor
-
Drinking water monitoring
-
RO filter monitoring
-
Water purification plants
-
Aquarium water monitoring
-
Fish farming
-
River water testing
-
Smart city water systems
⚖ Advantages of TDS Sensor
✔ Easy to use
✔ Low cost
✔ Analog output
✔ Compatible with ESP32
✔ Real-time measurement
⚠ Limitations of TDS Sensor
⚠ Does not identify specific contaminants
⚠ Temperature affects reading
⚠ Needs calibration
⚠ Cannot detect bacteria
TDS measures quantity of dissolved solids,
not the type of impurity.
🎯 What Students Will Learn
After this lesson, students will understand:
-
What TDS means
-
How water purity is measured
-
Conductivity concept
-
Voltage to PPM conversion
-
Environmental monitoring systems
📌 Lesson Summary
A TDS Sensor measures the total dissolved solids in water by detecting electrical conductivity.
Higher dissolved solids → Higher conductivity → Higher PPM value.
It is widely used in:
-
Water quality monitoring
-
RO plants
-
Environmental IoT systems
This sensor forms the foundation of our:
💧 Smart Water Quality Monitoring System (Module 8)

