How to Make an Arduino Temperature Data Logger
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.
The components required for this project are as follows
- Arduino Uno
- DS3231 Real Time Clock
- Mini SD card module
- LM35 temperature sensor
- Connecting wires
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
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.
This Post / Project can also be found using search terms:
- components needed to build temperature logger
- how to make an arduino temp data logger