

A TDs (Total Dissolved Solids) sensor measures the concentration of dissolved solids in a liquid, typically expressed in parts per million (ppm). It is widely used in water quality monitoring and treatment applications to assess the purity of water. The sensor works by measuring the electrical conductivity of the liquid, which correlates to the concentration of dissolved ions.








Below are the key technical details for a typical TDs sensor module:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V - 5V |
| Operating Current | 10mA (typical) |
| Measurement Range | 0 - 1000 ppm |
| Accuracy | ±10% |
| Output Signal | Analog voltage (0 - 2.3V) |
| Temperature Compensation | Yes (via external temperature probe) |
| Compatible Microcontrollers | Arduino, ESP32, Raspberry Pi |
| Pin Name | Description |
|---|---|
| VCC | Power supply input (3.3V - 5V) |
| GND | Ground connection |
| AOUT | Analog output signal (proportional to TDS) |
| TEMP | Optional connection for temperature probe |
Connect the Sensor to a Microcontroller:
VCC pin to the 5V (or 3.3V) pin of your microcontroller.GND pin to the ground (GND) of your microcontroller.AOUT pin to an analog input pin (e.g., A0 on an Arduino UNO).Calibrate the Sensor:
Temperature Compensation:
TEMP pin for more accurate readings.Read the Analog Signal:
Below is an example code snippet to interface the TDs sensor with an Arduino UNO:
// Include necessary libraries
const int TDS_PIN = A0; // Analog pin connected to the sensor's AOUT pin
float voltage, tdsValue;
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(TDS_PIN, INPUT); // Set the TDS pin as input
}
void loop() {
int sensorValue = analogRead(TDS_PIN); // Read the analog value from the sensor
voltage = sensorValue * (5.0 / 1023.0); // Convert ADC value to voltage
tdsValue = (voltage * 1000) / 2.3; // Convert voltage to TDS (ppm)
// 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
}
No Output or Incorrect Readings:
Fluctuating Readings:
Corrosion or Damage to the Probe:
Temperature Compensation Not Working:
Q: Can the TDs sensor measure salinity?
A: While the TDs sensor measures dissolved solids, it can indirectly indicate salinity. However, for precise salinity measurements, a dedicated salinity sensor is recommended.
Q: Is the TDs sensor waterproof?
A: The probe is waterproof, but the sensor module itself is not. Ensure the module is kept dry during operation.
Q: Can I use the TDs sensor with a 3.3V microcontroller?
A: Yes, the sensor is compatible with both 3.3V and 5V systems. Ensure the output voltage range matches the ADC input range of your microcontroller.
Q: How often should I calibrate the sensor?
A: Calibration frequency depends on usage. For critical applications, calibrate the sensor monthly or whenever accuracy is in doubt.