Tag Archive for datalogger

Build Your Own Data Logger – Arduino, the Datalogger-Shield and the Wiring

Sorry for the delay continuing this series. Actually, part of the delay had to do with developing an hands-on for explaining how gears work on a bicycle together with a colleague, using an arduino…

So, the basis of the logger is an arduino, which we presented lately as the “thing that can do things“. There are several arduino platforms depending on what you want to do. For our project we chose an arduino uno:
Photo by Clic17 via Wikipedia, CC-BY-SA 4.0Photo by Clic17 via Wikipedia, CC-BY-SA 4.0

Now, an arduino uno can do much more than just reading sensor data like we want to do, but it’s rather easy to make projects real without having to solder anything, it comes with a quite easy to understand coding language and there is a broad international community experimenting with it, so you probably find answers to your questions at the official arduino forum https://forum.arduino.cc/ or somewhere else on the web.

To work with an arduino you will connect the sensor and other devices you need to the ports of the arduino. You got digital ports (0 to 13), analog ports (A0 to A5) and some ports for connecting to power (marked 3.3 V, 5 V and GND). We take a close look on what we connect how later on.

First, we need another useful device, a data logger shield. So, what is a shield you ask? Well, as your arduino comes out of the box, it is a generalist. It can do anything, from showing the bike speed to logging your climate data. You connect it to all the parts you need for your specific project. Depending on the project, this can be a lot of wires, resistors, capacitors, switches… So, for some specific tasks you need for certain projects some fine people have developed boards that have everything you need on them and which you can connect to the arduino by simply “clicking” it on. So, the shield sits on the arduino like a backpack, is ready to perform certain tasks and you still have a reasonable amount of ports for your specific task, although some ports are now used for the connection.

And what is a data logger shield? Well, look here:

Taken from Adafruit website https://www.adafruit.com/product/1141

Taken from Adafruit website https://www.adafruit.com/product/1141


A data logger shield has two very useful devices: a SD card reader to log your data for further use and a real time clock (RTC). We need a real time clock because an arduino is incredibly dumb. When we tell it what time it is, it just remembers it as long as it got power. When we disconnect it from the power source it immediately assumes that it’s 0 o’ clock. The RTC has a small battery on board that safeguards the arduino remembers the time even when disconnected.

When we clicked the data logger shield to the arduino we can start wiring our logger. We can do that by soldering the wires directly to the shield, which comes with a convenient hole matrix for this task, or we can use a little breadboard and breadboard cables to do the wiring like in our example. For long-term use, I’d prefer soldering because it is less vulnerable to bad contacts. You can see the exact wiring in this scheme:

logger

The data pin of the sensor is connected to digital port 9, the green LED over a 100 Ohm resistor to digital port 8, the red LED over a 200 Ohm resistor to digital port 7. The “buckled (short) legs” of the LEDs, which are the minus pole, and the ground pin of the DHT22 are connected to the GND port. The power pin of the DHT22 and the data pin over a 10 K Ohm resistor are connected to the 5 V power port.

For our logger, we mounted the breadboard with the sensor and the two LEDs on the outside of the casing, while arduino and shield are inside of the casing. You can see the breadboard wires being connected from the inside to the outside:

DatLog_2

Finally, we need something that allows us to push the reset button in case we want to restart the arduino. In our case we used a q-tip with a broad plastic peg on one end.

Next up, we will take a look at the coding for our logger.

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 Software, Telling The Logger to Log

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

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Build Your Own Data Logger – The Sensor, Heart of the Logger

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 logger that writes temperature and humidity to a SD card

Quite to my surprise the last post about building a data logger caused quite a discussion. As I mentioned, this is not concurring with professional solutions. It’s an alternative for people who like to build things or who are searching for ideas for projects when cooperating with schools and STEM classes. For someone who isn’t keen on learning something new, maybe a bit unusual and building something, this project is not interesting. For someone who has a sufficient collections care budget to buy professional loggers and send them in for calibration regularly it might be interesting anyway to compare the professional loggers with the DIY versions. For someone with a collections management budget next to zero who sees a chance to find sponsors for buying the parts if he or she initializes a cooperation project with a school group, it opens up the possibility to have an alternative to the cheap loggers from the hardware store and spark interest for collections care in young people at the same time.

The critical questions – which I really appreciated – made me switch the order of this guide: instead of starting with the main parts, the arduino and the data logger shield, I start with the very heart of the logger: the sensor.

The sensor is the part that decides how good or bad the logger is suited for its purpose. No matter how careful you are building your project, if the sensor is bad, the results will not be satisfying. On the other hand, good sensors have their price. Like often it’s up to you to weigh the pro’s and con’s and decide how good your sensor has to be for your purpose. What helped me a lot were the tests conducted by Robert Smith with the most used sensors in the hobbyist sector, the DHT11, DHT22 and SHT71: http://www.kandrsmith.org/RJS/Misc/Hygrometers/calib_dht22_dht11_sht71.html. This comparison, together with his previous analysis of six DHT22 sensors made me use the DHT22/AM2302 which measures temperature and relative humidity for my projects.

Der DHT22, auch unter der Bezeichnung AM2302 zu finden.

The DHT22, also named AM2302.

Under real testing conditions it doesn’t reach the +/- 2% accuracy in measuring relative humidity mentioned in the data sheet on page 3 (which would have been a real surprise as only really high-prized loggers reach that accuracy in real life) but they bring good enough value for the money invested in my opinion. It can be found in electronic stores, in the adafruit store or on ebay and is easy to integrate into a project.

Sensors are generally not built for eternity. That’s why you have to send in the professional loggers for calibration. Fortunately, there is a method for testing loggers for accuracy by using saturated salt solutions described by Samantha Alderson and Rachael Perkins on the website of Connecting to Collections Care: http://www.connectingtocollections.org/wp-content/uploads/2012/03/Calibration-using-saturated-salt-solutions.pdf
That’s what you should do with your homebrew loggers, too. You can even built a little testing device so you only have to expose the sensors to the test, not the whole logger.

Before you let your logger log the first time you should check it against a reliable professional device. In two occasions I found linear differences between my own logger and the other device (for example one was always 1% below the reference device), which I could correct in the software. Then it’s important like I already mentioned to check your sensor regularly. If the sensor is not reliable anymore you should replace it. That’s where the price of about 9 USD comes in handy.

So much for the sensor. The next part will be about the arduino and the logger shield.

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