Public Lab Research note

First Riffle Deployment: City of Cambridge Water Department

by donblair | August 01, 2014 20:53 01 Aug 20:53 | #11004 | #11004

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






































riffle code

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):


... 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:

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):


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:


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:


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:


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


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:


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:


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:


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!)


Login to comment.