Access to safe drinking water remains a critical global challenge, particularly for communities in remote or underserved regions that often lack the infrastructure and resources for consistent water quality assessment. Traditional methods of water quality analysis, which typically involve manual sampling and laboratory testing, are frequently hampered by high costs, logistical complexities, and significant time delays. These limitations create a substantial gap in public health protection and environmental stewardship, leaving many populations vulnerable to waterborne diseases and environmental degradation.
In response to this critical need, community-led monitoring emerges as a powerful paradigm shift. By empowering local populations to actively participate in assessing their water sources, these communities can gain immediate, actionable insights into water quality. This approach fosters a sense of ownership and enables proactive identification of contamination events or deteriorating conditions, facilitating timely interventions that can prevent widespread health issues. Such decentralized monitoring capabilities move beyond a model of external dependency, cultivating self-reliance and resilience within the communities themselves.
The development of an affordable, offline, and open-source water quality analysis system represents a transformative advancement for these underserved regions. Affordability is paramount, as it ensures that the technology remains accessible to communities with limited financial resources, circumventing the prohibitive costs associated with proprietary commercial systems. Furthermore, the system's offline functionality is crucial; in areas where internet connectivity is sparse or non-existent, continuous operation and immediate data analysis are essential for rapid response to emergent water quality issues. This directly addresses the disparity in access to modern analytical tools that often accompanies the "digital divide," bringing advanced monitoring capabilities to the very locations where traditional infrastructure is lacking. The open-source nature of the solution provides unparalleled transparency, fostering local innovation and enabling customization and repair using readily available knowledge and tools. This approach avoids vendor lock-in, encouraging community contribution and adaptation to specific local needs, thereby promoting long-term sustainability and local capacity building. This is not merely about delivering a product but about cultivating technical skills and fostering sustainable environmental management practices within the community.
This guide is structured to serve a dual audience: community members and project managers who require a clear understanding of the system's purpose and operational procedures, and technical contributors—such as engineers and developers—who will be responsible for building, maintaining, and potentially expanding the system. It endeavors to strike a balance between simplified explanations for general understanding and detailed technical instructions with comprehensive code examples for practical implementation.
Water quality is a multifaceted concept assessed through a combination of physical, chemical, and biological parameters. For the purpose of ensuring safe drinking water, this guide focuses on parameters that are both critical for human health and readily measurable using affordable sensor technology. The selected parameters provide fundamental indicators of water potability and potential contamination.
pH: This parameter quantifies the acidity or alkalinity of water. The World Health Organization (WHO) recommends a pH range of 6.5 to 8.5 for drinking water, as values outside this range can indicate pollution or render the water corrosive, potentially leaching harmful substances from pipes. It is important to note that temperature can influence pH readings, necessitating concurrent temperature measurements for accurate interpretation.
Turbidity: Turbidity refers to the haziness or cloudiness of water, primarily caused by the presence of suspended particles. High turbidity is a significant concern because these particles can shield microorganisms from disinfection processes, thereby increasing health risks. Elevated turbidity levels are also associated with higher water treatment costs. The U.S. Environmental Protection Agency (EPA) recommends a turbidity level of less than 1 NTU (Nephelometric Turbidity Units) for drinking water in developed countries, while a guideline of less than 5 NTU is often considered acceptable in developing countries.
Total Dissolved Solids (TDS): TDS represents the total concentration of dissolved inorganic salts (such as calcium, magnesium, potassium, and sodium) and a small amount of organic matter in water. While high TDS levels are not always a direct health hazard, they can significantly affect the taste of water and serve as an indicator of contamination from sources like sewage, agricultural runoff, or industrial wastewater. The EPA suggests that water with a TDS level exceeding 500 ppm (parts per million) is considered high, and values above 1,000 ppm are generally deemed unsafe for consumption.
Dissolved Oxygen (DO): This parameter measures the amount of oxygen gas dissolved in water. While dissolved oxygen is primarily vital for aquatic life, low DO levels in drinking water sources can signal significant organic pollution, which consumes oxygen as it decomposes. Ideally, drinking water should maintain a DO concentration above 6.5-8 mg/L and between 80-120% saturation. A crucial inverse relationship exists between temperature and dissolved oxygen: as water temperature increases, its capacity to hold dissolved oxygen decreases.
Temperature: Water temperature is a fundamental physical parameter that profoundly influences biological activity, growth rates of microorganisms, and the kinetics of chemical reactions within the water body. It directly impacts other critical parameters such as pH, dissolved oxygen, and electrical conductivity. Although the EPA does not specify a direct drinking water standard for temperature, its pervasive influence on other water quality indicators makes its accurate measurement indispensable for a comprehensive understanding and interpretation of water quality data.
Both the WHO and EPA provide extensive guidelines and legally enforceable standards for drinking water quality, encompassing a broad spectrum of contaminants and parameters. These established benchmarks are foundational for this system, as they provide the crucial thresholds necessary for defining what constitutes "safe" versus "unsafe" water. This distinction is fundamental for training the machine learning model to classify water quality effectively. The table below summarizes the key parameters and their recommended limits, serving as a quick reference for interpreting sensor readings and making informed decisions within communities.
Parameter
Recommended Range/Limit (WHO/EPA)
Potential Implications of Deviation
pH
6.5 - 8.5
Outside range: Corrosivity, presence of pollutants, poor taste
Turbidity
Developed: <1 NTU
Developing: <5 NTU
High: Presence of suspended solids, microorganisms, increased treatment cost, low DO
TDS
<500 ppm (EPA suggests >500 ppm too high, >1000 ppm unsafe)
High: Unwanted taste, highly mineralized water, indicator of pollution
Dissolved Oxygen
>6.5-8 mg/L and 80-120% saturation
Low: Significant organic pollution, harmful to aquatic life
Temperature
No specific EPA limit
Influences pH, DO, EC, biological activity, and chemical reactions
This table is not merely a list of values; it serves as the direct reference for the machine learning model to classify water as "potable" or "not potable." For community members, it translates raw sensor data into meaningful health and safety implications, enabling them to understand the system's output and make immediate, informed decisions about water usage. This direct link between measured data and health guidelines is a cornerstone of empowering local water management.
The selection of hardware components for this offline water quality analysis system prioritizes affordability, ease of sourcing, and compatibility, ensuring that the solution remains accessible and sustainable for communities with limited resources.
The Raspberry Pi Zero W is chosen as the central processing unit due to its exceptionally compact size, minimal power consumption, and low cost, making it highly suitable for deployment in resource-constrained environments. While its integrated Wi-Fi capability is not utilized for continuous offline data transmission, it proves invaluable for initial system setup, software updates, and potential local network access for system configuration when temporary connectivity is available. Despite its small footprint, the Raspberry Pi Zero W possesses sufficient processing power to execute lightweight machine learning models for on-device inference.
For situations where the Raspberry Pi Zero W might be unavailable or for projects requiring greater processing flexibility, several cost-effective alternatives exist:
Libre Computer Board AML-S905X-CC (Le Potato): Often considered a robust overall alternative to the Raspberry Pi, this board is typically priced around $40. It offers enhanced processing power and more RAM compared to the Pi Zero, which could support more complex machine learning models or faster inference times. Le Potato is compatible with widely used operating systems like Ubuntu and Raspbian, simplifying software development.
Orange Pi Zero LTS: This is an extremely compact and low-cost option, with some variants available for as little as $9.49 (for the 256MB version). It includes onboard Ethernet and Power over Ethernet (PoE) functionality, making it a viable choice for fixed installations where a wired connection is feasible, even if not for internet access.
Banana Pi BPI M2 Zero: Sharing a similar form factor with the Raspberry Pi Zero W, the Banana Pi M2 Zero features a faster Allwinner H2+ System-on-Chip (SOC) and is typically priced around $18. It is capable of running various Linux-based operating systems, offering a performance upgrade within a familiar compact design.
The DFRobot Gravity series sensors are highly recommended for this project due to their balance of affordability, ease of use, and straightforward compatibility with microcontrollers like Arduino and Raspberry Pi through their "Gravity" connectors. These sensors often come with integrated signal conversion boards, significantly simplifying the electrical interfacing process.
pH Sensor: The DFRobot Gravity: Analog pH Sensor - Meter Kit (SKU: SEN0161-V2, approximately $39.50) is a suitable choice. For applications demanding higher durability and continuous monitoring, the
Industrial Analog pH Meter Kit (SKU: SEN0169-V2, approximately $64.90) is a more robust option, designed for 24/7 operation. Both models necessitate two-point calibration using standard buffer solutions (e.g., pH 4.0 and 7.0) to ensure accurate readings. It is important to note that typical lab-grade pH probes are not designed for prolonged immersion and may degrade if left in water continuously.
Turbidity Sensor: The DFRobot Gravity: Analog Turbidity Sensor for Arduino (SKU: SEN0189, approximately $9.90) is an economical solution. This sensor measures suspended particles by detecting changes in light transmittance and scattering. A critical design consideration is that the
top of the probe is not waterproof and must be protected from direct water exposure beyond its sensing area.
Temperature Sensor: The Waterproof DS18B20-compatible Temperature Sensor (ranging from approximately $3.60 to $13.13) is highly effective and widely available. This digital sensor utilizes a 1-Wire interface, enabling multiple sensors to share a single data pin, which simplifies wiring. Its stainless steel casing makes the probe itself inherently waterproof, allowing for direct immersion in water.
Total Dissolved Solids (TDS) Sensor: The DFRobot Gravity: Analog TDS Sensor/Meter for Arduino (SKU: SEN0244, approximately $11.80) provides an analog output compatible with microcontroller systems operating from 3.3V to 5.5V. It is crucial to understand that while the probe head and cable are waterproof, the connector and the signal transmitter board are
not and require secure housing within a protective enclosure. Accurate TDS measurements also necessitate temperature compensation, ideally achieved by integrating a temperature sensor into the measurement process.
Dissolved Oxygen (DO) Sensor: The DFRobot Gravity: Analog Dissolved Oxygen / DO Sensor Meter Kit for Arduino (SKU: SEN0237-A, approximately $169.00) is a more significant investment but provides essential DO measurements. This galvanic probe offers the advantage of not requiring a polarization time, making it ready for immediate measurements. The filling solution (0.5 mol/L NaOH) and membrane cap are replaceable components, which contributes to lower long-term maintenance costs. However, a significant challenge for international deployment is that the
corrosive filling solution is often not included due to shipping regulations, requiring local sourcing or preparation, and careful handling due to its corrosive nature. Gentle stirring of the water sample is recommended during measurement, as the sensor itself consumes a small amount of oxygen, which could affect readings in stagnant water.
The initial low purchase cost of many of these sensors, while appealing, can be deceptive. The true operational expense, or total cost of ownership, extends beyond the upfront price to include ongoing costs for calibration solutions, replacement parts (such as DO membranes and filling solution), and the labor and expertise required for consistent maintenance. The necessity of handling corrosive chemicals for the DO sensor and the non-waterproof nature of several sensor signal boards present practical difficulties and safety considerations for community deployments, particularly in environments where specialized chemicals or meticulous handling procedures may be difficult to implement consistently. This highlights a critical trade-off between initial affordability and the complexities of long-term operation, safety protocols, and the need for a reliable supply chain for consumables.
The Raspberry Pi's General Purpose Input/Output (GPIO) pins are inherently digital, meaning they can only interpret HIGH or LOW voltage states. To effectively read the continuous analog output signals from most water quality sensors (pH, Turbidity, TDS, DO), an external Analog-to-Digital Converter (ADC) is an indispensable component.
Two common and suitable ADC options are:
MCP3008: This is a widely used and low-cost 8-channel, 10-bit ADC. It communicates with the Raspberry Pi using the SPI (Serial Peripheral Interface) protocol. The MCP3008 benefits from robust open-source Python library support, facilitating its integration into Raspberry Pi projects.
DFRobot I2C ADS1115 16-Bit ADC Module (SKU: DFR0553, approximately $15.00): This module is specifically designed for seamless integration with Raspberry Pi and DFRobot's Gravity series analog sensors. It offers a higher 16-bit precision, providing significantly more granular data (65,536 distinct values compared to MCP3008's 1,024 values). The ADS1115 utilizes the I2C (Inter-Integrated Circuit) communication protocol, which typically requires fewer wiring connections (two data lines plus power/ground) than SPI, simplifying the assembly process. It supports four analog input channels and can be expanded to eight by cascading two modules, offering flexibility for future sensor additions.
The choice of ADC is not merely a technical detail; it directly influences the accuracy and granularity of the collected water quality data. While the MCP3008 is a common and economical choice, the ADS1115's 16-bit resolution provides substantially more detailed readings. This enhanced precision can be highly advantageous for detecting subtle changes in water quality parameters, which in turn can improve the performance and reliability of the machine learning model. Furthermore, the ADS1115's I2C interface simplifies wiring compared to SPI, reducing the number of GPIO pins consumed and minimizing potential points of failure during assembly, which is a practical benefit for non-expert builders. This highlights a critical design decision that balances initial cost, assembly complexity, and the ultimate quality of the data captured for analysis.
For a portable, offline water quality analysis system, a reliable and self-contained power source is paramount to ensure continuous operation in environments without consistent grid electricity.
UPS HATs (Uninterruptible Power Supply HATs): These boards attach directly to the Raspberry Pi's GPIO pins, providing a stable 5V power output. They are designed to support simultaneous charging and discharging, allowing the system to run on battery power during outages or when disconnected from the grid. Various Waveshare UPS HATs are available, with prices typically ranging from approximately $25.95 to $30.95.
PiSugar Battery Modules: The PiSugar 2 (1200 mAh, approximately $35.99) is specifically engineered for the Raspberry Pi Zero series. It offers an integrated Uninterruptible Power Supply (UPS) function, a Real-Time Clock (RTC), and customizable buttons. A key advantage of the PiSugar 2 is its connection method: it utilizes pogo pins to connect to the underside of the Raspberry Pi's GPIO, leaving the main GPIO headers free for sensor connections. It also features a user-friendly WebUI, which allows for convenient monitoring of battery status and configuration of functions without requiring complex command-line coding.
The PiSugar 2 offers a more integrated and user-friendly solution for portability. Beyond simply providing power, the choice of power solution significantly impacts the system's reliability, data integrity, and overall usability in remote, offline settings. The integrated Real-Time Clock (RTC) is invaluable for ensuring accurate timestamps for all logged data, which is critical for trend analysis and maintaining the integrity of the machine learning training dataset, especially in environments where network time synchronization is unavailable. The WebUI, accessible via a local Wi-Fi hotspot temporarily created by the Raspberry Pi, simplifies the process of monitoring battery status and system health without requiring physical access or complex terminal commands. This enhances the user experience and streamlines maintenance, elevating power from a basic "on/off" consideration to a vital component for sustained system health and data integrity.
A robust protective enclosure is indispensable for safeguarding the electronic components from environmental hazards such as moisture, dust, and physical damage, particularly in outdoor or challenging community environments.
Key considerations for the enclosure include:
Waterproof/Weatherproof Rating: The enclosure must be fully sealed to protect against rain, splashes, and high humidity. Commercially available waterproof project boxes (e.g., IP67-rated plastic enclosures) are highly recommended. For all cable entry points, the use of waterproof nylon cable glands is essential to create a tight, moisture-proof seal around the wires. Ensuring these glands are securely tightened is crucial to prevent any water ingress.
Air Circulation: For sensors designed to measure ambient conditions, such as the temperature sensor when placed outside the water body, the enclosure design must facilitate adequate air circulation while simultaneously preventing moisture entry. Mounting the enclosure with any necessary ventilation holes facing downwards can help mitigate rain intrusion.
Material: Durable plastics, such as Perspex or ABS, are suitable materials for the enclosure due to their resistance to environmental factors.
Internal Mounting: To prevent components from shifting, vibrating, or short-circuiting, it is advisable to use 3D-printed mounts, standoffs, or adhesive pads to securely fasten the Raspberry Pi, ADC module, and sensor signal boards inside the enclosure.
The term "waterproof" alone is often insufficient for robust environmental deployments; the design must consider broader "weatherproof" factors. This includes protection against high humidity, which can lead to corrosion of electronic components over time, and direct sunlight, which can cause internal heating and skew readings from certain sensors like pH, dissolved oxygen, and electrical conductivity. The fact that several critical sensor components (e.g., the top of the turbidity probe, and the signal boards for pH, TDS, and DO sensors) are explicitly not waterproof means the enclosure design must be highly sophisticated. It needs to effectively protect these sensitive electronics while allowing the sensor probes to interact with the water. This points to a need for detailed enclosure design considerations, potentially involving multiple compartments, specific sealing techniques, and material choices that can withstand the unique environmental conditions of the deployment site.
The following table provides a comprehensive list of the recommended hardware components, their estimated costs, and sourcing notes to facilitate procurement for communities with limited resources. All components are selected for their affordability and accessibility.
Component Name
Quantity
Recommended Model/SKU
Estimated Unit Cost (USD)
Sourcing Notes
Microcontroller
1
Raspberry Pi Zero W
$15 - $20
Online electronics retailers (Adafruit, SparkFun, PiShop.us)
MicroSD Card
1
16GB or 32GB (Class 10 or higher)
$5 - $15
Local electronics stores, online retailers
pH Sensor
1
DFRobot Gravity: Analog pH Sensor - Meter Kit (SEN0161-V2) OR Industrial Analog pH Meter Kit (SEN0169-V2)
$39.50 - $64.90
DFRobot, RobotShop, Makerlab-Electronics
Turbidity Sensor
1
DFRobot Gravity: Analog Turbidity Sensor (SEN0189)
$9.90
DFRobot, RobotShop, Makerlab-Electronics
Temperature Sensor
1
Waterproof DS18B20-compatible Temperature Sensor
$3.60 - $13.13
Pimoroni, Walmart, other electronics suppliers
TDS Sensor
1
DFRobot Gravity: Analog TDS Sensor/Meter (SEN0244)
$11.80
DFRobot, RobotShop, Makerlab-Electronics
Dissolved Oxygen Sensor
1
DFRobot Gravity: Analog DO Sensor Meter Kit (SEN0237-A)
$169.00
DFRobot, RobotShop, Makerlab-Electronics (Note: Filling solution often not included)
Analog-to-Digital Converter (ADC)
1
DFRobot I2C ADS1115 16-Bit ADC Module (DFR0553)
$15.00
DFRobot, RobotShop, Makerlab-Electronics
Power Module (UPS/Battery)
1
PiSugar 2 1200 mAh Raspberry Pi Zero Battery
$35.99
PiSugar.com, online retailers
Protective Enclosure
1
IP67-rated plastic project box (e.g., Hammond, Bud Industries)
$20 - $50
Local hardware stores, industrial suppliers, online retailers
Waterproof Cable Glands
5-7
M12/M16 Nylon Cable Glands
$5 - $10 (pack)
Local hardware stores, online retailers
Jumper Wires & Breadboard
1 set
Assorted Male-Female Jumper Wires, Small Breadboard
$5 - $10
Local electronics stores, online retailers
4.7kΩ Resistor
1
(For DS18B20 pull-up)
< $1
Local electronics stores, online retailers (often sold with DS18B20)
Small Screws/Standoffs
1 set
For internal component mounting
$2 - $5
Local hardware stores, online retailers
Total Estimated Cost
~$320 - $400
(Excluding shipping, local taxes, and consumables like calibration solutions)
Exportar a Hojas de cálculo
This Bill of Materials directly addresses the requirement for a list of affordable and easily sourced hardware components. By providing specific models and estimated costs, it helps communities budget effectively and identifies readily available procurement channels. This transparency and detailed listing are crucial for the reproducibility of the project, ensuring that contributors and community members can acquire the correct and compatible parts, thereby upholding the open-source ethos of the guide.
Assembling the offline water quality analysis system involves careful integration of hardware and initial software configuration. This section provides detailed, step-by-step instructions designed to be accessible to a non-expert audience while providing sufficient technical depth for contributors.
Install Raspberry Pi OS Lite: Begin by downloading the Raspberry Pi OS Lite image (the minimal, command-line-only version) from the official Raspberry Pi website. Utilize a high-quality microSD card (e.g., 16GB or 32GB, Class 10 or higher) and the official Raspberry Pi Imager tool to flash the operating system onto the card. This minimal OS version is ideal for embedded applications as it conserves system resources and provides a lean operating environment, which is beneficial for the Raspberry Pi Zero's capabilities.
Enable Interfaces: After successfully flashing the OS, insert the microSD card into the Raspberry Pi Zero. For initial setup, connecting a keyboard and monitor directly to the Pi is recommended. Alternatively, for remote access, pre-configure SSH and Wi-Fi settings on the SD card before first boot. Once the Raspberry Pi is powered on and running, open a terminal and execute the command sudo raspi-config. Navigate through the menu to "Interfacing Options" and enable the following communication protocols:
I2C: This interface is essential for establishing communication with the DFRobot I2C ADS1115 Analog-to-Digital Converter module.
1-Wire: This protocol is required for the DS18B20 digital temperature sensor.
After enabling these, select "Finish" and reboot the Raspberry Pi to apply the changes.
Update System: Once the Raspberry Pi has rebooted, ensure all pre-installed software packages are current. In the terminal, run the commands sudo apt-get update followed by sudo apt-get upgrade. This process fetches the latest package information and installs any available updates, ensuring system compatibility and security.
The Raspberry Pi's native inability to read analog signals necessitates an Analog-to-Digital Converter (ADC). The DFRobot I2C ADS1115 module is chosen for its higher precision and simplified wiring. The perceived simplicity of "Gravity" connectors on the sensors can be misleading, as interfacing analog signals with a digital-only microcontroller like the Raspberry Pi still requires an intermediary ADC. This introduces an additional layer of wiring and software configuration that must be explicitly detailed to ensure successful implementation for non-expert builders.
Wiring the ADS1115: Power off the Raspberry Pi before making any connections. Connect the DFRobot I2C ADS1115 module to the Raspberry Pi's GPIO pins as follows:
Connect the VCC pin of the ADS1115 module to the 3.3V pin on the Raspberry Pi. The ADS1115 is designed to operate with a wide voltage input, typically from 3.3V to 5V, making it flexible for various power rails.
Connect the GND pin of the ADS1115 module to any GND pin on the Raspberry Pi.
Connect the SDA pin (Serial Data Line) of the ADS1115 module to the SDA (GPIO 2) pin on the Raspberry Pi.
Connect the SCL pin (Serial Clock Line) of the ADS1115 module to the SCL (GPIO 3) pin on the Raspberry Pi.
Driver Installation: The ADS1115 requires a specific Python driver to communicate with the Raspberry Pi. Install the necessary libraries by opening a terminal on the Raspberry Pi and executing the following commands. These commands will install git (if not already present), Python development tools, and then clone and install the DFRobot ADS1115 Python driver:
Bash
sudo apt-get update
sudo apt-get install build-essential python-dev python-smbus git -y
git clone https://github.com/DFRobot/DFRobot_ADS1115.git
cd DFRobot_ADS1115/RaspberryPi/Python
sudo python setup.py install
This ensures the software is ready to interpret signals from the ADC.
Once the ADC is integrated, the water quality sensors can be connected. It is paramount to remember that while the sensor probes themselves may be waterproof, many of the associated signal conversion boards are not. This necessitates careful planning for their placement within the main protective enclosure.
Gravity Series Sensors (pH, Turbidity, TDS, DO) to ADS1115: These DFRobot Gravity series sensors typically feature a 3-pin connector (VCC, GND, Signal) on their signal conversion boards.
Connect the VCC pin of each sensor's signal conversion board to the VCC pin on the ADS1115 module.
Connect the GND pin of each sensor's signal conversion board to the GND pin on the ADS1115 module.
Connect the analog Signal pin of each sensor's conversion board to one of the available analog input channels on the ADS1115 (A0, A1, A2, or A3). For example, pH to A0, Turbidity to A1, TDS to A2, and DO to A3.
Critical Protection Note: It is imperative that the signal conversion boards for the pH, Turbidity, and TDS sensors, as well as the DO sensor's signal converter board, are not waterproof and must be housed securely within the main protective enclosure, completely isolated from any moisture. Only the sensor probes themselves should extend out of the enclosure and be exposed to the water source.
Temperature Sensor (DS18B20) to Raspberry Pi GPIO: The DS18B20 is a digital sensor and connects directly to the Raspberry Pi's GPIO.
Connect the VCC pin of the DS18B20 to the 3.3V pin on the Raspberry Pi.
Connect the GND pin of the DS18B20 to any GND pin on the Raspberry Pi.
Connect the Data (DQ) pin of the DS18B20 to GPIO 4 (physical pin 7) on the Raspberry Pi.
Install a 4.7kΩ pull-up resistor between the Data pin and the 3.3V line. This resistor is crucial for the 1-Wire communication protocol to function correctly.
To activate the 1-Wire interface, ensure it was enabled in sudo raspi-config during the initial setup. Additionally, load the necessary kernel modules by running sudo modprobe w1-gpio and sudo modprobe w1-therm in the terminal.
The PiSugar 2 module provides an integrated and user-friendly power solution that is particularly beneficial for portable, offline operation. Its inclusion of a Real-Time Clock (RTC) is vital for maintaining accurate timestamps in data logs, especially in environments where network time synchronization is unavailable. This ensures the integrity of the collected data for machine learning training and analysis.
Installation: Ensure the Raspberry Pi Zero is powered off. Carefully align the PiSugar 2's pogo pins with the corresponding GPIO pads on the underside of the Raspberry Pi Zero. Gently press the two boards together, ensuring a firm connection, and then secure them using the matching screws provided with the PiSugar 2. This design allows the PiSugar to supply power and communicate data without occupying the primary GPIO headers, leaving them free for other sensor connections.
Activation: After installation, press and hold the small activation button on the PiSugar 2 for approximately 2 seconds. The Raspberry Pi Zero should power on. Then, ensure the physical switch on the PiSugar 2 is in the "ON" position.
Charging: The PiSugar 2 module is designed to support simultaneous charging and discharging. This allows the system to remain operational while its battery is being recharged, for instance, via a standard micro-USB power adapter or a small solar panel and charge controller (though solar components are not included in this guide's Bill of Materials, they represent a valuable future enhancement).
The protective enclosure is a critical component, safeguarding the sensitive electronics from environmental elements and ensuring the system's longevity. The design must account for the non-waterproof nature of several sensor components, requiring a sophisticated approach to weatherproofing.
Main Enclosure: Select a robust, commercially available waterproof enclosure, such as an IP67-rated plastic project box. This main enclosure will house the Raspberry Pi, the ADS1115 ADC, and all sensor signal boards, providing a secure and dry environment for the sensitive electronics.
Sensor Probe Routing: Carefully plan and drill or cut precise holes in the enclosure for routing the sensor cables out to the water source. For each cable, use a waterproof nylon cable gland. These glands are designed to create a tight, moisture-proof seal around the wires as they pass through the enclosure wall. It is crucial to tighten these glands securely to prevent any water ingress, which could otherwise compromise the entire system.
Temperature Sensor Placement: If the DS18B20 temperature sensor is intended to measure ambient air temperature (rather than water temperature), its probe should be positioned to allow adequate air circulation while remaining protected from direct rain and prolonged direct sunlight. Direct sunlight can significantly skew temperature readings and impact the accuracy of other temperature-dependent parameters.
Internal Mounting: To prevent components from shifting, vibrating, or short-circuiting due to contact with the enclosure walls or other components, utilize 3D-printed mounts, plastic standoffs, or strong adhesive pads to securely fasten the Raspberry Pi and the ADS1115 ADC inside the box. This internal stability is vital for the long-term reliability of the system.
Effective machine learning models rely heavily on high-quality, well-prepared data. In an offline context, the methodology for collecting and labeling this data must be robust and practical for communities with limited resources.
The system will continuously collect water quality parameters using Python scripts running on the Raspberry Pi. These scripts are designed to interface with the connected sensors and store the readings locally.
Python Scripting: Python scripts will be developed to read the sensor data. For the pH, Turbidity, TDS, and DO sensors, the script will communicate with the DFRobot I2C ADS1115 ADC module to obtain analog voltage readings. The DS18B20 temperature sensor, being digital, will be read directly via the Raspberry Pi's 1-Wire GPIO interface.
Data Logging to CSV: The collected sensor readings, along with precise timestamps, will be stored in local Comma Separated Value (CSV) files on the Raspberry Pi's microSD card. The PiSugar's integrated Real-Time Clock (RTC) is essential here, ensuring that timestamps are accurate even without internet connectivity for network time synchronization. This local storage ensures data persistence and accessibility for later analysis or model training, regardless of network availability.
A conceptual Python code structure for data logging is provided below. The full, executable code will be made available in the project's open-source GitHub repository.
Python
import csv
import time
import os
from datetime import datetime
# Import specific sensor libraries (e.g., DFRobot_ADS1115 for ADC, ds18b20 for temperature)
# from DFRobot_ADS1115 import ADS1115 # Placeholder for actual library import
# from sensor import DS18B20 # Placeholder for actual library import
# Initialize ADC and sensors here (assuming objects 'ads1115' and 'temp_sensor' are created)
# Example:
# ads1115 = ADS1115()
# temp_sensor = DS18B20('28-XXXXXXXXXXXX') # Replace with your DS18B20 sensor ID, found via /sys/bus/w1/devices/
DATA_FILE = "/home/pi/water_quality_data.csv"
HEADERS =
def initialize_csv():
"""Ensures the CSV file exists with headers if it's new or empty."""
if not os.path.exists(DATA_FILE) or os.stat(DATA_FILE).st_size == 0:
with open(DATA_FILE, 'w', newline='') as f:
writer = csv.writer(f)
writer.writerow(HEADERS)
print(f"Initialized {DATA_FILE} with headers.")
def read_sensors():
"""Reads raw voltage data from all connected analog sensors via ADC and temperature."""
# This section requires actual sensor-to-voltage conversion logic based on datasheets
# and calibration. For simplicity here, we assume direct voltage readings.
# In a real implementation, these would be converted to standard units (pH, NTU, ppm, mg/L)
# using calibration curves.
try:
# Placeholder for actual ADC and sensor reading logic
# Example: ph_val = ads1115.read_voltage(ads1115.A0)
# Example: turb_val = ads1115.read_voltage(ads1115.A1)
# Example: tds_val = ads1115.read_voltage(ads1115.A2)
# Example: do_val = ads1115.read_voltage(ads1115.A3)
# Example: temp_c = temp_sensor.temperature().C
# For demonstration, returning dummy values
ph_val = 2.5 + (time.time() % 100) / 50.0 # Simulates some variation
turb_val = 1.0 + (time.time() % 100) / 100.0
tds_val = 0.8 + (time.time() % 100) / 100.0
do_val = 1.5 + (time.time() % 100) / 150.0
temp_c = 20.0 + (time.time() % 100) / 20.0
except Exception as e:
print(f"Error reading sensors: {e}. Returning dummy data.")
# Return dummy data or handle error appropriately
return {"pH_Voltage": -1, "Turbidity_Voltage": -1, "TDS_Voltage": -1, "DO_Voltage": -1, "Temperature_C": -1}
return {
"pH_Voltage": ph_val,
"Turbidity_Voltage": turb_val,
"TDS_Voltage": tds_val,
"DO_Voltage": do_val,
"Temperature_C": temp_c
}
def log_data():
"""Continuously collects sensor data and appends it to the CSV file."""
initialize_csv()
while True:
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
sensor_readings = read_sensors()
row_data = [
timestamp,
sensor_readings["pH_Voltage"],
sensor_readings,
sensor_readings,
sensor_readings,
sensor_readings
with open(DATA_FILE, 'a', newline='') as f:
writer = csv.writer(f)
writer.writerow(row_data)
print(f"Logged data: {row_data}")
time.sleep(300) # Log every 5 minutes (adjust frequency as needed)
if __name__ == "__main__":
log_data()
The dataset collected will be structured as rows of sensor readings, with each row representing a single measurement point. Each row will include a timestamp (e.g., "YYYY-MM-DD HH:MM:SS") and the raw voltage values (or direct readings for DS18B20) for pH, turbidity, TDS, DO, and the temperature in Celsius. These raw sensor values will serve as the
input features for the machine learning model, which will learn patterns from this data to predict water potability.
Before training a machine learning model, the raw collected data requires preprocessing to enhance its quality and suitability for algorithmic analysis.
Handling Missing Values: During continuous data collection, sensor malfunctions, power interruptions, or environmental factors can lead to incomplete readings, resulting in missing values (often represented as "NaN" - Not a Number). For resource-limited settings, practical strategies for addressing these gaps include replacing missing values with the median or mean of the respective sensor column. While more sophisticated imputation techniques exist, they often demand greater computational resources and expertise, which may not be feasible in an offline, community-based context.
Data Normalization/Scaling: Machine learning algorithms generally perform more effectively and converge faster when input features are scaled to a similar numerical range (e.g., between 0 and 1, or with a mean of 0 and a standard deviation of 1). This process prevents features with naturally larger numerical ranges (e.g., Solids in ppm vs. pH values) from disproportionately influencing the model's learning process. The
StandardScaler from the scikit-learn library is a widely adopted method for this purpose, transforming data to have zero mean and unit variance.
A fundamental requirement for supervised machine learning is the availability of labeled data, where each data sample is associated with a known outcome or "label" (e.g., "Potable" or "Not Potable"). Given that this system operates offline, the labeling process cannot rely on real-time cloud services or automated external APIs. This necessitates a human-in-the-loop approach, which is a critical, non-technical step ensuring the relevance and quality of the training data.
The methodology for offline data labeling involves:
Reference to Standards: The "Simplified Drinking Water Quality Standards" table presented in Section 2 serves as the primary reference. Clear thresholds are established for each measured parameter based on WHO and EPA guidelines. For instance, if a pH reading falls outside the 6.5-8.5 range, or turbidity exceeds 5 NTU, the corresponding water sample might be provisionally labeled as "Not Potable".
Manual/Semi-Automatic Labeling: Periodically (e.g., weekly or monthly), a local expert or a trained community member would review batches of the raw sensor data. Based on the established guidelines and potentially simple confirmatory field tests (e.g., visual inspection for extreme turbidity, or taste/odor assessment where deemed safe and appropriate), they would assign a "Potability" label (0 for unsafe, 1 for safe) to each data point or a representative subset of the collected data. This human input provides the essential ground truth that the machine learning model will learn from.
Cross-Referencing (if possible): If external laboratory tests are occasionally available for a subset of water samples, these highly accurate results can be used as definitive ground truth for labeling that specific data. Incorporating such validated labels can significantly improve the overall accuracy and reliability of the dataset used for training the machine learning model.
This iterative process of data collection, preprocessing, and human-guided labeling creates a comprehensive, labeled dataset. This dataset will resemble publicly available water quality datasets, featuring columns for sensor readings and a distinct 'Potability' column, which is the direct result of this offline, community-driven labeling effort.
The table below illustrates the typical structure of the dataset after local data acquisition and prior to machine learning model training. This format ensures that the data is ready for use as input features and target labels for a supervised classification task.
Timestamp
pH_Value
Turbidity_NTU
TDS_PPM
DO_MGL
Temperature_C
Potability (0=Unsafe, 1=Safe)
2024-07-20 10:00:00
7.2
0.8
350
7.5
22.1
1
2024-07-20 10:05:00
6.9
1.2
410
7.1
22.3
1
2024-07-20 10:10:00
8.6
3.5
620
6.8
22.5
0
2024-07-20 10:15:00
7.1
0.9
380
7.4
22.2
1
2024-07-20 10:20:00
6.4
5.1
1100
6.0
22.4
0
Exportar a Hojas de cálculo
This table directly demonstrates the precise format and types of data required as input features for the machine learning model, making the data preparation phase concrete and actionable for technical contributors. For non-expert community members, it visually represents what data is being collected and how it directly relates to the final "potability" decision. This bridges the conceptual gap between raw sensor data and the machine learning model's output, even if the model itself functions as a "black box" to the end-user. Furthermore, this standardized data structure is essential for consistent model training, facilitating future model updates, and enabling potential data sharing or collaboration with other communities.
The integration of machine learning into this offline water quality system is pivotal for providing intelligent, real-time analysis directly at the point of need. The primary challenge is to select and train models that are "lightweight" enough to run efficiently on resource-constrained devices like the Raspberry Pi Zero, without requiring constant internet connectivity for cloud-based processing.
For numerical classification tasks like water potability assessment, traditional image-based machine learning models (e.g., Convolutional Neural Networks for image classification) are generally unsuitable, as the input data consists of numerical sensor readings, not images. Instead, models optimized for numerical data and minimal computational overhead are preferred.
Recommended lightweight machine learning models for this application include:
Decision Trees (DT): Decision trees are highly interpretable and efficient algorithms suitable for both classification and regression tasks. They operate by recursively partitioning the dataset based on the most influential features, creating a tree-like structure that is easy to understand and visualize. Decision trees have demonstrated high accuracy in water quality prediction, with some studies reporting over 97% accuracy. Their simplicity and clarity make them an excellent choice for a community-focused project where understanding the decision logic can be beneficial.
Simple Artificial Neural Networks (ANN): Artificial Neural Networks, particularly those with a simple architecture (e.g., one or two hidden layers), are effective at capturing complex, non-linear relationships within data. ANNs have also shown strong performance in water quality prediction, with reported accuracies around 96%. While slightly less interpretable than decision trees, their ability to learn intricate patterns can lead to robust classification.
These models are chosen for their balance of accuracy and computational efficiency, making them suitable for deployment on embedded systems.
The training of the machine learning model will typically occur on a more powerful computer (e.g., a desktop PC) due to the computational demands of model training, even for lightweight models. The trained model is then converted for deployment on the Raspberry Pi Zero.
Data Splitting: The collected and preprocessed dataset is first divided into two distinct subsets: a training set and a testing set. A common split ratio is 70% for training and 30% for testing, or 85% for training and 15% for testing. This separation is crucial to prevent "overfitting," a phenomenon where a model learns the training data too well, including its noise, and consequently performs poorly on new, unseen data. The testing set provides an unbiased evaluation of the model's generalization capability.
Model Definition (Keras/TensorFlow): Using a high-level API like Keras (which runs on top of TensorFlow), the chosen model's architecture is defined.
For a simple ANN: This typically involves an input layer with the number of neurons equal to the number of input features (e.g., 5-6 sensor parameters). This is followed by one or two "Dense" (fully connected) hidden layers, often utilizing an activation function like ReLU (Rectified Linear Unit) for non-linearity. The final output layer would consist of a single neuron with a sigmoid activation function, which outputs a probability between 0 and 1, suitable for binary classification (0 for unsafe, 1 for safe).
For a Decision Tree: Libraries like scikit-learn provide straightforward implementations. The model's interpretability stems from its clear decision rules, which partition the data based on feature values.
Compilation and Training: Once the model architecture is defined, it is "compiled" by specifying the loss function (e.g., binary_crossentropy for binary classification), an optimizer (e.g., Adam for efficient gradient descent), and metrics to monitor during training (e.g., accuracy). The model is then trained using the
model.fit() method, iterating over the training data for a specified number of epochs (passes through the entire dataset) and in batches (subsets of data processed at once).
Evaluation: After training, the model's performance is assessed using the previously unseen testing dataset. Metrics such as accuracy, precision, recall, and F1-score are used to quantify how well the model generalizes to new data.
TensorFlow Lite (TFLite) is specifically designed to enable machine learning models to run efficiently on edge devices with limited computational resources, such as the Raspberry Pi Zero. This conversion process significantly reduces the model's size and optimizes it for on-device inference.
The conversion steps typically involve:
Saving the Trained Model: The trained Keras model is first saved in a standard TensorFlow format, such as a SavedModel or a Keras H5 file.
Using tf.lite.TFLiteConverter: The tf.lite.TFLiteConverter tool is then used to convert the saved model into the optimized TFLite FlatBuffer format (.tflite file). This converter can load models from SavedModel directories, Keras models, or concrete functions.
Quantization: A key optimization technique for embedded systems is "quantization." This process reduces the precision of the model's weights and activations (e.g., from 32-bit floating-point numbers to 8-bit integers), which drastically decreases the model's memory footprint and computational requirements without significant loss of accuracy. Post-training quantization is a common method where an already trained floating-point model is converted to a fixed-point model.
Once the lightweight .tflite model is generated, it is transferred to the Raspberry Pi Zero for on-device inference. To minimize the software footprint on the Pi, only the essential TensorFlow Lite interpreter is installed.
Installing tflite_runtime: Instead of installing the entire TensorFlow package, which is resource-intensive, the tflite_runtime package is installed. This lightweight package contains only the necessary Interpreter class, which is used for making predictions from an existing TFLite model. The installation typically involves downloading the appropriate Python wheel file for the Raspberry Pi's architecture and Python version, then installing it using
pip3.
Performing Inference: A Python script on the Raspberry Pi Zero will load the .tflite model and use the tflite_runtime.interpreter.Interpreter class to perform real-time water quality classification. The process involves:
Loading the .tflite model file into the Interpreter.
Calling interpreter.allocate_tensors() to allocate memory for the input and output tensors.
Obtaining the latest sensor readings (numerical values) from the connected hardware.
Setting these numerical input values to the interpreter's input tensor using interpreter.set_tensor().
Executing the model inference using interpreter.invoke().
Retrieving the classification result (e.g., 0 or 1 for potability) from the interpreter's output tensor using interpreter.get_tensor().
This on-device inference capability means that water quality assessments can be performed immediately and locally, providing communities with rapid feedback without any reliance on internet connectivity.
The development and deployment of this open-source, offline water quality analysis system holds profound implications for communities lacking internet access, transcending mere technological provision to foster significant social and health benefits.
The most immediate and impactful application of this system is its ability to enable communities to make timely, informed decisions about their water usage. By providing immediate, on-device analysis of key water quality parameters, local populations no longer need to wait for days or weeks for external laboratory results. This direct access to information allows them to determine if water is safe for drinking, cooking, or agricultural purposes in real-time. This capability fundamentally addresses the "digital divide" by decentralizing analytical power, placing it directly into the hands of those who need it most, thereby enhancing local autonomy and self-management of vital resources.
The continuous monitoring capabilities, coupled with the on-device machine learning model, transform the system into an effective early warning mechanism. The machine learning model can be trained to detect anomalies or deviations from established safe water quality parameters. In the event of sudden changes in pH, turbidity, or other indicators, the system can immediately flag potential contamination events. This rapid detection allows communities to initiate swift interventions, such as boiling water, seeking alternative sources, or reporting the issue to relevant authorities, thereby preventing the spread of waterborne diseases and mitigating health risks before they escalate.
Even in an offline context, the locally collected data provides an invaluable historical record. While not transmitted in real-time, this data can be periodically transferred (e.g., via USB drive) to a computer when available, allowing for long-term trend analysis. Such comprehensive datasets can be instrumental in identifying persistent water quality issues, demonstrating the severity of problems to external agencies, and serving as concrete evidence to advocate for necessary infrastructure improvements, policy changes, or resource allocation from government or non-governmental organizations. This empowers communities with data-driven insights, enabling them to engage in more effective advocacy and informed water resource management.
The open-source nature of this system is a critical enabler of long-term sustainability and community empowerment. By providing full access to the hardware designs, software code, and documentation, the project fosters the development of local technical skills in electronics assembly, programming, and basic data analysis. Community members can understand how the system works, learn to maintain it, troubleshoot issues, and even adapt it to their specific local environmental conditions or to monitor additional parameters. This approach cultivates a sense of ownership and technical self-sufficiency, reducing reliance on external support and promoting a sustainable model where communities become active stewards of their water resources, rather than passive recipients of external aid. This represents a shift from a "solution delivery" model to a "capacity building" model, fostering long-term resilience and potentially inspiring local innovation in other technological domains.
This project is built upon a fundamental commitment to open-source principles. All hardware components, software (including Python scripts for data acquisition and the machine learning model), and comprehensive documentation are designed to be entirely open-source and freely available for community use, modification, and distribution. This commitment ensures transparency, fosters collaborative development, and empowers communities to adapt and improve the system according to their evolving needs.
The entire codebase, including sensor reading scripts, data logging mechanisms, and the machine learning model training and inference code, will be hosted on a public GitHub repository. This will allow anyone to access, review, and contribute to the project.
Future enhancements and areas for community contribution include:
Integration of Additional Sensor Types: Expanding the system to monitor a broader range of water quality parameters, such as electrical conductivity (EC), Oxidation-Reduction Potential (ORP), or specific ion concentrations (e.g., nitrates, phosphates), could provide a more comprehensive assessment of water health.
Advanced Power Solutions: Investigating and integrating sustainable power sources, such as small solar panels with charge controllers, could further enhance the system's autonomy and reduce reliance on manual charging.
Local Data Visualization: Implementing a small, low-power LCD screen or e-paper display directly on the device could provide immediate visual feedback of water quality status to community members without needing a separate computer.
Improved Enclosure Designs: Developing more robust and modular enclosure designs that are specifically tailored for varying harsh environmental conditions (e.g., extreme temperatures, high humidity, physical tampering) would enhance durability.
Community-Driven Model Retraining and Updates: Establishing a simplified process for communities to contribute their locally collected and labeled data to a shared pool, enabling periodic retraining and updating of the machine learning model to improve its accuracy and adapt to changing local water conditions.
The imperative for robust, accessible water quality monitoring in communities with limited resources and often no internet access is undeniable. This report outlines a detailed, open-source framework for building an offline water quality analysis system centered on the Raspberry Pi Zero and lightweight machine learning. The feasibility of constructing such a system with affordable, readily available components, including DFRobot Gravity sensors for pH, turbidity, TDS, DO, and a waterproof DS18B20 temperature sensor, is clearly demonstrated. The critical role of an Analog-to-Digital Converter, such as the DFRobot I2C ADS1115, is highlighted as essential for interfacing analog sensors with the digital-only Raspberry Pi, emphasizing how this component directly impacts the granularity and quality of collected data. Furthermore, the integration of an intelligent power management solution like the PiSugar 2 is shown to be crucial for ensuring system reliability and maintaining data integrity through an onboard Real-Time Clock, even in the absence of network synchronization.
A key aspect of this offline system is the methodology for data collection and preparation, which necessitates a human-in-the-loop approach for labeling water quality data based on established WHO and EPA standards. This process empowers community members to actively participate in defining the ground truth for the machine learning model, transforming raw sensor readings into actionable insights for local decision-making. The subsequent training of a lightweight machine learning model, such as a Decision Tree or a simple Artificial Neural Network, and its conversion to TensorFlow Lite, enables efficient on-device analysis directly on the Raspberry Pi Zero. This eliminates the need for cloud connectivity, providing immediate water quality assessments at the point of need.
The real-world impact of this system in underserved communities is profound. It moves beyond passive monitoring by empowering local populations with the tools for immediate water quality assessment, fostering self-reliance, and enabling proactive responses to contamination events. The data collected, even offline, forms a valuable historical record that can be used for data-driven advocacy and informed resource management. Moreover, the open-source nature of the entire project cultivates local technical capacity, promoting long-term sustainability and reducing dependency on external support.
It is recommended that communities interested in deploying this system prioritize thorough calibration of all sensors and adhere to the detailed enclosure design guidelines to ensure the longevity and accuracy of the system, particularly given the non-waterproof nature of some sensor components and the need for careful handling of corrosive solutions for the DO sensor. Continued community engagement in data collection, labeling, and potentially contributing to future software and hardware enhancements will be pivotal for the sustained success and evolution of this vital open-source initiative.
Fuentes usadas en el informe
How can AI and machine learning be integrated into water quality assessments?
Community-based Water Monitoring: Start Up Guide - Gov.bc.ca
Surveillance - Guidelines for drinking-water quality - NCBI Bookshelf
Apera Instruments® Meters and Sensors for pH, Conductivity, TDS, Salinity, ORP, DO, Turbidity, ISE
Advances in machine learning and IoT for water quality monitoring: A comprehensive review
ductsoup/Raspberry-Pi-IoT-Water-Quality-Controller - GitHub
mcp3008.py - romilly/pico-code - GitHub
nickoala/sensor: Raspberry Pi Sensors - GitHub
3 Main Water Quality Parameters Explained | Atlas Scientific
Drinking water quality standards - Wikipedia
National Primary Drinking Water Regulations | US EPA
TDS and pH - Safe Drinking Water Foundation
The best Raspberry Pi alternatives of 2025: Expert recommended - ZDNet
14 Raspberry Pi Zero Alternatives That Cost Less Than $20 - It's FOSS
Gravity: Analog pH Sensor - Meter Kit — Arduino Online Shop
Gravity: 7/24 Industrial Analog pH Meter Kit (Arduino, Raspberry Pi) - DFRobot
Gravity: Analog Turbidity Sensor for Arduino - DFRobot
Grove - EC Sensor Kit | Seeed Studio Wiki
Gravity Analog Dissolved Oxygen Sensor / Meter Kit For Arduino - RobotShop
Gravity: Analog Dissolved Oxygen Sensor / Meter Kit for Arduino / ESP32 - DFRobot
Analog TDS Sensor Meter for Arduino / ESP32 / Raspberry Pi ...
Selection Guide for DFRobot pH Sensors
Gravity Analog Turbidity Sensor - RobotShop
Gravity Series | DFRobot Electronics
Gravity Analog pH Sensor Meter Kit V2 SKU ... - DFRobot WIKI EN
Turbidity sensor SKU SEN0189 - DFRobot WIKI EN
Waterproof DS18B20-compatible Temperature Sensor - Pimoroni
Arduino Water Temperature Sensor - Walmart
DFRobot Gravity: Analog Dissolved Oxygen Sensor / Meter Kit For ...
Raspberry Pi: Read Analog Inputs with Python (MCP3008) | Random Nerd Tutorials
MCP3008 | Raspberry Pi Analog to Digital Converters - Adafruit Learning System
MCP3008 Analog-to-Digital Converter | PiRecipes - GitHub Pages
Analog Inputs for Raspberry Pi Using the MCP3008 - Adafruit
Gravity: I2C ADS1115 16-bit ADC Module (Arduino & Raspberry Pi Compatible) - DFRobot
Raspberry Pi UPS in the US - PiShop.us
Raspberry Pi Zero Battery - PiSugar2 Portable 1200 mAh - PiSugar Kitchen
Build your own weather station | Coding projects for kids and teens
Raspberry Pi Water Alarm System : 10 Steps - Instructables
Sensor connection to Raspberry Pi - DFRobot WIKI EN
Raspberry Pi Temperature Sensor - Department of Computer Science and Technology |
Raspberry Pi Tutorial Series: 1-Wire DS18B20 Sensor - Waveshare Wiki
A Raspberry Pi Data Logger for about $25 (Temperature Probe and ThingSpeak)
Raspberry PI temperature graph using DS18B20 digital sensor - GitHub
Data Logging With Raspberry Pi Pico : 7 Steps - Instructables
Raspberry Pi - Data Logging : 5 Steps (with Pictures) - Instructables
Water Quality and Potability - Kaggle
Water quality dataset - Deepnote
water quality prediction project - Kaggle
Python Water Quality - Baseline Classification Model | Towards Data Science
(PDF) Water Quality Monitoring Using Machine Learning Model - ResearchGate
Image Classification with TensorFlow Lite Explained - helloworld.co
A review of the application of machine learning in water quality evaluation - PMC
How to Run TensorFlow Lite Models on Raspberry Pi - Paperspace Blog
(PDF) Water quality prediction using CNN - ResearchGate
Water Quality Prediction using ML: A Simple Guide with Scikit-Learn and Decision Trees
Evaluation of Tree-Based Voting Algorithms in Water Quality Classification Prediction - MDPI
An Artificial Neural Network Model for Water Quality and Water Consumption Prediction
Tadesse33/Neural-Network-for-Water-Quality-Prediction - GitHub
esciencecenter-digital-skills.github.io
Classification by a Neural Network using Keras – Introduction to deep-learning
First Neural Network with Keras - The Data Frog
python-tutorial-notebooks/notebooks/Neural Network Example with Keras.ipynb at master
tf.keras.Model | TensorFlow v2.16.1
Understanding TF Lite and Model Optimization - Kaggle
Convert your Tensorflow Object Detection model to Tensorflow Lite. - Gilbert Tanner
Intro to Machine Learning on Android — How to convert a custom model to TensorFlow Lite
TensorFlow Lite Tutorial — SensiML Documentation
Simple Audio Recognition on a Raspberry Pi using Machine Learning (I2S, TensorFlow Lite)
tf.lite.Interpreter | Google AI Edge - Gemini API
Source Water Monitoring Systems for Drinking Water and Reservoirs - YSI
Water Sensors Toolbox | US EPA
Fuentes consultadas, pero no usadas en el informe
Arduino Chemistry Probe Kit - Temperature and Conductivity : 8 Steps - Instructables
DFRobot Gravity - analogue turbidity sensor - Botland.store
DFRobot Gravity: I2C Oxygen / O2 Sensor
How to Use Gravity: Analog TDS Meter Sensor: Examples, Pinouts, and Specs
DFRobot Gravity - analog sensor of TDS, purity of water for Arduino - Botland.store
Deep learning for water quality - PMC
manishkumar101/Ganga-Water-Quality-Monitoring-IOT - GitHub
Neural Network-Based Water Quality Prediction
(PDF) Machine learning for water quality classification - ResearchGate
Water Quality Classification Using Machine Learning - Tuijin Jishu/Journal of Propulsion Technology
Retraining an Image Classifier | TensorFlow Hub
Use a custom TensorFlow Lite model on Android | Firebase ML
Image classification with TensorFlow Lite Model Maker | Google AI Edge - Gemini API
Pensamientos