A real-time water quality monitoring system using Arduino Nano to measure TDS, EC, and temperature, with results displayed on a 16x2 I2C LCD. Ideal for sustainable water management and analysis.
This project is designed to monitor water quality in real-time by measuring Total Dissolved Solids (TDS), Electrical Conductivity (EC), and Temperature using an Arduino Nano. The system displays the readings on a 16x2 LCD with I2C interfacing for easy monitoring and decision-making regarding water quality.
- Real-time water quality monitoring.
- Measures TDS, EC, and Temperature.
- Displays data on a 16x2 I2C LCD screen.
- Utilizes a TDS sensor and digital temperature sensor.
- Simple and cost-effective solution for water quality management.
- Arduino Nano: Microcontroller for processing data.
- TDS Sensor: Measures Total Dissolved Solids in water.
- Temperature Sensor: Measures water temperature.
- 16x2 LCD with I2C: Displays the sensor data.
- Jumper wires, Breadboard: For connecting the components.
- DallasTemperature: For interfacing with the temperature sensor.
- OneWire: For communication with the Dallas temperature sensor.
- LiquidCrystal_I2C: For displaying data on the LCD screen.
You can install these libraries via Arduino IDE:
- Open Arduino IDE.
- Go to Sketch > Include Library > Manage Libraries.
- Search for each library by name and click Install.
- Clone this repository or download the files.
- Open the
WaterQualityMonitor.inofile in the Arduino IDE. - Select your board and port under Tools.
- Upload the code to the Arduino Nano.
-
Create a New Folder:
Create a folder with a name like TdsReader. Arduino requires the .ino file to be in a folder with the same name.
-
Save the File:
Save the file as TdsReader.ino inside the TdsReader folder.
-
Open in Arduino IDE:
Open the TdsReader.ino file in the Arduino IDE.
-
Add Required Libraries:
Install the necessary libraries in the Arduino IDE: OneWire library DallasTemperature library LiquidCrystal_I2C library Go to Tools > Manage Libraries and search for these libraries to install them.
-
Select the Correct Board and Port:
Go to Tools > Board and select the appropriate board (e.g., Arduino Uno, Nano, etc.). Go to Tools > Port and select the correct COM port for your connected Arduino.
-
Upload the Code:
Click the Upload button in the Arduino IDE to upload the code to your board.
-
Temperature Coefficient:
T.C. = 1.0 + 0.02 * (Twater - 25.0) -
Electrical Conductivity (EC):
EC = (rawEC / (T.C)) * EC_Calibration -
Total Dissolved Solids (TDS):
TDS = (133.42 * EC^3 - 255.86 * EC^2 + 857.39 * EC) * 0.5
The system displays the TDS, EC, and temperature values on the LCD as shown below: TDS EC Temp 333 0.53 25.44
- Water Quality Monitoring: Suitable for aquariums, hydroponics, and household water analysis.
- Sustainable Water Management: Helps ensure safe and healthy water usage.
This simple and affordable water quality monitoring system provides real-time insights into water contamination levels, empowering users to make informed decisions about water consumption.
We would like to thank Professor Debashish Dash from VIT Vellore for providing valuable guidance and support throughout this project.
This project is licensed under the MIT License - see the LICENSE file for details.
Kamalesh Chakraborty
Vedant Singh Jadon
Yash Nayan

