Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

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

Image of TDS sensor
Cirkit Designer LogoDesign with TDS sensor in Cirkit Designer

Introduction

A TDS (Total Dissolved Solids) sensor measures the concentration of dissolved solids in water, providing an indication of water quality and purity. It is widely used in applications such as water filtration systems, aquariums, hydroponics, and environmental monitoring. By measuring the electrical conductivity of water, the TDS sensor estimates the total amount of dissolved ions, such as salts, minerals, and metals, in parts per million (ppm).

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!
ESP32-Based Environmental Monitoring System with Wi-Fi Connectivity
Image of Smart_city: A project utilizing TDS sensor  in a practical application
This circuit is an environmental monitoring system using an ESP32 microcontroller to collect data from various sensors, including temperature, humidity, air quality, pH, and TDS sensors. The collected data is displayed on an OLED screen, sent to ThingSpeak for remote monitoring, and email alerts are sent if critical thresholds are exceeded.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based TDS Meter for Water Quality Monitoring
Image of test: A project utilizing TDS sensor  in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Water Quality Monitoring System with DS18B20 and Turbidity Sensor
Image of Copy of AquaSense: A project utilizing TDS sensor  in a practical application
This circuit is a water quality monitoring system that uses an ESP32 microcontroller to measure TDS, pH, temperature, and turbidity of water. The system includes sensors for each parameter and a start switch, with data being displayed on a 16x2 I2C LCD and logged via serial communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Leonardo-Based pH and TDS Sensor with OLED Display
Image of Exhibition Arduino- 2: A project utilizing TDS sensor  in a practical application
This circuit is designed to measure pH and TDS (Total Dissolved Solids) levels in a solution using a pH sensor and a TDS sensor, respectively, interfaced with an Arduino Leonardo. The measured data is then displayed on a 0.96" OLED screen.
Cirkit Designer LogoOpen Project in Cirkit Designer

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 Smart_city: A project utilizing TDS sensor  in a practical application
ESP32-Based Environmental Monitoring System with Wi-Fi Connectivity
This circuit is an environmental monitoring system using an ESP32 microcontroller to collect data from various sensors, including temperature, humidity, air quality, pH, and TDS sensors. The collected data is displayed on an OLED screen, sent to ThingSpeak for remote monitoring, and email alerts are sent if critical thresholds are exceeded.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of test: 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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of AquaSense: A project utilizing TDS sensor  in a practical application
ESP32-Based Water Quality Monitoring System with DS18B20 and Turbidity Sensor
This circuit is a water quality monitoring system that uses an ESP32 microcontroller to measure TDS, pH, temperature, and turbidity of water. The system includes sensors for each parameter and a start switch, with data being displayed on a 16x2 I2C LCD and logged via serial communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Exhibition Arduino- 2: A project utilizing TDS sensor  in a practical application
Arduino Leonardo-Based pH and TDS Sensor with OLED Display
This circuit is designed to measure pH and TDS (Total Dissolved Solids) levels in a solution using a pH sensor and a TDS sensor, respectively, interfaced with an Arduino Leonardo. The measured data is then displayed on a 0.96" OLED screen.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Below are the key technical details and pin configuration for a typical TDS sensor module:

Key Technical Details

  • Input Voltage: 3.3V to 5.0V DC
  • Output Signal: Analog voltage (proportional to TDS value)
  • Measurement Range: 0 to 1000 ppm (can vary by model)
  • Accuracy: ±10% of the measured value
  • Temperature Compensation: Built-in (some models)
  • Probe Material: Stainless steel
  • Operating Temperature: 0°C to 60°C
  • Cable Length: Typically 1 meter (varies by model)

Pin Configuration

The TDS sensor module typically has three pins for connection:

Pin Name Description
1 VCC Power supply input (3.3V to 5.0V DC)
2 GND Ground connection
3 AOUT Analog output signal, proportional to the TDS value (connects to an ADC pin)

Usage Instructions

How to Use the TDS Sensor in a Circuit

  1. Connect the Sensor:

    • Connect the VCC pin of the TDS sensor module to the 5V pin of your microcontroller (e.g., Arduino UNO).
    • Connect the GND pin to the ground (GND) of the microcontroller.
    • Connect the AOUT pin to an analog input pin (e.g., A0) on the microcontroller.
  2. Place the Probe:

    • Submerge the stainless steel probe into the water sample. Ensure the probe is fully immersed but avoid submerging the module itself.
  3. Calibrate the Sensor:

    • Use a known TDS solution (e.g., 342 ppm calibration solution) to calibrate the sensor for accurate readings.
  4. Read the Output:

    • The sensor outputs an analog voltage proportional to the TDS value. Use the microcontroller's ADC to convert this voltage into a digital value and calculate the TDS in ppm.

Important Considerations and Best Practices

  • Avoid Corrosion: Clean the probe regularly to prevent corrosion or buildup of contaminants.
  • Temperature Compensation: If your sensor does not have built-in temperature compensation, account for temperature variations in your calculations.
  • Avoid Immersing the Module: Only the probe is waterproof; the module should remain dry.
  • Power Supply: Ensure a stable power supply to avoid fluctuations in readings.

Example Code for Arduino UNO

Below is an example code to interface the TDS sensor with an Arduino UNO:

// Include necessary libraries
const int TDS_PIN = A0;  // Analog pin connected to the TDS sensor's AOUT pin
float voltage;           // Variable to store the sensor's output voltage
float tdsValue;          // Variable to store the calculated TDS value in ppm
const float VREF = 5.0;  // Reference voltage of the Arduino (5V for UNO)
const int ADC_RES = 1024; // ADC resolution (10-bit for Arduino UNO)

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 / float(ADC_RES)) * VREF;  // Convert ADC value to voltage
  tdsValue = (voltage * 1000) / 2;  // Convert voltage to TDS value (calibration factor: 2)

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

Note: The calibration factor (2 in this example) may vary depending on the sensor model and water sample. Adjust it for accurate results.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Inaccurate Readings:

    • Cause: Sensor not calibrated.
    • Solution: Calibrate the sensor using a known TDS solution.
  2. Fluctuating Values:

    • Cause: Unstable power supply or electrical noise.
    • Solution: Use a decoupling capacitor near the sensor module and ensure a stable power source.
  3. No Output or Zero Reading:

    • Cause: Incorrect wiring or damaged probe.
    • Solution: Verify connections and check the probe for physical damage.
  4. Corroded Probe:

    • Cause: Prolonged exposure to water without cleaning.
    • Solution: Clean the probe with distilled water and a soft cloth.

FAQs

  • Q: Can the TDS sensor measure salinity?

    • A: Indirectly, yes. TDS sensors measure dissolved ions, which include salts, but they do not provide a direct salinity reading.
  • Q: Can I use the TDS sensor in hot water?

    • A: Most TDS sensors operate up to 60°C. Check your sensor's specifications before use in hot water.
  • Q: How often should I calibrate the sensor?

    • A: Calibration frequency depends on usage. For critical applications, calibrate weekly or before each use.
  • Q: Can I extend the probe cable?

    • A: Yes, but longer cables may introduce noise. Use shielded cables to minimize interference.