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:


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.

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

Read the other posts for this project:

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


This post is also available in: German


  1. Pascale Julia says:

    I built this datalogger some time ago. It is now in a box, all disconnected, would you have the schematics so I can rewire it properly without plunging back into electronics books (the logger link is dead)?
    BTW, I really appreciated this article.
    Thank you,

    • Angela says:

      Hi Pascale,

      thanks for bringing the broken link to my attention. I fixed it in the original post.
      Here you go:

      Mind sharing a picture of your logger when you reassembled it? 🙂


  2. john says:

    More a question

    Met data loggers yonks ago, about the same time that I met lock in amplifiers.
    Thinking of revisiting them.Is it possible to start with discrete transistors and a sensor to build a simple, very simple data logger ?

    • Angela says:

      Hi John,

      full disclosure: I never built something from gound up with discrete transistors, so take everything I write with a grain of salt.

      Short answer: It’s probably possible, however you will sure need a bunch of other parts to make it work, especially if you want to make use of it in a real-world setting, so the question will arise if it makes sense to built it this way.

      Long answer: For someone who understands lock-in amplifiers the electronics behind arduino and friends are probably not much of a secret and it won’t take long to find out that there are a bunch of unnecessary parts for your project on the board. The original idea of an arduino was to have an easy development/prototyping tool where you can experiment and once you are satisfied with the prototype results you build the final device with only the necessary parts.

      So, back to your original question: theoretically you can built a very simple datalogger with transistors and a sensor, but I’m rather sure you also want it to either display or store the data somewhere. So you need an LCD, or control a pen on a paper strip, or need an internet connection to a server, or an SD-Card, or whatever suits your needs and fits your energy requirements. You will also want to log the correct time, so you need to include a quartz or something that serves as a clock, or you need an internet connection to sync with a time server. A lot of tasks to achieve if you want to built it from ground up. They nearly shout for a microcontroler to help you. You can buy a development board like the arduino, experiment with different setups, displays, realtime clocks, whatever tickles your developer’s nerves and once you are satisfied you buy the parts you need and an additional ATMEGA328, flash the software, solder it together and that’s that.

      As prices for those boards are rather low (at least in Germany) it might even not be worth to invest time in building your own thing and just use the prototyping board in the final application. I did this especially with the ESP8266 on a NodeMCU board where I have all the neccessary things like WiFi and USB on board but which is still rather small.

      Hope that helps.

  3. 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

    • 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.

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

  5. 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

Leave a Reply

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