Intro: 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.
Arduino Uno R3
Adafruit data logger shield
Type K thermocouple
Stacking headers (optional)
Power supply for arduino
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.
(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.