Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use TDS SENSOR: Examples, Pinouts, and Specs

Image of TDS SENSORDesign with TDS SENSOR in Cirkit Designer

Introduction

Explore Projects Built with TDS SENSOR

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Based TDS Meter for Water Quality Monitoring: A project utilizing TDS SENSOR in a practical application
ESP32-Based TDS Meter for Water Quality Monitoring

This circuit connects a TDS (Total Dissolved Solids) sensor to an ESP32 microcontroller. The TDS sensor's power is supplied by the ESP32's 3.3V and ground pins, and its analog output is connected to GPIO 35 of the ESP32 for measurement. The purpose of this circuit is to enable the ESP32 to read the TDS level of a solution, which is commonly used in water quality testing.

Open Project in Cirkit Designer

Technical Specifications

Pin Configuration and Descriptions

Pin Name Description
VCC Power supply input (3.3V - 5.0V DC)
GND Ground connection
AOUT Analog output signal

Usage Instructions

How to Use the TDS Sensor in a Circuit

  1. Connect the Sensor:

    • Connect the VCC pin to a 3.3V or 5.0V power source.
    • Connect the GND pin to the ground of the circuit.
    • Connect the AOUT pin to an analog input pin of a microcontroller (e.g., Arduino UNO).
  2. Calibrate the Sensor:

    • Use a known TDS solution (e.g., 342 ppm calibration solution) to calibrate the sensor.
    • Adjust the calibration potentiometer on the sensor module until the output matches the known TDS value.
  3. Place the Probe:

    • Submerge the stainless steel probe in the liquid to be tested. Ensure the probe is fully immersed but avoid submerging the entire module.
  4. Read the Output:

    • The sensor outputs an analog voltage proportional to the TDS value. Use an ADC (Analog-to-Digital Converter) to read the signal.

Important Considerations and Best Practices

Example Code for Arduino UNO

// 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
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings:

    • Solution: Check the wiring and ensure the sensor is powered correctly. Verify the probe is fully submerged in the liquid.
  2. Fluctuating Readings:

    • Solution: Ensure the liquid is still and free of air bubbles. Use a stable power supply to avoid noise.
  3. Corrosion or Residue on the Probe:

    • Solution: Clean the probe with distilled water and a soft cloth. Avoid using abrasive materials.
  4. Inconsistent Calibration:

    • Solution: Use a fresh calibration solution and ensure the potentiometer is adjusted carefully.

FAQs