Monitoring water quality with TDS and turbidity sensors for fish farming is critical for the survival and growth of fish in Indian aquaculture. With India being the second largest fish producer globally and inland fishery expanding rapidly in states like Andhra Pradesh, West Bengal, Odisha, and Uttar Pradesh, water quality monitoring has become essential for commercial fish farmers. Poor water quality — excess TDS, high turbidity from algae blooms, low dissolved oxygen — is the leading cause of fish mortality in Indian fish farms. This guide covers building an Arduino/ESP32-based water quality monitoring system for fish ponds and tanks.
Table of Contents
- Critical Water Quality Parameters for Fish
- TDS (Total Dissolved Solids) Sensor
- Turbidity Sensor
- Complete Components List
- Wiring Diagram
- Arduino Monitoring Code
- Water Quality Targets for Indian Fish Species
- Frequently Asked Questions
Critical Water Quality Parameters for Fish
Fish health depends on multiple interconnected water quality parameters. The most important for Indian aquaculture:
- Dissolved Oxygen (DO): Most critical parameter; below 3 mg/L causes stress, below 1 mg/L causes mortality. Affected by temperature, algae growth, and stocking density.
- pH: Optimal 6.5-9.0 for most Indian freshwater species; below 6.0 or above 10 causes mortality.
- Temperature: Catla and Rohu grow optimally at 25-32°C; mortality risk below 10°C or above 38°C.
- TDS (Total Dissolved Solids): For freshwater fish, TDS below 500 mg/L is ideal; high TDS from salt or industrial runoff causes osmotic stress.
- Turbidity: Moderate turbidity (20-40 NTU) is acceptable; very high turbidity (above 100 NTU) from algae blooms reduces DO and is a health risk.
- Ammonia: Toxic waste product from fish metabolism; above 0.5 mg/L causes gill damage. Most important in heavily stocked recirculating systems.
TDS and turbidity sensors, being the most affordable electronic sensors (₹200-500 each), provide practical starting points for water quality monitoring even before investing in more expensive DO and ammonia sensors.
TDS (Total Dissolved Solids) Sensor
TDS sensors use two electrodes to measure electrical conductivity, which correlates with total dissolved solids. The TDS-2 or TDS-3 type sensors output an analog voltage proportional to conductivity. TDS is calculated from conductivity using a temperature-compensated conversion factor:
TDS (mg/L) ≈ EC (µS/cm) × 0.5 to 0.7 (factor varies by dissolved substance type)
For fish pond water monitoring in India, the key TDS considerations are:
- Freshwater fish (catla, rohu, catfish): prefer TDS below 500 mg/L
- Brackish water fish (shrimp, milkfish): require higher TDS (3,000-10,000 mg/L)
- During monsoon: heavy rain dilutes pond water, reducing TDS and potentially causing osmotic shock if changes are rapid
- In summer: evaporation concentrates dissolved salts, increasing TDS
Turbidity Sensor
Turbidity measures water clarity — how much light is scattered by particles in suspension. Common turbidity sensor types:
- TSW-30RB (Grove Turbidity Sensor): Analog output, range 0-3000 NTU. Cost ₹300-600. Simple but affected by air bubbles and biofouling.
- SEN0189 (DFRobot Turbidity Sensor): Analog output with both voltage and NTU conversion. Cost ₹400-800. More stable readings.
- OBS (Optical Backscatter Sensor): Professional grade, accurate to ±1 NTU. Used in regulatory monitoring. Cost ₹5,000-15,000.
For fish pond monitoring, turbidity above 40 NTU often indicates algae bloom (which can cause overnight DO crash, killing fish) or sediment disturbance. Turbidity below 10 NTU indicates very clear water which may lack the natural microorganism food base that most pond fish rely on. Target 20-40 NTU for most Indian pond aquaculture species.
Complete Components List
- ESP32 development board (₹350-500)
- TDS sensor module with probe (₹200-400)
- Turbidity sensor (SEN0189 or similar) (₹400-800)
- DS18B20 waterproof temperature probe (₹80-150)
- pH analog sensor module (optional) (₹200-500)
- 16×2 LCD with I2C (₹100-200)
- SIM800L (for SMS alerts when parameters critical) (₹150-350)
- Waterproof enclosure IP65 (₹200-400)
Total: approximately ₹1,700-2,900 for TDS + turbidity + temperature monitoring with display and SMS alerts.
Wiring Diagram
| Component | ESP32 GPIO |
|---|---|
| TDS Sensor (analog out) | GPIO 34 (ADC) |
| Turbidity Sensor (analog out) | GPIO 35 (ADC) |
| DS18B20 Temperature | GPIO 4 (1-Wire) |
| LCD SDA | GPIO 21 |
| LCD SCL | GPIO 22 |
Arduino Monitoring Code
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define TDS_PIN 34
#define TURBIDITY_PIN 35
#define TEMP_PIN 4
OneWire oneWire(TEMP_PIN);
DallasTemperature tempSensor(&oneWire);
LiquidCrystal_I2C lcd(0x27, 16, 2);
const float VREF = 3.3; // ESP32 ADC reference
const int ADC_RES = 4096; // 12-bit ADC
float readTDS(float temperature) {
// Average 30 readings
long sum = 0;
for (int i = 0; i < 30; i++) { sum += analogRead(TDS_PIN); delay(10); }
float avgV = (sum / 30.0) * VREF / ADC_RES;
// Temperature compensation
float compensationCoeff = 1.0 + 0.02 * (temperature - 25.0);
float compensatedV = avgV / compensationCoeff;
// Quadratic formula for TDS from voltage (sensor-specific)
float tds = (133.42 * compensatedV*compensatedV*compensatedV
- 255.86 * compensatedV*compensatedV
+ 857.39 * compensatedV) * 0.5;
return max(0.0f, tds); // Ensure non-negative
}
float readTurbidity() {
long sum = 0;
for (int i = 0; i < 30; i++) { sum += analogRead(TURBIDITY_PIN); delay(10); }
float voltage = (sum / 30.0) * VREF / ADC_RES;
// SEN0189 voltage to NTU conversion (polynomial approximation)
float ntu;
if (voltage 1000) Serial.println("ALERT: High TDS!");
if (turbidity > 80) Serial.println("ALERT: High Turbidity - possible algae bloom!");
delay(30000); // Check every 30 seconds
}
Water Quality Targets for Indian Fish Species
| Parameter | Rohu/Catla | Catfish | Tilapia |
|---|---|---|---|
| Temperature | 25–32°C | 24–30°C | 25–35°C |
| TDS | <500 mg/L | <600 mg/L | <700 mg/L |
| Turbidity | 20–40 NTU | 10–50 NTU | 20–50 NTU |
| pH | 7.0–8.5 | 6.5–8.0 | 6.5–9.0 |
Frequently Asked Questions
What causes sudden TDS spikes in fish ponds during monsoon?
Monsoon runoff carries dissolved minerals, fertilisers, and pesticides from surrounding agricultural land into ponds. Runoff from paddy fields treated with urea, DAP, or pesticides enters ponds through rainwater flow, causing sudden TDS increases. Install check banks and vegetated buffer strips around pond perimeters to slow runoff. Monitor TDS continuously during monsoon and be prepared to pump fresh water into the pond if TDS rises sharply.
My turbidity sensor gives widely different readings from different positions in the pond. Which reading should I use?
Turbidity varies significantly from surface to bottom and from inlet to outlet in ponds. Algae bloom creates stratified turbidity (high at surface where light is available, low at bottom). Sediment disturbance increases bottom turbidity without affecting surface. Mount the sensor at mid-depth (50% of pond depth) approximately 1 metre from the edge for most representative readings. Take multiple readings from different locations weekly to understand spatial variability.
How do I reduce turbidity from algae bloom in my fish pond?
If turbidity from algae bloom exceeds 80 NTU (green water syndrome): reduce fertiliser inputs immediately; apply alum (aluminium sulphate) at 15-20 ppm which coagulates algae cells and causes them to settle; increase aeration to prevent overnight DO crash while algae is dying; add freshwater to dilute the bloom. Monitor DO hourly during algae die-off as decomposing algae consumes oxygen and can cause mass fish mortality within hours.
Can the same TDS sensor be used for both freshwater fish ponds and saltwater shrimp ponds?
Standard TDS sensors (0-1000 ppm range) are designed for freshwater applications. Shrimp ponds have salinity of 5-25 ppt (5,000-25,000 ppm TDS equivalent) which is well beyond these sensors’ range. Use a dedicated EC meter (0-100 mS/cm range) for saltwater shrimp ponds and express results in ppt salinity using the known conversion. Many inexpensive EC sensors can be calibrated for saltwater using standard calibration solutions.
Add comment