Category Archives: How this project started…

The story of how this project developed. Wordpress generates this list is in reverse chronological order, so SCROLL DOWN TO THE BOTTOM, and click on the post titled “In the beginning…Part 1”

The “Alpha” build (of an underwater sensor housing)

Although the dive-light forums had convinced me to use PVC tubing as my housing material, I still had some significant design issues to work out. How big were these things going to be? How was I going to seal the unit under water? How was I going to actually install it in the caves? etc. I spent so much time rummaging through the plumbing isle looking at fittings, that the staff at my local hardware store were starting to run the other way whenever they saw me step over the threshold. And the ones I did capture, with my half baked story about what I was trying to do, had a kind of “There but for the grace of God go I…” expression creeping across their faces. Of course, after years of exposure from my own friends and family, I guess I am just used to it now 🙂

Anyway, I started out with three inch pvc pipe, for the simple reason that this had the smallest inner diameter that would hold my “alpha” Arduino Uno datalogger. But how was I going to OringSetuphold it together? Bolts?  Bungees?  I had seen plenty of latch clamps designs on the newer lights from Dive Rite, etc., but they all seemed to use machined rod stock with turned threads and special holder grooves for the O-rings. And this was more complicated than I wanted to go.  Fortunately, while I was working this out, I came across a miniDV housing instructable with a really nice system for backing an O-ring on a pipe. I realized that my housing could use this idea, but I did not need any of the clear windows or other things that complicated his design. Yes!

4" rings over 3" end caps

4″ pipe rings over 3″ end caps formed the basis of my housings

In fact all I really needed was two end-caps and a short length of pipe and I would have something that presented a nice smooth profile to the water flowing around it. But to connect the latch clamps I would need much thicker walls, or the screws would puncture the housing.  A bit more noodling around and I made the happy discovery that the inside diameter of 4″ pipe just barely goes over a 3″ pvc endcap, and the two solvent weld together nicely. Of course, hand sanding those matching faces down through to 600 grit took a while, but I was left with a nice smooth polish on the O-ring seats.

Getting down to 600 grit takes allot of hand sanding.

Getting those O-ring seats down to 600 grit takes quite a bit of sanding.

It took ages to find marine grade latch clamps, and I was surprised to find them costing $15 to $20 each. (After a great deal of time reading spec sheets, I found the cheapest clamps and O-rings at amazon – I will post a complete parts list for those later). So I had a basic “latch clamp & clam shell” idea percolating away. But how was I going to suspend this thing in the water column? Initially I had thought that I would simply run a bit of fishing line up to the float, but as I thought more about what the 3-axis accelerometer was actually doing, I realized that I could get much more than a simple tilt angle out of it:

If I could keep the unit from rotating, I would also get the direction of the water flow from the same sensor data! This realization was at the heart of the question of how to suspend the units inside the flooded caves.

So I need 180 degrees of freedom on the anchor points, but no rotation about that axis, or the direction information in the data would become meaningless as the sensor spun around. I suppose I could have just put a compass sensor in the unit and been done right there, but I had this sneaky feeling feeling that the problem could be solved more elegantly if I just burned a bit of midnight oil.

Corrosion had locked up some of our drip sensor tipping buckets a few years before.

Corrosion had locked up some of our drip sensor tipping buckets a few years before.

I started making all sorts of gimbals with hinges, bent wires, rods, bolts, springs, tubes, you name it, and I probably tried it. Most of them worked too, but they tended to be fiddly looking things that depended on one or more bits of metal, and I knew from previous projects that corrosion was eventually going to do them in. I also had to figure out how to attach those pivot joints to stiff rods, of varying lengths, which then somehow connected to the housing itself. On top of that, the whole assembly would have to gracefully fit inside a suitcase. And finally, just to complicate things still more, whatever I came up with had to be easily assembled in a dark cave, with a divers cold fumbling hands.

Well this little nut took me a few weeks to crack, and with all the factors in play, it represented the most complicated thing I had tackled on the project to date.  Especially with “easily repaired in the field” also echoing around inside my head.

Pivot joint with no rotation

Pivot joint with no rotation

But I am happy to reveal here, for the first time, a bodgers masterpiece of simplicity made with two cable ties, a length of pex tubing (cut into a washer), and a threaded pvc cap. I can whip up one of these puppies in about five minutes, from parts at any hardware store, and the pex tubing, which bends easily into a suitcase, is just barely positive under water…and there are no metal parts. With this in hand it was full steam ahead, and as soon as the latch clamps & 3 inch O-rings arrived (341 EPDM 70A) I would be ready to start testing the alpha build.

Boyancy testing

Buoyancy testing

But I ran into a bit of a snag when I started doing dunk tests: I had not really counted on the extra mass of the latch clamps (20g each), so with my rough calculations, I hadn’t left enough internal volume.  By the time I put my calibration mass (for the batteries, the Ardunio, etc) into the clam-shell, it sank like a stone. So I started drilling holes in the outer rings that the clamps were attached to, trying to increase the buoyancy so that the unit would just barely float when the simulated payload (about 220 grams) was inside it. The whole thing started to look like Swiss cheese.

One of the alpha housings, with anchor

One of the alpha housings, with anchor, and the short connector rod I made for the buoyancy testing.

Eventually, I ended up shaving most of the outer rings off the unit, which lead to several adhesion failures once the latch clamps started to apply pressure. But I just re-purposed those old shells into anchors with a rubber end cap. I had made a few shells, but I still had a pang of regret for the lost time, as I had spent more than an hour hand-sanding each of those O-ring seats. But the alpha housing build, minus electronics, was ready for testing. And just in time too, as this was early summer, and my wife had an undergrad about to leave for some fieldwork in Mexico. I made a few one meter support poles, stuffed the rest of the parts into a ziplock bag , and Trish passed this on to the student who flew out the very next day. I knew eyebrows might go up at the airport, but hopefully my weird collection of plumbing parts would not give the student too much grief from the airport security scanners. And even though the student was keen to help out, I knew that like anyone doing fieldwork, they already had a to do list that was larger than their available time. So there was a good chance they were not going be able to throw my contraption in the water and to see how it behaved.

I went back to developing the electronics side of things over the next couple of weeks, but I felt like a penny waiting for change each time I asked if the housing had been tested, and found out that, no, they had not had a chance to put it in the water. Not yet.

Then one morning over coffee, my wife says: “Oh, yeah. (the student) is back from her field work.”

My eyes widen, “And? Did the units go in? Did the floats respond to the water flow?”

“She put them in at one of the outflows along the coast” she replied, “And they seemed to respond to the direction of flow pretty well….”

“Mmmm, why do I hear a “But” coming…What actually happened?” I asked.

“She says that they wobbled.” and then she added,”Sort of wiggling around as they tilted in the direction of the current. But the flow’s pretty strong there, so it could have just been regular eddy currents. You see that in the seaweed along the bottom all the time…Then they sank.”

Trish wasn’t too worried about this news but I was a bit stunned. I had been expecting something like “it sank”, or “moved slowly”, or “no response at all”, but I was not prepared for “wiggly & wobbly”.  I spent that morning in front of Google, trying to learn something about fluid dynamics, and specifically, the phenomenon of: “Bluff Body Vortex Shedding“. My heart was sinking with each new read because this had the potential to introduce so much noise in the accelerometer’s signal, that the data would be useless.

So we had run into a piece of fundamental physics that might kybosh the whole project. I was pretty bummed out that day, because even when I did start to understand the math, sort of, I still could not see any way around the problem. Fortunately for me, I was about to get some really good news on the electronics side of things, which had me doing my  ‘happy dance’, which, on reflection, was probably a bit “wiggly & wobbly” too.

<—Click here to continue reading—>

The original float/pendulum idea

Once I had seen the old fashioned air speed indicators, it did not take me long to find references to an even older idea: the hydrometric pendulum. (mentioned in books as old as 1884) So a simple pendulum (or float!) would indeed work if I was able to measure the angle of deflection.  I scribbled a few doodles down on a piece of paper, and ran in to my wife’s office at Northwestern University to discuss it with her. At the time, she was conducting a lab session with her instrumentation students, so they also got an earful of my enthusiasm, which amused everyone.

I don’t have any of those original “back of the envelopes”, but I did find one of my early concept drawings from some time in February 2011:

Original concept sketch from 2011

Original concept sketch from 2011

As you can see from the picture I figured I was going to need a really big battery in a heavy enclosure resting on the floor of the cave, so I initially conceived of the device using a float rather than a pendulum. I was still trying to figure out some way to actually measure the angle of deflection without breaking the integrity of the underwater housing because I knew each gasket or o-ring was just another potential point of failure. I had some idea of just attaching the bobber to a joystick mechanism, and one friend suggested putting magnets on the string and using hall effect sensors in the case.

But I was still trying to figure out how it might be possible to put everything, including the sensors, inside the float itself. I soon discovered from the Arduino forums I was rummaging through that there were plenty of people using accelerometers in tilt sensing applications very much like this, for robots, quad copters, and even one fellow who put a datalogger with an accelerometer on his garbage can.

One of the prototypes from 2011. (held together with hot glue.)

One of the prototypes from 2011. (held together with hot glue.)

So I set to work building prototype data logger / accelerometer combination, bootstrapping myself on the arduino micro-controllers with the many helpful tutorials at Adafruit Industries , and of course the Arduino playground.  I was, and still am, beholding to the many people who share their expertise so freely in the open source hardware community. And I managed to cobble together a couple of dry prototypes (that actually recorded data) near the end of 2011, which I dragged around at Christmas of that year, doing show & tell sessions with my more technically able friends. My wife, bless her, put up with “Ed’s latest project” evangelism, even though I had melted my way through most of the drinking cups in the kitchen, and the house was beginning to take on the distinct bouquet of poor soldering & burnt plastic. At the time I was using a vanilla Arduino Uno, with an Adafruit data logger shield.  To that I had added the MMA7361 from modern devices as the accelerometer, and the whole thing gave me a whopping 24 hours of run time out of 6 AA batteries.  Not exactly the year’s worth of data we were hoping for but I had managed to cram all of that into a hunk of pvc pipe from Home Depot, so the “all in the float” approach was looking like it might just be possible.  I still had not given anything a “dunk” test yet, but at least it was a start.

<—Click here to continue reading—>

In the beginning …Part 3

So I dug my teeth into the problem.  This was around the beginning of February 2011, and my first task was to find out just how many different ways there actually were to detect water movement. I had some sense of this from the units we had already used in the past:

  • Mechanical methods, such as rotating impellers, veins etc. (like the RCM7’s Trish had used in her PHD work)
  • Electromagnetic flow sensors (like the InterOcean S4 or the Ott Nautilus) that detected the movement of ions in the water, or flux line deflection.
  • Ultrasonic systems (like the Falmouth Scientific ACM & the later model RCMs)

And of course there were many, many more listed on wikipedia including:

  • Optical flow meters, using reflection of light from particles.
  • Thermal mass flow sensors, using heat conduction.
  • Vortex flow meters, using turbulence and vibration.
  • Pressure based systems, that rely on the Bernoulli principle

I even thought of a method based on inductive coupling (that still might work) based on building a transformer with a hollow core through which water flowed. I hoped the inductance of the core would change (and therefore the voltage on the secondary winding) with the water velocity. But it seemed that I would also need a conductivity reading because the inductance would also change with whatever was dissolved with the water (probably much more so than flow) so I would have to separate the changes caused by salinity from those caused by water flow. This might even be possible, but it just seemed way too complicated.

And I was realizing that many of these approaches were simply out of my league, as my electronics background was fairly modest. So then I concentrated on the apparently simpler physical and mechanical methods, using a process of elimination based on major criterion Trish had outlined to find the the most promising one.

A propeller based system seemed pretty simple to build, and modifying one of the many hall effect magnetic flow sensors already on the market seemed like the easiest approach. But I had enough experience diving those caves to remember all the organic “ick” that could accumulate near the Cenote openings, so I was not really keen to use anything with a little propeller on it.

The thermal loss systems involved heating an element to a constant temperature and then measuring the electrical power that was required to maintain the heated element at temperature. So they seemed pretty easy to make, as they were basically just a resistor in line with something measuring the temperature.  In fact, there were plenty of cheap anemometers already out there based on mass flux that I could modify, but they were physically pretty small so I worried about fouling, and I had a sense that just throwing electrical power away as heat would draw too much juice for long term deployments, especially in an underwater environment.

Then I came across the Salamander Sensor Project. They were working on flow sensors too! And they had already open sourced a velocity sensor design based on a really simple flexible resistor strip. I was pretty excited, and thought that I had reached the end of my quest right there. But as I read into it, I discovered that they had been concentrating on streams, and other surface accessible water flows, with wireless data transmission. And I had a feeling that those flex sensor strips were just not going to like being put under significant pressure all the time. So none of it was really suitable for complete submersion in flooded caves, possibly thirty meters down, and hundreds of meters away from any surface access.

The Johnson Air speed indicator (1935)

The Johnson Air speed indicator (1935)

However, the fact that some other group had already come up with a water velocity measuring device was really encouraging, and the simplicity of the flexi sensors appealed to me, as they had so few moving parts. So I dug a little deeper into the concept, and found the same physical principal being applied all over the place like, for example, in the old Johnson Airspeed indicators, used by barnstormers back in the 30’s. All I had to do was figure out how to use the same “flow-pressure causing displacement” principal in a design that was small, robust, and most importantly, completely submersible for long periods of time….hmmmmm.

<—Click here to continue reading—>

In the beginning… Part 2

Our discussion resumed the next day over morning coffee:

I began: “You know Trish, I’ve been thinking…”

“Uh..Oh..” she injected, with an impish grin.

“No seriously,” I replied ” The loss of the latest hydrolab has me thinking about all the kit you’ve used over the years, and how, in one way or another, it was never quite the right fit for cave research. Like the old Aanderaa RCM’s you borrowed from Southampton for your PhD.”

Trish (working her PHD in 2001)  with RCM7 & OTT

Trish with RCM7 & a modified OTT Nautilus with a custom housing.

“Absolute beasts.” she agrees, “Almost twenty kilos negative! Even with lift bags to get them into the caves, we often couldn’t install them because the cave walls were so friable that they would just break under the weight. And in our caves, the pipe flow gradually slowed down and reversed direction twice a day. That’s just totally different from open ocean flow that has more than enough strength to push the fin around. So it’s not surprising that they didn’t spin on their gimbals properly.  The worst though was the cut-off at about 1 cm per second, so the data was pretty choppy in the quieter caves. But that’s what you get with something designed for deployment in the open ocean.”

“Right” I continued, “And if I recall, the batteries were expensive custom cells, and there was the potential for stuff to fowl the rotors. So then you went up scale to the yellow ball. What was that again?”

“It was an InterOcean S4“, she described, “A lovely electromagnetic flow sensor. But it was still the size of a  beach ball, and worth a few grand. I bit my nails every time I deployed the thing, for fear someone might just walk away with it.  I must have been pretty persuasive for Southampton to let me borrow that thing for fieldwork in Mexico.”

S4 ready to deploy in the cave.

S4 ready to deploy in the cave.

“Wasn’t there another really expensive one?” I inquired.

“Ummhmm. For a while we tried the Falmouth Scientific ACM. I had really high hopes for their acoustic doppler. But we had problems with the signal. Some of those systems are really tight; so it could have been reflections from the cave walls.”

“So did anything really work in the underwater caves?”

“Yes, remember the little OTT Nautilus?” she asked.

I respond, “The stream unit we converted for underwater work. The yellow duck billed thing?”

“Yep, the dive housing that Andres from Germany made for us turned it into a really fantastic piece of kit. Dang!” she adds with a frown. “I really miss that thing.”

“Uhhh, I’ve been laboring under the assumption that it was just hiding under some pile of maps in your office… What happened?”

She explained, “It disappeared in a piece of lost luggage on the last Northwestern student trip I led to Mexico.  I did receive an insurance settlement, but since Ott had almost gifted their demo unit to me, the settlement was nowhere near enough to replace it. I’ve been keeping an eye on the forums, eBay, etc. But they don’t come up often, and even used they are still not exactly what you would call cheap. And we still have to recreate that housing, since the display end was never designed to be submersible. So it’s not going to be that easy to replace. And it had no facility for logging; remember writing all the data on our underwater slates when we calibrated each cave site?”

I pause for a moment, and then ask “So give me a wish list.” I suggested. “If there was a perfect piece of equipment out there for your work, what would it be?”

It took a lift bag just to move the RCM units.

It took a lift bag just to move the RCM units.

“Well…”she began, and I could see a beat up hydrogeologist fieldwork hat materializing on her head: “It goes without saying that the unit has to measure how fast the water is flowing, and in the cave systems, those flows can vary quite a bit: from fractions of a centimeter per second all the way up to 20 cm/s at the coastal discharge sites. And it should be small enough to deploy when you only have a meter or so between the ceiling an the floor, plus light enough that I am not hauling boat anchors with me on the dive. So something the size of a baseball would be perfect if I was trying to set out a network of them.”

“A compact, light weight, water flow measuring device. Any other sensors?” I ask.

“Oh yes, I’d want CTD to put the flow rates in context. And ideally I would want the unit to log for an entire year, so that I can compare the dry season and the wet season in the same units data set.”

“Ok” I confirm, “So a completely submersible data logger, with sensors that measure water flow plus conductivity, temperature and depth for an entire year. Anything else?”

“Cheap as chips!” she replies, reminding me of our time in the UK. “That would seriously reduce my chances of ‘accidentally’ strangling my students the next time they return home with a flooded unit” We laughed a bit. “But seriously, take a couple of zeros off the price of those commercial units, and I could deploy them all over the place; characterize an entire system! The nice toys produce really high quality measurements, but only for one single location, or one single dive.  And you can only extrapolate so far with data from one or two monitoring sites, no matter how accurate the numbers are”

“Right” I say, as I pretend to check off a list. “So less than..say..$500 each? What about other issues… that might need to be addressed?”

“A year is a long time under water. So you are bound have corrosion on anything made of metal, so generally speaking the less metal used the better. And you get organics drifting by in some systems, so anything that could foul up with a leaf, or a bit of seaweed should be avoided. And there is also the basic chemistry of the place to deal with. There is plenty of calcite raft deposition going on. So the perfect design would keep on working after it became encrusted with accumulated bits of crud.”

So I clarify: “No metal, and no moving parts?”

Another O-ring failure.

O-ring failures lead to incredibly fast corrosion anywhere that two different metals meet.

Trish doing field repairs.

Trish doing field repairs on an RCM9.

She replies: “The moving parts bit is not absolutely required, as the RCM7’s did run for a while before they stopped spinning. But it would still be a good idea.  And that reminds me of something else: you don’t want something that uses any kind of custom battery. I get enough grief flying with research equipment as it is, without also running afoul of TSA regulations on some weird  Litho-Phospho-Unobtainium batteries . And while we are on the subject of things that matter, Easy to repair in the field should be on the list. Eventually, everything floods, which usually means waiting for custom part X to ship from half way around the globe before you are running again. It would be nice to just go down to the hardware store to fix something for once.”

“Sure”, I respond, as I pretend my invisible list just got long enough to run off table. “Standard batteries, and fixable with off the shelf materials. Anything else the queen of hydrogeology might want under the tree this Christmas?” I am being a bit silly at this point, but only because she was being serious. But in my head I was starting to hear echos of all the three legged stool comments that tech support folks “ahem” so often make.

“Yeah, I am sure if you give me more time I could come up with half a dozen other criterion. But even that list of things does not exist in one single device, or I would already be using it….what are you thinking?”

Trish wiring up one of our home made drip sensors for her post-doc research (2004)

Trish connecting one of our home made drip sensors.

“Well,” I cleared my throat, “You know how Mike and Steve have been telling me to look into the open source micro-controllers, like the Arduino’s you use with the students in your instrumentation course?  And I’ve been reading quite a bit about the makers movement, and 3d printers, and, well… I just though perhaps I could give it a go. You know, bodge something together, like we did with the drip sensors in Vancouver, but this time I try to do the whole thing, including the electronics.”

“Mmmmmm.” she replied,” And this would be Ed’s new project number…?”  with eyebrows raised to remind me of the many other projects I seem to have lying around the house…in various states of completion. And to be fair I guess that last part did sound a bit hand-wavy, even for me. But now I had a well defined challenge to sink my teeth into, and I knew that, if such a device could be made, it would open up some serious research opportunities. So I thought about it. In fact, I was rather obsessed with the idea for several days. I scoured the web, reading everything I could find about flow meters. How they were built, and how they worked, about Arduinos, data loggers, and anything else I could find that was relevant to building something that could even do half of the things on her list.

<—Click here to continue reading—>

In the beginning… Part 1

This project really began in early 2011 with a conversation something like this:
(some details removed to protect the innocent, and the not so innocent)

The door bell rings. My wife has returned from three weeks of fieldwork.

“Hey hon, I’m back” she says, over the cursing of a taxi driver who is struggling to unload five beat-up suitcases. He is mumbling something “…eels like they are full of bloody rocks…Ungh!” .  Trish smiles at me sheepishly because…well…they actually are full of rocks… and about 100 Nalgenes of water to boot. You see my wife is a hydro-geologist, who’s never seen a piece of karst limestone that she didn’t like.

“How was the field work?” I ask

“Oh, pretty good.  We met some wonderful people from (insert university name here), and put some new equipment in (cave system there).  The monitors in (another cave) are still there, but the recent (hurricane/flood/tidal anomaly/etc) threw them all over the place so we had to set them up again. Interesting data though.  The new undergrad student, (student name here), survived their first real trip into the wild…mostly. (grad student name here) continues their work on (thesis Y) more slowly than I would hope, but there is progress.  Unfortunately we did have one real casualty on the trip”
“Uh Oh…”, I say, “Not again”

..a bit later…
Flooded board
“Sorry dear, but I’m not sure we are going to be able to revive this one.” as I examine the salt corrosion on the motherboard. “From the looks of things I’d say the whole unit flooded. Didn’t they see bubbles or something”

“Yes…”she says, through gritted teeth. “They saw the bubbles, but (grad student name) decided to continue their dive anyway and deal with it later…”

At this point, I am slowly backing away, as my normally sweet tempered wife is emitting a low growling noises, and her hair is starting to move on its own, in a very strange way…

“Well” I say, trying to be positive, ” the sensor heads may be salvageable, and I think the battery compartment stayed dry. Why don’t I just take it down to the workshop…” as I beat a hasty retreat to the basement. I know that we can probably pick up a used one on ebay and cobble something together, but even if we do, five grand just evaporated. In the furnace storage room, I place the dead Hydrolab in a box with other fallen soldiers, all waiting for one repair or another, if we are lucky.AllTheRest

Now I know caves are harsh environments, and cave diving is tough on equipment, but a young academic doesn’t bring in monster grants, so each loss like this really hurts, especially when the unit is brand spanking new. There has to be a cheaper way to get equipment into student hands because, well, everybody makes mistakes like this when they are just learning the ropes…I know because “ahem” I have seen more than my fair share of failed O-rings.

So I thought this over for a while…

<—-Click here to continue reading —>