Introduction: LM35 Temperature Sensor With Datalogging on SD Card on Intel Edison

- Demonstrates the use of an LM35 sensor on Intel Edison to measure temperature over extended periods ranging from several hours to weeks and logs the temperature readings from the sensor to an SD card inserted onboard, all necessary things such as time interval between two consecutive readings, either reading temperature in degrees Celsius or in Fahrenheit, etc. can be varied from this code itself.

Step 1: INTRODUCTION

- This setup was aimed at long term temperature monitoring and analysis of data for reference purposes.

- This program has been created on the Intel Edison and Arduino expansion board, it uses the Arduino IDE.

- Demonstrates the use of an LM35 sensor on Intel Edison to measure temperature over extended periods ranging from several hours to weeks and logs the temperature readings from the sensor to an SD card inserted onboard, all necessary things such as time interval between two consecutive readings, either reading temperature in degrees Celsius or in Fahrenheit, etc. can be varied from this code itself.

- Once you are done with the project, you can also plot a graph using MS excel.

- If you have any doubts regarding this project feel free to email me on vishalpawar1502@gmail.com , you can also contact me at www.instagram.com/vish_1502/

- I promise you that by the end of this page you will be able to do it with minimal setup, be it Hardware or Software and at the same time interesting and productive.

- Also, you should be a bit aware of the Arduino programming environment and basic electronics to fully grasp these things.

Step 2: REQUIREMENTS:-

- Intel Edison Compute Module + Arduino expansion board. (The

soul and body respectively)

- A DC power adapter (9-12V, max 1A), you can also use a 9V battery via the 9V barrel jack or use a 3.7V Li-Po battery. (For powering the board when not connected to your PC)

- A micro SD card. (For Logging the temperature values continuously)

- A micro USB cable. (For connecting Edison to PC)

- An LM35 Temperature Sensor. (That's what this article is all about)

- Arduino IDE. (For compiling and uploading the program)

- Jumper wires and/or a Breadboard. (For connecting the sensor to the pinouts, 'coz that's the fun part)

Step 3: FUNCTIONS:-

- The code for this project uses the built in "SD.h" in library of the Arduino IDE.

- Additional Functions included in the program are, checking whether or not the SD card is ready. (Displayed in the serial monitor)

- The temperature readings are dumped in a text file in the SD card. (Also displayed in the serial monitor)

- The Program also checks whether the data is written correctly, otherwise, displays an error. (Displayed in the serial monitor)

- You can either log the temperature in degrees Celsius or Fahrenheit or both scales.

- You can also plot a curve/graph for the collective data in MS excel which makes analysis and understanding easier.

Step 4: MAKING CONNECTIONS:-

- For minimal setup (not for nerds), use 3 male to female

wires (I know what you're thinking about...). Once you have the flat surface of the sensor facing you, connect the pin at the Left of the sensor to the 5V Rail on the power pins of the board, the middle pin of sensor to Analog input A1 on the board, the Right pin of the sensor to GND (ground rail) on the board, that's it for the Sensor.

- Now, swipe in a micro SD card into the SD card slot and finally connect the DC adapter/battery to the board.

Step 5: PROGRAMMING:-

Here is the program you'll need.

Step 6: RETRIEVING DATA:-

- Once you have the data on the SD card, connect it to your computer and open the "TempLog.txt" file, select all the data and copy it, now open MS excel and then paste it in a column, then, from the toolbar, click on "insert" and you'll see a list of all available graphs to plot.

- If you have any doubts regarding this project feel free to email me on vishalpawar1502@gmail.com , you can also contact me at www.instagram.com/vish_1502/

Arduino All The Things! Contest

Participated in the
Arduino All The Things! Contest