Category Archives: Developing a FLOW ≋ sensor

A hydrometric pendulum using drag-induced tilt angles to infer water flow velocity.

For a case study showing the kind of data we collect from these sensors, see:
A Flexible Arduino-Based Logging Platform

Field Report 2014-12-16: Rebuilding & Reloading the Old Sensors.

The depth limits on our point & shoot camera prevented us from capturing photos from the dives. But a pile of 1st & 2nd gen units was slowly accumulating on the floor in our room...

1st & 2nd generation loggers were accumulating rapidly…

Each of the next few days started with a dive to replace old units that had been installed in deeper passages along System Ox Bel Ha, with the new generation of flow sensors.  To avoid the ballast problems we had on the last round of salt water deployments,  we decided to adjust the buoyancy of each flow sensor in-situ, while it was hanging from the support rods. The connectors themselves contributed varying amounts of negative buoyancy depending on their distance from the pivot joint, and some of the deep sites needed up to four rods (~2m) to get the flow meter into the right location in the water column. This required more time at depth than I would have liked the first time we tried it, but over the next few deployments we got reasonably good at weighting the units so that they were sensitive to the gentlest water movements. I need to put some more thought into making this procedure easier to do.

And we knew how important this fine-tuning was in the deep saline zone because each unit we downloaded told us that the August flow sensors were far heavier than they should have been. Ten grams of negative buoyancy is fine in a coastal discharge that races along at 15 cm/second, but when the fastest flows are below 1 cm/s, the pearls needed to be as light as a feather.  Semi-diurnal tides that jumped off the screen when we plotted the data from high flow sites, barely rose above the ADC noise in systems like Maya Blue and Jailhouse.  Of course there were more epoxy failures, and we continued to see units brought down by fake SD cards. The combination of these factors meant that we lost most the data from the last generation of flow sensors. I will never trust retail packaging for electronic components again.

Each rebuilt unit needed a 24 hour test run...

Each rebuild needed a few days of testing to catch code bugs…

And for the first time, we had so many sensors returning from deployments that refurbishing & reloading them was turning into a major part of the trip logistics.  That sounds pretty obvious in hindsight, but I was so used to having the opposite problem: where we concentrated on squeezing every possible  dive out of the “precious” YSI Sonde or Hydrolab, that having to triage old data loggers had never happened to us before. I started migrating parts from the younger units with failed epoxy, into the older generation builds with sound housings. Then every logger had it’s SD card replaced with ‘good sleepers’, and I tested them over again… just to be sure.  I completely rebuilt two of the Beta generation units for CEA’s open ocean deployement, and finally got around to putting the bma250’s they carried into a low current sleep mode.  I even melted grooves into the housings so that Marco could check the sensor orientation “by feel”, after they turned into floating algae farms.

Good enough for a "surface" deployment

I hope it is sealed well enough for a surface deployment…

Things proceeded well: All clocks on UTC? Check.  Replace old style battery connectors? Check. Good data saves from test runs? Check. Every few hours saw another unit up and running with reasonable sleep currents.  But the failed pressure sensor posed a bit of a problem. Bad epoxy or not, we needed two pressure units running so we could subtract the barometric from the combined signal that the under water units were reading. In the end I decided to re-submerge the older 2bar unit I built back in March, despite the fact that it had already done a long stint underwater, and I would leave the newer 5-bar pressure unit on the surface after sealing the hole with some glue from the local hardware store.

I was so zoned getting all these little Frankensteins going that for a while I lost track of the days.  I think it rained…or maybe it was sunny…because I was in Mexico…right? Fortunately while I was going non-verbal, Ben Schwartz and his crew of avid cavers arrived in Akumal. Being somewhat occupied, I hardly noticed the time Trish spent talking to them about to the region, and it’s wonderful cave systems.  They got the two-penny tour of our humble field station and endured my Cave Pearl “elevator speech”, which was still embedded in my brain from the GSA. Good thing too, as scripting & sleep deprivation had crowded out most of my other brain functions by that point.

And at night our room lit up like a Christmas tree every fifteen minutes, because all the little LED heartbeats were blinking in rough unison as loggers ran their overnight tests…

<— Click here to continue reading the story—>

Field Report: 2014-12-12 Retrieve the Costal Discharge Flow Sensors

The C generation units ready to come home.

The ‘C’ generation units, ready to come home.

We planned on retrieving the deeper system units first, so after our customary visit to Bil’s dive center in Tulum, we headed out to one of the sites that our friends Jeff & Gosia had installed for us back in October.  But a cracked sleeve on one of the high pressure hoses stopped the dive while we were still dry, and we spent a couple of hours hunting for a replacement in town.  By the time we were ready to go again, a long dive was out of the question. So we chose instead head over to our primary test site on the coast. It was a short, shallow dive, and I had a new suspension rig that I was keen to put on the ceiling of the cave to bring those flow sensors closer together.  We only had one new sensor ready for the site, but we could always swing by later to put the other units in.

Uh oh, what is that brown stain on the temperature sensor?

Uhhh, what is that brown stain on the temperature sensor?

The tide was with us, and we were at the site moments after leaving the surface. I did the now routine inspections, noting a bit more wobbling than I wanted to see on the suspension rods. I also spotted some discoloration on the white thermal-conductive epoxy I had used for the temperature sensors. I checked my watch, then the unit, watch, unit,…and saw no LED pips.  Now that was a real cause for concern, but there was nothing for it at this point.  So we collected the old flow sensors, removed the anchors, and I set about constructing a new connection rig from the various pieces of PVC I had in the mesh bag by my side.

It looks more exciting in photos than it does in real life...

It looks more exciting in the photos than it does in real life…

A little extreme underwater plumbing, and an improvised extra support for the center of the rod (thanks to my old nemesis: vortex shedding) we had it installed.  We connected the one new sensor we had with us, and were somewhat surprised that it took almost 180 grams of ballast to make it neutral (?), then I remembered that I had lithium batteries in this unit.  High  power/mass ratios are not as advantageous as they might seem in underwater applications.  After returning to the surface, I cradled the Pearls as we drove the tanks back to Tulum, watching for any signs of life, but it was starting to look like all of the units had expired.  I was pretty unhappy about that, especially since C1 was a “Rosetta stone” build, with both a BMA180, and a BMA250 acclerometer inside. I planned to use that data to develop a transfer function that could merge the data from the different build generations.  Now it depended on how long that logger had operated before the epoxy let go. If water had entered the housing, there might not be any data at all. I was also cursing myself for putting an untested adhesive on the pressure logger, as that was our only reliable tide record for the site.

Pretty bummed out at this point...

Wanna see a maker cringe?  Show them this

Back at base, I had a chance to examine things more closely, and the news did not get any better. The new epoxy had degraded into a flakey, rubbery mess, and rust had devoured my temperature sensors. My only hope was that the plastic weld putty around the wires passing through the hull had provided some measure of protection in the shallow water.  Once we had photos of the damage, I started opening them up.

I was not expecting much, so I was pleasantly surprised to find that the loggers with the white epoxy had no water in the main housing. Both C1 and the pressure unit had small battery leaks, because the power module shorted out when salt water bridged the contacts, and alkalines usually pop if you drain them completely. The data files on the SD cards were intact, showing that C1 had two weeks worth of data, while the pressure sensor ran for a month before it lost power. I copied the files over to Trish, and moved on to other forensics.  As with the Beta units in the Akumal Bay, the RTC’s had lost between 30-40 seconds of time over the three month deployment.

The test rig in place

The parallel deployment rig after installation.

Then I turned to C2 and C4, which had been spared the bad epoxy. I had hoped for a full data set from at least one of them, but the log showed that they  barely squeaked into October before pulling their batteries below the 2.8v cutoff. That meant we now had a month long data gap for a system that we had been monitoring continuously since the first alpha units went in. The C2&4 units power curves were so spectacularly bad that I immediately restarted them on the meter, and discovered that both of their SD cards were terrible, with one of them drawing > 7mA while the logger slept. (That’s probably some kind of record, and I am temped to mail it to Bunnie, to see where it came from.)  And just to pour salt on the wound, the 7-8 month lifespan projections from the previous generation made me pretty bravo about power consumption back in August.  So I left the C’s running on a short 5 minute sampling interval, taking three times as many data points as we actually needed. Had I set them to a more pedestrian 15 minute sampling schedule, they might have pulled though. Arrrgh!

But in the end, we had something to work with, and that’s all we really need from these early builds. While I was grumbling about crap SD cards, and adhesives made from leftover chicken parts, Trish had been click-clicking away happily on her data.  She was in a much better mood than I was, so I asked her to cheer me up with a quick peak at some of the raw Z axis records out of C1.  In theory, the 14-bit/1g bma180 (in blue) should outperform the humbler 12-bit/2g bma250 (red) which I had used on the earlier builds:

StratifiedValuesforTwoacc_redisBMA250That 250 data is more stratified, but not nearly as much I was expecting, and the difference in signal magnitude is almost negligible.  Huh…perhaps that inter-generation data translation is not going to be as tough as I though.

By this point (2 am? ish?) my own batteries were running low, so we called it a day. Not a great day mind you, but sometimes that’s just how it goes.

<— Click here to continue reading the story—>

Field Report 2014-12-10: Collecting Salt Water Pearls

We did not have scuba gear, so the fastest approach was simply to cut the anchors away.

Without scuba gear, the fastest approach was simply to cut the anchors. I wanted to inspect  those connectors anyway.

Our first day with boots on the ground, and we were quite keen to see what we had on the loggers that were deployed in back in August.  A fresh batch of data is always a great way to motivate yourself for fieldwork.  So Trish headed out to Rio Secreto to collect the 1st generation drip sensors, while I met up with Gabriel and Marco from CEA to see about retrieving the Beta flow sensors we put in Akumal bay back in August. As we waited for a boat to become available Gabriel showed me the fantastic records that they had kept, and the locations they had selected for the deployments of the other two flow meters. One had been placed in the shallower south side of bay on October 13th, and the third unit was deployed at the mouth of Yalku Lagoon on November 27th.


This was discovered on Aug, and the unit was re-installed on Nov 21st.

This pivot joint failure was discovered on Nov 7th, and the unit was re-installed on Nov 21st. (Photo courtesy: Centro Ecologico Akumal)

Opportunistic photos of the units every couple of weeks revealed that the constant roil of the surf had taken a toll: with both of loggers in the bay suffering failures on the anchor rods & pivot joints. I had designed the pearls for much gentler cave environments, so this was not unexpected. I was just thankful that the folks at CEA had been around to catch the problems while the “backup” bungee cords were still in place, or the loggers could have simply drifted away.  Sometimes all you get from the first deployment is an understanding of how to do the next one better, and patchy data is still 100% better than no data at all.  Of course, As I reviewed the photos with Gabriel, I could not help but wonder if the electronics had survived all that knocking about.


There was even a few small crabs crawling around on the surface.

A marine bio project if I ever saw one

Gabriel had other pressing business that day, so when the boat became available Marco and I set off to retrieve the flow meters.  At each site we did a quick check that the north orientation was still correct, and that there were no obvious signs of physical damage. It was a gorgeous day to be out, but the bright tropical sun made it impossible for me to determine if the leds were still piping.  The first unit in the bay looked great but the second unit (in much shallower water) had suffered an incredible amount of bio-accumulation in only two months. I had never seen this on a sensor in the caves and it made wonder it if would even be possible to deploy ambient light sensors on a reef without some kind of rigorous cleaning schedule. By mid afternoon we had all the babies on board, and were heading back to shore.

The Oring seats were still clear. I guess PVC tastes better than EPDM?

The 0-ring seats were still clear. I guess PVC tastes better to sea critters than EPDM?

I spent a couple of hours scraping the gunk off of the housings with isopropyl alcohol before I dared to break a seal. And it was tough going, even with a pot scrubber. During the cleaning I could see that the LED on unit three was lit, indicating that it had gone into some kind of error state. Unit 4 piped on schedule, but I saw no flash from Unit 5. After the cleaning, it still took a wrench and some colorful language to loosen those bolts.

Once they were open I had a chance to look at the data files.  All of them had saved at least 10,000 records, but unfortunately the data from Unit 3 consisted of the same four numbers, repeating over and over again.  Inspection revealed that the SCL line on the I2C bus was broken. This had terminated the internal communications, although the RTC interrupt continued to fire on schedule for at least a month before it got confused and reset itself. So the logger from the south of the bay did not give us anything useful.  Unit 4, the first to go in, was still running when I disconnected it and I was keen to how much power it had used in three months. (see: mV vs time in the graph below) These beta generation units were running some pretty hairy old code, and I knew they were probably pulling a few mA the whole time. I also had Unit4 on a five minute sample schedule, so it had saved almost twenty eight thousand records to the SD card:


No surprises there, with another 2-3 months of operation before this unit powered down. But it is worth noting how much spread there is in the voltage reading. This generation of loggers sported a TinyDuino stack so I used the AVR’s internal 1.1 vref to monitor the battery, and I was not expecting to see so much variability with the bandgap voltage method (>70 mV of noise?). When I use a voltage divider to read Vbat on my other builds, the readings are much more stable. 

It will take me a while to chew the compass and accelerometer data into something useful but the temperature record really jumped out at me:


 *repairing the anchor rod failure left a two week data gap in Nov.

For almost two months the night-time lows stay above 28 C, with some of the highs reaching 31 degrees. And this sensor (DS18B20) is not on the surface, but down in the middle of the water column at about 3m depth, pretty close to that reef. I’m no biologist, but it seems to be getting a little toasty down there…

We had a little farmer tending the crop on unit3.

We had a little farmer tending the crop of algae that bloomed on Unit 3

Unit 5 was still running, although the LED ground line had been shaken loose, which I why I did not catch any pips. This build also had a 3.3v regulator one the power module, so I don’t have a battery voltage data to analyse. And finally, this unit did not go into the water till Nov 27th, so it’s flow data record is quite brief. However there was one other thing I could look at, before calling it a day: How much did those cheap eBay RTC’s I was using drift over the deployment?  I found a lag of about 30 seconds in the RTC on Unit4, and about 40 seconds had been dropped from Unit5. I probably caused some of that delay myself as I was not setting the clocks very carefully back then, but it is still gives me some indication that these RTC boards should be good for a year long deployment. Not bad for a board that only cost two bucks.


Beta Unit 4 has now been under water for almost 10 months. The JB marine weld & Loctite epoxy are starting to show their age, in fact if the units were not under water the whole time, I’d say they were suffering from UV exposure.  But I think they should still be water tight for a while, despite the fact that I exceeded any manufacturer specifications quite a while ago.  The plan is to keep these early builds in service till the housings finally fail, but I would like to lower that sleep current before I deploy these units are redeployed.  If memory serves, I never did get around to sleeping that bma250 in the Beta generation code (?)

<— Click here to continue reading the story—>

Project Update: Gearing up for field work 2014-11-26

Using Loctite E00-CL this time round.

Using Loctite E00CL this time round. The epoxy is weaker overall, but claims higher shear strength on PVC than E30-CL. The faster epoxy gets hotter, and contracts more, so there may be some risk of lifting the components. And the numbers in the individual data sheets do not exactly match those in Loctite’s own Plastics Bonding Guide, so who knows?

Another field trip is rapidly approaching, and I am scrambling to finish the bench tests before we have to stuff everything into a suitcase. The last three months have seen the project migrate away from the unregulated TinyDuinos as the heart of the data logging platform, to RocketScream based builds. Most of my sensors require a regulated 3.3 volt supply, and with only one MCP1700 voltage regulator in the mix, the Ultras have been delivering better sleep currents overall.  The MCP also gives me the ability to use lithium batteries in a pinch (who’s over-voltage would fry the unprotected processor on a TinyD board) , and it delivers up to 250mA if I end up with really power hungry sensors later on. Now that I have the same core logging platform in all the different Cave Pearl models, it is easier to shave down my code, as the compiles keep bumping up against the 32k limit for multi-sensor configurations like the pressure/temp/RH unit

But I have not forgotten how the TinyDuinos catapulted this project into viability back in 2013, and I am waiting to see if they release a generic I2C driver shield. Despite my rough handling of those early Tiny-based builds, most of them are still chugging along after months under water, a tribute to the quality of their build. I enjoy soldering my little bots together, but anything you have to do a hundred times begins to loose it’s luster.

Cave Pearl Flow Sensor

With new 32k EEproms in the mix, space on that logger platform is getting pretty tight and I have to trim the groove hub pcb to make more room.

Bench testing over the last few months has seen more sensor failures than I can throw a stick at, and I am sure that there are more to come if I keep using cheap eBay vendors.  The best overall diagnostic to identify good breakout boards continues to be shutdown mode current. If it’s on spec, and the board delivers a stable reading after wake-up, your golden.  Along the way, there have been so many little code tweaks I could not even begin to list them all. Some, like having the sensor reading LED pip change color to also indicate battery status, were effortless. But others, like determining the optimum number of times to use precious power up cycles to check that battery status, still have me scratching my head. We have more than 12 new loggers to deploy this time round, and I will be embedding plenty of little mini-experiments in the code to give me some empirical data for those questions.

You need at least a week of dry runs, as some sensors fail after a few days of operation.

You need at least a week of dry tests, as some sensors don’t fail till they have been running for a few days.

At this point I am focusing on micro amps, not milli amps, and the best drip sensor builds are coming in with sleep currents in below 15 μA (if I get all the sensors in to their low power modes and pin-power the RTC) That’s a heck of allot better than I was expecting for a few jumpers connecting off-the-shelf breakout boards. Even with the physical build coming together well, I still have a huge sensor calibration to-do list hanging over my head. But the tickets already bought, so that will have to wait till after the next set of field deployments. I also need to develop a new bench testing method that gives me the ability to discriminate how relatively subtle code changes affect a micro-power budget. Oscilloscopes seem to capture a time window that is too brief for the complex duty cycle of a data logger, and the power use ranges from a few μA of sleep current to many tens of mA for SD card writing during each cycle.


<— Click here to continue reading the story—>

Field Report 2014-09-02: Our first open water deployment

With the fieldwork coming to a close, we still had three working betas from the March deployment in handThese had already delivered a beautiful time series, and it seemed a shame to bring functional sensors back home when they could be out gathering more data.  So over the last few days Trish and I hatched a plan to conduct another experiment: Why not deploy them out on the open ocean, just to see what what happens? After all we were staying in the CEA dorms, and they have always been keen to support the research…

But this was going to be a real shot in the dark, as the Pearls were designed for the cave flows in the 0-20cm/s range, and the ocean is considerably more rough & tumble than that. After a bit of digging through her reference database, Trish found a write up of an experiment that had been done with acoustic doppler velocity meters at Puerto Morelos; just up the coast. A quick review of that paper gave me some sense of just how tricky it would be to get meaningful data out of my twitchy little accelerometers. While I chewed on that nut, Trish spoke with CEA’s director, who was quite keen on the idea of putting our new instruments in Akumal Bay.

Showing Marco from CEA how the support system works.

Showing Marco how the support system is assembled.    (Photo courtesy Monika Wnuk)

But it only took one look at the surf breaking over the reef to know that wave motion was going to dominate the kinetics. Fine if you are studying wave energy, but not so great if you want to gauge the direction of flow.  How was I going to tease the overall signal out of my little devices while they were being tossed around like that?  In the end I decided to really stretch the time between
accelerometer readings, hoping that my “average reading” would span the shorter frequency wave cycles.  Each sample would consist of thirteen separate accelerometer readings, separated by the maximum watch dog timer delay of 8 seconds, and then I would throw away the extreme high and low values before calculating an arithmetic mean. I was in the process of running tests with these modifications when Trish returned to our dorm room with Gabriel Rivera (from CEA’s water quality program), who told me that the centers director had arranged for a boat and that they already had an installation site in mind which they wanted me to look at. Trish already had a full schedule of work at Rio Secreto, including a public presentation of her cave research (in Spanish), so once again I drafted Monika as our team photographer and we set out for the launch.

Installing the sensor

Installing the sensor on the old buoy anchor (Photo courtesy Monika Wnuk)

The boat headed straight for one of the main reef buoys, and I was a bit concerned that they intended to anchor my delicate little sensors to that heavily chained beast. But once in the water, Marco guided me to an much older cement barrel anchor that was still in place, though it had rusted beyond use as serious anchorage. This was fantastic! We zip-tied the pivot and support rods into place, and returned to the boat for the sensor itself.  A few minutes later we had the sensor in place, but the poor thing was bouncing back and forth like a ping-pong ball. I had to do something to damp down those wild displacements, so I removed about 80 grams of the eternal ballast mass, giving the flow sensor a much stronger vertical restoration force.

Hopefully secure enough from boats, waves and tourists.

Secure enough from boats, waves and, hopefully, tourists.

The unit was in the center of the water column (at about 3m) and despite the roil of the surf above it now seemed to be consistently leaning in the direction of the particles we could see floating by. Our first open water unit had been deployed!

Our boat rental about to expire, and I now knew that I had to alter the ballast on the two remaining units, so we returned to shore for showers and a late lunch. Gabriel and I re-calibrated the last two units in a tide pool, and I gave him the last of our anchors and support rods so they could install the last two sensors after CEA staff had a chance think about other suitable locations.

After that I drove up to Rio Secreto,  making just in time to catch the end of Trish’s presentation. Her talk ended with a gratifying burst enthusiasm from the R.S. staff as we handed the 2 bar pressure sensor over to the science liaison who had been our guide a few days before. She promised to put it into the cave near the drip sensors as soon as she had an opportunity.

So I would be returning home with only one of the 13 units I had brought down, and in total this trip would see 16 different sensors running in the wild.  Brilliant!  Now it’s time for me to start digging into all that data…

<— Click here to continue reading the story—>

Field Report 2014-09-01: Our first “deep” saline installation

I was keen to see if the Pearls were sensitive enough to track the slower deep water circulations and Trish has an ongoing collaboration with some UNAM researchers studying cave organisms in a system called Ox Bel Ha.  With the new build, I was confident that we could push the envelope a bit, so we planned a dive to a deploy the remaining two Cave Pearls in the deeper saline zone of that system. (around 20m)

Did I mention how much I dislike tábanos?


Once again our friend Jeff loaned me some of his dive equipment, and even better, both he and his partner Gosia, were able take a break from their busy instructor schedules to join us for the installation.  Jeff had often offered his services to researchers in the past, and I think my nerdy enthusiasm amused both of them.  As with previous installations, I calibrated the buoyancy of the sensors at the surface with a small hand-held postal scale. Deeper systems tend to have slower flows, so I adjusted the Pearls to only 10 grams negative buoyancy. This was pretty close to the wire for a system at full marine salinity, but with flows down in the 0-5 cm/s range I was hoping for the best sensitivity I could get. With our kit sorted we put in at a rather boggy zero-vis cenote whose large population of mosquitoes & tábanos which the pre-dive checks at the surface a trial, despite the fact that they had already feasted on me while I did the buoyancy calibrations.

I was sad that we had to leave my little waterproof point&shoot at the surface, because it was a beautifully decorated system, with intersecting passages at multiple levels. Three of us followed Trish’s lead out to a nice wide section where we waited patiently on the line while she inspected the cave with her hydro-geologist’s eye. She found a spot, with a roof profile suitable for our bungee anchors, and instructed me to connect three 50cm segments to pivot, putting the meter in the center of the passage, at 22m depth. With the supports connected I returned for the first flow meter, only to make the unwelcome discovery that both of the sensors were now positively buoyant. Arrrgh! I had cut it too close by calibrating to only -10 grams in the fresh water of the cenote! We transferred a couple of five gram ballast washers over from the second unit, but we still had a slow persistent rise to the ceiling. Trish provided a temporary solution by adding a metal dog clip to the support rods, and since we only had the one spare clip, we called the dive with our second flow meter still in the bag.

Despite the buoyancy problem, everyone was happy with the overall simplicity of the installation procedure, and Jeff graciously offered to re-calibrate and install the orphan meter the next time he was in the system (and he wanted his clip back 😉 )With our shortened trip schedule, we took him up on the offer, and after a celebratory cerveza in Tulum, we gratefully left him with all the pieces he would need for the second installation.

<— Click here to continue reading the story—>

Field Report 2014-08-26: Old Flow Sensor Inspection

The drip sensor deployments left me with an couple of hours free time that evening, which gave me a chance to take a closer look at the flow sensors we pulled the day before.

From the same batch?

Different corrosion  although nuts & bolts were identical

The most obvious impact of the near marine exposure was the rust that had accumulated on the stainless steel bolts and ballast washers. (no spec on the bolts, but the lock nuts were 18-8) While they fasteners were all purchased at the same time, they showed dramatic variation in the amount of oxidization they sustained. I can only presume these are the result of the manufacturing process leaving scratches which acted as nucleation sites. Even the fasteners that suffered significant oxidization remained secure and they were relatively easy to remove once the surface rust had been brushed away.

Still clear, and nothing growing on the surface.

E-30CL still  clear, with nothing growing..

Some pitting on the JB weld surface.

Some pitting on the JB weld surface. I had some concern that the iron particles in the J-B weld might induce galvanic corrosion on the other metal parts.

Both epoxies proved to be far more robust than the manufacturers testing indicated, with the Loctite showing some surface fogging on two units, while remaining perfectly clear on the other one. The grey JB marine weld changed from a smooth surface to one with significant grit (~400 grit sandpaper?). I suspect the pitting is a result of the iron particles in their formulation rusting out of the the matrix, and I will try to get these puppies under a microscope later.  The rubber 0-rings were still in pretty good shape although they had a significant layer of bacterial slime on the exposed surfaces which I cleared off with a touch of isopropl alcohol. I suspect that any material with suflur in it is a banquet for critters the low energy cave environment, but the O-rings certainly look like they will survive for at least a year. (something for me to keep in mind with the bungee anchors though, as the older one’s are at 9 months submersion now)

Three of the four units pulled their 6 x AA power supplies into the 3.3 volt range (as read by the Atmel internal 1.1 vref trick) ; more power drain than my earlier tests had indicated for a 5 month run. But those bench-top tests were done too fast to include self discharge, without isolation diodes, and the real world batteries had been exposed to a relatively high humidity for the duration. (I have added 10 gram desiccant packs to the current crop.)

Perhaps the most interesting power consumption result was from the one unit that included a voltage regulator in the power supply module. I was unable to measure the cell voltage directly till a few days after the units were disconnected, but after the rebound period the AA’s supplying the NCP1402-3.3V Step-Up regulator were at 1.35v, while identical cells that had powered the unregulated Tinyduinos were at 1.4 v.  That’s a pretty small difference given that the nominal efficiency of the regulator is around 75%.

I will have to analyze the rest of the data later because the little net-book I have with me doesn’t have the gumption to chew on data sets of nearly 34000 records. So now we have the three older model Cave Pearls (and a pressure sensor!) cleaned up and in working condition… I think it’s time to put some thought into our next experiment!

Field Report 2014-08-25: Retrieve & Deploy New Flow Sensors

We started the day with breakfast at Turtle Bay Cafe, and once I had enough caffeine in my bloodstream to engage more than two brain cells at the same time, I reviewed the data on the SD cards from the overnight test runs. They all looked good.  Over breakfast we met up with Monika Wnuk, a multimedia journalist and documentary photographer from Northwestern University, who wanted to interview Trish for a water & development story she was working on. Yesterday, when she heard about our abbreviated schedule, she volunteered to help with the sensor preparation, and to provide shore support for our deployment dive. I was glad for the assistance, as two scheduled days were now being merged into one single operation.

Pre-dive planning with Bill, Trish, Monica & Jeff.

Pre-dive planning with Monica, Bil, Trish & Jeff.

Our diving field work almost always begins with a visit to Speleotech in Tulum, to see our long time friend Bil Phillips. Bil taught me to cave dive many years ago, and I still have much to learn from that remarkable man, who is without doubt one of the most dedicated cave explorers in the world. We also had the good fortune of meeting another good friend, Jeff Clark, who loaned me some equipment I needed for the days dive. The dive community in Tulum has always been generous to visiting researchers because they understand, more than most people, what is at risk with the rapid development that is happening in the region.  We all share a passion for protecting the caves as both a vital water resource, and as areas of natural beauty & wonder.

Checking for rotation, damage, etc.

Inspecting the old units for rotation, damage, etc.

With the kit sorted, we headed out to our main deployment site where I began to adjust the buoyancy of the new sensor units. With the new internal copper ring of ballast mass (45g), and heavier
aluminum battery holders, it only took 2-3 external washers to bring each unit to my target of 15 grams negative. This is slightly heavier than the last deployment but I am expecting any reduction in the tilt angle to be more than compensated by the 14bit 1g resolution of the new BMA180 accelerometers.  With
calibration out of the way,  Trish and I set off on the dive. High tide at the coast meant the system was experiencing very low flow, so we had a relaxed swim, with three new pendulums and a pressure sensor stowed neatly in the mesh bag by my side.

Old vs. New

New  vs. Old

Once at the site, the first task was to do a general inspection of the old units, noting anything unusual in my dive notebook.  After almost five months of submersion, there was plenty of rust on the stainless steel bolts and one of the units needed it’s anchor plate replaced.  Using the checklist I had prepared earlier, we swapped each unit in succession with it’s replacement.  In the calm conditions, percolation obscured our view a bit as our bubbles meandered around the ceiling of the cave, but it was still a very simple operation to exchange flow sensors.

Once the new units in place, we did a final inspection swim:

…checking that the new units were secure, with the X axis of the accelerometers oriented toward north.  While this is not strictly necessary with magnetometers inside the units,  I can use it as a rough confirmation of the compass bearings when I get the chance to do some proper data analysis later. I gathered the old sensors into the mesh bag and we made our way out of the cave.  I am not sure I can fully express the excitement that an inventor feels returning from a dive like this, but it’s very, very cool.

I think there is an ocean and a sunset in this picture. But at the time, we did not even notice it.

There is an ocean and a beautiful sunset in this picture. But at the time, I don’t think we even noticed it. (photo courtesy Monika Wnuk)

Back at the surface we had a chance to do a better visual inspection of the old units, which all appeared to be intact. I had some concern about the hull penetrations, as none of the epoxies were rated for long duration marine exposure. But the indicator LEDs were still piping on schedule, telling us that they were all still running.  Back at the dorms, we were equally thrilled to find complete data sets recorded on the SD cards.  (I will post more on the actual data after we have a chance to work on it.)

 <— Click here to continue reading the story—>

Project Update: Gearing up for field work 2014-07-20

GluingSensorsThe last two weeks have been a complete blur of sanding, gluing & soldering, with simultaneous assembly of five next generation of flow meters, and six new dry cave drip sensors.  With the leftover beta unit I used for the long bookshelf power drain test, and the new 5 Bar pressure sensing unit, we will have 13 deploy-able Cave Pearls with us this trip.

Packed & Ready to go..

Packed & Ready to go..

Laying all this out, I realized that while our clothing for would easily fit into a single carry on, I could not remember the last time my wife and I traveled without two 49.99 pound suitcases of equipment. I make detailed component identification sheets for the TSA inspectors, who always return the favor by putting their own little pieces of paper in our luggage.  So far it has worked out OK.

Flow meter updates:

Since the last deployment, I have located better sensors for the flow meters and tweaked quite a number of things in the physical build. The new accelerometer is the BMA180, the only 14bit 1g accelerometer I could find on the market.  The venerable DS18B20 temperature sensor has been replaced by the Sparkfun TMP102, in my quest for completely interchangeable I2C sensors. Several new epoxies will also be tested in this build, including a very expensive Arctic Alumina thermally conductive epoxy to see if it will improve the temperature sensor response.


Does a logger with three temperature sensors know how warm it is?

I have built two special “Rosetta Stone” units for this deployment. One has the Ms5803-05, TMP102 & Ds18B20 temperature sensors, while the other has three accelerometers in it.  Data from these units will give me a head-to-head comparison of the sensor performance, and allow me to unite the data sets that we are generating with each successive build. The multi-accelerometer unit will sport the BMA180, BMA250 and the ADXL345. I think the 180 will come out on top, but there is always the chance that the increased sensitivity of that acclerometer will contribute more noise than accuracy to the overall performance.

The anchoring system now uses modular 50 cm long connecting rods, so we can hang the pendulums at different heights in the cave passage simply by adding or removing sections. (and they are much easier to transport in the luggage) Replacing the stainless steel rim bolts with nylon removed about 80 grams of ballast mass, so I have embedded a ring of copper inside the upper clam-shell. Hopefully this will improve the accuracy of  the data from the compass sensor.

Drip Sensor Progress:

Similar to one of the early flow meters, this would probably withstand submersion for quite a while.

Similar to one of the early flow meter designs, this would probably withstand complete submersion for quite some time…

Developed from a minimalist three component design, these are the first data loggers I have constructed where the mcu board possesses an always-on voltage regulator. Using only 3 AA batteries to power systems already sandbagged by the relatively high quiescent current of the MIC5205, really forced me to look for other ways to conserve power. Thanks to at tip from one 0f the advanced users at the Arduino Playground I discovered that the heartbeat LED pips are still quite visible when I use a whopping 10k limit resistor. This brings the 20mA LED currents well below 1mA, and if I sleep the processor while the LED is on, we save another 5mA for the pip duration. This little tweak will become part of my standard build from now on. Wherever possible I have replaced delay statements with brief MCU sleeps, and I am only reading Vcc once before the SD card writing process, since that is the only time the information becomes important. I originally conceived these units around the Sparkfun Pro Mini,  but early bench tests are indicating that the Rocket Scream Ultra could be the board of choice for future Cave Pearl data loggers.

<— Click here to continue reading the story—>

Field Report 2014-03-22: The next generation of flow sensors is deployed.

The Field Testing Station.

The field testing station. The polished O-ring seats are covered with blue painters tape for protection.

After the successful retrieval, I set to work on scripts for the next generation of sensors. It’s amazing how the kind of focus that coding requires can really mess with your perception of time, leaving you feeling that everything is being done at the last possible minute, though you have been working on it for several days... But after some datasheet slogging (thanks once again to the folks at Turtle Bay Cafe for their patience), the units started to produce reasonable
numbers, and on the morning of the 20th we were “all systems go”. I had three pendulum units (plus one backup) and one high resolution pressure sensor ready to deploy.   The pressure sensor would be stationary to record the water level, and I did not want it swing around on a pendulum until I get a chance to do a bit more homework on the calculations required to compensate for that motion.

As usual, we had one unit misbehave on the bench so badly it needed a complete "brain transplant".

We had one unit misbehaving so badly it needed a complete “brain transplant”, but the modular design of the system meant this was pretty easy to do.

The low power consumption of our bench tests gave me the confidence to set a couple of the loggers to 5 minute sampling intervals, while leaving the third on a more conservative 15 minute schedule. (in case the faster loggers run out of juice before we can collect them). Then we sealed everything up and set out to collect the tanks, etc. from our friend Bil Phillips at Speleotec dive shop in Tulum. On the way there I monitored the heartbeat LED’s.  But unit 3 did not pip, so while Trish sorted the dive gear I cracked it open to find that indeed, it was not logging (I suspect because of a loose RTC alarm/interrupt line).  As luck would have it, a couple of researchers working with a group from Denmark/Austria  (who have done some impressive work ) arrived to prepare for their days dive. They were testing some newly developed 3D scanning equipment, including a flow meter using an optical method based on laser tracking of particles. A good nurtured discussion ensued about the pros & cons of different measurement methods: “How will you calibrate?” “That’s going to be really non linear..” “Yep, but I have no problems with bio-fouling, and no issues with salinity/refractive index…” I will skip the rest of the nerdy details, but let’s just say there’s nothing like a bit of friendly competition to motivate…

I used the deflection of an 8 inch cable tie as a rough field balance. Units were tuned to approximately 10-20 grams negative.

I used the deflection of an eight inch cable tie as a rough field balance. The units were tuned to  approximately 10-20 grams negative.

Once out at the site, I tried to standardize the buoyancy of each unit. The beta’s had significant variation in their response to water flow, and my goal on this build was to achieve a more reasonable amount of inter-unit consistency. Even with stainless steel bolts on the housings, I still had to add about 150 grams of ballast to each logger. (weighted towards the top of the units to offset any torque from the internal mass of the AA batteries)  I am not happy about all that hard iron near my compass sensor, but the data will tell me if it causes a serious problem, as compared to all the other factors, like the batteries, etc. My humble budget will not extend to a degaussed power supply!

They are deployed quite close together, to allow me to assess inter-unit response for this build.

They are deployed quite close together, to allow me to assess inter-unit response for this build.

Low channel flow meant that the deployment dive was pretty easy, and we re-occupied the previous logger location for a continuous data set. The new bungee cord anchors are much easier to attach to the ceiling of the cave than the knots of nylon string used earlier, but of course we don’t yet know how long the rubber will last. Despite my surface testing, I still needed to transfer a few ballast washers to achieve a similar angle of inclination on the pendulums.  During this operation I was promising myself that the next units will be much more compact, and have no metal parts on the outside.  After a final inspection swim, with the capture of a little video, we were done.  Although the whole installation went smoothly, the earlier delays from Unit 3, and my buoyancy calibrations, made for a very long day, so it was well after dark when we finally left the water. After so many months of work, I could finally relax a moment and take it all in – my little cave pearls are starting to feel like a “real” scientific monitoring platform:

(Yeah, shakey cam: but our WG-3 croaked last year and the Heros are not great in low light, so this was captured on a little Powershot D10, that’s nearly 10 years old)

It will be a while before we see data from the new units, but I am confident we will see good numbers from them. (…still have my fingers crossed though!) I think I need to go have a moment on the beach, before my brain starts chewing on all fixes for the next build. I have homework to do before I get a good electrical conductivity sensor in the mix that can cover the entire fresh to marine range (standard electrodes are not designed for this) but I wonder what else I could add to the little loggers?

<— Click here to continue reading—>