☀ How to Build an Arduino Data Logger ☀

A data logger is a device that records sensor information at regular intervals over a period of time so that information can be examined later for an understanding of phenomenon that are hard to observe directly. THIS PAGE is a consolidated set of links to the different Arduino-based logger tutorials that we’ve released over time, with some commentary to put them in context.  (OR  you can jump directly to the latest logger build instructions)

The hardware side of the Arduino platform is a circuit board built around an Atmel AVR microcontroller with connections broken out so you can physically attach wires to it more easily. It’s really the integrated development environment (called the IDE) that makes programming the Arduino so easy for beginners. The IDE handles a lot of messy details when converting code you’ve written into something that will run on that little chip.  Because those low level details are taken care of, you can run essentially the same program on many different flavors of Arduino hardware – even if they look look different 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.

Most people who are just discovering Arduino start with the UNO. It’s a relatively large board, and robust enough for the physical handling you see in a classroom situation.  We have posted several tutorials for the UNO that are suitable for beginners, with the hope that that teachers will use this material to create their own Arduino-based lessons.  UNO’s don’t run very long on batteries, but they are a fantastic platform for learning programming and electronics.

  1. Arduino UNO Data Logger for Beginners
  2. Adding Sensors (& Modules) to an Arduino Data Logger
  3. Display ‘Live’ Sensor Data from an Arduino with the Serial Plotter
  4. Simple Arduino Logger code w Sleep & RTC wake-up
  5. Build your own Arduino Starter Kits for the Classroom
  6. Ideas for your Arduino STEM Curriculum

While it might not be immediately obvious, the plotter tutorial is probably the most important one in the set for teachers. The serial plotter built into the IDE makes it possible to view sensor output in real time simply by adding one print statement to the code. This updates a graph live on screen by sending the numbers over the USB cable attached to a laptop. Nothing I’ve used before lets you do real-time classroom demos so easily.

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 several years on one set of batteries we use smaller Pro-Mini style Arduinos, which we modify by removing a few light-emitting diodes 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,  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 get smaller and more energy efficient as your skills improve, with some people reaching the point of using raw processors from the AVR family to create custom sensors. Or if your code grows large enough to exceed the memory on a standard 328P, you can switch to a board with a 1284P processor.  

This project started building data loggers with smaller Pro Mini style Arduinos in 2014using a generic wiring plan to enable future development:

In 2018  we published our first academic paper:  A Flexible Arduino-Based Logging Platform for Long-Term Monitoring in Harsh Environments   This open-access publication is free to download, and describes real world deployments that show how modifying both the logger and the housing enable us to monitor different aspects of groundwater flow with similar sensors. The “modules & jumper wires” approach used by this project makes it easy to create prototypes to suit different research questions, and other groups are now taking advantage of this flexibility; extending the basic 3-module design with new housings & sensor configurations.

In 2019: As part of our commitment to science education, we’ve developed a simplified version of the logger from that paper which uses Dupont connectors to reduce assembly time to about 1 hour. Dr. Beddow’s instrumentation class has been building the 3-module loggers for several years now, and their feedback informed this new layout which is easy to reconfigure for different student projects, while still keeping within the time constraints of a typical lab schedule. YouTube videos explain the assembly in detail and the new logger program starting point provides a functional temperature & light level logger without adding any extra sensors.  (For an idea of how this tool could be used in an educational context, see our post about testing plant stress with a normalized vegetation index.)   DIY sensors like this will soon become a standard part of the earth & environmental science curriculum, and we hope this new build supports other STEM educators who want to add Arduino based experiments to their teaching portfolio. 

Cave Pearl data loggers

An underwater DS18b20 temperature sensor chain with 24 nodes and MS5803 pressure sensor. This build uses the 2″ PVC housing for deployments below 5m. DIY underwater connectors join interchangeable ‘sensor segments’ to each other and to the the logger body.

Our earliest underwater housings used a rubber end cap, which could only be submerged to ~ 5m before water pressure compressed the flexible bottom too much.  Many of our deployment sites are much deeper than that, so we also developed a stronger underwater housing and inexpensive underwater connectors so that sensors can be placed at the end of long cables.  The core of the underwater logger is built from the same components as the 1-hour student version, but they are re-arranged to fit inside the 2″ PVC pipe housing.  We’ve also been developing methods to add 5110 LCD & OLED display screens using the lowest possible amount of power & system memory.

Sensor Tutorials:
There are many sensor tutorials the site, and
we are constantly developing new methods for calibrating inexpensive sensors to research standards: 

You can search for all the other material on this site via the search box on the upper right hand corner. In addition, progress summaries 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!