Checks pH and cloudiness of water and tells your phone if it is safe.
Built and tested by Drisya K S · Industrial Robotics Institute

A real-time water quality monitor. A pH sensor measures how acidic or alkaline the water is, and a turbidity sensor measures how cloudy it is. The ESP32 decides "Safe Water" or "Unsafe Water" and sends the readings and status to the Blynk app.
| Component | Qty |
|---|---|
| ESP32 Dev Board | 1 |
| pH Sensor Module | 1 |
| Turbidity Sensor | 1 |
| Jumper Wires / Breadboard | As needed |
| Power Supply | 1 |
| From | Connect to |
|---|---|
| pH sensor VCC | 3.3V |
| pH sensor GND | GND |
| pH sensor AO | GPIO 34 |
| Turbidity VCC | 3.3V |
| Turbidity GND | GND |
| Turbidity AO | GPIO 35 |
| ESP32 | USB or 5V supply |
Complete, tested Arduino C++ code for this project. Copy it into Arduino IDE and upload it to the ESP32.
#define BLYNK_TEMPLATE_ID "YourTemplateID"
#define BLYNK_TEMPLATE_NAME "Water Quality"
#define BLYNK_AUTH_TOKEN "YourAuthToken"
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>
char ssid[] = "YourWiFiName";
char pass[] = "YourWiFiPassword";
int phPin = 34;
int turbidityPin = 35;
void setup() {
Serial.begin(115200);
pinMode(phPin, INPUT);
pinMode(turbidityPin, INPUT);
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
}
void loop() {
int phValue = analogRead(phPin);
int turbidityValue = analogRead(turbidityPin);
float ph = (phValue / 4095.0) * 14; // simple 0-14 scale; calibrate for accuracy
float turbidity = turbidityValue;
String quality;
if (ph >= 6.5 && ph <= 8.5 && turbidity < 2000) {
quality = "Safe Water";
} else {
quality = "Unsafe Water";
}
Blynk.virtualWrite(V1, ph);
Blynk.virtualWrite(V2, turbidity);
Blynk.virtualWrite(V3, quality);
Blynk.run();
delay(1000);
}A real-time water quality monitor. A pH sensor measures how acidic or alkaline the water is, and a turbidity sensor measures how cloudy it is.
You need: ESP32 Dev Board (1), pH Sensor Module (1), Turbidity Sensor (1), Jumper Wires / Breadboard, Power Supply (1). Software: Arduino IDE, Blynk IoT app.
It is rated intermediate and takes about 2–3 hours to build, using the ESP32. The guide on this page explains every connection and step.
The complete, tested Arduino C++ code is free on this page. Copy it into Arduino IDE and upload it to the board.
Yes. IRI sells a kit with the parts for this project (PRJ-137). Message IRI on WhatsApp at +91 86060 82634 for the kit price and delivery details.