Home > Projects > Temperature Measurement Projects > How to Make an Arduino Temperature Data Logger

How to Make an Arduino Temperature Data Logger

Summary of How to Make an Arduino Temperature Data Logger


This project constructs an Arduino Temperature Logger that captures temperature data from an LM35 sensor and timestamps it using a DS3231 Real-Time Clock. The system logs these readings to a mini SD card, which can later be accessed on a PC to generate charts in Microsoft Excel.

Parts used in the Arduino Temperature Logger:

  • Arduino Uno
  • DS3231 Real Time Clock
  • Mini SD card module
  • LM35 temperature sensor
  • Connecting wires
  • Breadboard

In this project, we are going to make an Arduino Temperature logger that will get the temperature value from the LM35 temperature sensor and the time from the DS3231 Real Time Clock module. Then we will store these values in the SD card file using the mini SD card Module. After that, we will access this file from a PC and create a chart of these values in the Microsoft excel.

 temperature-logger-finished-768x576

Required Components

The components required for this project are as follows

Circuit Diagram

Make the connections for the DS3231 time clock with your Arduino as shown below

  • GND of DS3231 to GND on the Arduino
  • VCC of DS3231 to 5V pin on the Arduino
  • SDA of DS3231 to A4 on the Arduino
  • SCL of DS3231 to A5 on the Arduino

Make the connections for the SD card module with your Arduino as shown below

  • CS of mini SD card module to digital pin 10 on the Arduino
  • SCK of mini SD card module to digital pin 13 on the Arduino
  • MOSI of mini SD card module to digital pin 11 on the Arduino
  • MISO of mini SD card module to digital pin 12 on the Arduino
  • VCC of mini SD card module to digital 5V on the Arduino
  • GND of mini SD card module to digital GND on the Arduino

Make the connections for the LM35 temperature sensor with Arduino as shown below

  • VCC pin of LM35 to 5V pin on the Arduino
  • OUT pin of LM35 to A0 on the Arduino
  • GND pin of LM35 to GND on the Arduino

Arduino-Temperature-logger

How Does It Work?

The LM35 temperature sensor gives the output in analog form. We need to convert this output using the ADC to be able to measure the temperature. The Arduino has a built in ADC through which we will convert the output of LM35 into a temperature value.

The DS3231 time clock module works with the Arduino through the I2C communications. So, we just need to connect the SCL and SDA pins on the DS3213 with the Arduino and the module will start to communicate. The module has a separate battery which makes it able to run even when it is not powered by the Arduino.

The SD card module is then used to store the temperature and time in the SD card. The SD card module will open the SD card and store the data in it. After that, we will open this file on the PC and make a graph using these values in the Microsoft excel.

Note: If you are using the DS3231 module for the first time, then you will have to set the time and data in it. To do that, change the time and date in the code according to your time and upload the below code.

 

Read More:  How to Make an Arduino Temperature Data Logger

 

Quick Solutions to Questions related to Arduino Temperature Logger:

  • How does the Arduino measure temperature?
    The Arduino uses its built-in ADC to convert the analog output of the LM35 sensor into a temperature value.
  • Can the DS3231 module run without Arduino power?
    Yes, the module has a separate battery that allows it to continue running even when not powered by the Arduino.
  • What communication method does the DS3231 use with Arduino?
    The DS3231 time clock module works with the Arduino through I2C communications.
  • How is the logged data visualized?
    You open the file stored on the SD card on a PC and create a chart of the values in Microsoft Excel.
  • What must be done if using the DS3231 for the first time?
    You must change the time and date in the code according to your current time and upload the code before it starts working correctly.
  • Which pins connect the DS3231 SDA and SCL to the Arduino?
    The SDA pin connects to A4 and the SCL pin connects to A5 on the Arduino.
  • Does the LM35 sensor provide digital or analog output?
    The LM35 temperature sensor gives the output in analog form.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top