Arduino Temp Logger




For my first instructable, I am sharing a temperature logging contraption based on the Arduino Uno R3. As I have it configured the temperature will be measured by a type K thermocouple and recorded to a SD card every 10 minutes. All hardware and related libraries are from Adafruit except the thermocouple, Any Type K will do.

The sketch I am sharing is a mix of my own work and examples from Adafruit.

Parts needed:

Arduino Uno R3

Adafruit data logger shield

Adafruit MAX31855

Type K thermocouple

Stacking headers (optional)


Power supply for arduino

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Connections

The connections for this build are pretty strait forward.

Arduino: Needs a dedicated power supply. The SD shield uses a lot of current and will drain a battery supply in a couple hours. I used a 7812 circuit to supply 12VDC to the arduino.

SD shield: The shield stacks on top of the arduino. In this version I added stacking headers to the shield. This isn't necessary but nice if the build isn't going to be permanent.

MAX31855: The pins on this board are labeled. From arduino to MAX,

5VDC to 5VDC

Ground to Ground

D3 to CLK

D4 to CS

D5 to DO

Also the thermocouple connections: Remember Yellow is positive and red is negative when using thermocouples.

(note) If you are getting noise in the thermocouple, add a .1uf non-polarized capacitor in parallel with the thermocouple.

Step 2: Sketch

Here is the sketch I used. Remember to set up the SD shield's clock before loading this sketch. Directions for this step are available at Adafruit. You will also need to download the hardware specific libraries from Adafruit. They are listed at the top of my sketch.

(note) I didn't use the sd library from Adafruit. Use the one that is included in the arduino ide.

good luck

(edit) I was having some trouble with the tc picking up ambient noise around line voltage so the code has been changed to keep polling the MAX31855 chip until a good reading is detected. Then it is written to the SD card. This should get rid of the NAN (not a number) reading that kept showing up.

I also cleaned up the commenting to make things easier to read.

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    9 Discussions

    rob c

    2 years ago

    Thanks I got it working and it seems to be a really good additiion to my "Lab", but needs to display temperature in degrees "C" (not "F") and needs to log data in one line not two for each entry.

    I how and what do i need to do to fix this?

    rob c

    3 years ago

    Is it possible to get your Arduino Sketch for this project ? (Please)

    3 replies
    rob crob c

    Reply 3 years ago

    Never mind, my browser was hiding it......

    What is the difference between temp logger sketch.txt and temp logger sketch 2.0 ?

    linker210rob c

    Reply 3 years ago

    in 2.0 the program will loop back and keep polling the temp sensor until a good reading is received. electrical noise can result in a NaN (not a number) reading which does not compute because the value is stored as an int.

    linker210rob c

    Reply 3 years ago

    only if you look at page two 0_0

    rob c

    3 years ago

    Great Job on the project !!


    Do you have a sketch that adds a LCD to this ?

    If not, what do I have to do to add it to the sketch?

    1 reply
    linker210rob c

    Reply 3 years ago

    you would need to add the lcd library specific to your display. I recommend the ones from adafruit. They have great examples. The command would be something like "LCD.print(your_text_here)"


    Reply 4 years ago on Introduction


    I needed a way to track temperature data from a solar heating project I'm working on. Off the shelf temp loggers are a pricey.