New project? Water sensors

I was chatting to the frome river group on Facebook…

Of course we’d need more peeps but interesting to see interest

So I emailed the UK environmental protection agency… They have a map of swimming spots see -

but they don’t include data sets on rivers…

I’ve asked for sample dataset to see if we could play with it


A possible slight hitch… Looking at the sample data

To know if water is good to ‘swim in’ you need to know if it has bacteria… (e.g. E. coli )

And there aren’t any sensors for that! The environmental agency appears to send off samples of analysis in a lab. I wonder if there is a way to take an image sample at a microscopic level in situ then send it to environmental agency for analysis… hmmm

a portable and automated version

Looks like someone has almost thought same thing… Cloud anaylsis of water quaility

hmm or has someone actually done it… ?

A very relevant discussion on arduino forum about this very topic

I think this is a great idea, but as you’ve highlighted pathogen data would be very difficult (impossible?) to measure on-line. The problem is, samples are taken and cultivated over a few days to establish pathogen count, so you’d have real difficulty in measuring this directly.

Surfers Aginst Sewage have built an App highlighting water quality problems at beaches:

This is based on publicly available APIs with information on point source pollution sources, rather than measuring pollution themselves. It would be interesting to do something similar for rivers, which could be run in conjunction with direct monitoring of more easily measured parameters (e.g. ammonia, dissolved oxygen, temperature).


Interesting and thanks for sharing… A few peeps have also had a punt at this.

See all sensors available

I think you could get AI to look for patterns in a petri dish swabed every few days but starts to get pretty technical…

I also managed to get some sample data of what Eviornmental agency measure in river Frome

They just don’t API it or test in real time like SAS

I think you could get AI to look for patterns in a petri dish ...

Ha! It’s only since joining this forum that I see how similar Artificial Intelligence and Alison look in print. For a moment there I thought it was me that had to study the petri dishes!
:woman_scientist: :microbe: :microscope:

1 Like

Oooh, that’s interesting thought on machine learning/AI (or Al if she wants to!) for classifying microbes in samples “live” in water (rather than culturing them).

I’ve started looking for relevant image data sets and existing research as on the face of it, it seems like (with decent magnification) there should be something to look at… (I’ll add any links on Trello)

Even if we couldn’t classify what’s living in there (*) we could possibly baseline it, then try out anomaly detection to flag up changes that need chemical analysis (catching changes quicker and flagging up short term pollution/changes which may escape the periodic sampling).

Counting/classifying fish (working around seasonal change) might be another angle for signals of pollution as well.

(*) which we might be able to, but needs data and time - what’s living in there might highlight what chemicals are present too…

Is there such a thing as ‘open source AI’ that’s can get access to apply such pattern matching?

Essentially yes - there are:

  • Free & opensource Frameworks for training and classifying data (e.g. keras/tensorflow, pytorch, fastAI, openCV [computer vision] & others)
  • Loads of opensource examples (likely not many covering what we need directly, but for sure image classification, anomaly detection, etc.) on Github, Kaggle, Google Colab etc.
  • Some open/public datasets to work with

On the Trello board, I’ve linked to an interesting project on Kaggle that includes things like PH and conductivity that might be usable to predict harmful contaminants.

[edit: some assembly required

  • unless there’s some existing research to base directly off, it needs designing etc.]

Some reasonably accessible examples:

So I wrote to the professor in video…

Water quality sensory

|Paul Kay
Hi Danny

Thanks for getting in touch and it sounds great what you are doing. The only way I know of producing real time water quality data at the moment is to install a sonde with telemetry - this works well but costs several £k per sonde so doesn’t sound like what you are after. I know some people at Hull who are developing next generation dip sticks to measure phosphorus and other pollutants in water and these have been used in citizen science but, again, I guess not what you are after. Happy to chat if I can be of any help.

Best wishes


From: Danny Hearn
Sent: 24 January 2020 13:47
To: Paul Kay
Subject: Water quality sensory

Hi Paul,

I wanted to write to you as i’m part of a local community citizen technology group in Frome ( We are exploring ways we can using open source technology come up with innovative solutions to problems that benefit the community. We are in the process of creating an air quality sensor network in our local town. We were interested to see if we can expand that to the local rivers. I understand that water quality sensors is a more complicated game, but was curious to see if there was a way to create a water quality sensor station, that replicates some of the Environmental Agency tests in realtime to immediately determine the quality and safety of the water. Would you be able open to having a conversation or point me towards some relevant reading material that helps me understand the subject more deeply and exact process that EA use to analyse the water quality. I did see water which seems to have gone quiet and not moved forward.

Thank you and appreciate any time you can give

Kind regards


1 Like

Oh and I wrote to another one that is linked to the water pressure group

Hi Danny,

Sounds interesting – there’s lots of work going on amongst various freshwater groups. Suggest you contact Michelle Walker of the Rivers Trust in the first instance. You could also contact Earthwatch .

Some things can be measured reasonably accurately (e.g. conductivity, temperature, pH) but the most important things for water quality such as orthophosphate are mainly unreliable.

I’d be interested to know more about your air quality sensors.

Kind regards

Someone’s had a run at it here

well done - interesting to get these inputs.

Ok a big part of water quaility is measuring the phosphorus This link alludes how it is done

  1. The EPA-approved method for measuring total orthophosphate is known as the ascorbic acid method. Briefly, a reagent (either liquid or powder) containing ascorbic acid and ammonium molybdate reacts with orthophosphate in the sample to form a blue compound. The intensity of the blue color is directly proportional to the amount of orthophosphate in the water.

This could be done by dropping a sache of reagent and then detecting the colour of the blue with

  1. The total phosphorus test measures all the forms of phosphorus in the sample (orthophosphate, condensed phosphate, and organic phosphate). This is accomplished by first “digesting” (heating and acidifying) the sample to convert all the other forms to orthophosphate. Then the orthophosphate is measured by the ascorbic acid method. Because the sample is not filtered, the procedure measures both dissolved and suspended orthophosphate.
  2. The dissolved phosphorus test measures that fraction of the total phosphorus which is in solution in the water (as opposed to being attached to suspended particles). It is determined by first filtering the sample, then analyzing the filtered sample for total phosphorus.
  3. Insoluble phosphorus is calculated by subtracting the dissolved phosphorus result from the total phosphorus result.

I’ve created a document to help frame the problem -

Welcome feedback or edits…

Email from Prof at leeds

" So, in terms of my thoughts on determinands to measure I would suggest:

  • General water quality variables (pH, electrical conductivity, dissolved oxygen and temperature): these form the basis of most water quality monitoring programmes and would allow the data collected to be put in the context of other monitoring and water quality standards).
  • Nutrients (could just go with phosphorus although nitrate and ammonia would also be useful): excessive levels of phosphorus are a key problem in UK rivers and derive from agricultural runoff and and sewage effluent. Even very low levels drive eutrophication (algal blooms and associated problems). Again, phosphorus is usually monitored and can easily be compared to other datasets and water quality standards (e.g. those stated in the Water Framework Directive). Elevated phosphorus levels are a clear indicator of pollution.
  • E. coli: if bathing water quality is the driver of the work then this is the key variable to measure, as per routine coastal bathing water monitoring. Looking at the literature it seems that the use of a fluorescence detector would be the way to go.

If needed, I’m sure there are people at Leeds who could help with the development of a sensor. More widely, grants do exist for citizen science work and it would be great to spin this out across the country to do some work on bathing waters in rivers."

1 Like