Component guide · Beginner · 3 min read
Analog TDS Sensor (DFRobot Gravity and Grove)

Wiring, Temperature Compensation and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
An analog TDS sensor measures the conductivity of water with a two-pin probe and an AC excitation board, then outputs 0 to 2.3 V that converts to dissolved solids in ppm. It is used for RO filters, aquariums and hydroponic nutrient levels. Add a DS18B20 to correct for temperature, and calibrate once against a known solution or a TDS pen.
Key specs at a glance
- Range
- 0 to 1000 ppm (Gravity) or up to 3000 ppm on some probes
- Accuracy
- About +/-10 percent of full scale
- Supply
- 3.3 to 5.5 V
- Output
- 0 to 2.3 V analog
- Probe
- Waterproof, two electrodes, not for hot water above 55 C
- Excitation
- AC signal to avoid probe polarisation
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1DFRobot Gravity Analog TDS Sensor Meter for Arduino – Waterproof Probe, 0-1000ppm₹1,489
Option 2Analog TDS Sensor Module – 0-2.3V Output, Waterproof Probe₹479
Option 3Analog TDS Water Quality Sensor Module₹368
Option 4Seeed Studio Grove TDS Sensor/Meter For Water Quality – Analog Output, Waterproof Probe₹1,959
Option 5TDS Water Quality Sensor Probe – 0-3000 ppm, 5V DC, Plug 1/4″ PE₹168
What the Analog TDS sensor is
An analog TDS sensor measures how well water conducts electricity and turns it into an estimate of dissolved solids in parts per million.
Conductivity rises about 2 percent per degree C, so the reading is corrected to 25 C: compensated voltage = V / (1 + 0.02 x (T - 25)). The standard DFRobot formula then turns voltage into ppm.
Do not run a TDS probe and a pH probe in the same small container at the same time without isolation; the TDS excitation upsets the pH reading.
Analog TDS sensor pinout
The pins on the Analog TDS sensor and what each one does.
| Pin | Function |
|---|---|
| + / VCC | 3.3 to 5 V |
| - / GND | Ground |
| A / AOUT | Analog output |
| Probe | XH2.54 two-pin connector |
- + / VCC
- 3.3 to 5 V
- - / GND
- Ground
- A / AOUT
- Analog output
- Probe
- XH2.54 two-pin connector
Wiring the Analog TDS sensor
Connect the Analog TDS sensor like this.
| Analog TDS sensor pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC | 5V | 3V3 |
| GND | GND | GND |
| AOUT | A1 | GPIO 35 |
- VCC
- Arduino Uno:
- 5V
- ESP32:
- 3V3
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- AOUT
- Arduino Uno:
- A1
- ESP32:
- GPIO 35
Example code
This is DFRobot's published conversion. Multiply by a correction factor if your reading differs from a calibrated TDS pen in the same water.
const float VREF = 5.0;
float temperature = 25.0; // replace with a DS18B20 reading
void setup() { Serial.begin(9600); }
void loop() {
float v = analogRead(A1) * VREF / 1024.0;
float comp = v / (1.0 + 0.02 * (temperature - 25.0));
float tds = (133.42 * comp * comp * comp - 255.86 * comp * comp + 857.39 * comp) * 0.5;
Serial.print(tds, 0); Serial.println(" ppm");
delay(1000);
}Setup and tuning
measure water temperature with a DS18B20 and correct the reading to 25 C.
dip the probe in a known solution (for example 707 ppm) and adjust the factor in your code.
take a median of 20 or more readings; single readings jump.
only the probe goes in water. Keep the board in a dry box.
remove the TDS probe while other probes such as pH share the same water, or isolate their supplies.
What you need
Shop this list9 of 10 found in our store · ₹5,555
DFRobot Gravity Analog TDS Sensor Meter for Arduino – Waterproof Probe, 0-1000ppm: the part this guide coversDFRobot Gravity Analog TDS Sensor Meter for Arduino₹1,464
Generic Analog TDS Sensor Module – 0-2.3V Output, Waterproof Probe: another version this guide coversAnalog TDS Sensor Module – 0-2.3V Output, Waterproof Probe₹479
Analog TDS Water Quality Sensor Module: another version this guide coversAnalog TDS Water Quality Sensor Module₹368
Seeed Studio Studio Grove TDS Sensor/Meter For Water Quality – Analog Output, Waterproof Probe: another version this guide coversSeeed Studio Grove TDS Sensor/Meter For Water Quality – Analog Output, Waterproof Probe₹1,959Closest match, check the specs
Generic TDS Water Quality Sensor Probe – 0-3000 ppm, 5V DC, Plug 1/4″ PE: another version this guide coversTDS Water Quality Sensor Probe – 0-3000 ppm, 5V DC, Plug 1/4″ PE₹168- Uno R3 development board: the controller used in the wiring tableFind this part
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
DS18B20 waterproof temperature probe: temperature for compensationSonoff DS18B20 Waterproof Temperature Sensor Probe w/ 1m Cable – 1-Wire Interface₹340
Mini peristaltic dosing pump: to dose nutrient or pH solutionMini Peristaltic Dosing Pump₹249
0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
Alternatives and when to choose them
- pH and TDS pen meters: handheld testers for checking.
- Analog pH sensor: the other key hydroponics reading.
- Water quality sensors: overview of probes.
Common mistakes to avoid
- Treating the TDS reading as a drinking water safety test.
- Skipping temperature compensation.
- Putting the circuit board in the water as well as the probe.
- Running TDS and pH probes from the same supply in the same tank.
Frequently asked questions
Can a TDS sensor tell me if water is safe to drink?
No. It measures dissolved salts, not germs, metals or chemicals, so it is a guide for filters, not a safety test.
Why does my reading change with temperature?
Conductivity rises with temperature. Measure temperature and apply compensation for stable readings.
Can I leave the probe in water all the time?
It is fine for monitoring, but clean it regularly. Keep it out of water above about 55 C.
What range does the sensor cover?
The Gravity version reads about 0 to 1000 ppm. Seawater and strong nutrient solutions are out of range.
Why do readings jump when a pH probe is in the same tank?
Both probes put signals into the water. Isolate their power or measure them one at a time.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.


