Smart Water Quality Monitoring Network with Raspberry Pi (SDG 6 – Clean Water and Sanitation)

Last Updated May 28, 2026

Water quality monitoring depends on reliable environmental measurement. A Raspberry Pi water quality monitoring system can combine distributed sensors, analog-to-digital conversion, local logging, and optional analytics to help communities, researchers, educators, and environmental managers observe water conditions in real time while supporting SDG 6: Clean Water and Sanitation.

Freshwater systems are fundamental to human health, agriculture, biodiversity, food systems, sanitation, cities, industry, and economic life. Rivers, lakes, reservoirs, wetlands, aquifers, streams, and groundwater provide drinking water, sustain ecosystems, support food production, shape local economies, and influence the resilience of both urban and rural communities.

Yet freshwater systems increasingly face pressure from pollution, climate variability, agricultural runoff, wastewater discharge, industrial contamination, mining, sedimentation, land-use change, urban development, stormwater flows, failing infrastructure, and shifting hydrological regimes. These pressures are not always visible at the surface. Water may appear clear while still carrying chemical, biological, or ecological risks.

This project demonstrates how to build a Raspberry Pi-based water quality monitoring station capable of collecting environmental sensor data, storing observations locally, and supporting longer-term water analysis. While simple, the design reflects a broader sustainability principle: water systems become easier to protect when they can be measured continuously, transparently, and responsibly.

The project should not be treated as a drinking-water safety device, certified water-quality instrument, regulatory compliance system, public-health warning platform, or substitute for laboratory testing. Its purpose is educational and methodological: to show how sensing, calibration, local data logging, environmental analytics, field validation, and responsible interpretation can work together in a freshwater monitoring workflow.

Raspberry Pi water quality monitoring station measuring pH and turbidity in a river to support SDG 6 Clean Water and Sanitation.
Raspberry Pi environmental monitoring station collecting water quality data including pH, temperature, and turbidity to support SDG 6: Clean Water and Sanitation.

This project also connects to broader site areas, including Environmental Monitoring Systems, Intelligent Infrastructure Systems, Freshwater Change and Earth System Risk, Sustainable Development Goals Within Planetary Boundaries, Biogeochemical Flows: Nitrogen, Phosphorus, and Planetary Destabilization, and Planetary Boundaries. In that wider context, this Raspberry Pi water-quality monitor is not only a maker project. It is a small prototype of the sensing, logging, calibration, and data infrastructure needed for water stewardship, watershed monitoring, public-health awareness, freshwater governance, and resilient environmental decision-making.

Abstract

This project presents a prototype Raspberry Pi water quality monitoring system built around environmental sensing, analog-to-digital conversion, local data logging, and optional dashboard integration. The platform reads water-related sensor values such as pH, turbidity, and temperature, stores observations locally, and can be extended with anomaly detection, dashboard export, or cloud synchronization.

From an engineering perspective, the system demonstrates a compact environmental observation node with sensing, conversion, logging, calibration, and analysis layers. From a sustainability perspective, it illustrates how low-cost embedded systems can expand water monitoring capacity and strengthen evidence-based water management.

The system is intentionally limited. It is not a certified water-quality instrument, not a drinking-water safety system, not a regulatory compliance device, not a laboratory method, and not a public-health warning platform. Its value is educational and methodological: it shows how local water observations can be collected, stored, validated, and interpreted responsibly while making uncertainty visible.

Back to top ↑

SDG Alignment: Clean Water, Freshwater Ecosystems, Climate Resilience, and Environmental Governance

This project connects most directly to SDG 6: Clean Water and Sanitation, which emphasizes improving water quality, reducing pollution, increasing water-use efficiency, protecting freshwater ecosystems, and strengthening water-resource management.

The project also relates to SDG 9: Industry, Innovation and Infrastructure, SDG 13: Climate Action, SDG 14: Life Below Water, and SDG 15: Life on Land. Monitoring infrastructure supports water governance by making contamination, ecosystem stress, and environmental change more visible over time.

Sustainable Development Goal How the Project Relates Project-Level Mechanism
SDG 6: Clean Water and Sanitation Supports water-quality awareness, pollution screening, freshwater ecosystem observation, and water-resource stewardship. pH, turbidity, temperature, conductivity, and related water-quality time series collected through a local monitoring node.
SDG 9: Industry, Innovation and Infrastructure Demonstrates distributed environmental sensing and low-cost data infrastructure for water systems. Raspberry Pi, ADS1115 ADC, sensor interfaces, SQLite logging, dashboards, and anomaly detection.
SDG 13: Climate Action Relates to drought, flooding, extreme rainfall, heat, runoff, and climate-driven water-quality variability. Time-series monitoring that can be compared with rain events, heat periods, flow changes, and watershed stress.
SDG 14: Life Below Water Connects freshwater monitoring to downstream aquatic ecosystems, estuaries, coasts, and marine water quality. Early observation of sediment, temperature, and chemical changes that may move through connected watersheds.
SDG 15: Life on Land Relates to wetlands, riparian zones, forests, soils, and terrestrial ecosystems that depend on freshwater quality and flow. Field monitoring of water conditions that affect habitat quality and ecological resilience.

The strongest SDG connection is SDG 6. Clean water requires measurement. Pollution events, sediment pulses, temperature stress, algal bloom precursors, dissolved-solids changes, and runoff effects cannot be managed effectively if they are not observed.

The connection to SDG 9 comes through infrastructure. A water-quality monitor is not just a sensor. It is a small data infrastructure system with analog conversion, calibration, storage, metadata, dashboards, power, enclosure, maintenance, and quality-control layers.

The connection to SDG 13 is increasingly important because climate variability changes water systems. Heavy rainfall can increase runoff and turbidity. Drought can concentrate pollutants. Heat can affect water temperature and dissolved oxygen. Flooding can mobilize contaminants. Monitoring helps make these relationships more visible.

The connection to SDG 14 and SDG 15 reflects ecological continuity. Freshwater monitoring affects downstream aquatic ecosystems and terrestrial ecosystems alike. Rivers, wetlands, floodplains, riparian corridors, soils, estuaries, and coastal waters are connected systems.

Because the Sustainable Development Goals are broad public frameworks, it is important not to overclaim. This project is not a complete water-governance system, not a certified drinking-water instrument, and not a legal compliance platform. Its contribution is narrower and still meaningful: it teaches the measurement architecture behind responsible freshwater observation.

Back to top ↑

Connections to Other Site Areas

This Raspberry Pi water quality monitoring system belongs to a wider body of work on environmental sensing, data infrastructure, and resilient resource management. It connects directly to Environmental Monitoring Systems, where field sensors, water-quality stations, remote sensing, telemetry, and environmental datasets become tools for understanding ecological and public-health conditions.

It also connects to Intelligent Infrastructure Systems. A water-quality station becomes more useful when it can sense conditions, store observations, validate data, detect anomalies, and export results to dashboards or decision-support systems.

At the planetary-boundary level, the project relates directly to Freshwater Change and Earth System Risk. Local pH, turbidity, temperature, dissolved-solids, and conductivity readings cannot describe the entire freshwater boundary, but they demonstrate the same principle: freshwater systems become more governable when their physical and chemical conditions are observed consistently.

The project also connects to Biogeochemical Flows: Nitrogen, Phosphorus, and Planetary Destabilization because runoff, fertilizer use, sediment, dissolved nutrients, wastewater discharge, and agricultural pollution affect watershed health. At small scale, water-quality monitoring makes those larger nutrient and pollution questions more visible.

Back to top ↑

Water Quality and the Policy Goals of SDG 6

Water security depends on maintaining healthy freshwater systems and preventing contamination of drinking-water sources. The SDG 6 framework places strong emphasis on improving water quality, reducing pollution, increasing treatment and reuse, protecting freshwater ecosystems, expanding safe water access, and strengthening integrated water-resource management.

Achieving these goals requires reliable environmental measurements. Without consistent monitoring data, it becomes difficult to identify pollution events, evaluate environmental policy, track ecosystem stress, detect infrastructure failures, understand watershed change, or manage freshwater systems effectively.

Water monitoring networks therefore function as critical infrastructure supporting evidence-based environmental governance. They do not solve water quality problems by themselves, but they make those problems visible enough to investigate, manage, and address.

The governance value of monitoring depends on trust. Data must be calibrated, documented, maintained, and interpreted in context. Poor data can mislead communities, obscure pollution, exaggerate risks, or create false confidence. Better water governance requires not only more sensors, but better measurement discipline.

Back to top ↑

Why a Raspberry Pi Water Quality Monitoring System Matters

Traditional water monitoring often depends on periodic manual sampling conducted by environmental agencies, utilities, universities, watershed groups, or research institutions. While these programs are valuable, they may not capture rapid environmental changes such as stormwater runoff surges, industrial discharges, algal bloom precursors, sediment pulses, combined sewer overflow events, salinity changes, or sudden turbidity spikes.

A Raspberry Pi-based monitoring system matters because it can provide continuous, distributed observation at much lower cost. This helps make water systems more visible in rivers, agricultural settings, urban watersheds, campus environments, local ecosystems, community science projects, and field laboratories where dense monitoring coverage is often limited.

The platform is not a substitute for laboratory-certified water analysis. Its value is that it brings continuous field measurement into reach for more researchers, communities, educators, and environmental monitoring projects.

The system also teaches an important distinction: low-cost sensors can support screening, education, trend detection, and early awareness, but public-health, regulatory, legal, or drinking-water decisions require certified instruments, laboratory methods, and accountable institutions.

Back to top ↑

Key Water Quality Parameters

Environmental scientists typically monitor several physical and chemical variables when evaluating water quality.

Common measurements include:

  • pH: acidity or alkalinity of water
  • turbidity: suspended particles, sediment, and water clarity
  • temperature: influences aquatic ecosystems, dissolved oxygen, metabolism, and chemical behavior
  • dissolved oxygen: critical for aquatic life and ecosystem health
  • electrical conductivity: indicates dissolved ions and salts
  • total dissolved solids: reflects dissolved mineral content
  • oxidation-reduction potential: indicates chemical conditions relevant to aquatic chemistry
  • nutrient indicators: nitrogen and phosphorus compounds, where appropriate sensors or laboratory methods are available

Changes in these measurements can indicate contamination, ecosystem stress, runoff events, erosion, algal bloom conditions, wastewater influence, salinity shifts, temperature stress, or environmental change. Continuous monitoring allows researchers to detect patterns that would be difficult to observe through occasional sampling alone.

Not every parameter can be measured reliably with low-cost field sensors. Some contaminants require laboratory analysis, specialized probes, sampling protocols, or certified methods. A responsible Raspberry Pi platform should be clear about what it can measure, what it can only approximate, and what remains outside its scope.

Back to top ↑

Distributed Water Monitoring Networks

Distributed sensor networks allow water systems to be monitored continuously rather than only through periodic field visits. In these systems, low-cost monitoring stations collect environmental measurements and transmit or store observations over time.

The Raspberry Pi can serve as a local data hub that aggregates measurements from multiple sensors, stores them in local databases, and supports environmental analytics or dashboard export. This helps create time-series environmental records that can be interpreted more effectively than isolated samples.

In more advanced deployments, multiple Raspberry Pi water-monitoring stations could be placed across a watershed, urban drainage network, campus stream, agricultural runoff area, restoration site, stormwater system, or river corridor. The result would be a distributed environmental data layer capable of revealing how water conditions vary across time, place, land use, and weather events.

Distributed networks also raise governance questions. Who maintains the sensors? Who verifies the data? Who has access to the dashboard? Who responds to anomalies? Who is responsible if the system misses an event or reports a false alarm? These questions should be part of the monitoring design, not an afterthought.

Back to top ↑

System Overview

The Raspberry Pi water quality monitoring system reads analog and digital sensor signals, converts them into structured observations, stores readings locally, and optionally exports results to dashboards or analytics workflows.

The system can include:

  • pH sensing through an analog sensor module
  • turbidity sensing through an analog sensor module
  • water temperature measurement through a DS18B20 probe
  • optional conductivity or total dissolved solids sensor
  • ADS1115 analog-to-digital converter
  • SQLite database logging
  • dashboard export or cloud synchronization
  • optional anomaly detection

The key design pattern is environmental observation. The system should measure, store, validate, and interpret water conditions without pretending that prototype sensors are laboratory instruments. Its strength lies in continuous monitoring, local visibility, trend detection, and education.

Back to top ↑

System Requirements

A water quality monitoring station becomes useful only when its requirements are explicit. The system must collect readings, preserve metadata, support calibration, protect electronics, and avoid presenting prototype data as certified water-quality evidence.

Requirement Design Target Reason
Analog conversion Use ADS1115 or equivalent ADC for pH, turbidity, and optional conductivity sensors Raspberry Pi lacks native analog input
Temperature measurement Use DS18B20 or equivalent waterproof temperature probe Temperature affects chemistry, ecology, and sensor interpretation
Calibration workflow Calibrate pH and turbidity sensors with reference solutions or controlled samples Raw sensor values are not meaningful without calibration
Local data logging Store timestamped observations in SQLite or similar local database Supports trend analysis and field operation without constant connectivity
Metadata capture Record sensor ID, location ID, units, calibration ID, and quality flags Preserves context needed for interpretation
Field protection Protect electronics from water, corrosion, sediment, sunlight, and physical damage Water-monitoring environments are harsh for electronics
Responsible interpretation Label outputs as prototype observations, not certified drinking-water or regulatory data Prevents misuse of low-cost sensor readings

These requirements make the project more than a sensor demonstration. They frame it as a small environmental data infrastructure node for water systems.

Back to top ↑

Raspberry Pi Water Quality Monitoring System Architecture

A Raspberry Pi water monitoring station typically follows a layered architecture.

Sensor Layer

  • pH sensors
  • turbidity sensors
  • temperature probes
  • dissolved oxygen sensors
  • conductivity or TDS sensors

Data Collection Layer

  • Raspberry Pi computer
  • analog-to-digital converter such as ADS1115
  • sensor interface circuitry
  • GPIO or OneWire temperature input

Data Management Layer

  • local CSV logging
  • SQLite database storage
  • cloud synchronization
  • dashboard visualization

Typical architecture:

Water Sensors → ADS1115 / GPIO → Raspberry Pi → Local Database → Environmental Dashboard

This structure allows the monitoring station to operate autonomously while still contributing to broader environmental datasets or local decision-support systems. It also mirrors the larger Raspberry Pi environmental monitoring series, where edge computing supports climate sensing, urban air-quality monitoring, smart irrigation, biodiversity observation, renewable energy, early warning, and flood monitoring.

Back to top ↑

Bill of Materials

  • Raspberry Pi 4, Raspberry Pi 5, or Raspberry Pi Zero 2 W
  • pH sensor module
  • turbidity sensor
  • DS18B20 waterproof temperature probe
  • ADS1115 analog-to-digital converter
  • optional conductivity or TDS sensor
  • optional dissolved oxygen sensor
  • waterproof or water-resistant sensor housing
  • microSD card with adequate endurance for logging
  • stable power supply or solar-assisted power system
  • weather-resistant enclosure for electronics
  • mounting hardware for laboratory, classroom, streamside, or sheltered field deployment

The ADS1115 ADC allows the Raspberry Pi to read analog sensor signals that would otherwise be incompatible with its digital GPIO interface. For field deployments, sensor waterproofing, cable routing, strain relief, cleaning access, and electronics protection are as important as the sensor list.

Back to top ↑

Engineering Specifications

Parameter Reference Design
Compute platform Raspberry Pi 4, Raspberry Pi 5, or Raspberry Pi Zero 2 W
Primary sensors pH sensor, turbidity sensor, DS18B20 waterproof temperature probe
Optional sensors Conductivity, TDS, dissolved oxygen, ORP, or rainfall sensor
ADC interface ADS1115 over I2C
Temperature interface OneWire or compatible DS18B20 interface
Storage options CSV, SQLite, InfluxDB, or optional dashboard export
Output options Local database, local dashboard, cloud sync, API export
Deployment mode Distributed water observation node
Power options Fixed supply or solar-assisted field deployment
Target scope Educational, prototype, and experimental water-quality observation

The reference design is modular. It can begin with pH, turbidity, and temperature, then expand to conductivity, dissolved oxygen, rain events, flow context, dashboarding, or multi-site network monitoring.

Back to top ↑

Measurement Principle: Water Chemistry, Sensor Signals, and Calibration

Water-quality sensors do not directly produce trustworthy environmental knowledge. They produce electrical signals that must be converted, calibrated, validated, and interpreted.

A pH sensor module produces a voltage related to hydrogen ion activity, but the relationship depends on probe condition, calibration, temperature, amplifier behavior, and reference solutions. A turbidity sensor produces a voltage related to scattered or transmitted light through water, but readings depend on particle type, color, sensor geometry, biofouling, bubbles, and calibration. A temperature probe produces a digital temperature reading that helps interpret biological and chemical behavior.

The Raspberry Pi cannot read analog pH or turbidity signals directly. The ADS1115 converts analog sensor voltages into digital readings. The software then applies calibration formulas to estimate physical values such as pH or turbidity in NTU.

The measurement principle is therefore: collect sensor signals, convert them consistently, calibrate against references, store raw and estimated values, record metadata, flag uncertainty, and interpret results as environmental observations rather than certified findings.

Back to top ↑

Mathematical Lens: From Sensor Readings to Water-Quality Signals

The Raspberry Pi water quality monitor can be understood as a calibration and time-series analysis system. It transforms raw voltage readings into estimated environmental variables and then tracks how those variables change over time.

\[
pH = 7 + m(V – V_7)
\]

Interpretation: A simple pH calibration model estimates pH from voltage \(V\), neutral buffer voltage \(V_7\), and calibration slope \(m\). Actual values must be calibrated using buffer solutions.

The pH slope and neutral voltage should not be copied blindly from example code. They should be estimated from calibration measurements using known buffer solutions such as pH 4, pH 7, and pH 10.

\[
Turbidity_{NTU}=f(V_{\mathrm{turbidity}})
\]

Interpretation: Turbidity estimation depends on a sensor-specific response curve \(f\), which should be validated against known standards or controlled samples.

Low-cost turbidity sensors often provide useful trend signals but may not produce laboratory-quality NTU values without careful calibration and maintenance.

\[
\bar{x}_t=\frac{1}{n}\sum_{i=t-n+1}^{t}x_i
\]

Interpretation: A rolling average smooths short-term sensor noise and helps reveal recent water-quality trends.

Rolling averages can help stabilize pH, turbidity, temperature, or conductivity readings, but they should not hide real pollution spikes when rapid change matters.

\[
\Delta x_t=x_t-x_{t-1}
\]

Interpretation: Change between consecutive readings helps identify sudden shifts, such as turbidity spikes after rainfall.

Rate-of-change logic is useful for detecting events such as runoff pulses, sensor fouling, sudden discharge influence, or calibration drift.

\[
Q_t =
\begin{cases}
\text{review}, & |x_t-\bar{x}_t| > T \\
\text{observe}, & |x_t-\bar{x}_t| \leq T
\end{cases}
\]

Interpretation: A simple review flag can identify readings that differ sharply from recent baseline conditions.

The mathematical lens shows why the station is more than a sensor kit. It is a small measurement system that depends on calibration, baselines, quality flags, trend detection, and cautious interpretation.

Back to top ↑

Connecting Water Quality Sensors

Many water-quality sensors produce analog signals that must be converted to digital values before the Raspberry Pi can process them. The ADS1115 provides higher-resolution analog-to-digital conversion and communicates with the Raspberry Pi using I2C.

Typical wiring configuration:

  • pH sensor analog output → ADS1115 A0
  • turbidity sensor analog output → ADS1115 A1
  • optional conductivity or TDS sensor output → ADS1115 A2
  • ADS1115 VCC → Raspberry Pi 3.3V or compatible sensor voltage configuration
  • ADS1115 GND → Raspberry Pi Ground
  • ADS1115 SDA → Raspberry Pi GPIO 2
  • ADS1115 SCL → Raspberry Pi GPIO 3
  • DS18B20 data line → Raspberry Pi GPIO 4 with pull-up resistor

This configuration allows the Raspberry Pi to collect multiple water-quality measurements simultaneously. In practical deployments, careful grounding, cable routing, sensor isolation, and waterproofing matter because analog measurements can be sensitive to electrical noise, corrosion, cable length, unstable power, and environmental conditions.

Enable I2C and 1-Wire before running the scripts:

sudo raspi-config
# Interface Options → I2C → Enable
# Interface Options → 1-Wire → Enable

sudo apt update
sudo apt install -y i2c-tools
i2cdetect -y 1

The ADS1115 often appears at address 0x48, though this depends on the board and address configuration.

Back to top ↑

Water, Electrical, Field, and Public-Health Safety

Water monitoring places electronics near wet, conductive, chemically active, and sometimes contaminated environments. Even low-voltage systems require careful design when used near water.

  • Keep Raspberry Pi hardware and power electronics out of contact with water.
  • Use waterproof probe housings and weather-resistant electronics enclosures.
  • Provide strain relief and drip loops for cables.
  • Avoid exposing users to potentially contaminated water without appropriate safety practices.
  • Do not use prototype readings to declare water safe for drinking, swimming, irrigation, or aquatic life.
  • Do not connect field systems to mains power without qualified electrical design and protection.
  • Use certified laboratory testing for public-health, drinking-water, legal, or regulatory decisions.

This project is intended for educational, prototype, and experimental monitoring. If water safety matters, sensor readings should be treated as screening observations, not final answers.

Back to top ↑

Software Environment and Dependencies

The project uses Python because Raspberry Pi systems support sensor libraries, I2C communication, OneWire temperature probes, SQLite logging, analytics, and dashboard export in one environment.

sudo apt update
sudo apt install -y python3-pip python3-venv i2c-tools sqlite3

python3 -m venv .venv
source .venv/bin/activate

pip install adafruit-circuitpython-ads1x15 adafruit-blinka w1thermsensor pandas requests

For first testing, begin with one sensor at a time. Verify the ADS1115, then the pH voltage, then the turbidity voltage, then the temperature probe, then logging. Combining all components before testing each layer makes troubleshooting harder.

For long-running deployments, scripts should eventually run under a managed service and include log rotation, storage monitoring, restart behavior, and safe handling of missing or invalid sensor readings.

Back to top ↑

Python Code for Sensor Data Collection

The following Python example reads analog sensor values through the ADS1115 and converts them into prototype pH and turbidity estimates using calibration constants. Real deployments should calibrate these conversions against known buffer solutions and controlled turbidity samples.

"""
Raspberry Pi Water Quality Monitor
ADS1115 Analog Sensor Reader

Reads:
- pH sensor analog voltage from ADS1115 channel A0
- turbidity sensor analog voltage from ADS1115 channel A1

Notes:
- This is prototype code for education and experimental monitoring.
- pH and turbidity conversion formulas depend on the sensor module.
- Calibrate with known reference solutions before interpreting results.
"""

import time
from dataclasses import dataclass

import board
import busio
from adafruit_ads1x15.ads1115 import ADS1115
from adafruit_ads1x15.analog_in import AnalogIn


@dataclass
class WaterQualityReading:
    """Structured container for one water-quality observation."""
    ph_raw: int
    turbidity_raw: int
    ph_voltage: float
    turbidity_voltage: float
    ph_estimate: float
    turbidity_estimate_ntu: float


def initialize_ads1115() -> ADS1115:
    """Initialize ADS1115 over the Raspberry Pi I2C bus."""
    i2c = busio.I2C(board.SCL, board.SDA)
    ads = ADS1115(i2c)

    # Gain affects measurable voltage range.
    # Adjust based on sensor output voltage and ADS1115 wiring.
    ads.gain = 1

    return ads


def estimate_ph(voltage: float, neutral_voltage: float = 2.50, slope: float = -5.70) -> float:
    """
    Estimate pH from sensor voltage.

    This is a placeholder calibration model:
    pH = 7 + slope * (voltage - neutral_voltage)

    Replace neutral_voltage and slope with values obtained from calibration
    using pH 4, pH 7, and pH 10 buffer solutions.
    """
    return 7.0 + slope * (voltage - neutral_voltage)


def estimate_turbidity_ntu(voltage: float) -> float:
    """
    Estimate turbidity in NTU from sensor voltage.

    This is a simplified placeholder conversion. Different turbidity modules
    use different response curves. Validate against known turbidity standards
    or controlled sediment samples before interpretation.
    """
    estimated_ntu = max(0.0, (3.30 - voltage) * 300.0)
    return estimated_ntu


def read_water_quality(ads: ADS1115) -> WaterQualityReading:
    """Read pH and turbidity sensor channels and estimate physical values."""
    ph_channel = AnalogIn(ads, ADS1115.P0)
    turbidity_channel = AnalogIn(ads, ADS1115.P1)

    ph_voltage = ph_channel.voltage
    turbidity_voltage = turbidity_channel.voltage

    return WaterQualityReading(
        ph_raw=ph_channel.value,
        turbidity_raw=turbidity_channel.value,
        ph_voltage=ph_voltage,
        turbidity_voltage=turbidity_voltage,
        ph_estimate=estimate_ph(ph_voltage),
        turbidity_estimate_ntu=estimate_turbidity_ntu(turbidity_voltage),
    )


def print_reading(reading: WaterQualityReading) -> None:
    """Print one formatted water-quality reading."""
    print(
        f"pH raw: {reading.ph_raw} | "
        f"pH voltage: {reading.ph_voltage:.3f} V | "
        f"pH estimate: {reading.ph_estimate:.2f} | "
        f"Turbidity raw: {reading.turbidity_raw} | "
        f"Turbidity voltage: {reading.turbidity_voltage:.3f} V | "
        f"Turbidity estimate: {reading.turbidity_estimate_ntu:.1f} NTU"
    )


if __name__ == "__main__":
    ads = initialize_ads1115()

    print("Raspberry Pi Water Quality Monitor")
    print("Reading pH and turbidity channels...")
    print("-----------------------------------")

    while True:
        try:
            reading = read_water_quality(ads)
            print_reading(reading)
        except Exception as exc:
            print(f"Water-quality sensor read error: {exc}")

        time.sleep(10)

This code preserves both raw values and estimated physical values. Keeping raw voltage readings is important because calibration formulas may change later, and raw signals can help diagnose sensor drift or electrical noise.

Back to top ↑

Reading Water Temperature with a DS18B20 Probe

Water temperature is important because it influences chemical behavior, dissolved oxygen, biological metabolism, aquatic stress, and sensor interpretation. The DS18B20 waterproof probe is commonly used in prototype water monitoring because it is inexpensive and relatively easy to integrate with Raspberry Pi systems.

"""
DS18B20 Water Temperature Reader for Raspberry Pi

Reads water temperature from a waterproof DS18B20 probe using the w1thermsensor
library.

Before running:
- Enable the 1-Wire interface on Raspberry Pi OS.
- Connect DS18B20 data line with an appropriate pull-up resistor.
"""

import time
from w1thermsensor import W1ThermSensor, SensorNotReadyError


def initialize_temperature_sensor() -> W1ThermSensor:
    """Initialize and return the first detected DS18B20 temperature sensor."""
    return W1ThermSensor()


def read_water_temperature_c(sensor: W1ThermSensor) -> float:
    """Read water temperature in degrees Celsius."""
    return sensor.get_temperature()


if __name__ == "__main__":
    sensor = initialize_temperature_sensor()

    print("Reading DS18B20 water temperature...")
    print("------------------------------------")

    while True:
        try:
            temperature_c = read_water_temperature_c(sensor)
            print(f"Water temperature: {temperature_c:.2f} C")
        except SensorNotReadyError:
            print("Temperature sensor not ready.")
        except Exception as exc:
            print(f"Temperature sensor error: {exc}")

        time.sleep(10)

Temperature should be logged alongside pH, turbidity, conductivity, and other readings because water chemistry and sensor behavior can be temperature dependent.

Back to top ↑

Logging Water Quality Data

Environmental monitoring systems typically log measurements for long-term analysis. A lightweight SQLite database is more robust than a loose CSV file for extended projects because it allows timestamped records, metadata, structured queries, quality flags, and dashboard integration.

"""
SQLite Logger for Raspberry Pi Water Quality Monitoring

Stores timestamped water-quality readings in a local SQLite database.
The resulting time-series dataset can be analyzed with Python, R, SQL,
or dashboard tools.
"""

import sqlite3
from datetime import datetime, timezone
from pathlib import Path


DATABASE_PATH = Path("water_quality.db")


def create_connection(db_path: Path = DATABASE_PATH) -> sqlite3.Connection:
    """Create and return a SQLite database connection."""
    return sqlite3.connect(db_path)


def initialize_database(conn: sqlite3.Connection) -> None:
    """Create the water_quality table if it does not already exist."""
    cursor = conn.cursor()

    cursor.execute("""
        CREATE TABLE IF NOT EXISTS water_quality (
            id INTEGER PRIMARY KEY AUTOINCREMENT,
            timestamp_utc TEXT NOT NULL,
            ph_estimate REAL,
            turbidity_ntu REAL,
            temperature_c REAL,
            ph_voltage REAL,
            turbidity_voltage REAL,
            sensor_id TEXT DEFAULT 'water_node_01',
            location_id TEXT DEFAULT 'prototype_site',
            calibration_id TEXT DEFAULT 'uncalibrated',
            quality_flag TEXT DEFAULT 'unchecked',
            notes TEXT DEFAULT ''
        )
    """)

    conn.commit()


def log_water_quality(
    conn: sqlite3.Connection,
    ph_estimate: float | None,
    turbidity_ntu: float | None,
    temperature_c: float | None,
    ph_voltage: float | None,
    turbidity_voltage: float | None,
    sensor_id: str = "water_node_01",
    location_id: str = "prototype_site",
    calibration_id: str = "uncalibrated",
    quality_flag: str = "unchecked",
    notes: str = "",
) -> None:
    """Insert one water-quality observation into SQLite."""
    cursor = conn.cursor()

    timestamp_utc = datetime.now(timezone.utc).isoformat()

    cursor.execute("""
        INSERT INTO water_quality (
            timestamp_utc,
            ph_estimate,
            turbidity_ntu,
            temperature_c,
            ph_voltage,
            turbidity_voltage,
            sensor_id,
            location_id,
            calibration_id,
            quality_flag,
            notes
        )
        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    """, (
        timestamp_utc,
        ph_estimate,
        turbidity_ntu,
        temperature_c,
        ph_voltage,
        turbidity_voltage,
        sensor_id,
        location_id,
        calibration_id,
        quality_flag,
        notes,
    ))

    conn.commit()


def read_recent_observations(conn: sqlite3.Connection, limit: int = 10) -> list[tuple]:
    """Return recent observations for inspection."""
    cursor = conn.cursor()

    cursor.execute("""
        SELECT timestamp_utc, ph_estimate, turbidity_ntu, temperature_c, quality_flag
        FROM water_quality
        ORDER BY timestamp_utc DESC
        LIMIT ?
    """, (limit,))

    return cursor.fetchall()


if __name__ == "__main__":
    conn = create_connection()
    initialize_database(conn)

    # Example row. Replace with live sensor readings.
    log_water_quality(
        conn=conn,
        ph_estimate=7.12,
        turbidity_ntu=18.4,
        temperature_c=21.6,
        ph_voltage=2.48,
        turbidity_voltage=3.24,
        calibration_id="demo_calibration",
        quality_flag="demo",
        notes="example observation",
    )

    for row in read_recent_observations(conn):
        print(row)

    conn.close()

Over time this dataset forms a time-series record that can reveal seasonal trends, contamination events, turbidity spikes, sensor drift, stormwater effects, or ecosystem changes.

Back to top ↑

Water Quality Data Model

Water-quality readings should not be stored as isolated numbers. A useful monitoring dataset includes the measured value, raw signal, unit, timestamp, sensor identity, calibration history, location ID, quality flag, and field notes.

Field Example Purpose
timestamp_utc 2026-05-28T09:15:00Z Provides a consistent time reference for analysis
location_id stream_site_03 Identifies the monitoring location without requiring exact public coordinates
sensor_id water_node_01 Links readings to specific hardware
ph_voltage 2.48 Stores raw pH-related signal for recalibration or debugging
ph_estimate 7.12 Stores estimated pH after calibration model
turbidity_ntu 18.4 Stores estimated turbidity value
temperature_c 21.6 Provides water-temperature context
calibration_id ph_cal_2026_05 Links readings to a calibration event
quality_flag unchecked Marks observations as valid, suspect, demo, missing, or calibration-needed
notes after heavy rain Preserves field context

A strong data model helps prevent misuse. It makes clear which readings are raw, which are estimated, which are validated, and which need review.

Back to top ↑

Integrating Environmental Dashboards

Water monitoring stations often transmit data to visualization dashboards that allow researchers, students, policymakers, and community groups to interpret environmental conditions more effectively.

Popular tools include:

  • Grafana dashboards
  • InfluxDB time-series databases
  • SQLite-backed local dashboards
  • cloud IoT platforms
  • CSV export for analysis in Python, R, or spreadsheet tools

The following example exports recent readings from SQLite into a simple JSON structure that could be used by a dashboard or local web application.

"""
Dashboard Export Example for Water Quality Data

Reads recent SQLite observations and exports them as JSON-ready dictionaries.
A Flask, FastAPI, or dashboard application could use this function as a data
source.
"""

import sqlite3
from pathlib import Path


DATABASE_PATH = Path("water_quality.db")


def get_recent_dashboard_records(limit: int = 100) -> list[dict]:
    """Return recent water-quality records as dictionaries."""
    conn = sqlite3.connect(DATABASE_PATH)
    conn.row_factory = sqlite3.Row

    cursor = conn.cursor()

    cursor.execute("""
        SELECT
            timestamp_utc,
            ph_estimate,
            turbidity_ntu,
            temperature_c,
            sensor_id,
            location_id,
            calibration_id,
            quality_flag
        FROM water_quality
        ORDER BY timestamp_utc DESC
        LIMIT ?
    """, (limit,))

    records = [dict(row) for row in cursor.fetchall()]
    conn.close()

    return records


if __name__ == "__main__":
    for record in get_recent_dashboard_records(limit=5):
        print(record)

Dashboards allow water monitoring networks to generate real-time environmental intelligence rather than isolated sensor readings. They should also display uncertainty, calibration status, missing values, and prototype status where appropriate.

Back to top ↑

AI Applications in Water Monitoring

Machine learning techniques can enhance environmental monitoring systems by detecting patterns that may indicate pollution, runoff events, equipment drift, sensor failure, or ecosystem stress.

Possible applications include:

  • pollution anomaly detection
  • predictive water-quality forecasting
  • algal bloom risk indicators
  • watershed health monitoring
  • sensor drift detection
  • event classification after heavy rainfall or discharge events

The following example uses a simple rolling baseline to flag turbidity spikes. This is not a substitute for environmental diagnosis, but it shows how local monitoring data can be converted into useful event signals.

"""
Simple Turbidity Spike Detector

Flags turbidity readings that exceed a rolling baseline by a configurable
amount. This is a lightweight heuristic for prototype water monitoring.
"""

from collections import deque
from statistics import mean


class TurbiditySpikeDetector:
    """Tracks recent turbidity values and flags unusually high readings."""

    def __init__(self, window_size: int = 24, spike_threshold_ntu: float = 30.0):
        self.window_size = window_size
        self.spike_threshold_ntu = spike_threshold_ntu
        self.recent_values = deque(maxlen=window_size)

    def add_reading(self, turbidity_ntu: float) -> dict:
        """
        Add a turbidity reading and return diagnostic information.

        If the current reading exceeds the recent baseline by the threshold,
        it is flagged as a possible spike.
        """
        if len(self.recent_values) == 0:
            baseline = turbidity_ntu
        else:
            baseline = mean(self.recent_values)

        spike_size = turbidity_ntu - baseline
        is_spike = spike_size >= self.spike_threshold_ntu

        self.recent_values.append(turbidity_ntu)

        return {
            "turbidity_ntu": turbidity_ntu,
            "baseline_ntu": baseline,
            "spike_size_ntu": spike_size,
            "possible_turbidity_spike": is_spike,
        }


if __name__ == "__main__":
    detector = TurbiditySpikeDetector(window_size=6, spike_threshold_ntu=25.0)

    sample_values = [8, 10, 11, 9, 12, 10, 55]

    for value in sample_values:
        result = detector.add_reading(value)
        print(result)

Lightweight frameworks can also run on Raspberry Pi devices, enabling edge-based environmental analytics in field settings. The key is careful interpretation: anomaly detection can identify unusual readings, but it does not automatically identify the cause of a pollution event.

A dashboard label such as “review recommended” is safer than “pollution event detected” unless the system has been validated against known events, reference data, and appropriate regulatory or scientific standards.

Back to top ↑

GitHub Repository

The article body includes the core sensor, logging, dashboard, and anomaly-detection examples so the build remains readable. The full repository expands the project into a reproducible prototype package, including Python sensor-integration scripts, ADS1115 examples, water-quality logging materials, dashboard export scaffolding, anomaly detection examples, deployment notes, and example environmental datasets.

The repository contains the complete prototype build materials:

  • Python sensor-integration scripts
  • data logging examples
  • environmental dashboard integration notes
  • deployment documentation
  • example environmental datasets
  • configuration files for system setup

Repository Structure

raspberry-pi-water-quality-monitoring/

README.md
LICENSE
requirements.txt

src/
  read_water_quality.py
  read_temperature_probe.py
  log_water_quality.py
  dashboard_export.py
  anomaly_check.py

docs/
  setup_guide.md
  deployment_notes.md
  sensor_notes.md
  calibration.md
  data_model.md
  responsible_use.md

data/
  example_water_quality_readings.csv

hardware/

Engineers can clone the repository, fork the design, or download the complete project using GitHub’s Download ZIP feature. All materials are released under the MIT License to support reuse in research, education, community science, and prototype engineering work.

Back to top ↑

Calibration, Probe Care, and Measurement Discipline

Calibration is central to water-quality monitoring. A sensor that produces a number is not automatically producing a meaningful environmental measurement.

For pH, calibration should ideally use known buffer solutions. A practical educational workflow may include:

  1. rinse the probe with distilled water
  2. measure voltage in pH 7 buffer
  3. measure voltage in pH 4 buffer
  4. optionally measure voltage in pH 10 buffer
  5. estimate slope and neutral voltage
  6. record calibration date and calibration ID
  7. recheck calibration after field use or storage

For turbidity, calibration is more difficult. Low-cost turbidity sensors may be useful for relative trend detection, but calibrated NTU measurement requires reference standards or carefully prepared controlled samples.

Probe care also matters. pH probes can dry out, drift, foul, or become damaged. Turbidity sensors can be affected by algae, sediment, bubbles, biofilm, scratches, and water color. Temperature probes are generally more stable, but they still require waterproof integrity and reference checks.

Example Calibration Record

Calibration Item Reference Sensor Reading Adjustment Notes
pH neutral point pH 7 buffer 2.50 V Set neutral voltage Probe rinsed before test
pH acidic point pH 4 buffer 3.02 V Estimate slope Waited for reading stability
Temperature Reference thermometer 21.4°C vs 21.6°C No adjustment Within educational tolerance
Turbidity trend Clear vs sediment sample Voltage decreased with sediment Trend confirmed Not certified NTU calibration

A calibration record like this makes later readings more interpretable and prevents uncalibrated sensor outputs from being mistaken for precise scientific measurements.

Back to top ↑

Engineering Notes

A few technical considerations are especially important in this build:

  • Analog dependency: many water sensors require an ADC because the Raspberry Pi lacks native analog input.
  • Calibration realism: raw sensor values are only useful when linked to real physical measurement ranges.
  • Field exposure: sensor fouling, moisture, corrosion, sediment, algae, and enclosure design strongly affect long-term performance.
  • Grounding and noise: analog water measurements can be sensitive to unstable power, poor grounding, cable length, and electrical interference.
  • Time-series value: the strength of the system comes from repeated observation over time, not only single readings.
  • Dashboard usefulness: structured storage and visualization greatly improve interpretability.
  • Temperature context: water temperature helps interpret chemistry, sensor behavior, and ecological stress.
  • Data boundaries: low-cost sensors should be clearly labeled as screening or educational tools unless validated for higher-stakes use.

These considerations make the project more than a simple sensor demonstration. It becomes a prototype environmental data infrastructure node for water systems.

Back to top ↑

Deployment Scope and Data-Quality Considerations

This prototype is designed for educational, experimental, and early-stage environmental monitoring. It should not be treated as a certified water-quality instrument, drinking-water safety system, regulatory compliance device, or substitute for laboratory testing.

Water-quality sensing is difficult because sensors are exposed to wet, chemically active, biologically active, and physically variable environments. Probe fouling, sediment, algae, temperature shifts, calibration drift, enclosure leakage, unstable analog readings, and sensor aging can all affect data quality.

These constraints do not make the system unhelpful. They define the appropriate scope of interpretation: local observation, trend detection, education, prototype analytics, and environmental awareness. For public-health, regulatory, or legal decisions, readings should be verified by certified instruments and laboratory methods.

Responsible data use also requires uncertainty. Public dashboards should identify prototype status, calibration status, sensor maintenance, data gaps, suspect readings, and whether values are raw, estimated, or validated.

Back to top ↑

Failure Modes and Practical Risks

A useful water-quality monitoring article should explain not only how the system works, but how it can fail. Water systems are harsh measurement environments, and low-cost sensors can fail quietly while still producing plausible-looking numbers.

  • pH probe drift: probes can drift over time, especially without proper storage and recalibration.
  • probe fouling: algae, sediment, biofilm, mineral deposits, and debris can distort readings.
  • analog noise: grounding problems, long cables, unstable power, or electrical interference can affect voltage readings.
  • temperature effects: chemistry and sensor response may change with water temperature.
  • enclosure leakage: moisture can damage electronics and create intermittent failures.
  • sensor placement bias: one location may not represent an entire river, pond, pipe, stream, or watershed.
  • sample disturbance: moving water, bubbles, sediment, and probe motion can cause unstable readings.
  • storage failure: long-running logging can fill storage or corrupt files if unmanaged.
  • false confidence: dashboards can make uncalibrated prototype data look authoritative.
  • misuse risk: readings may be incorrectly used to make drinking-water, legal, or public-health claims.

These risks do not make the project unusable. They make calibration, validation, maintenance, and cautious interpretation essential. A monitoring system should help users ask better water-quality questions, not make unsupported claims.

Back to top ↑

Validation and Testing

To bring this project closer to engineering-grade documentation, validation should include:

  1. verify I2C communication with the ADS1115
  2. confirm that analog sensor values change plausibly under controlled conditions
  3. compare calibrated pH readings against known buffer solutions where possible
  4. compare turbidity behavior across clearer and more sediment-rich samples
  5. verify temperature probe readings against a reference thermometer
  6. test CSV or SQLite logging across extended runs
  7. check that timestamps, units, sensor IDs, and location metadata remain consistent
  8. inspect probes for fouling, corrosion, drift, or physical damage during longer deployments
  9. compare prototype readings with reference instruments or laboratory samples where possible
  10. test dashboard exports and quality flags before public display

If the system behaves inconsistently, the issue may be related to wiring, calibration, power stability, analog noise, grounding, sensor condition, probe fouling, or field exposure rather than to the monitoring concept itself.

Example Validation Record

Test Expected Result Observed Result Likely Issue Action
ADS1115 I2C scan ADC appears at expected address Device appears at 0x48 None Proceed to sensor test
pH 7 buffer Reading near pH 7 after calibration pH estimate 7.4 Calibration offset Update neutral voltage
Clear water turbidity test Low turbidity estimate High reading Bubbles, dirty probe, or poor calibration Clean sensor and retest
Temperature comparison Close to reference thermometer Difference 0.3°C Acceptable for prototype context Record comparison
Extended logging No missing records over 24 hours Gaps after power drop Power instability Improve power and restart behavior

Validation records like this help separate water-quality signals from sensor artifacts. That distinction is essential in environmental monitoring.

Back to top ↑

Suggested Performance Metrics

For a more rigorous evaluation, the station can be assessed using several simple metrics:

  • sensor stability: consistency of repeated readings under unchanged conditions
  • calibration accuracy: agreement between sensor estimates and known reference solutions
  • logging reliability: whether observations are stored without loss over long runs
  • uptime: how consistently the station continues operating without intervention
  • data completeness: whether the expected number of records is captured over time
  • trend usefulness: whether the collected series reveals meaningful environmental changes
  • maintenance burden: how often sensors require cleaning, recalibration, or replacement
  • reference agreement: how prototype readings compare with trusted instruments or laboratory samples
  • dashboard clarity: whether uncertainty, calibration status, and prototype scope are visible to users

Even simple tracking of these metrics improves the project’s value as an experimental water monitoring platform. The goal is not merely to produce numbers, but to produce observations that are stable, documented, interpretable, and honest about their limits.

Back to top ↑

Field Deployment, Waterproofing, Power, and Maintenance

Field deployment is where water-monitoring prototypes often become difficult. Streams, ponds, rivers, and stormwater locations expose sensors to moisture, sediment, algae, debris, animals, vandalism, sunlight, freezing, heat, flow changes, and physical damage.

Responsible deployment should address:

  • waterproof probe placement and secure mounting
  • weather-resistant electronics enclosure
  • drip loops, strain relief, and sealed cable entry
  • safe placement away from flood hazards where possible
  • probe-cleaning schedule
  • calibration-check schedule
  • battery or solar power sizing
  • storage backup and log rotation
  • metadata updates after probe movement or maintenance
  • safe field access procedures

Maintenance is not separate from monitoring. A fouled probe, tilted housing, drained battery, full storage card, or loose connector can make the system produce misleading data. Field logs should record every cleaning, calibration check, relocation, sensor replacement, and unusual environmental event.

Back to top ↑

Environmental Governance and SDG 6

Reliable water monitoring infrastructure supports multiple aspects of environmental governance.

These systems can contribute to:

  • drinking-water safety awareness
  • river and watershed management
  • agricultural runoff monitoring
  • stormwater and flood-event observation
  • industrial pollution investigation
  • community science environmental initiatives
  • school and university field-lab programs
  • restoration monitoring and ecological stewardship

By expanding environmental measurement capabilities, distributed monitoring systems help strengthen the evidence base required for sustainable water policy. Better measurement does not guarantee better governance, but weak measurement makes effective governance far more difficult.

Water monitoring also has a justice dimension. Communities facing contamination, flooding, industrial exposure, agricultural runoff, or failing infrastructure often need credible evidence to make environmental burdens visible. Prototype systems can support awareness and education, but they should not shift responsibility away from public agencies, utilities, regulators, or polluters.

Back to top ↑

The Future of Water Monitoring Networks

Emerging environmental monitoring systems increasingly combine:

  • sensor networks
  • satellite data
  • AI analytics
  • open environmental databases
  • watershed dashboards
  • community science programs
  • public decision-support tools
  • laboratory-confirmed sampling workflows

Low-cost computing platforms such as Raspberry Pi allow students, researchers, and community organizations to prototype these technologies and contribute to broader environmental monitoring efforts. Projects like this demonstrate how open hardware and open-source software can strengthen water governance and environmental stewardship.

The long-term challenge is not merely collecting more data. It is building water-monitoring systems that are accurate enough to be useful, transparent enough to be trusted, maintained enough to remain reliable, and accessible enough to support communities facing real freshwater risks.

A stronger future for water monitoring will combine low-cost field nodes with certified laboratory testing, public agencies, watershed institutions, community knowledge, and transparent data governance.

Back to top ↑

Responsible Deployment

This prototype is appropriate for classrooms, makerspaces, environmental education, field labs, community science, watershed awareness projects, and early-stage monitoring experiments. It should not be used to determine whether water is safe for drinking, swimming, irrigation, aquatic life, legal compliance, or public-health decision-making without validated instruments and appropriate laboratory or regulatory procedures.

Responsible deployment means matching the system to the consequence of error. A classroom demonstration can use controlled samples and simulated readings. A field education project can observe trends. A public-health or regulatory context requires certified procedures, chain-of-custody, calibrated instruments, and accountable interpretation.

A responsible version should include calibration records, quality flags, sensor-maintenance logs, data gaps, clear prototype labeling, raw and estimated values, uncertainty notes, and escalation pathways when serious concerns appear.

The central rule is simple: water monitoring should make risk more visible without pretending that prototype data can replace certified water analysis.

Back to top ↑

Reproducibility

All code, documentation, and supporting build materials necessary to reproduce the prototype are included in the project repository. The design intentionally relies on widely available Raspberry Pi hardware, open-source Python libraries, and common sensing components so that it can be rebuilt in classrooms, labs, makerspaces, and independent water-monitoring projects.

The system is intended as a reference implementation rather than a certified scientific observation node. Engineers adapting it for longer-term deployment should validate calibration, enclosure design, data retention, power stability, sensor maintenance, waterproofing, grounding, and local operating conditions.

For the rest of this project series, reproducibility should mean more than making code available. Each article should include a clear bill of materials, setup instructions, validation notes, data model, known failure modes, test procedure, responsible-use framing, and realistic statement of appropriate scope.

Back to top ↑

Conclusion

Building a Raspberry Pi water quality monitoring system demonstrates how embedded sensing and local computation can support stronger water stewardship. By combining water-quality sensors, analog-to-digital conversion, local logging, calibration workflows, and optional dashboard integration, the platform creates a flexible foundation for distributed environmental observation.

Although compact, the design reflects a broader sustainability principle: water resilience depends on environmental visibility. When freshwater systems can be measured continuously and interpreted effectively, communities are better positioned to protect ecosystems, detect pollution, and make more informed decisions.

For classrooms, makerspaces, environmental labs, community science projects, and early-stage watershed monitoring, this Raspberry Pi water quality monitor provides a practical foundation for understanding how sensor networks, data infrastructure, and water governance can work together.

The deeper lesson is not simply that a Raspberry Pi can read pH and turbidity sensors. The deeper lesson is that water monitoring requires measurement discipline: calibration, probe care, waterproofing, data logging, quality flags, field validation, responsible interpretation, and clear limits. When those layers are treated seriously, even a small prototype can demonstrate the logic of stronger freshwater monitoring infrastructure.

Back to top ↑

Further Reading

Back to top ↑

References

Back to top ↑

Scroll to Top