
For setups that rely on stored water, clear awareness of tank level and water quality is essential. Traditional level monitors are often bulky offline devices with only simple LED indicators, while many newer smart models can be expensive and still ignore key quality parameters such as total dissolved solids (TDS) and turbidity. As environmental contamination increases, continuous monitoring of both water level and purity has become necessary.
This system provides a cost-effective approach with remote pump control over Wi-Fi, data logging, and the ability to operate in mesh configurations across multiple tanks or monitoring points. It measures water level, TDS, and turbidity in real time, issues alerts when thresholds are crossed, and stores the readings for later review, offering significant savings compared to many commercial options.
Compact and easy to install, the system uses the IndusBoard Coin V2 as the central controller due to its small size and integrated analogue-to-digital conversion. Alerts are generated when the water becomes cloudy or shows increased dissolved solids, and all data is stored locally. Fig. 1 shows the prototype and dashboard, and the Bill of Materials table lists the required components.

| Bill of Materials | ||
| Components | Quantity | Description |
| IndusBoard Coin V2 | 1 | ESP32-S2 brain (Wi-Fi, ADC, GPIO) |
| TDS sensor | 1 | Analogue probe for TDS (0-1000ppm) |
| Turbidity sensor | 1 | IR optical module (0-1000NTU) |
| Stainless probes | 3 | For level sensing (conductive strips) |
| 5V single relay | 1 | Controls pump/valve (pin 33) |
| USB-C cable | 1 | Power/programming |
| 5V power adaptor | 1 | 5V power supply |
IoT-based Water Monitoring System – Circuit and Working
Fig. 2 shows the circuit diagram of the miniature IoT water TDS and level monitor cum controller system. The core elements include the IndusBoard Coin V2, a TDS sensor, a turbidity sensor, stainless steel probes for water level sensing, and supporting components.

The water level is detected by measuring conductivity and capacitance across stainless steel probes placed at different heights in the tank. For tanks with uniform shapes, a time-of-fight laser distance sensor may be used for calculating volume more precisely.
Here, we have used I/O pins 3, 4, and 5 for water level detection. If you need finer level detection (e.g., 10%, 20%, 30% of tank fill), you can utilise additional free GPIO pins on the Coin board. The IndusBoard Coin provides over 30 I/O pins for flexibility. Pin 5 is used for the TDS and turbidity sensors, while pin 33 is connected to a relay to control the water pump or valves. Additional relays can also be added using the remaining free I/O pins.
The board and sensors operate from the 3V output, and the relay is powered via the VIN line. Power is supplied using a standard 5V adaptor through the USB port.
Code for Water TDS and Level Monitor Cum Controller
The GravityTDS.h library must be downloaded and added to the Arduino IDE through the Library Manager. After installation, the Wi-Fi SSID and password for network access are configured. The IndusBoard Coin supports STA (station) mode, AP (access point) mode, or both simultaneously. Example code is available for STA-only operation as well as combined STA+AP functionality.

Sensor pins are assigned within the code, and threshold values are defined for turbidity, TDS, temperature, and water level. The web dashboard and database functions are preconfigured to process and display readings in real time. After final verification, the code is uploaded through the Arduino IDE by selecting the appropriate board and communication port.
Finally, after configuring the code, it is uploaded to the IndusBoard Coin by selecting the correct board and port in the Arduino IDE settings.
Construction and Testing
The IndusBoard Coin V2, TDS sensor, turbidity sensor, and relay module may be mounted on an acrylic or wooden base. Stainless steel probes should be positioned vertically within the tank and connected to pins 3, 4, and 5. Probes must be clean, insulated, and not in physical contact with one another. The TDS probe should be immersed approximately halfway, while the turbidity sensor must remain aligned and submerged during measurement.


Power is supplied via a 5V adaptor. After uploading the program, the serial monitor or web dashboard can be used to observe live data. Gradually filling the tank will allow level readings to update. Introducing salt increases TDS readings, while adding particles such as dust or soap increases turbidity. When configured thresholds are reached, the pump is automatically switched on or off. Once stable operation is confirmed, the system may be enclosed in a 3D-printed or moulded case for long-term installation.







Could you please share the source & model No. of TDS sensor used in this project ? An indicative prcice would be useful too.
I have used Analog TDS Sensor Module . Search online you will get yu can also check the link below :- https://tinyurl.com/dhhpd8f6. Price is around 300-400