Category Archives: DIY UNDERWATER housings

The housing must go to at least 30 meters water depth, for at least a year, and be made from inexpensive PVC fittings & parts that can be obtained anywhere.

Field Report 2013-12-03: The Full Monty

Trish ties off Unit 1

Trish ties unit one to the ceiling of the cave.

Although our field tests so far had uncovered buoyancy issues, both designs had remained water tight. So I was feeling brave enough to think about putting the electronics into the housings. And the UNAM crew was arriving in Tulum today, so I was about to loose my dive buddy to “real” research. We decided to go for it and install the little loggers, in a cave system, and leave them there for a few days taking readings every five minutes.

For this first deployment we chose a system that Trish had already calibrated for discharge many times over the years, allowing her to review any data that my little DIY units might produce within that context.  But given the buoyancy issues we had seen over the last few days, we decided to test everything in open water at the entrance.  And it’s a good thing we did as, once again, the o-ring design sank*… as you might imagine, I spent the next few minutes making some rather large bubbles.

…Once I regained my composure, we decided to make lemonade. If that unit was not going to float, then we would simply install it upside down, as a pendulum. The magnitude of the displacement would be almost the same, and all I had to do was change the sign on a few of the readings.  So we grabbed one of the anchors, and a bit braided line from the dive kit, and made our way into the cave.  I carried the anchor and poles, while Trish ran the dive reel leading us into the dark of the cave.  I have to admit I winced a few times as the mesh bag carrying her unit occasionally bashed into the nearby rocks, while her attention was focused on the line. I had visions of those Tinyduino stack connectors coming apart, “But hey” I told myself, “that’s what a this is all about.”  They would either survive the real world, or I would have to go looking for a different electronics platform.

We made our way to a location where we had installed one of the old RCM Aanderaa sensors, many years before. And while I found a place where the anchor didn’t sink elbow deep into the piles of organic mung, Trish tied off the pendulum unit. We did a few laps round the installation with the waterproof camera, to capture a little video, and then made our way back to the entrance. Our loggers were now out in the wild, collecting real flow data! The schedule was pretty busy for the next little while, so it was going to be a few days before we would be able to retrieve our units, to see if they worked. It will be interesting to see how the readings compare to each other.

I have my fingers crossed!

<—Click here to continue reading—>

*Some time later, we found that AA batteries vary considerably in their mass, and I had switched brands just before this deployment, throwing our buoyancy off again.

Field Report 2013-12-02: Another dunk test

In the evening of the open water tests, we reviewed video of the housings while talking (perhaps evangelizing is a better word…) to several friends at the Centro Ecológico Akumal where we were staying.

IMGP0273After sleeping on it, I realized that we had actually observed one other problem with the units the day before: Although the water flow was moving the housings, the videos showed that they did not quite lean at the same angle as the supporting pole. The second pivot point under the float was allowing the unit to try to right itself, reducing the tilt angle that the accelerometer would read. So the next day, while Trish was off diving with one of her students, I attached some foam floats to the support rods, which now had plenty of holes to vent any trapped bubbles, and I refashioned the float end of the support rods into a fixed ‘T’ junction.

IMGP0293After Trish returned, I put on my kit and we took the units in for their second real world test, again with a dummy payload.  With extra buoyancy on the lines, the o-ring design performed beautifully, and even with the really fast flow of this system, we were not seeing much wobble.  So I proceeded to setup the rubber bottom design, and this time I got to watch that unit slowly sink to the ground. Closer inspection revealed that the rubber end cap was slowly becoming convex. The water pressure at this deeper cave was much higher than it had been at the coastal site we used for the first test; so it was pressing the end cap inwards.

So day 2 of the field testing was nearly the mirror image of day 1, but it showed that I needed to re-enforce the soft rubber end cap somehow before that unit would behave predictably.  This also explained why we had heard the noise during the pressure test in the light maker’s dive shop:  the rubber must have been extremely concave during that test, so it sank to the bottom of the chamber with a “clunk”.

So another unsuccessful trial, but much was learned. So it goes…

<—Click here to continue reading—>

Field Report 2013-12-01: A pressure test for the rubber bottom housing.

The next day I needed to do some diving, both to test our kit, but also for me to just to get back into the “zen” that is cave diving.  This shakedown left us with one broken fin strap and one dead IMGP0219primary light. Which is pretty much on par for the beginning of fieldwork. We brought the dead light in for repair at the Dreams Tulum Dive Shop, where the owner (who makes dive lights and turns professional housings on his lathe) kindly offered to test my humble DIY housings in a pressure chamber he had fashioned from a decapitated scuba tank.  I was fairly confident about the o-ring design, but I still had lingering doubts about the one with the rubber end cap, so I jumped at the chance.  While the unit was still dry, I stuffed it full of toilet paper to act as an indicator for any water that might leak in. Then I put in the calibration weight, and he lowered it into the chamber. He pressurized it to about 100 feet and there was an a loud “clunk” sound at the start of the procedure; I feared the worst.

Perfectly dry after testing.

Perfectly dry after testing.

For the next ten minutes I paced the floor like an expectant father, much to everyone’s amusement. Then we depressurized, I dried off the housing, carefully loosened the pipe clamps to remove the end cap, and . . .

Whoo Hoo!  It survived with no leaks!  Not bad for $10 worth of plumbing!

But still I wondered what that noise was…

Addendum:  I did not find this out till after our trip was over, but the spec sheets list that caps maximum “working pressure” at a mere 4.3 psi. The pressure at 100 feet is almost 60 psi.  OOOPS! 

<—Click here to continue reading—>

Field Report 2013-11-30: The first “real world” housing test

I had some serious concerns about the wobble behavior observed during the early housing tests, and that vortex shedding might still kill the whole idea of measuring tilt as a proxy for water velocity. But without some real world observation there was no way to know if this was a lethal design flaw, or just an artifact of plain old surface turbulence. The support poles I had given the student to try out earlier were only 50cm long…


The new housings get their first real world test.

So, even though we started our trip with a lovely bit of dry caving, I was very keen to get the new housings in the water before Trish started diving with her grad student and the diverse group of UNAM & Texas A&M researchers that would be arriving soon.

We piled all the bits into the rental car, and headed out to a local coastal outflow that was easy to access from the surface. I reasoned that if the units didn’t respond in the high flows at that site, there was no point in trying them out in the slower cave systems.  And, as this was to be the first test in anything deeper than a laundry tub, I decided it was safer to leave the electronics behind, and test them with simple calibration weights inside. We passed the usual gaggle of snorkelers on the way in, who stared curiously at all the plumbing we were carrying. A few continued to circle around above us as I set to work getting the anchors in place,  threading the poles, and attaching the housings.  At least I had proved that the thread plugs were easy to attach under water!

Right from the start the units appeared to be working: they were leaning in the direction of flow, and by 45 degrees (or more). I knew that the 2 G rating on our accelerometer meant we were using less than half the sensors range, but there wasn’t going to be any problem reading a signal that strong. And although we could see some of the wobble that the student had mentioned in the support poles, it was fairly mild except in the fastest flow areas. So the dreaded vortex shedding problem turned out to be far less serious than I had feared. I was happy!

IMGP0172Trish and I spent the next little while swimming around the units, trying to see them from all angles, while the curious onlookers tried to figure out what the heck we were doing. But as we continued discussing the floats, working on where to move them next, a problem was slowly developing. Over the next 15-20 minutes, the o-ring housing, slowly, inexorably, sank to the bottom. The only logical conclusion I could think of was that the seals had failed, and that the Mark II, which I had so carefully assembled, was a failure.

Later, after we had retrieved the units and dried them out at the surface, I cracked open our sinker, preparing myself for….Nothing! It was bone dry inside! How does something sink “slowly” without leaking? I put the cap back on and marched back over to the water, to dunk it in. And it floated, just as it had before, with just a small bump of pvc cresting the water. Hmmmm.

Then I grabbed the hollow support poles, tossed them in, and they floated too.  What was going on?  I moved the tubes around a bit, and spied a few small bubbles leaking out one end…Aaaha! They were not as buoyant as I thought they were. A bit more shaking to fill their internal volume with water, and I managed to get the poles to sink, very, very, slowly.

Then I jumped in, and pushed the housing down to the bottom; to observe it at depth. On the surface, it floated happily, but down around 15 feet, it rose much more slowly.  It dawned on me that I had been compressing the new o-rings for the first time! So the bubbles in the support poles were draining out, and, the internal volume of the housing was also changing with oring compression!

So today was not a failure at all!  I had simply shaved the buoyancy budget too close in my quest for more response to water flow. I could fix this…

<—Click here to continue reading—>

A simpler housing design emerges.

I was happy with my Mark II design, but I realized that it was going to take half a day to make each one.  The latch clamps pushed the material cost to about $60, and the labor involved meant they were still going to be expensive in the kind of numbers Trish wanted for her network of cave sensors.  So I applied some thought to simplifying the design still further.

IMGP0029I had used some Fernco Quick-caps to convert the earlier botched housing bodies into anchors. It only took about fifteen minutes to create a one-piece housing, based on those, and I did not have to sand down any o-ring seats. Dayam! But my excitement was tempered when I put them in water, as the rubber end caps were so heavy that they rolled the units over, even with batteries in the PVC cap.  So I needed to come up with a way to attach these guys to the floor anchor, that maintained a rubber side down orientation. But I could not get anything to bond the flexing, bumpy outer surface of that rubber (which turned out to be “elastomeric pvc”)  In the end I threaded a fewIMGP0038 cable ties through pvc plugs, and suspending them under the pipe clamp. This worked but it only heightened my concern about the nature of the seal on these puppies. You see traditional O-ring designs actually work better on deep dives, because the added water pressure compresses the o-rings more tightly. This new design was super simple to build but it was also critically dependent on not one, but two pipe clamps made of metal, as I had to balance the mass of the clamp screw. Even with marine grade stainless, I had my doubts about the longevity of that seal. Nonetheless, I pressed on, and thought about a scaffold for the batteries and sensor package. A bit of IMGP0033ply, some hard foam insulation, and a touch of gorilla glue (an adhesive on my top five list of bodging materials) produced a battery compartment and electronics platform under 25 grams.  I added a ballast mass post with an old Ikea door pull, and put one of my new Tinyduino stacks into place. The hold down screws they came with were not long enough to penetrate that wood, so I had to fashion a U bend out of brass wire to affix the electronics.
Flow Sensor Housing by Edward Mallon

So now I had two different sensor housing designs. The more robust, o-ring design was expensive and took ages to make, while the simpler quick-cap housing, at about $10 material cost, it was definitely “Cheap as chips”, but it’s integrity relied on a couple of metal pipe clamps. I would not know if we had a winner until the next field work trip in late November. But even if this second design didn’t handle the water pressure at depth, I knew it was going to be handy for other cave research, because it was still a decent enough waterproof enclosure for less demanding environments.

<—Click here to continue reading—>

Underwater housing: Mark II

LeakEventually the “wobbly” enclosures made their way back to my workbench, and upon opening them I discovered that they had all leaked. But determined to improve the design, I scraped off the surface rust and began the post-mortem. Pressure from the latch clamps had actually separated the o-ring seats from the main body, damaging the o-rings. But it looked like I might have damaged the adhesion well before that, with all the grinding I had done in my quest for more buoyancy.


So the first step was to make the end caps bigger, and move the upper latch clamp ring further away from the delicate o-ring seat. Then I lengthened the support struts along the bottom shell, carefully gluing them into place with clamps. Once the latch clamps were attached, I thought about how I was actually going to place the electronics inside housing. Using Lego blocks as a proxy for some of the parts, I experimented with many different configurations attached to knock-out caps which kept everything level inside the housing. In the process I made the happy discovery that you can solvent weld the ABS bricks together, and they will also bond reasonably well to the caps, provided you use “just enough” solvent to bond the surfaces without softening them. As they say: “Many Bothans died to bring us this information…”


In the end I decided to put the power block into the bottom of the unit, and use a second knockout cap as the platform holding the electronics in the top half of the unit, I would figure out how to connect them later via some kind of power plug.

BalastI was really happy with the new housing, as the clips applied a nice even compression to the o-ring, and the overall unit just “felt right” to my divers hands.  With the batteries held securely in place by a scaffold of Lego, the bucket buoyancy tests looked good, showing no torque from the uneven weight distribution that plagued the first builds. But it was riding pretty high in the water, and I need them to be “just barely positive” if they were going to respond well in low flow conditions.  So I added a few ballast washers to both the top and bottom clam shells, and the Mark II housing was finally complete.

Flow Sensor Housing by Edward Mallon

It was now somewhere past 2 AM, and my wife, who had been on some sort of Skype call to another time zone, came down to the workshop to suggest that we call it a day.  But I was in pretty good spirits at at this point, and like a proud father, I started showing off my new baby as it bobbed up and down in the laundry tub. She was trying to smile, but the air was still pretty thick with the PVC/ABS solvent I had been using. And she couldn’t help but notice the small piles of half melted Lego scattered around the workbench.  While I was babbling, she slid a phone out of her back pocket, and just before capturing the above photo, she quips “You know, other women loose their men to football, or video games, but I end up with one who hides down in the basement, playing with Lego!”

<—Click here to continue reading—>

Addendum 2014-06-01: Just a note for any other underwater DIY’ers out there:  my
housing design has changed significantly since this build. I have now moved away from metal latch clamps to a system of nylon bolts around the perimeter.  See photos here.


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—>