Final-year projects / Environment

IoT drinking water quality monitor (pH, TDS, turbidity)

Many homes and hostels drink from borewells, tankers and RO plants without knowing the water quality. A monitor for pH, dissolved solids, cloudiness and temperature, checked against the BIS drinking water limits, gives a quick warning.

ESP32Mini or Major projectECE, EIE, CSE
ESP32PHTDSTURBIDFeatured
Parts
₹4,450
Build
12 weeks
Board
ESP32
Objectives
6

Block diagram

Inputs
  • PH
    pH probeMeasures acidity
  • TDS
    TDS probeMeasures dissolved solids
  • TURBID
    Turbidity sensorMeasures cloudiness
  • TEMPERAT
    Temperature probeCompensates the readings
Controller
  • ESP32
    ESP32Checks against BIS limits
Outputs
  • 23.4°COLED
    OLED displayShows a safe or unsafe verdict
  • CLOUD
    Cloud dashboardStores readings, plots trends and sends alerts+
  • DATA
    Data loggerStores timestamped readings for analysis+

Objectives

  1. To measure pH, TDS, turbidity and temperature of a water sample.
  2. To calibrate pH with two buffers and TDS against a known salt solution.
  3. To compare each value with IS 10500 limits and give a verdict.
  4. To test ten water sources and compare with a lab or handheld meter.
  5. To publish readings over MQTT and show them on a live dashboard with threshold alerts.
  6. To log timestamped data and analyse it to support the conclusions with evidence.

Parts and specifications

Total about ₹4,450 at typical online prices. Tap a part for its pinout and datasheet notes.

Design calculations

pH two-point calibration

Read voltage in pH 7 (V7) and pH 4 (V4) buffers. Slope = (7 − 4) / (V7 − V4); pH = 7 + (V − V7) × slope. If V7 = 2.50 V and V4 = 3.03 V, slope = −5.66 pH/V.

TDS with temperature

Compensate EC to 25 °C: V25 = V / (1 + 0.02 × (T − 25)). TDS (ppm) = (133.42 V³ − 255.86 V² + 857.39 V) × 0.5 (DFRobot fit).

BIS limits (IS 10500)

pH 6.5 to 8.5; TDS acceptable 500 mg/L, permissible 2000 mg/L without another source; turbidity acceptable 1 NTU, permissible 5 NTU.

ESP32 ADC accuracy

The ESP32 ADC is non-linear near its ends; use the eFuse calibration (esp_adc_cal) or an ADS1115 for better pH readings.

Pin map

SignalPin or connection
pH board POGPIO 36 (ADC1)
TDS board AGPIO 39
Turbidity A (5 V module via 10 k / 20 k divider)GPIO 34
DS18B20GPIO 4 (4.7 kΩ pull-up)
OLED SDA / SCLGPIO 21 / 22

Firmware outline

  1. Read temperature first.
  2. Read each probe 30 times, drop the highest and lowest 5, average.
  3. Convert pH with the stored calibration; TDS with temperature compensation; turbidity with its curve.
  4. Compare with IS 10500 limits and show 'Safe', 'Check' or 'Unsafe' with the reason.
  5. Store calibration in flash and give a calibration menu with a button.

Test plan

TestExpected result
pH 4 and 7 buffers after calibrationWithin ±0.1
Salt solution of known ppmTDS within ±10%
Tap, RO, borewell, bottled, pond waterCompare with a handheld meter
Probe left in water for an hourDrift recorded

These rows start your results table when you plan the project.

Viva practice

Say your answer out loud first, then check. The first 2 answers are free; Maker opens all 5.

1. How does a pH electrode work?
2. Why temperature compensation?
3. Is TDS the same as safety?
4. What does turbidity tell you?
5. Why can't the probes stay in water forever?

Make it yours

One or two upgrades for a mini project, two to four for a major one.

Build these first

Datasheets and sources to cite

  • IS 10500:2012 Drinking water specification
  • DFRobot Gravity analog TDS sensor wiki
  • Hach turbidity measurement handbook

About this project

How much does the iot drinking water quality monitor (ph, tds, turbidity) project cost?

About ₹3,840 for the parts in the base list: ESP32 DevKit V1, pH sensor kit (analog), TDS sensor module, Turbidity sensor module, DS18B20 waterproof probe, 0.96 inch OLED (SSD1306, I²C), pH 4 and 7 buffer powder sachets, Sample cups and holder, 5 V USB adapter.

How long does it take?

About 8 weeks for the base project, built on an ESP32. Each upgrade adds time.

Which branches is it suitable for?

Electronics and Communication, Instrumentation, Computer Science / IT (IoT, AI), as a mini or major project.

Which pins and design calculations does it use?

pH board PO on GPIO 36 (ADC1); TDS board A on GPIO 39; Turbidity A (5 V module via 10 k / 20 k divider) on GPIO 34. Worked calculations on this page: ph two-point calibration, tds with temperature, bis limits (is 10500), esp32 adc accuracy.

How do I test it?

pH 4 and 7 buffers after calibration: Within ±0.1. Salt solution of known ppm: TDS within ±10%. Tap, RO, borewell, bottled, pond water: Compare with a handheld meter. Probe left in water for an hour: Drift recorded.

What are the objectives?

To measure pH, TDS, turbidity and temperature of a water sample. To calibrate pH with two buffers and TDS against a known salt solution. To compare each value with IS 10500 limits and give a verdict. To test ten water sources and compare with a lab or handheld meter.