Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›Analog TDS Sensor (DFRobot Gravity and Grove)

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

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the Analog TDS sensor isAnalog TDS sensor pinoutWiring the Analog TDS sensorExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

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
01

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.

Caution

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.

02

Analog TDS sensor pinout

The pins on the Analog TDS sensor and what each one does.

PinFunction
+ / VCC3.3 to 5 V
- / GNDGround
A / AOUTAnalog output
ProbeXH2.54 two-pin connector
PinFunction
+ / VCC
3.3 to 5 V
- / GND
Ground
A / AOUT
Analog output
Probe
XH2.54 two-pin connector
03

Wiring the Analog TDS sensor

Connect the Analog TDS sensor like this.

Analog TDS sensor pinArduino UnoESP32
VCC5V3V3
GNDGNDGND
AOUTA1GPIO 35
VCC
Arduino Uno:
5V
ESP32:
3V3
GND
Arduino Uno:
GND
ESP32:
GND
AOUT
Arduino Uno:
A1
ESP32:
GPIO 35
04

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.

TDS with temperature compensation (Uno) · Arduino C++Verify & upload in Electrolark
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);
}
05

Setup and tuning

Temperature compensation

measure water temperature with a DS18B20 and correct the reading to 25 C.

Calibration

dip the probe in a known solution (for example 707 ppm) and adjust the factor in your code.

Averaging

take a median of 20 or more readings; single readings jump.

Probe in, board dry

only the probe goes in water. Keep the board in a dry box.

Interference

remove the TDS probe while other probes such as pH share the same water, or isolate their supplies.

06

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
07

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.
08

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.
09

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

  • DFRobot Gravity Analog TDS Sensor Meter for Arduino – Waterproof Probe, 0-1000ppm
    ₹1,489View
  • Analog TDS Sensor Module – 0-2.3V Output, Waterproof Probe
    ₹479View
  • Analog TDS Water Quality Sensor Module
    ₹368View
  • Seeed Studio Grove TDS Sensor/Meter For Water Quality – Analog Output, Waterproof Probe
    ₹1,959View
  • TDS Water Quality Sensor Probe – 0-3000 ppm, 5V DC, Plug 1/4″ PE
    ₹168View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • DS18B20 Waterproof Temperature Sensor Probe w/ 1.8m Cable – 1-Wire Digital Interface
    ₹1,679View
  • Mini Peristaltic Dosing Pump
    ₹249View
  • 0.96" OLED Display 128x64
    ₹139View
Shop Water, Liquid Level & Flow Sensors

Keep learning

Buying guideIntermediateWater Quality SensorsHow analog pH, TDS and turbidity sensor kits work, calibration with buffer solutions, temperature compensation, probe care, and why TDS is not a safety test.3 min read · SensorsComponent guideIntermediateAnalog pH Sensor Kit (BNC Probe and PH-4502C Board)An analog pH kit pairs a glass pH electrode with a small amplifier board that turns the electrode's millivolts into a 0 to 5 V signal.3 min read · SensorsComponent guideBeginnerDigital pH Pen and TDS/EC MeterPen-style pH and TDS/EC meters are pocket testers for drinking water, aquariums, hydroponics and science labs.3 min read · Tools & Workshop SkillsComponent guideBeginnerDS18B20 Waterproof Temperature SensorThe DS18B20 is a digital temperature sensor that talks over a single data wire called 1-Wire.3 min read · Sensors

Sources

  • DFRobot Gravity analog TDS sensor wiki
  • Seeed Grove TDS sensor wiki

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the Analog TDS sensor isAnalog TDS sensor pinoutWiring the Analog TDS sensorExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)8 items · ₹4,761

DFRobot Gravity Analog TDS Sensor Meter for Arduino – Waterproof Probe, 0-1000ppm · DFRobot Gravity Analog TDS Sensor Meter for Arduino · Analog TDS Sensor Module – 0-2.3V Output, Waterproof Probe · Analog TDS Water Quality Sensor Module · TDS Water Quality Sensor Probe – 0-3000 ppm, 5V DC, Plug 1/4″ PE · Sonoff DS18B20 Waterproof Temperature Sensor Probe w/ 1m Cable – 1-Wire Interface · Mini Peristaltic Dosing Pump · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

TDS from the probe voltage with 25 °C compensation. Tap water is usually 100 to 400 ppm.

Serial monitor9600 baud
226 ppm

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question