π§ 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)
Β Β Β Β Β Β Β Β Β Β Β 
