Key takeaways

  • The Arduino Uno Q's 4 GB of RAM and ARM Cortex A53 make it capable of running trained edge AI models directly.
  • Four sensor channels (pH, ORP, turbidity, TDS) feed two Edge Impulse classifiers that match samples against trained water types.
  • Classification quality is limited by dataset size; more labeled samples would improve results.
  • Simple sensor suites cannot detect trace contaminants like botulinum, so treat this as a screening tool, not a safety guarantee.

Water quality is one of those problems that looks simple until you try to measure it. [Thomas Vikström]'s WaterLens is a self-contained device that classifies water samples on the spot using edge AI, and it shows a path any maker can follow: grab a capable single-board controller, wire up a small sensor set, and let a trained model do the interpretation. The build is built around the Arduino Uno Q, a single-board computer with 4 GB of RAM and an ARM Cortex A53 chip, which gives it enough headroom to run a trained model locally rather than shipping data to a server.

The interesting part for anyone building physical products with AI is the structure of the problem. Four cheap, well-understood sensor channels produce numbers that are hard to interpret by hand, and a small classifier model turns them into a human-readable answer. That pattern, sensor array plus edge model, generalizes far beyond water.

The platform: why an Uno Q and not a classic 8-bit board

The choice of controller is the first decision that matters here. A classic microcontroller can read these sensors fine, but it cannot run a meaningful trained model. The Arduino Uno Q is described as a single-board computer with 4 GB of RAM and an ARM Cortex A53, which is what makes on-device inference practical.

For your own builds, the decision rule is simple. If your model is a handful of threshold comparisons, an 8-bit part will do. If you are training a classifier on multi-channel sensor data, you need a board in this class, and 4 GB of RAM is the kind of figure that decides whether you can load the model and buffer samples at the same time.

One commenter on the project notes the Arduino is a $79 board. That is a real budget line for a prototype, but it is still far below what a lab-grade water analysis setup costs, and it is a single BOM item you can reuse across projects.

The sensor suite: four channels, one sample

WaterLens measures four parameters: pH, oxidation-reduction potential, turbidity, and total dissolved solids. Each of these is a standard, widely available water measurement, and together they give the model a compact feature vector to work with.

Each channel covers a different property. pH tells you acidity, ORP tells you something about the oxidizing chemistry, turbidity tells you about suspended particles, and TDS tells you about dissolved material. None alone identifies water type, but the combination is reasonably distinctive, which is exactly what a small classifier wants.

If you replicate this, pay attention to sensor calibration and drift as well as wiring. A classifier trained on one set of sensor readings will misclassify when the same sensor drifts a few months later. Log raw values alongside labels so you can retrain when hardware changes.

Two Edge Impulse models, not one

The sensor outputs feed two Edge Impulse models rather than a single network. Each model uses the sensor figures to classify the water based on past data. The project page does not detail the split between the two models, but the two-model structure is worth thinking about when you design your own.

A common reason to split is that different classification tasks have different difficulties. One model might separate broad categories, while the other refines within a category, or the two might cover different sensor subsets. If you are sketching your own version, start with one simple model, look at where it fails, and only split when the failure modes are genuinely different problems.

Edge Impulse is the tool the build uses to go from sensor data to trained classifiers. That is what turns a pile of labeled sensor logs into a model that answers a question on the board.

Training on representative water types

The training approach is straightforward classification. Having trained the system on representative values for sea water, it should be able to give a clear identification when a test sample really is sea water. In other words, the model learns what typical water types look like in this four-dimensional sensor space and matches new samples to them.

This works well when the sample genuinely resembles the training data. It works less well in between classes, or when a sample is a mixture the training set never contained. If you build something like this, define your classes around water types you can actually collect in quantity, not classes you wish you could detect.

A practical tip from working with any classifier on tabular sensor data: balance your classes during collection. If you have 500 sea water samples and 12 tap water samples, the model will happily bias toward sea water, and your accuracy metric will lie to you.

The dataset problem

[Thomas] himself notes the challenge of a limited dataset for this kind of classification work. This is the real bottleneck of the whole project, and of most sensor-classifier builds. The compute is cheap now; labeled data is not.

For water specifically, each labeled sample means physically obtaining a known water type, immersing four sensors, and recording stable readings. That is slow, and the number of distinct water types you can source locally is small. One commenter makes the related point that the four endpoints "are not going to give much away in terms of water quality," which is really a statement about how much variance a four-feature vector can capture.

If you want to push this project forward, that is where the effort belongs: more labeled samples, more water types, and repeated measurements over time to capture sensor drift. The model architecture is almost certainly not the limiting factor.

What this can and cannot detect

The comment thread on the build raises the safety question directly, and it is the right question. One commenter points out that for drinking water, a very small amount of botulinum could be harmful, and you are not going to detect that with these four sensors. Another notes that drinking, bathing and irrigation are very different quality targets, and a single device cannot certify all three.

The correct framing is that WaterLens classifies water type from bulk chemistry and optics. It can tell you a sample looks like sea water, or like the training data for whatever classes you defined. It cannot find trace toxins, pathogens, or specific chemical contaminants, because pH, ORP, turbidity and TDS are aggregate measurements.

For a product, that distinction matters legally and morally. Present the output as "this sample resembles X," never as "this water is safe." If you need contaminant detection, you need sensors specific to that contaminant, and no amount of AI on top of four general channels will substitute.

Why an edge classifier beats the "just log it" alternative

One commenter argues that pre-LLM software could classify data against historical norms and periodically update those norms, calling the edge AI approach inefficient for this task. There is truth in that for this particular problem: a nearest-neighbor lookup or simple statistics on four numbers would get you much of the way there.

But the edge model approach has its own value for a build like this. A trained classifier can grow with your dataset and handle nonlinear boundaries between classes without you hand-tuning rules, and the board that runs it can also serve display, logging, or connectivity duties.

The trade-off to weigh in your own project: start with the dumbest method that works, and move to a trained model when hand-written rules start sprawling. The Uno Q means you can make that move without changing hardware.

A template you can reuse

Strip away the water domain and the shape of this project is a reusable template. One: pick a controller with enough RAM to run inference, here an ARM Cortex A53 with 4 GB. Two: assemble a small multi-channel sensor array, here pH, ORP, turbidity and TDS. Three: collect labeled examples of each class you care about. Four: train models with Edge Impulse and run them on the board. Five: accept that your dataset, not your model, will be the bottleneck, and say so in your documentation.

The writeup says it is a project the site would love to see developed even further. It is a working demonstration of what small boards and some edge AI can accomplish, with its limits stated by its own builder.

For hardware founders, the lesson is that "AI in the product" does not have to mean a large model. Four sensors, two small classifiers, and a labeled dataset is a legitimate, manufacturable, and explainable use of machine learning, as long as you never let the marketing claim more than the sensors can measure.

Questions readers ask

What sensors does WaterLens use?

pH, oxidation-reduction potential, turbidity and total dissolved solids. Their outputs feed two Edge Impulse models that classify the sample against trained water types.

Why run the AI on the board instead of a server?

The Arduino Uno Q has 4 GB of RAM and an ARM Cortex A53, so the trained model runs locally on the device. That means classification happens where the measurement happens.

Can this tell me if water is safe to drink?

No. A small amount of some toxins would not show up in these four readings, so the device is a classifier of water types, not a safety certification.

How much does the board cost?

A commenter on the project notes the Arduino is a $79 board, as of the current pricing they cite.

The AI Hardware Prototyping Stack is a free checklist of tools and prompts.

Circuit Owl Lab wrote this with AI from public sources, and a separate review pass checked its claims against them. Nothing here comes from first-hand testing.