

A TDS (Total Dissolved Solids) sensor is an electronic device used to measure the concentration of dissolved solids in a liquid. These dissolved solids include minerals, salts, and organic compounds, which affect the conductivity of the liquid. The sensor provides a TDS value in parts per million (ppm), which is a key indicator of water quality.








Below are the key technical details and pin configuration for a typical TDS sensor module:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V - 5.0V |
| Operating Current | 3-6 mA |
| Measurement Range | 0 - 1000 ppm |
| Accuracy | ±10% (25°C calibration) |
| Output Signal | Analog voltage (0-2.3V typical) |
| Temperature Compensation | Supported (via external probe) |
| Operating Temperature | 0°C - 60°C |
| Pin Name | Description |
|---|---|
| VCC | Power supply input (3.3V - 5.0V) |
| GND | Ground connection |
| AOUT | Analog output signal proportional to TDS value |
Connect the Sensor Module:
VCC pin to a 3.3V or 5V power source.GND pin to the ground of your circuit.AOUT pin to an analog input pin of your microcontroller (e.g., Arduino).Calibrate the Sensor:
Measure TDS:
AOUT pin and convert it to a TDS value using the formula provided in the sensor's datasheet.Below is an example of how to use a TDS sensor with an Arduino UNO:
// Define the analog pin connected to the TDS sensor
const int tdsPin = A0;
// Calibration factor for converting voltage to TDS (adjust as needed)
const float calibrationFactor = 0.5;
// Variable to store the analog reading
int analogValue = 0;
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(tdsPin, INPUT); // Set the TDS pin as input
}
void loop() {
// Read the analog value from the TDS sensor
analogValue = analogRead(tdsPin);
// Convert the analog value to voltage (assuming 5V reference)
float voltage = analogValue * (5.0 / 1023.0);
// Calculate the TDS value in ppm
float tdsValue = voltage / calibrationFactor;
// Print the TDS value to the Serial Monitor
Serial.print("TDS Value: ");
Serial.print(tdsValue);
Serial.println(" ppm");
delay(1000); // Wait for 1 second before the next reading
}
Inaccurate Readings:
No Output or Fluctuating Values:
Sensor Not Responding:
Readings Drift Over Time:
Q: Can the TDS sensor measure salinity?
A: While the TDS sensor measures dissolved solids, it is not specifically designed for salinity measurement. However, it can provide an approximate salinity value in ppm.
Q: Is the TDS sensor waterproof?
A: Only the probe is waterproof. The module must be kept dry to avoid damage.
Q: How often should I calibrate the sensor?
A: Calibration frequency depends on usage. For critical applications, calibrate before each use. For general use, calibrate monthly or as needed.
Q: Can I use the TDS sensor with a 3.3V microcontroller?
A: Yes, the sensor operates at 3.3V and 5V, making it compatible with most microcontrollers.