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 Turbidity Sensor (DFRobot SEN0189 Style)

Component guide · Beginner · 4 min read

Analog Turbidity Sensor (DFRobot SEN0189 Style)

Wiring, NTU Formula 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 turbidity sensor isAnalog turbidity sensor pinoutWiring the Analog turbidity sensorExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

A turbidity sensor shines infrared light through water and measures how much is scattered by particles, so murky water gives a lower output voltage. These modules give an analog signal (about 4.2 V in clear water) and a digital threshold output. They suit washing machine, filter and water tank projects that need to tell clear water from cloudy, rather than lab-grade NTU readings.

Key specs at a glance

Principle
Infrared light transmission and scattering
Range
0 to about 3000 NTU (hobby modules)
Supply
5 V
Output
Analog 0 to 4.5 V plus digital (threshold)
Probe
Top part waterproof; electronics must stay dry
UART version
DFRobot non-contact sensor reads through a clear pipe

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1DFRobot Gravity Analog Turbidity Sensor for Arduino – Probe w/ Adapter₹1,359
  • Option 2Turbidity Sensor Module for Suspended Solids Detection – 0-4.5V Analog & Digital Output₹769
  • Option 3Turbidity Sensor with Module – 0-1000 NTU Range, Analog/Digital Output₹489
  • Option 4Asair AZDM01 Turbidity Sensor Module – Analog Output₹259
  • Option 5DFRobot Turbidity Sensor Module – Non-contact Optical UART Output for Arduino₹1,259
01

What the Analog turbidity sensor is

A turbidity sensor shines infrared light through water and measures how much reaches the other side, so it shows how cloudy the water is.

The commonly used curve for the DFRobot sensor is NTU = -1120.4 x V^2 + 5742.3 x V - 4352.9, valid from about 2.5 V to 4.2 V at 5 V supply. Treat the result as approximate; ambient light, bubbles and supply voltage all shift readings.

Calibrate by reading clear tap water and noting that value as your reference, then watch how far readings drop.

02

Analog turbidity sensor pinout

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

PinFunction
VCC5 V
GNDGround
AO / OUTAnalog output (A/D switch set to A)
DODigital output on modules with threshold
PinFunction
VCC
5 V
GND
Ground
AO / OUT
Analog output (A/D switch set to A)
DO
Digital output on modules with threshold
03

Wiring the Analog turbidity sensor

Set the module's A/D switch to A for analog. On an ESP32, divide the up to 4.5 V signal down or use an ADS1115.

Analog turbidity sensor pinArduino UnoESP32
VCC5V5V (VIN)
GNDGNDGND
OUTA0GPIO 34 via 10k/20k divider
VCC
Arduino Uno:
5V
ESP32:
5V (VIN)
GND
Arduino Uno:
GND
ESP32:
GND
OUT
Arduino Uno:
A0
ESP32:
GPIO 34 via 10k/20k divider
04

Example code

The curve is approximate. For decisions, compare against your own clear and dirty reference samples.

Read voltage and approximate NTU (Uno) · Arduino C++Verify & upload in Electrolark
void setup() { Serial.begin(9600); }

void loop() {
  long sum = 0;
  for (int i = 0; i < 50; i++) sum += analogRead(A0);
  float v = sum / 50.0 * 5.0 / 1023.0;
  float ntu = (v < 2.5) ? 3000 : -1120.4 * v * v + 5742.3 * v - 4352.9;
  if (ntu < 0) ntu = 0;
  Serial.print(v, 2); Serial.print(" V  "); Serial.print(ntu, 0); Serial.println(" NTU");
  delay(1000);
}
05

Setup and tuning

Supply 5 V

the module is designed for 5 V; on a 3.3 V board use a divider on the output.

Calibrate in clear water

note the voltage in clean water and adjust the NTU formula to match your module.

Keep electronics dry

only the probe tip is waterproof. Seal the cable entry and keep the board dry.

Block stray light

strong sunlight reaching the probe changes the reading; use it in a shaded tank or pipe.

Clean the lens

wipe the probe window regularly, because algae and film look like turbid water.

06

What you need

Shop this list9 of 10 found in our store · ₹4,929

  • DFRobot Gravity Analog Turbidity Sensor for Arduino – Probe w/ Adapter: the part this guide coversDFRobot Gravity Analog Turbidity Sensor for Arduino – Probe w/ Adapter₹1,359
  • Generic Turbidity Sensor Module for Suspended Solids Detection – 0-4.5V Analog & Digital Output: another version this guide coversTurbidity Sensor Module for Suspended Solids Detection – 0-4.5V Analog & Digital Output₹769
  • Generic Turbidity Sensor with Module – 0-1000 NTU Range, Analog/Digital Output: another version this guide coversTurbidity Sensor with Module – 0-1000 NTU Range, Analog/Digital Output₹489
  • Asair AZDM01 Turbidity Sensor Module – Analog Output: another version this guide coversAsair AZDM01 Turbidity Sensor Module – Analog Output₹259
  • DFRobot Turbidity Sensor Module – Non-contact Optical UART Output for Arduino: another version this guide coversDFRobot Turbidity Sensor Module – Non-contact Optical UART Output for Arduino₹1,259
  • 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
  • ADS1115 16-bit 4-channel ADC module: better analog readings, especially on ESP32ADS1115 16-Bit 4-Channel ADC Module₹199
  • 16x2 LCD with I2C: to show readings on a character display16×2 LCD with I2C (RG1602A)₹179Closest match, check the specs
  • Buzzer module 3.3-5 V: for an audible alarmBuzzer Module 3.3–5V₹27
07

Alternatives and when to choose them

  • ✓Water quality sensors: turbidity alongside pH and TDS.
  • ✓Analog TDS sensor: dissolved solids rather than particles.
  • ✓Liquid level sensors: level rather than quality.
08

Common mistakes to avoid

  • !Submerging the whole module instead of only the probe.
  • !Feeding the 4.5 V output straight into a 3.3 V board.
  • !Using the sample NTU formula without calibrating it.
  • !Leaving the probe dirty, so it always reads cloudy.
09

Frequently asked questions

What does NTU mean?

NTU (nephelometric turbidity unit) measures cloudiness; clean drinking water is below about 1 NTU and muddy water reaches hundreds.

How accurate are these modules?

They are good for clear versus cloudy and trend detection, not precise lab NTU measurement.

Can I use it with an ESP32?

Yes, but divide the 0 to 4.5 V output down to below 3.3 V before the ESP32 analog pin.

Why does my reading change in sunlight?

The sensor uses infrared light, and sunlight adds to it. Shade the probe for steady readings.

What is the digital output for?

It switches when turbidity crosses a level set by the pot, useful for a simple alarm.

Parts for this guide

  • DFRobot Gravity Analog Turbidity Sensor for Arduino – Probe w/ Adapter
    ₹1,359View
  • Turbidity Sensor Module for Suspended Solids Detection – 0-4.5V Analog & Digital Output
    ₹769View
  • Turbidity Sensor with Module – 0-1000 NTU Range, Analog/Digital Output
    ₹489View
  • Asair AZDM01 Turbidity Sensor Module – Analog Output
    ₹259View
  • DFRobot Turbidity Sensor Module – Non-contact Optical UART Output for Arduino
    ₹1,259View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • ADS1115 16-Bit 4-Channel ADC Module
    ₹199View
  • 16×2 LCD with I2C (RG1602A)
    ₹179View
  • Buzzer Module 3.3–5V
    ₹27View
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 guideBeginnerAnalog TDS Sensor (DFRobot Gravity and Grove)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.3 min read · SensorsComponent guideIntermediateADS1115 16-Bit ADC ModuleThe ADS1115 adds four precise 16-bit analog inputs to any board over I2C.3 min read · Sensors

Sources

  • DFRobot SEN0189 turbidity sensor wiki
  • ISO 7027 turbidity measurement

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 turbidity sensor isAnalog turbidity sensor pinoutWiring the Analog turbidity 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)7 items · ₹4,306

DFRobot Gravity Analog Turbidity Sensor for Arduino – Probe w/ Adapter · Turbidity Sensor Module for Suspended Solids Detection – 0-4.5V Analog & Digital Output · Turbidity Sensor with Module – 0-1000 NTU Range, Analog/Digital Output · DFRobot Turbidity Sensor Module – Non-contact Optical UART Output for Arduino · ADS1115 16-Bit 4-Channel ADC Module · Buzzer Module 3.3–5V · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

Clear water gives about 4.2 V. Below 2.5 V the formula caps at 3000 NTU.

Serial monitor9600 baud
4.15 V  182 NTU

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