Pin Name | Description |
---|---|
VCC | Power supply input (3.3V - 5.0V DC) |
GND | Ground connection |
AOUT | Analog output signal |
Connect the Sensor:
VCC
pin to a 3.3V or 5.0V power source.GND
pin to the ground of the circuit.AOUT
pin to an analog input pin of a microcontroller (e.g., Arduino UNO).Calibrate the Sensor:
Place the Probe:
Read the Output:
// TDS Sensor Example Code for Arduino UNO
// Reads the analog output of the TDS sensor and converts it to ppm
const int TDS_PIN = A0; // Analog pin connected to the TDS sensor
float voltage, tdsValue;
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(TDS_PIN, INPUT); // Set TDS pin as input
}
void loop() {
int sensorValue = analogRead(TDS_PIN); // Read analog value from sensor
voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage (5V reference)
// Convert voltage to TDS value (ppm)
tdsValue = (voltage * 1000) / 2.3; // Assuming 2.3V corresponds to 1000 ppm
// Print the TDS value to the Serial Monitor
Serial.print("TDS Value: ");
Serial.print(tdsValue);
Serial.println(" ppm");
delay(1000); // Wait 1 second before next reading
}
No Output or Incorrect Readings:
Fluctuating Readings:
Corrosion or Residue on the Probe:
Inconsistent Calibration:
Can the TDS sensor measure salinity?
Yes, TDS sensors can indirectly measure salinity, as dissolved salts contribute to the TDS value.
Is the sensor waterproof?
Only the probe is waterproof. The module should not be exposed to water.
Can I use the sensor for hot liquids?
No, the sensor is designed for liquids within the 0°C - 60°C range. Exceeding this range may damage the probe.
How often should I calibrate the sensor?
Calibration frequency depends on usage. For critical applications, calibrate before each use. For general use, calibrate monthly.