Skip to content

How To Interface TDS Water Conductivity Sensor Module with Arduino

Introduction:

Analog TDS Conductivity sensor is used for measuring the TDS value of the water, this TDS values define the cleanliness of the water. It can be used to check the quality of domestic water, hydroponic liquids, and in other fields of water quality testing

TDS Sensor Module. The left image shows the probe and the right side shows the module.

TDS Pen is widely available to measure TDS value, but it is not able to communicate the data to a control system like microcontroller, computer, PLC, Arduino, etc. You can use our TDS sensor which can communicate and transmit data to an Arduino or any microcontroller with an analog interface.

Check out our website www.probots.co.in to find all the parts for your projects! We have 2000+ Electronic Modules, Sensors, and Components for all your electronics projects.

You can purchase this signal generator here – Buy Now

What is TDS? Why is it useful to measure it?

TDS stands for Total Dissolved Solids(TDS). It indicates the water quality. In general high TDS, the value indicates high dissolved solids in water and low quality. So TDS values define the cleanliness of the water. The below Image shows the acceptable TDS values for different water sources. 

Image shows the TDS levels of the different water source

Low TDS values of 0-50 are ideal for drinking. High TDS values are not recommended for consumption.

Specification

  • Input Voltage: 3.3~5.5V
  • Output Voltage: 0~2.3V
  • Working Current:3~6mA
  • TDS Measurement Range: 0~1000ppm
  • TDS Measurement Accuracy: ±10% FS(25°C)
  • Number of Needle in TDS Probe: 2
  • Overall length:(approx): 60cm
  • Color of TDS Probe: White and WaterProof Probe
  • Interface Analog output

Note:

  • The probe can not be used in water above 55 degrees centigrade.
  • The probe can not be left too close to the edge of the container, otherwise, it affects the reading. 
  • The Head and the cable of the probe are waterproof, but the connector and signal transmitter board are not waterproof.

Board Overview

TDS controller Board
NumLabelDescription
1-Power GND(0V)
2+Power VCC(3.3V~5.5V)
3AAnalog signal output(0~2.3V)
4TDS ProbeTDS Probe Connector
5LedPower Indicator
Pinout Description

  • Hardware
    • Arduino Uno
    • Analog TDS Water Conductivity Sensor Waterproof Module
    • Jumper wires for connection
    • Liquid for testing
  • Arduino IDE

Connection Diagram

Connection diagram for TDS module and Arduino Uno

Connection Explanation

As you can see this signal Transmitter Board has two connectors. The left one is the TDS probe connector, the right side connector is used to interface this module with the Arduino or any other compatible controller board. The connector pins are labeled with A which is analog output and connected to which analog pin of Arduino,+  which can be connected to 3.3v or 5v,- which is connected to ground pin.

  • Red Wire: connected 5V
  • Block Wire: Connected to gnd
  • Yellow Wire: connected to Analog pin A1(TDS output is Analog output)

Sample Code

#include <EEPROM.h>
#include "GravityTDS.h"  // garvityTDS.h is library used by the dfrobot and is available in 
                            github                  

#define TdsSensorPin A1    // define the TDS sensor pin connected to which analog pin of 
GravityTDS gravityTds;       arduino

float temperature = 25,tdsValue = 0;

void setup()
{
    Serial.begin(115200);
    gravityTds.setPin(TdsSensorPin);
    gravityTds.setAref(5.0);  //reference voltage on ADC, default 5.0V on Arduino UNO
    gravityTds.setAdcRange(1024);  //1024 for 10bit ADC;4096 for 12bit ADC
    gravityTds.begin();  //initialization
}

void loop()
{
    //temperature = readTemperature();  //add your temperature sensor and read it
    gravityTds.setTemperature(temperature);  // set the temperature and execute temperature compensation
    gravityTds.update();  //sample and calculate
    tdsValue = gravityTds.getTdsValue();  // then get the value
    Serial.print(tdsValue,0);
    Serial.println("ppm");
    delay(1000);
}

Install library of GravityTds.h library and run the example program.

Output:

  • Upload the code to the controller board, and open the Serial Monitor.
  • Insert the TDS probe into the water and check the Serial Monitor.
  • Test with different types of water because a different type of water has different ppm values.

Testing the TDS levels of Purified water shown on the right side of the gif, and the left side shows, output at the serial monitor. The TDS level of Purifier is between 0-100.
Testing the TDS levels of Distilled water shown on the right side of the gif, and the left side shows, output at the serial monitor. The TDS level of Distilled Water is 0-2.
Testing the TDS levels of Tap water shown on the right side of the gif, and the left side shows, output at the serial monitor. The TDS level of Tap water is 200 to 400.

Application

  • Fish tank and aquariums: Fish requires a specific  TDS and ph similar to the natural environment in which they live. Freshwater fish require less than 400ppm, with some other freshwater fish requiring less. Saltfish requires TDS readings of between 5000and 500000ppm. Using our Analog TDS module maintain the TDS levels of the Fishtank and aquarium.
  • Hydroponic: A TDS meter is useful for quickly measuring the nutrient concentration of the hydroponic solution. This TDS Probe is Waterproof, so it can be fit in the pipes and measure the organic compounds dissolved in water.
Application of TDS Probe in Purifiers
  • Pool and spas: A low TDS reading of water can help prevent maintenance issues, skin irritation, and algal blooms.
  • Colloidal Silver: There are many consumers of colloidal silver today using a TDS meter to measure their colloidal silver concentration in parts per million(ppm). The  TDS meter gives a relatively accurate measurement. “Colloidal Silver means, tiny silver particles suspended in a liquid”.

How does this sensor work?

A TDS meter is basically an electrical charge(EC) meter, it has two electrodes equally spacing apart, are inserted in water, and provides an ac signal to it. The resistance of the probe changes with conductivity and measures the voltage across the probe, converting it into dc and amplifying it.

The amplified output voltage depends on the conductivity of the liquid. So measuring this voltage we can calculate the TDS.

Water Conductivity process
  • We have two electrodes of known dimension at a known spacing
  • We dip this in liquid and provide an AC signal to it
  • The resistance of the probe changes with conductivity
  • We measure the voltage across the probe, convert it to dc and amplify it.
  • The amplified output voltage depends on the conductivity of the liquid.
  • By Measuring this voltage we can calculate the TDS.

Leave a Reply

Your email address will not be published. Required fields are marked *