About this Project

Dr. Beddows observing vortex induced sway of a flow sensing unit. The hydrometric pendulum idea also works in a “float & anchor” configuration: allowing us to  deploy them in open water environments.

Early in 2011 it became clear that open-source micro controllers had the potential to replace expensive commercial sensor units with cheap  & cheerful DIY equivalents -provided someone was willing to dedicate the time.  In January 2014, we started a small blog recording the development of a simple water flow sensor using the Arduino platform. The project has grown since then, and those crude early attempts have been refined into a generic data logging platform which can be configured for many different  environmental monitoring applications.

The basic 3-module plan uses a  ‘lowest common denominator’ approach, and this means any component in the build, including the Arduino itself, can be changed to suit available parts without requiring a significant re-write of the code. Our performance benchmark is at least one full year of operation on common batteries. With this foundation, we are deploying sensor prototypes in wetlands, coastal waters and flooded caves; focusing on hydrology because of the crucial role water resources play in sustaining us, and connecting everything people do to the natural world.

2023 e360 2-Part Logger Assembly

The 2023 version of our class-room datalogger supports multiple sensor module combinations.

Anyone can learn to build something like this from scratch, and our hope is that this project is a useful contribution to the Makers movement; engaging people with environmental issues and giving them a chance to actively participate as citizen scientists.  So if you want to start a project of your own, you can go straight to the How to build a Datalogger page, or browse through our ongoing adventures from the place where it all startedThere have been many successes & many failures along the way, and I still learn something new every day…

– Ed 

59 thoughts on “About this Project

  1. Grace Cagle

    Wow, I’m so happy to have come across this page. Thank you for your diligent documentation! I can’t wait to see how I can use this information. I especially enjoyed your writing on the inception of the project.

    Reply
  2. Dan Cross

    Wow, I can’t tell you how much I’ve been enjoying this blog. As a relatively recent “Maker” (and ham radio nerd) things like this have been extremely inspiring! Thanks for it and keep it up.

    Reply
  3. Greg Springer

    Great blog. Motivated me to buy an Arduino and begin prototyping a pressure sensor for monitoring cave stream water depths. Curious: What temperature sensor would you recommend given your experiences? Thanks.

    Reply
    1. edmallon Post author

      To date I have been working with I2C breakouts (Sparkfuns tmp102 & Adafruits MCP9808) and one-wire DS18b20’s. All give you 0.0625C resolution but the MCP9808 gives a reasonably decent ±0.25 accuracy. The DS18s take quite a bit of calibration because there is a large amount of quality variation, but they have the strength that you can hook so many of them to very long wires. This multi-drop aspect of the DS18B20’s keeps bringing me back to that sensor over and over again. To be honest, all of them are ‘just OK’ as most of the caves we work in have less than 1 degree Celsius of variation all year. But what I really want for the cave work is an affordable sensor that can give me ±0.1C accuracy and 0.01C resolution. RTDs and Thermistors can deliver that but I have not had a chance to play with them yet.

      [Update] In 2017 I got the thermistors working at high resolution with better than ±0.2C accuracy .

      Reply
  4. Christophe C.

    Thanks for your blog and sharing information. I’ll come back on it to search for Arduino information, power consumption reduction, sensors selection and epoxy pouring. For now, you just took 2 hours of my work day .. pfff.

    Reply
  5. Jimmys

    Thank you! You are a big source of inspiration even to hardened engineers. The reading of the articles is a joy and also I learned a great deal for sensors calibration and what not. Also the density of information you provide is fantastic I truly consider this blog a Arduino university. If you need to deploy to Crete, I will be GLAD to help. Over a hundred caves in the island are waiting.

    Reply
      1. koitoliver

        Ed,

        thank you for the suggestions. I decided to give your Mini Pro build a try. I think it should not be too hard to change whatever sensors you are using with the Maxbotix ultrasonic sensor (http://www.tme.eu/ee/details/mb7092/ultraheliandurid/maxbotix/)

        What do you think,would both of these work for as the main unit:
        http://www.tme.eu/ee/details/a000087/arduino-arenduskomplektid/arduino/arduino-mini-05/#

        or a clone using Atmel mega328P-AU
        http://isetegija.ee/toode/arduino-pro-mini-kloon/

        I read this report version of your logger:https://edwardmallon.wordpress.com/2014/10/07/the-diy-data-logger-v2-with-low-power-shut-down-capability/

        Have you updated the component list since?

        I am complete beginner in this field, however I rely on a robotics specialist in my university to able to reproduce your build and pair it with the maxbotix sensor.

        Best regards
        Oliver

        Reply
        1. edmallon Post author

          Pretty much any 3.3v Arduino will work with the updated build plans at:
          https://edwardmallon.wordpress.com/2015/10/24/diy-arduino-logger-build-instructions-part-1/

          I stopped using the Polou power switch from those older instructions because it was drawing 0.25mA -which was more than the logger itself while sleeping. From the datasheet it looks like that the MB sensor will run on 3.3v, so be sure to select a pro-mini style board that runs at 8mhz/3.3v as this lets you connect the SD cards without a level-shifter. Also dig around for a library to control the sensors, as that will make your life a lot easier when you are just starting out. The basic datalogger script at on the Project’s Github gives you a code starting point, although it does not have any buffering, so it uses power with all the sd writing.

          Reply
          1. edmallon Post author

            Well…that is interesting. I’m pretty sure the standard sleep libs will put the USB peripheral the 32u4 into low power mode, but I am wondering why they went with the SPX3819 instead of the MCP1700? The SPX seems to have much higher ground current? I guess they deal with that through the enable pin, but my problem is that the sensors need regulation more than the cpu does, so I never get to turn the vreg off. I will have to get a couple to see if they can deliver low enough sleep currents for long runs. My optimized builds usually come in around 0.12-0.15 mA. If they can beat that, I’d be happy to transfer some soldering time over to the thornier issue of sensor calibration…

  6. Luis Skinner

    Hi Ed ! It is a very nice and impressive work you did ! And the amount and quality of environmental data is amazing.

    I’m Marine Biologist in Brazil and I am trying to develop one similar project to monitor both, intertidal rocky shore temperatures and some water variables like salinity, light, currents and others.

    My first step is to build a cable, using arduino and 12 DS18B20 sensors. I really appreciate if you could support me in this.

    Best regards,

    Luis

    Reply
  7. Paul Wood

    We are looking at doing a data logger project for river monitoring. I just want to say this is an extremely well done blog that, through your generosity, will save us countless hours going down unnecessary rabbit holes in building a submersible pressure gauge. Thanks!

    Reply
    1. edmallon Post author

      Glad to help. Keep in mind that the MS5803 series sensors allow two configurable I2C addresses, so with the long cable configuration you can monitor barometric variation, and water level at the same time if you are near a dock, etc. And then the housing is even easier to make.

      Reply
  8. Herve

    Hi,
    I just want to say “thanks” for writting this blog. it is really interesting and fun to read.
    I like a lot your style and it very great to see real life arduino projects … and a very usefull project !
    Thanks for sharing.

    About the ATMEGA328p 10 bits ADC limititation … you can perhaps have a look on “MassDuino Nano” based on MD-328D MCU with 16 bit ADC (available with or without onboard usb to serial)

    Reply
    1. edmallon Post author

      Always interested in hearing about a new board, but when I checked the MD-328D data sheet, the specs say only a 12-bit ADC. Although there are commands for things like analogRead_16bits() they capture only 125 sps. The slow sampling rate makes me highly suspicious that they are simply doing oversampling in software with the chips internal noise to provide dither. Since it is easy to do that with the 328P based boards to achieve higher ADC resolution, I would have to find another reason to try out the MassDuino.

      Reply
  9. Austin Greene

    Hey Ed,
    I’m building an underwater ambient light and temperature monitor for use on coral reefs and heavily relying on some of your housing construction tips. I know you’ve experimented with the DS18B20 waterproof thermometers for your temperature chain, but you replace their original cables. What have you found to be the most cost-efficient, corrosion and water resistant cable for long-term deployments? I’ll have cable lengths from 2 – 5 m, and will need the jackets to hold up in salt water for 6+ months. Any suggestions on a specific jacketed, 3+ core wire for this application?

    Reply
    1. edmallon Post author

      I have yet to hunt down a good cable supplier for long rolls. For now I’m using silicone jacket M12C-SIL-4-R-F-15 cable from Omega.com for shallow work, but I have only recently started testing it past 20m, and those units are still out on deployment so I don’t know if they will survive. For deeper sites I would recommend the tougher M12C-PUR-4-R-F-15, but it’s stiff, and coils enough to be annoying compared to the beautifully supple silicone cables under water. Both jacket types easily handle salt water, but at 300′, your biggest problem is compression of the cable jacket causing the cable to tear away from the epoxy that you potted the end connector in. It’s possible that cable glands would handle this better by pre-compressing the jackets, and I would look at the ones used by diving light suppliers or other high-end temp chain vendors.

      Reply
      1. Austin Greene

        Gotcha, thanks for the link. As a new PhD student I’m looking to do this on a budget, so the silicone and polyurethane might be a bit out of pocket at the moment. Have you tested or considered a rubber-jacket SOOW or SJOOW service cable? The SOOW seems listed as waterproof, yet for some reason the SJOOW isn’t usually (despite still being labeled as waterproof via the second “O” in the name. An 18/3 cable is only about $0.50/ft so its budget friendly – if perhaps a bit big. Most are EPDM jacketed, same as our O-Rings so I’d think they’d be ok. Thoughts?

        Reply
        1. edmallon Post author

          I looked at service cables, but they are just way too thick for our work. Remember that most sensors barely draw 10-20mA. Also the PUR jacketed cable from omega is still cheaper on a per foot basis, and it’s really robust.

          Reply
          1. Austin Greene

            Gotcha, I’ll give the PUR cable another look. From what I saw the webpage didn’t offer an option without the connector, making it about $1 / ft at the cheapest for 10m after shipping. It would be great to get it without the connector, I’ll call them.

            I can’t seem to find much on this and am a novice, but is there a reason why having low currents over a big cable (16 awg) would be a problem if its for short distances?

          2. edmallon Post author

            No problem at all with the current, but as a general principle, I find that moving to smaller, lighter parts makes most aspects of building things easier when they are appropriate. For example, I almost always use tiny 1/8 watt resistors now, because they let me fit things into tight places more easily. But for your first prototypes I wouldn’t worry about it; just getting the darned thing working is an accomplishment!

  10. Greg K.

    Edward, great and inspiring work!
    I built data loggers for my PhD based on your work and I was wondering how i may cite you or the Cave Pearl Project? Have you published these designs?
    Regards
    Greg

    Reply
    1. edmallon Post author

      When do you defend? We are getting an article ready for publication now, but fieldwork is also approaching so it might be mid summer before it actually gets submitted.

      If you need something immediately, you can reference our GSA presentations:
      A LOW-COST SUBMERSIBLE DATA LOGGER SYSTEM FOR ENVIRONMENTAL MONITORING NETWORKS
      https://gsa.confex.com/gsa/2014AM/webprogram/Paper243506.html

      THE CAVE PEARL PROJECT – LOW COST OPEN-SOURCE HARDWARE FOR ENVIRONMENTAL MONITORING NETWORKS
      https://gsa.confex.com/gsa/2015AM/webprogram/Paper270702.html

      Which provide links to PDF’s, build plans, etc.

      Reply
  11. Greg K.

    No rush, I’m probably gonna defend next year so I guess your paper will be out by then. I will check the presentations anyway. Thanks again for the everything!

    G.

    Reply
    1. edmallon Post author

      I am happy to report that our paper has been published:
      Cave Pearl Data Logger: A Flexible Arduino-Based Logging Platform for Long-Term Monitoring in Harsh Environments
      Sensors 2018, 18(2), 530; doi:10.3390/s18020530
      http://www.mdpi.com/1424-8220/18/2/530

      And Sensors is an open access journal, so it’s free for everyone to download the PDF.

      Reply
  12. Jan

    THANK YOU for putting all that information on the internet for free. Haven’t seen a more valuable source regarding logging with Arduinos, DS18B20’s etc.
    Congrats on your paper (open access wohooooo!) as well!!!

    Reply
    1. edmallon Post author

      Happy to help anyone with enough curiosity & gumption to build their own instruments! This project benefited from the hard work of so many people in the Arduino community, that we felt publishing in an open access journal was our way to “Pay it forward”. Cheers!

      Reply
  13. Alan from Roberts Roost

    Hi Ed, Thanks for such a brilliant blog. I’ve enjoyed every post. On Aug 12, 2017 you posted about EC probes. I was wondering if you ever got any time to get back to that project, or if you are aware of any simple, reliable solutions for measuring dissolved solids in water. I’m working with a group trying to do some monitoring of wells and springs around a new fracking injection well site in our community. I can put together the basic logger (which I will be using in a tensiometer project I’m doing), but I’m hoping for some guidance on the EC sensor. Any thoughts would be appreciated.

    Reply
    1. edmallon Post author

      Sadly I still have not had time to get back to the EC work but it’s penciled in for November. The Atlas EC kits are probably your best bet if you are relatively new to the Arduino game as you should be able to find plenty of people working with them in hydroponics / aquarium land. If you’ve a bit more electronics background then the 555 Timer based circuits have a great following on Publiclab & there are plenty of tutorials. The trick is getting some good probes, and for fresh water I’d start by re-purposing one from a used Vernier kit off of eBay – though if you go that route you might as well use their circuit too since they output a voltage signal you can read directly with the ADC – same goes for the thermistor that’s embedded in the probe.

      Reply
      1. Alan from Roberts Roost

        Thanks for the quick response. The Atlas EC kits look great, but we need to put out 20+ to cover our area and that’s not in the budget. Looks like I’ll have to bump up my electronics skills. I’ll keep watching your site for inspiration.

        Reply
    2. Patrick

      Hi,
      this is a great website with plenty of information and inspiration. Thanks for giving us insight of your work.
      I’m interested in monitoring springs as well and there is also a karst spring nearby. But I’m no diver and the only thing that I can think of is temperature for little springs. I was thinking of measuring flow rate with ultrasound, but professional sensors are expensive and there seems to be no easy way to build them.
      So I will monitor the water level of the stream flowing from the larger springs.

      Reply
  14. C Markwardt

    Regarding absolute temperature calibration of sensors. Thought you might enjoy.

    I found an interesting article by Robert Smith (http://www.kandrsmith.org/RJS/Misc/Thermometers/absolute_ds18b20.html – “Absolute Calibration of DS18B20 Thermometers”). He found that using the melting point of ice (“ice bath”) and melting point of gallium, he could establish a two-point linear calibration. After calibration, he could recover better than 0.05C temperature scale.

    Gallium is pretty inexpensive and safe to work with. I’ve been using a basic cheap hotplate magnetic stirrer, and modified the heater to use one of those cheap heater controllers.
    The technique works well for the One-Wire sensors, but it should work equally well for any sensor like thermistors as well.

    Reply
    1. edmallon Post author

      I love kandrsmith.org, and have quoted them as refs for several of the articles here including my own early attempts at two point calibration. My temperature work has moved on from the DS18b20’s to oversampled thermistors, but the Gallium continues to fall in price so I might give it another look if I need to get to that level of accuracy. My only concern is about Gallium forming an amalgam with many metals, and those dissolved metals could compromise the purity of the bath, shifting the melting point. I’d love to see someone compare a batch that been used for a few dozen calibrations to some of the stuff that’s still 99.99%, (via some other high accuracy reference.)

      Reply
      1. C Markwardt

        Re amalgams. I’ve been wrapping bundles of sensors tightly in cling wrap before I dip them in the gallium, so there is no metal-metal contact.

        Reply
          1. C Markwardt

            I’m using 100 grams in 25 mm plastic test tubes. That’s enough gallium to fill ~1.5 inches of the tube. I can fit 4-5 DS18B20’s in there as well, which displaces the liquid.

  15. Pete

    Hi Ed, I am curious if you have made any further advances on an EC meter. I am looking for an inexpensive option for salinity measurements (full gamut from 0-32 ppt) in interstitial (gravel) water where salmon spawn in intertidal stream environments. I like approach of Chapin et al. 2014 (reference below), but I think only works in (very) low conductivity/salinity range (0-2 ppt). Any advice would be great!
    Thanks, Pete

    Robust, low-cost data loggers for stream temperature, flow
    intermittency, and relative conductivity monitoring
    Chapin, Todd, & Zeigler (2014), Water Resour.
    Res., 50, 6542–6548, doi:10.1002/2013WR015158.

    Reply
    1. edmallon Post author

      Hi Pete, EC has been bumped again to mid year, but the schedule has sort of gone out the window at this point…for obvious reasons. I will post that prototyping work if I can get a workable calibrations out of it. The trick is to to cover the entire fresh to marine range with a single sensor, and I’ve been thinking of trying one of the ultrasonic methods, but I may have to switch away from the 8MHz 328p based Arduino’s for that, as I’m not sure they are fast enough.
      Btw, thanks for the tip on that intermittency sensor: it’s a great hack of Onset’s light sensing circuit.

      Reply
  16. javier bollecich

    Dear Edward,
    Great job! i’m trying to measure soil moisture (from soil) and temperature + humidity (from air) and connect to the cloud with LoRa (Long Range) is a low-power wide-area network (LPWAN) protocol. I have to replace the Sd card reader by one lora module to transmit the data.
    Do you know any project like this based on your work?
    I loved your project because of the way you manage low consumption!, this is crucial for my project.
    I would appreciate any suggestions…
    Regards!

    Reply
    1. edmallon Post author

      I haven’t paid much attention to the whole IOT phenomenon because few of our deployments are located in areas with internet service. Adding cell/sat hardware usually blows the power budget for our multi year deployments & makes the loggers worth stealing (which has long been our #1 reason for data loss, followed by alkaline battery leaks). If you don’t need the 5km LoRa distance, then I’d look into Espressif’s custom protocol as it might be the most power efficient option if you can live with ~1km line of sight. I’d also invest in a good antenna tester, as they rarely match the frequency listed on the box wrt peak signal strength – no matter which protocol you are using. But since I haven’t added wireless coms to our loggers yet, I suggest you start with the material on Andreas Spiess’s YouTube channel as he’s probably already done a review of various LoRa options.

      Reply
  17. Jim Shepherd

    I downloaded the “Basic Logger Script with subminute intervals”, and it will not compile in the IDE. I get errors like “WIre was not declared in this scope” or “expected initializer before ‘const'” and I have no clue how to correct these…. Both of those two errors show up for lines that have similar other statements that were not flagged………… I’m an old Fortran/Cobol/Basic programmer, and this ‘language’ does not compute… I’ve got a prototype temperature logger built and ready for the program, but nothing to run it. I am more interested in getting data that learning programming… How do I proceed?

    Reply
    1. edmallon Post author

      I just tested the script on github and it compiles with no errors here. My guess is that you lost or gained a curly brace { or } somewhere during a copy/paste operation, and that is causing a cascade of seemingly unrelated/random errors further down in your program.

      Reply
  18. Robin Smith

    Hi Ed. First of all, huge thanks for this incredible repository of information. I’m in the process of building a wave height logger and your blog has helped immensely, not many people would be so dedicated and selfless with their knowledge and I hope you don’t mind if I ask you some more questions…

    Re SD card storage; When retrieving data/removing the card is there any possibility of corrupting the data during removal after deployment? Do I need a switch to tell the controller to stop writing to the card or disconnect the batteries or can I just pull out the card? Paranoid about loosing months worth of data because of this…

    Reply
    1. edmallon Post author

      Yes, one or two of Dr. Beddows instrumentation students manage to zap their cards this way on every run of the instrumentation course (with rapid writing loops) This vulnerability of SD cards during the write process is one of the primary reason we buffer readings into the little EEprom on the RTC module and then shift that data from the EEprom to the SD card only at the midnight rollover. But wave height loggers need to gather much quicker readings so you’d probably have to use an external FRAM. And Grieman also has some code on github that writes data much faster than SDfat, thereby reducing your chances of pulling the card at the wrong moment.

      Reply
  19. Pierre

    Hello, in many places of your blog you said that the standard for getting the data is 15′. Does that apply for of water temperature only? Would you be able to let me know where I can find information about 15′ standard?
    Thank you, Pierre

    Reply
    1. edmallon Post author

      As far as I know there is no actual ‘standard’, it’s more a case of analyzing the phenomenon you are monitoring and having enough data for the analysis you want to do afterward. For example measuring wave heights with a pressure sensor would need a sampling interval of much less than a second [ https://lukemiller.org/index.php/category/open-wave-height-logger/ ] while running fourier analyis on tidal signals usually forces us to down sample to about 1 hour [ https://www.youtube.com/watch?v=0VzX-3erjPI&ab_channel=EdwardMallon ] . So it’s usually a balance between sampling fast enough that you don’t accidentally alias your data, and having enough points for statisitcal analyis, while staying below your systems storage limits. 15 minute intervals works reasonably well for most of our environmental monitoring stations and align with the other data sources we use like government run monitoring stations.

      Reply
  20. Roman

    Hi Ed. Thank you so much for all the sharing and effort! We love the cavepearlproject!
    Great work!
    For a research project in Croatia that wants to understand the flow dynamics in a devastated urban bay, I would like to build a flow tilt sensor based on your designs. My question: Would it be possible to use your 2-part ProMini Logger also as a flow tilt sensor (with an additional light sensor) or did I miss some detail in the code/necessary processing for the tilt data? Or would you rather recommend to use the larger design (maybe for better resistance or maintenance?)? Time wise we think about a year but could also easily reach the sensors for earlier maintenance… Thank you so much in advance for your opinion and judgement, Roman

    Reply
    1. edmallon Post author

      The primary difference between the old and new models is the use of AA batteries for power, which also makes it possible to save data on an SD card – which gives you essentially unlimited space. Accelerometers and magnetometers tend to be more power hungry than other sensors so you’d have to do some hunting to find one that could even be powered from a coin cell for a year. What’s less obvious is the need for a certain amount of inertial mass to damp oscillations due to vortex shedding. Larger battery packs provide this, while the lighter 2-module logger has the potential to be tossed around so much that the readings become uninterpretable.

      Reply

Leave a reply to edmallon Cancel reply