You are on page 1of 7

5/5/2018 Arduino Data Logger Project - educ8s.

tv - Watch Learn Build

Videos Tutorials Support Contact Blog About 

Arduino Data Logger Project Home / Arduino Projects / Arduino Data Logger Project

 Previous Next  Free Project Articles


Get the latest Arduino,
Raspberry Pi and electronics
project articles rst.

Arduino Data Logger Project


 Name

 Email
#1 Data Studio Connector -
More Metrics than with
Join Now
Most Other Tools
Ad Supermetrics™ 100% Privacy. We don't spam.

Learn More

Welcome to this Arduino Data Logger Project video. This data logging project is very easy to
build even for beginners to Arduino programming. Let’s start!

Arduino Data Logger Project - Very Easy

http://educ8s.tv/arduino-data-logger-project/ 1/7
5/5/2018 Arduino Data Logger Project - educ8s.tv - Watch Learn Build

Intro to the Arduino Data Logger Project


This project reads the temperature every few minutes and stores the data in a micro SD card it
is the simplest possible datalogger. It consists of an Arduino Nano, this one here a DS3231 Real
time clock module, this one here, and an SD card module. This module here. The DS3231 RTC
has a temperature sensor embedded so we don’t need any other components except those two
modules. The cost of the project is very low. 3 Euros for the Arduino Nano, 2 Euros for the SD
card module and about 1,5 Euros for the Real-Time clock. So the total cost is around 6,5 Euros.

——————–
WHERE TO BUY
——————–
1. DS3231 RTC: http://educ8s.tv/part/DS3231

2. Micro SD card module: http://educ8s.tv/part/MicroSDModule

3. Arduino Nano: http://educ8s.tv/part/ArduinoNano

4. Multimeter Mastech 8268: http://educ8s.tv/part/Multimeter

5. AA Battery holder: http://educ8s.tv/part/BatteryHolderAA

6. Small Breadboard: http://educ8s.tv/part/SmallBreadboard

http://educ8s.tv/arduino-data-logger-project/ 2/7
5/5/2018 Arduino Data Logger Project - educ8s.tv - Watch Learn Build

7. Wires: http://educ8s.tv/part/Wires

8. Batteries: http://amzn.to/2b3Fh88

Full disclosure: All of the links above are af liate links. I get a small percentage of each sale
they generate. Thank you for your support!

Advanced Angular UI
components to help you
build better apps faster. Try …
Ad Progress Telerik

Download

Let’s now see how to connect those modules together in order to build this simple data logger.
I have removed all the wires in order to show you how to connect the modules. for details
about each module please check our previous tutorials. We have prepared detailed tutorials for
each module. So let’s start by connecting the power to each module. Vcc is connected, Vcc from
each module goes to breadboard Vcc, and we have connected the breadboard Vcc to Vin on the
Arduino Nano. We have connected all the Grounds to the breadboard Ground. Now, let’s connect
the Real Time Clock. Pin SCL from the Real Time Clock goes to analog pin 5 on the Arduino
Nano. Pin SDA from the Real Time Clock goes to analog pin 4 on the Arduino Nano. Now let’s
connect the SD card module. Pin MISO goes to digital pin 12 on Arduino nano. Pin MOSI goes
to digital pin 11. Pin SCK goes to digital pin 13. And lastly, pin CS goes to digital pin 10. Now
we are ready to connect power to the breadboard. I have connected this power bank to the
breadboard and now are ready to log data.Now let’s go to the computer and see how to
program this project. This is the code the project.

The Code of Arduino Data Logger Project


In order to better understand how it works watch the tutorials DS3231 real-time clock and the
SD card module. Also, note that we are using Arduino IDE 1.6 .1 the latest version available
today. This code won’t work on the Arduino IDE previous than the 1.6 so update your Arduino to
the latest version if you want to use this code. We are using the rodan library for the real-time
clock today. The rst time that we upload the program to the Arduino we have to set time if it
is now already set. So we have to uncomment this line here and enter the correct time and
date. So the rst argument, this argument here is the year, the month, the day of the month,
http://educ8s.tv/arduino-data-logger-project/ 3/7
5/5/2018 Arduino Data Logger Project - educ8s.tv - Watch Learn Build

the day of the week, fourth day, time in hours, minutes and seconds. We upload the program
once, we run it on Arduino and it sets the time. Then we comment this line here and we upload
it again. If we upload the program to Arduino and open the Serial Monitor we can see that the
program produces a line of data every second. This line includes that ID of the entry, the date
the time and the temperature. That line is then stored on the micro SD card. You can change
the time that Arduino creates a new entry by changing this variable here. The interval which
represents time in milliseconds so If we want Arduino to enter an entry in the le every minute
we have to make the interval 60,000 like this. If we now upload the program to Arduino it will
store an entry every minute. I run this program outside for 24 hours and I stored temperature
every ve minutes. So I had my interval set to 300000 milliseconds.

Before we place that datalogger outside in order to log data, let’s calculate how long it can last
on batteries. The current draw now is around 30mA. So, with this power bank, it stays on for
around three days. Most of the power is consumed by those two LEDs that are lit all the time. If
we remove them, we can reduce the power consumption and log data for more days. This time I
am going to log data for only one day. So this power bank is more than enough. Let’s do it. After
24 hours we have this le stored on the SD card. It contains almost 300 entries. Each value in
every entry is separated by a comma so it is very easy to import this le into Excel and plot the
data. Let’s see. We open a blank workbook in Excel and we click on the Data tab. Then we select
“From Text” and from there we select the le that Arduino created. We open that le and we
say that it is, of course, the delimited and it is delimited by commas as we saw before, and we
press nish. Then we import all the data in the existing workbook and as you can see all the
data are now in an Excel le. Very easy. Now, all we have to do is to plot the data. We select the
two columns that we are interested in time and temperature by holding control down and we
go to insert tab and we insert a chart. That’s it! As you can see this is an easy and low-cost
project. We will add more sensor to it in the future and we will try to increase its battery life
with various techniques So stay tuned!

——————–
CODE
——————–
 
 DOWNLOAD
 

http://educ8s.tv/arduino-data-logger-project/ 4/7
5/5/2018 Arduino Data Logger Project - educ8s.tv - Watch Learn Build

——————–

SUBSCRIBE ON YOUTUBE

——————–
Never miss a video: Subscribe to educ8s.tv

Pass CCNA Exam DS3231 Archives Quantum Bitcoin Arduino Project:


Fast Arbitrage Advanced
Datalogger with...
Ad prepaway.com educ8s.tv Ad Atlas Quantum educ8s.tv

Arduino Project: Arduino SD Card Arduino MP3 ESP32 Web Server


Real time clock Tutorial player project
with DS3231...
educ8s.tv educ8s.tv educ8s.tv educ8s.tv

Share This Story, Choose Your Platform!         

Leave A Comment

http://educ8s.tv/arduino-data-logger-project/ 5/7
5/5/2018 Arduino Data Logger Project - educ8s.tv - Watch Learn Build

Comment...

Name (required) Email (required) Website

POST COMMENT

NICK KOUMARIS RECENT POSTS RECENT TWEETS POPULAR TOPICS

 A Nixie Tube Clock Kit ESP32 Web Server


arrived  Tutorial with a BME280
Arduino Arduino Game

I'm extremely passionate about Sensor: Arduino GSM


electronics, making things and  Xiaomi E Ink Thermometer youtu.be/aUSwEkJCIAA?
design. I love teaching what I and Hygrometer a μέσω @YouTube Arduino Project
know and sharing my 6 months ago
experiences with you. I put out Arduino tutorial Art Deco
 Arduino 2.8″ ILI9341
new YouTube videos every Tutorial BMP180 Button
week as well as updating this ESP32 WiFi Weather
site with free tutorials. Be sure
 Arduino FM Radio #2
 Station with a Nextion Color TFT Display
to sign up for my newsletter to Display: youtu.be/eI-
be noti ed of new content! 4_QyVenw?a μέσω DS18B20 DS3231
 ESP32 Deep Sleep Tutorial
@YouTube
6 months ago e-paper ESP32 ESP8266

GPS GSM GSM Shield

http://educ8s.tv/arduino-data-logger-project/ 6/7
5/5/2018 Arduino Data Logger Project - educ8s.tv - Watch Learn Build

 Πρόσθεσα ένα βίντεο


σε ένα playlist
Hall Effect LCD LED

@YouTube Low Power Mosfet


youtu.be/afGxMfy7_0A?
a Arduino Two-Way Nokia 5110 NRF24L01
Bluetooth
OLED Python
Communication
6 months ago Raspberry Pi

Raspberry Pi GUI

Raspberry Pi Tutorial

Real Time Clock Robot

RTC SMS ST7735

Teensy TFT display

Thermometer Touch Screen

Tutorial Weather Station

Wemos WeMOS D1

Wemos D1 mini Wireless

Copyright 2015 educ8s.tv| All Rights Reserved     

http://educ8s.tv/arduino-data-logger-project/ 7/7

You might also like