“A data logger is a device that captures sensor information and stores it for later use. It can use multiple sensors and collect data over time to record events, analyze for trends or help predict events. Using a microcontroller such as an Arduino is an excellent device to do this. In this Instructable, I show how to use an Arduino Uno for data logging complete with a DS1307 real time clock (RTC). Although this project is a DIY shield, I included Fritzing images for setting up on a breadboard if you do not want to solder. Multiple sensor readings can be saved to the microSD card along with a time (down to the second) and date from the RTC. The file type is a “comma separated values” (.csv) file that can later be opened in a spreadsheet program like Excel of analysis and graphing.
The shield was also purposefully designed with wireless data transmission in mind so that it can transmit or receive the data wirelessly to create a simple telemetry system. In fact, it is able to receive data from multiple transmitters and log them all on the microSD card in a single file. If you have tried to use a microSD card reader and an nRF24L01 together on the same project, you may have found that both often use the “Serial Peripheral Interface” (SPI), and are meant to be able to work together in the same circuit. However, many people have had trouble getting these modules working together. I will include a link to a video explaining a hack to the microSD card reader module that will fix this problem.
This Instructable covers the connections and sample code for a number of demonstrations on data logging with a timestamp. Simple sensor setups are used below to demonstrate how data can be recorded. The last two demonstrations involve wireless transmission. I will build upon a previous Instructable about using the nRF24L01 (link). You should have a look at that before trying Demo 3 and 4.
It is assumed that the reader has some knowledge of using an Arduino already, including downloading and using libraries from the internet. If not, there are many tutorials on getting started with the Arduino. That being said, I have included many pictures of the connections, links to other resources for important concepts and video demonstrations explaining the code and illustrating the function of the data logger.
Components for data logging with an RTC time stamp
- Arduino Uno
- MicroSD card module with SPI communication
- MicroSD card
- DS1307 RTC integrated circuit
- 32.768 kHz crystal oscillator (for DS1307)
- 2032 3Volt coin cell
- 2032 coin cell holder
- Resistors 4.7 kOhm, x2
- Jumper Wires
- Solderless breadboards for prototyping”