Back to search

Michigan State University

Water quality monitoring and contaminants analysis with coffee-ring effect by machine learning

Abstract

dc:description

In the first stage, a low-cost tap water fingerprinting technique was explored using the coffee ring effect, which produces distinguishable residue patterns after tap water evaporates. This technique was evaluated by photographing tap water droplets from different communities in southern Michigan with a cell phone camera and 30x loupe. A convolutional neural network (CNN) model was then trained using the images to group the tap waters with similar water chemistry, achieving 80% accuracy. Further experiments were conducted to determine the influence of lower concentration species in the tap water "fingerprint". By analyzing the residue patterns from salt mixtures with varying concentrations of sodium, calcium, magnesium, chloride, bicarbonate, and sulfate, it was found that the residue patterns are unique and reproducible, and are associated with the water chemistry of the sample. Principal component analysis (PCA) was also applied to the image files and particle measurements, further highlighting differences in the residue patterns. The results suggest that the residue patterns of tap water, imaged with a cell phone camera and loupe, contain valuable information about the composition of tap water, and the coffee ring effect should be further studied for potential use in low-cost tap water fingerprinting.The second stage examined the coffee-ring effect for tap water component analysis using synthetic samples with varying concentrations of ions. A custom four-axis autosampler was built using Raspberry Pi, a 3D printer stage, and programmed with Ubuntu and Python 3.7. The experiment was conducted in a controlled temperature and humidity chamber. SEM images, EDS mapping, and particle features extracted from photographs were analyzed using statistical methods. Optimal℗ conditions were identified as 23-26℗ʻC with 45%-50% humidity, 20-23℗ʻC with 45%-50% humidity, and 26-29℗ʻC with 40%-45% humidity, showcasing the coffee-ring effect as a low-cost, effective technique for tap water analysis. In the third stage, three models were evaluated in this research: the One-stage point estimation model (OnePeM), the Two-stage vision-transformer point estimation model (TwoVtPeM), and the Two-stage vision-transformer multiple output estimation model (TwoVtMoM). The TwoVtPeM technique achieved the best performance of the models tested (OnePeM, TwoVtPeM and TwoVtMoM), with OnePeM also performing well and TwoVtMoM falling short. The TwoVtPeM relative percentage errors were ℗ł17.1% for oxygen, ℗ł4.5% for sulfur, ℗ł19.9% for sodium, ℗ł5.7% for chlorine, ℗ł19.8% for calcium, ℗ł25.8% for magnesium, and ℗ł20.1% for carbon. The R2 was 0.95 which is higher than OnePeM with 0.90 R2 and TwoVtMoM which was 0.54. The TwoVtPeM had a higher error mean than OnePeM, but it exhibited lower relative standard deviations of estimation; the TwoVtPeM relative standard deviations values were: 3.9% for oxygen, 3.0% for sulfur, 5.3% for sodium, 3.9% for magnesium, 5.3% for chlorine, 10.0% for calcium, and 5.9% for carbon. Moreover, 79.2% of water samples were correctly classified for hardness based on the estimated element concentrations by TwoVtPeM. Compared to strip test kits, this technology offers advantages such as speed, low cost, and the ability to simultaneously estimate multiple contaminants. However, addressing certain limitations, such as the quality of the substrate used and the size and complexity of the dataset and models, is essential. The TwoVtMoM is underfitting and requires additional training epochs and fine-tuning. Overall, this research demonstrates a promising technique for water quality analysis, providing a low-cost, fast, and relatively accurate method for estimating water contaminant concentrations.

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Li, Xiaoyan
Contributors dc:contributor
  • Lahr, Rebecca
  • Xie, Yuying
  • Mantha, Phanikumar
  • Tan, Pang-Ning
  • Tarabara, Volodymyr

Subjects

dc:subject × 1

Rights

dc:rights
Statement dc:rights
  • Attribution 4.0 International
Language dc:language
English

Identifiers

dc:identifier.*
Identifier
etd:51139
isbn:9798379512125
oclc:on1396767439
oclc:1396767439
umi:30425231
local:Li_grad.msu_0128D_19711

Chain of custody

source
Harvested from
Michigan State University
Base URL
d.lib.msu.edu/oai
Last updated
2026-11-18
Source record
OAI-PMH GetRecord
citation

Li, Xiaoyan. Water quality monitoring and contaminants analysis with coffee-ring effect by machine learning. 2023. https://doi.org/doi:10.25335/cgcm-gg71