The problem
RO Water Purifier Filter-Life Tracker with TDS Trend Alerts is an ESP32-based IoT system that answers the question no RO purifier answers for its owner: which filter is exhausted, and when. Most households change cartridges on a fixed schedule or wait until the water tastes wrong, so filters get replaced too early (wasted money) or too late (a tired membrane silently lets dissolved solids through). This build replaces guesswork with measurement. Two TDS probes sit on the purifier's inlet and outlet, and a YF-S201 flow sensor counts every litre of product water. The ESP32 converts cumulative throughput into per-stage life percentages against each filter's rated capacity, while trend analysis watches outlet TDS climb over weeks — the signature of membrane ageing. Cross 100 ppm or drop below 80% salt rejection and a Telegram alert names the failing stage; a cloud dashboard charts it. Unlike a water-quality monitor that reports today's water, this project tracks the health of the filters themselves.
Two TDS probes on inlet and outlet plus a YF-S201 flow sensor on the water line.
Follow the working sequence
How it works
End to end, the device turns two physical measurements — water conductivity and water flow — into a maintenance decision. Each TDS probe is a conductivity cell: two electrodes pass a small AC current through the water and the firmware converts the measured conductance into a ppm reading using a calibration factor, so inlet and outlet TDS arrive as numbers every few seconds. The YF-S201 flow sensor's internal rotor spins with product-water flow and its hall-effect pickup emits about 450 pulses per litre, which the ESP32 counts with an interrupt to accumulate total throughput. Firmware divides each stage's used litres by its rated capacity for life percentages, and separately tracks the outlet-TDS rolling average against its installation baseline to compute salt rejection. Every 60 seconds the ESP32 publishes everything over MQTT; the cloud dashboard charts the trends and a Telegram bot pushes alerts when outlet TDS crosses 100 ppm, rejection drops below 80%, or any stage's life falls under 20%.
- The inlet TDS probe samples feed-water conductivity and the outlet probe — mounted after the post-carbon filter, not at the membrane — samples product water; the ESP32 converts both to ppm with a two-point calibration against a handheld TDS meter.
- The YF-S201 on the product-water line emits ~450 pulses per litre (datasheet value); an ESP32 interrupt counts pulses into a cumulative litre total stored in flash so counts survive power cuts.
- Each filter stage holds a rated capacity in litres (configurable); remaining life % = (rated − used) / rated, recomputed after every publish cycle.
- A rolling 24-hour outlet-TDS average is compared with the installation baseline, and rejection % = (1 − outlet/inlet) × 100 is tracked alongside.
- If outlet TDS exceeds 100 ppm or rejection falls below 80% (design targets, configurable), the firmware flags membrane degradation regardless of what the calendar says.
- Every 60 seconds the ESP32 publishes TDS in/out, flow, life percentages and flags to an MQTT broker; the dashboard renders trend charts, life gauges and device status.
- Threshold events trigger a Telegram bot message naming the stage, the measured value and the suggested action.
- A filter replacement is logged from the dashboard, which resets that stage's used-litre counter; the event stays in the service history for the report.
Tech stack:
- ESP32 dev board
- TDS sensor modules × 2
- YF-S201 hall-effect flow sensor
- Arduino IDE · ESP32 core
- MQTT · Mosquitto broker
- Telegram Bot API
- Web dashboard · HTML/CSS/JS
- Git
| Parameter | Value |
|---|---|
| Controller | ESP32 dual-core 240 MHz with built-in Wi-Fi (datasheet) |
| TDS sensing | 2 × analog TDS modules, 0–1000 ppm probe range (typical) |
| Flow sensor | YF-S201 hall-effect, ~450 pulses/litre (datasheet value) |
| Rated stage capacity | 8000 L sediment/carbon, 12000 L post-carbon (design target, configurable) |
| Membrane rated life | 24 months (design target, configurable) |
| Outlet TDS alert | Above 100 ppm (design target, configurable) |
| Rejection alert | Below 80% salt rejection (design target, configurable) |
| Publish interval | 60 s over MQTT (configurable) |
| Alerts | Telegram bot message + MQTT event (implemented) |
| Power | 5 V USB, approximately 1 A peak (typical) |
| Dashboard | Web dashboard with TDS trend charts and life gauges (implemented) |
Project features
The system's three strongest capabilities are throughput-based life accounting, membrane-health trend analysis, and automatic replacement alerting. Throughput-based accounting means each filter stage — sediment, carbon, RO membrane, post-carbon — carries a rated capacity in litres, and the flow sensor's pulse count decrements it continuously, so the dashboard shows honest percentages like "Sediment: 22% remaining" instead of a calendar guess. Membrane-health trend analysis is the smarter half: a healthy RO membrane rejects 90–95% of dissolved solids, so when the outlet-TDS curve climbs from ~20 ppm toward 100 ppm over months, the firmware flags membrane ageing even if the calendar says the membrane is young. Automatic alerting closes the loop — Telegram messages and MQTT events fire the moment a threshold breaks, naming the stage, the measured value, and the likely cause, which is exactly the maintenance decision a service technician would make from the same data.
- [Throughput-based filter-life accounting] Each stage — sediment, carbon, RO membrane, post-carbon — carries a rated capacity in litres, and the YF-S201 flow sensor's pulse count decrements it continuously, so the dashboard shows honest remaining-life percentages instead of calendar estimates.
- [Membrane-health trend analysis] A healthy RO membrane rejects 90–95% of dissolved solids; the firmware tracks the outlet-TDS rolling average against its installation baseline and flags membrane ageing weeks before the outlet crosses the 100 ppm alert threshold.
- [Correct dual-probe TDS placement] The inlet probe taps the feed line and the outlet probe sits after the post-carbon filter, so readings reflect the water actually dispensed rather than an intermediate stage of the purifier.
- [Cloud dashboard with TDS trend charts] Inlet/outlet TDS trends, a membrane-ageing curve, per-stage life gauges and device status render on a web dashboard fed by MQTT every 60 seconds.
- [Telegram and MQTT replacement alerts] Threshold breaches fire a Telegram message and an MQTT event naming the stage, the measured value and the suggested action — for example, outlet TDS over 100 ppm implicates the membrane.
- [Replacement event log] Every cartridge change is logged from the dashboard with a timestamp, resetting that stage's used-litre counter while keeping the full service history for the report.
- [Monthly probe-clean reminder] Because scale fouling on the inlet electrodes is the most common source of TDS drift, the firmware raises a recurring reminder to wipe both probes — two minutes, no tools, no recalibration needed.
What is included
- Assembled and calibrated prototype (ESP32, TDS probes, YF-S201 flow sensor, wiring)
- ESP32 firmware source (Arduino IDE) with calibration, life accounting and alert logic
- Cloud dashboard web app with TDS trend charts and filter-life gauges
- MQTT broker configuration and Telegram bot setup guide
- Wiring diagram and complete component list
- Installation guide for a domestic RO purifier
- Project report PDF, PPT presentation and viva Q&A document
Limitations & prerequisites
- TDS is a proxy, not a purity certificate: it estimates dissolved ions and cannot detect bacteria, viruses, undissolved sediment or non-ionic contaminants.
- Inlet-probe fouling is the most common drift source: scale coats the electrodes and depresses conductivity readings, which is why the firmware issues a monthly probe-clean reminder rather than trusting a flat calibration.
- Flow-derived litre totals carry the YF-S201's installation-dependent error: pulse rate is ~450/litre (datasheet) but fittings, pressure and mounting shift it, so life percentages are approximate, not laboratory figures.
- Rated capacities and the 100 ppm / 80% thresholds are configurable design targets, not guarantees of any specific membrane's behaviour.
- The ppm conversion assumes a typical NaCl-type conversion factor (~0.5, typical); water with a different mineral mix reads proportionally higher or lower.
- Dashboard and Telegram alerts need 2.4 GHz Wi-Fi; sensing and local counting continue offline, but alerts queue until reconnection.
- The prototype is an academic build, not a certified water-safety device; it tracks filter health and never certifies drinking-water safety.
Frequently Asked Questions
Where exactly do the TDS probes go, and why does it matter?
The inlet probe taps the feed-water line before the purifier; the outlet probe taps the product-water line after the post-carbon filter, not at the membrane output. Permeate still passes through the post-carbon polishing stage before reaching the tap, so a probe at the membrane reads water that never sees that final stage and reports a falsely optimistic membrane-health figure. Placement decides whether you measure what you drink or an intermediate.
How is this different from an IoT water-quality monitor?
They answer different questions. A water-quality monitor reports the condition of the water right now — pH, TDS, turbidity — which is useful for safety awareness. This tracker reports the condition of the filters: per-stage life percentages from cumulative throughput and a months-long outlet-TDS trend that reveals membrane ageing weeks before the water itself looks bad. One watches the water; this one watches the machine that cleans it.
Which controller is used, and why ESP32?
The build uses an ESP32 dev board: it provides Wi-Fi for MQTT publishing, two ADC channels for the TDS probes, and an interrupt-capable pin for the flow sensor's pulse train on one inexpensive board with no extra shields. Its dual core lets one core count flow pulses while the other handles networking, so no pulses are lost during Wi-Fi reconnects.
Does it work without Wi-Fi?
Partly. Sensing and life accounting never stop: the ESP32 keeps reading both TDS probes, counting flow-sensor pulses, and updating life percentages locally even with no network. What pauses is the cloud side — the dashboard stops receiving fresh data and Telegram alerts cannot go out. Readings are buffered in flash and published when Wi-Fi returns, so a network outage delays alerts rather than losing the underlying measurements.
Can the thresholds and rated capacities be changed?
Yes — every number that drives a decision is configurable, because no two purifiers or water supplies are alike. Rated capacities per stage, the outlet-TDS alert threshold, the minimum rejection percentage, and the MQTT publish interval are all set in one configuration section of the firmware. A household with very hard feed water, for example, would lower the rated capacities so replacement reminders arrive earlier.
Is this project suitable for a final-year project?
Yes — for Electronics & Telecommunication, Electrical, and IoT & Embedded programs. It demonstrates sensor interfacing and calibration, interrupt-driven pulse counting, embedded networking over MQTT, cloud dashboarding, and data-driven maintenance logic — a complete sense-to-decision pipeline. The trend-analysis angle also gives strong report and viva material, since membrane ageing is a real, explainable physical process rather than a black box.
Components & software requirements
- ESP32 dev board
- TDS sensor modules × 2
- YF-S201 hall-effect flow sensor
- Arduino IDE · ESP32 core
- MQTT · Mosquitto broker
- Telegram Bot API
- Web dashboard · HTML/CSS/JS
- Git
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.