Build Your Own Data Logger – Quick Start Guide

The first thing that can do things that actually DOES things for the TECHNOSEUM: A data logger that records the climate in a certain area of our museum.

The “Q-Tip-Logger”, a simple data logger that logs temperature and humidity to a SD card.

Like I promised before, here I show you how to build a data logger with the arduino. I want to do this step-by-step so you can follow the development and considerations that led to “our” logger. Many considerations had to do with the necessities of everyday museum work and so they might be of interest even if you don’t plan to build your own logger but want to hand the project over to your STEM group or your museum’s DIY club. For the impatient reader who has already did some building or raises a technology nerd, here comes the parts list, wiring scheme and code and some considerations for a good head start.

First of all: of course there are commercial products for this task and I don’t want to concur with those. But often I see that colleagues can’t afford the professinal solutions and therefore buy cheaper loggers that are not suitable for the task. Here, building it yourself can be an interesting alternative. Because it’s you who decides on which components to use you are the one who decides on the quality. And because you built it yourself you can maintain and repair it yourself.

Another remark: Wiring and code worked well in our setup but I can’t take responsibility for any damage that is done because you built your logger according to this guide.

What the device does:
This logger logs the current temperature in degrees Celsius and the relative humidity in percentage, then writes this data along with the date and the time as comma separated values to the file MyLogger.csv. This file can be imported into a spreadsheet software for further processing.

Needed Components:

  • 1 Arduino Uno
  • 1 Logging Recorder Shield with SD-Card reader and clock
  • 1 Temperature and humidity sensor (used here DHT 22 / AM 2302)
  • 1 Minibreadboard
  • 1 LED red
  • 1 LED green
  • 1 resistor 200 ohm
  • 1 resistor 100 ohm
  • 1 resistor 10 kiloohm
  • Breadboard cables
  • 1 SD-Card (because only small data is stored this is quite deliberate, I used a 2 GB card)
  • 1 power adapter (230 V AC to 9 V DC)
  • Case according to personal preferences

Wiring scheme:

logger

Arduino Code:

The code is based mainly on examples provided with the libraries used. It might be that I have drawn certain solutions from the web and haven’t noted the source. Should someone discover his/her code used here, please drop me a line so I can give propper credit.

The Casing:
Unleash your creativity here. I used a cardboard box that was roughly the right size and cut openings for the cables and the SD Card into it with a cutter. The only really important thing is that you can operate the reset button on the shield. You can spare it in the casing, we used a q-tip with a broad plastic peg on one end so the reset button is pressed reliably.

Improvements:
By looking close you realize that this project was an emergency response, designed to be quickly available. So, there is room for a couple of improvements.
Instead of the mini breadboard it is logical to solder the components to the logger shield wihich has already a built in prototype board. The only thing to think about is that the sensor has to be outside of the casing because the outside climate should be monitored.
Then, the logger remains comparably numb. To know about your climate, you have to read the SD card or plug in your laptop ans see what the serial monitor tells you. A LCD shield would be a comfortable solution to this issue – and you could skip the LEDs and print the error messages on that LCD monitor.
Last but not least a LAN or WiFi shield could send the data to the web.

Have fun experimenting!
Angela Kipp

More posts on this topic:
A thing that can do things – Taking a look at the Arduino from the perspective of a collections specialist
Build Your Own Data Logger – Quick Start Guide
Build Your Own Data Logger – The Sensor, Heart of the Logger
Build Your Own Data Logger – The Shield and the Wiring
Build Your Own Data Logger – The Software, Telling The Logger to Log

This post is also available in Russian translated by Helena Tomashevskaya.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

This post is also available in: German

7 comments

  1. Barry Knight says:

    The crucial point with any datalogger, commercial or home-made, is the quality of the sensors – particularly the RH sensor. Cheap sensors may be unreliable, especially at high or low RH, and they may lose their calibration quite rapidly. We all know there is a temptation to skimp on calibration, or to rely on the data uncritically, so my advice is to buy the best sensors or loggers you can afford and to calibrate them regularly.

    • Angela says:

      Hi Barry,
      you are right, the sensors are key, so is checking and calibrating them regularily. This post is just the Quick Start Guide, the next posts will take a deeper look at the used components and discuss the options. So, next up will be:
      1. Arduino and shields
      2. Sensors
      3. Coding
      Maybe some additional considerations, let’s see.
      Of course interchanging with other posts, so the readers not interested won’t get bored 😉

      Best wishes
      Angela

    • William Lull says:

      Checking RH calibration beyond the effective use of an aspirating psychrometer is rarely done. However, with several loggers, typically $120USD each, you can gather them once or twice a year and compare readings. Replace any loggers that are out of acceptable range (though you can continue to use them for temperature logging). This is the most prudent and cost-effective data logger approach.

      • Angela says:

        Actually, just to compare readings can lead to mistakes, as their sensors might have the same drift, especially when purchased around the same time. Your loggers might all show 10% off but you don’t realize because they all show aroud 35% instead of 45%, which seems reasonable. What proves quite effective is comparing their readings in a container with NaCl athmosphere (75%) and MgCl athmosphere (33%). You get an idea if they drift, in which direction they drift, if the drift is linear and if their reaction time is still okay.

  2. […] Source: Build Your Own Data Logger – Quick Start Guide | Registrar Trek: The Next Generation […]

  3. William Lull says:

    Since you point out that commercial loggers are available to do this same task, can you cite reasons or link us to a discussion to the problems a DIY logger solves? Maybe a case study would help, including a cost comparison of commercial vs DIY.

    • Angela says:

      Hi William,

      thanks for the input. Unfortunately, I haven’t taken a note everytime I saw someone asking for recommendations for affordable dataloggers on the MUSEUM-L or RC-AAM listserv but I’ve seen quite a few and some of them asking if some cheap gadgets for about 50 € can do the job just as well. Well, for the same price you can build your own, of course if you don’t count the costs of your own working hours. I see the following advantages:

      – For the same price a comparably cheap off-the-shelf solution costs you get a logger you know what it is capable of because you know the components you used.
      – If the sensor loses reliability (of course you have to check and calibrate it on a regular basis, like every logger), it is easy to replace at a reasonable price (the comparably expensive one I used here is at around 8 Euros (9 USD)). I will discuss this in the part about chosing the sensor which is coming up, this is just the quick start guide.
      – As grants for preventive conservation are few but there is a high interest in supporting STEM education, it’s a win-win if you do this as a project together with your local highschool. The kids learning about coding and microcontrollers and at the same time about the importance of preventive conservation and how climate data is used at their local history museum.
      – If you build it yourself, you learn a lot about coding and microcontrollers, which opens up new possibilities both for your institution as well as you personally.

      Again, if you do have the money to buy a commercial logger and the money to have it calibrated regularily, go for it. There are pretty good ones on the market, of course not mentioning names here. But I know that especially small museums struggle with getting money for such devices and for them it might be easier to find technically interested volunteers to help them with building such a thing.

      Of curse, if anyone is aware of a case study, I would be interested in sharing it here.

      Best wishes
      Angela

Leave a Reply

Your email address will not be published. Required fields are marked *