☀ How to Build an Arduino Data Logger ☀

This project has been running for a few years now, and the blog is peppered with many different builds that arose naturally over time as we tackled different research questions.  Those variations have been causing some confusion for people who google their way into the middle of it all.

So this page is simply a consolidated set of links to the latest datalogger build instructions, with a bit of commentary to put them in context.

If you do not yet know what an Arduino is, then it might be a good idea to review some of the great  introductory material that you can find on the web before diving in. The Arduino hardware itself actually isn’t that unique: it’s just a circuit board built around an Atmel AVR microcontroller chip, with connections broken out so you can attach wires to it more easily. It is really the software development environment (called the IDE) that makes the Arduino  easy for nonprogrammers to work with. The IDE application handles a lot of messy details when converting the code you’ve written into something that will run on that little processor.  Because those low level details are taken care of, you can run essentially the same program on many different flavors of Arduino, even if they look different physically.

An Uno-based  basic data logger, with no soldering required.  As the instructor, you can assemble this logger very quickly with pre-made jumpers but we found the connections were too easily knocked loose by clumsy students, so it's worth taking the time with them to put stiff solid core wires in place.

The starting point for most people is the Arduino UNO. It is relatively large, and robust enough for the physical handling you see in a classroom situation.  We have posted several tutorials based on the UNO that are suitable for beginners, with the hope that that teachers can use this material to build their own Arduino-based curriculum.  UNO’s don’t run very long on batteries, but they are a fantastic learning platform for programming and electronics.

  1. Arduino UNO Data Logger for Beginners
  2. Using the UNO for Sensor Data Acquisition
  3. Build your own Arduino Starter Kits for the Classroom

While it might not be immediately obvious, the DAQ tutorial is probably the most important one in the set for teachers. The new serial plotter makes it possible to view live sensor output simply by adding one print statement to the code, which updates a graph on screen by sending the data over the USB cable. Nothing I’ve used before lets you do real-time demos that easily, and the plotter  allows you to replicate tasks that would normally  require an oscilloscope.

MasonsSensorPottingThe drawback of most larger Arduinos is that they are built for ease of use, rather than being optimized for low power operation. Since this project is building data loggers that have to run for a very long time on one set of batteries we use smaller Pro-mini style Arduinos, which we modify by removing LED’s and changing the regulator to extend the operating time. There are some important differences between Arduino models in terms of pin locations and operating voltage, but the key thing to realize is that once you get your UNO based logger recording sensor data properly, you should be able to transfer  that code into to a Pro-mini based build with few (if any) changes to the programming.  This gives you a development path, where your prototypes generally get smaller and more energy efficient as your skills improve, with some people reaching the point of using raw processors from the AVR family all by themselves to build custom sensors.  Or if your code grows to the point where you are exceeding the available memory of a standard 328P based Arduino, you can switch to a board with a 1280P processor.   Since October 2012, Arduino’s are also being made with 32-bit ARM CortexM3 microcontrollers, which will coexist with the more limited 8-bit AVRs. ARM and AVR are not compatible at the binary level, but they can be programmed with the same IDE and again, most programs compile without changes for the two platforms.

In 2015 we produced a four part tutorial set describing how to build these stand-alone loggers:

  1. Preparation of the three core components
  2. Connecting those modules into a data logger platform
  3. Assembling a waterproof housing and attaching sensors
  4. Techniques for optimizing power consumption

Some of the material in Part 4 is quite advanced so it’s a good idea to get a few of the basic loggers running, before tackling power optimization. Provided you sleep the logger between readings, you should get more than six months of operating time on 3xAA’s from the basic build described in Parts 1-3, and a sensor with low sleep current can help stretch  that out to a year.

ICave Pearl data loggersn 2016 we posted an alternate build of the logger platform,  which combined Parts 1&2 listed above with links to all the needed parts. It’s cheaper, takes about 1/3 less time to build, and is easier for beginners to assemble. However the connections are not quite as strong as the soldered version from 2015, which is better suited to deployments where they could be bumped or shaken  around.  If your site location is relatively protected from disturbance, then either build should work OK.  If  you are monitoring the indoor environment, and don’t need a submersible housing, then check out the 2017 bare-bones logger. which makes it easy to connect sensors via a screw-terminal shield.

The 4″ housing in those tutorials uses a soft end cap, which can only reach about 5m of depth before water pressure compresses rubber bottom too much.  Several of our deployment sites are significantly deeper than that, so we also developed a stronger underwater housing made from PVC plumbing, and a method for building underwater connectors so that sensors can be placed at the end of long cables.  The core of the logger is still made from the same three modules as the rubber bottom build, but they are re-arranged to fit inside the 2″ pipe.

Cave Pearl data loggersThere are many sensor tutorials on the site, and that list is constantly growing. We are also developing methods for calibrating inexpensive sensors  to research standards.  I hope that by the time you’ve built few of these loggers,  you’ll be able to find all that additional information via the search  option on the upper right hand corner of all pages. In addition, progress summary lists  are shown there for some of the instruments I’m currently working on. 

Below that you will find a very long list of links to other Arduino projects that I found helpful or interesting. If you get stuck on something, leave a comment on the related page of this blog or post your questions to the forums at Arduino.cc – especially if you are trying to build something for your own research using a sensor I have not worked with yet.  Arduino.cc is by far the best resource available for beginners, and I always start my searches there.

Good luck with your project!