Public Lab Research note


  • 3

First Riffle Deployment: City of Cambridge Water Department

by donblair |

NOTE: We presented a poster summarizing the data from this deployment at the EPA's 'Advanced Tech Demo' on Aug 5th.

photos

IMG_0484.JPG

IMG_0483.JPG

IMG_0465.JPG

IMG_0473.JPG

IMG_0461.JPG

IMG_0460.JPG

IMG_0457.JPG

IMG_0458.JPG

IMG_0438.JPG

IMG_0423.JPG

IMG_0422.JPG

IMG_0418.JPG

IMG_0420.JPG

IMG_0412.JPG

IMG_0405.JPG

IMG_0404.JPG

IMG_0403.JPG

IMG_0402.JPG

IMG_0399.JPG

IMG_0398.JPG

IMG_0394.JPG

IMG_0396.JPG

IMG_0380.JPG

IMG_0388.JPG

IMG_0386.JPG

IMG_0376.JPG

IMG_0375.JPG

IMG_0366.JPG

IMG_0373.JPG

IMG_0369.JPG

IMG_0357.JPG

IMG_0356.JPG

IMG_0343.JPG

IMG_0346.JPG

IMG_0349.JPG

IMG_0344.JPG

riffle code

https://gist.github.com/dwblair/26313551dbac1db6ef11

theory and simulation

Jeff Walker set up an online web app that allowed for an exploration of what frequency (Hz) from the 555 timer-based conductivity sensor to expect, for a given value of the conductivity (uS/cm):

http://walkerjeffd.shinyapps.io/riffle-conductivity/

analysis

... and then wrote up a detailed analysis of the data that came off the two Riffles we deployed, and how they compared to the USGS sensor located at the same spot:

https://github.com/walkerjeffd/riffle-ito-apps/blob/master/analyses/20140725_cambridge/index.md

I'm just going to pull out some salient points from this analysis, here ...

  • The second Riffle we'd deployed measured the conductivity using a '555 timer circuit'. The principle behind this is explained in two earlier research notes on the topic, here and here. The basic idea is this: the 555 timer outputs an oscillating square wave signal whose frequency is dependent on a resistor placed across two of its pins. Instead of using a resistor, we're connecting each of these two pins to an electrode (in our case, a stainless steel screw) and placing both of these electrodes in water. The water then acts as a 'resistor', and determines the frequency of the 555 output. By measuring this frequency, we can than assess the resistivity of the water -- and thus its inverse, the conductivity.
  • In order to get 'real units' from this measurement, though, we need to figure out some more details. The particular in-water electrode materials and geometry that we use will affect the 'resistance' that the 555 circuit sees, so we need some way of calibrating our particular setup.
  • The electrode geometry is referred to as the 'cell constant', and is often very hard to calculate theoretically -- it's best just to determine it by using the electrodes to measure solutions with known conductivity, and backing out the value by fitting the resultant curve.
  • The idea here is that there is an equation that relates the frequency of the 555 output to the conductivity of the solution and the 'cell constant' -- so if we measure the frequency of a bunch of solutions with known conductivity, we can do a least-squares fit of this equation to the resultant data, by floating the cell constant parameter (we call this cell constant 'L/A' in our analysis).
  • Note: the conductivity also depends on the temperature, so we have to account for this as well.
  • Here is the derivation of the frequency vs. (conductivity, L/a) equation, as well as the assumed relationship between conductivity and temperature (from Jeff's writeup):

frequencyBackground.png

We generated a set of conductivity 'calibration solutions' following the procedure outline in this research note, and collected the data in this google spreadsheet. Here's a google docs plot of that data:

hzVs.png

I believe that the apparent inflection point in the middle of the conductivity range is due to a change in protocol midway through the calibration procedure. The entire process was quite sloppy -- will aim to be a bit more careful next time. But good enough for a first pass ...

Then, Jeff used a fitting procedure to find a value for L/A that allowed us to fit the equation for frequency vs. conductivity nicely to that calibration curve:

conductivityCalibration.png

Now we have a 'calibrated conductivity sensor', and we were then ready to deploy this sensor in the field.

The first data we looked at after we got the Riffles back was the photocell data. As we'd hoped, the photocell registered the daily changes in light level:

plot_light.png

Jeff then plotted every day's light level changes on the same 24 hour x-axis, so see how they compared:

plot_light_hour.png

Fun! The next thing to check was the temperature data. When we had gone out to the field to deploy the second Riffle, it was clear even before we put it in the water that the temperature sensors weren't working properly -- both the RTC temp and thermistor temp were very far away from ambient air temperature when we tested them on the shore. This is clear when looking at the comparison of thermistor and RTC values in both the first and second riffle data:

plot_temp_ts.png

Probably this was a short in the crazy circuit we'd put together as a conductivity prototype; but since we didn't want to waste a deployment opportunity, we put this riffle out there anyway, thinking that maybe only the temperature values were off, and otherwise the conductivity sensor would work alright (and we could use the other riffle's temperature values to temperature-correct the conductivity readings). When looking at the data that resulted, it's clear that the first riffle's temp is much more closely aligned with the USGS sensor -- but the second riffle's temp (noisy, and probably because of a short circuit) still shows the right trend:

plot_usgs_riffle_temp.png

Finally, we used our fitted conductivity 'L/A' parameter to interpret the frequency data we'd gotten from our 555 conductivity circuit to find the conductivity trace, and compared that to the USGS sensor:

conductivity.png

Not bad! We're not sure whether the differences in these curves are due to changes in the conductivity of the solution, or because e.g. our electrodes were corroding faster than we thought ... further tests will need to be done -- hopefully with a lot of input from the community!

All in all, though, it was a great first trial run!

next steps

  • We're going to try to make a more detailed calibration procedure (for both temp and conductivity), and begin to send out riffles to folks who'd like to help us figure out a good, accessible protocol ...

  • We're going to see if we can make a simple turbidity measurement (more on the idea that Jiansheng came up with to address this, soon!)



somerville-massachusetts cambridge massachusetts water-quality riffle northeast riffle-examples

0 Comments

You must be logged in to comment.