MAX6675 Library

Here is a Library for interfacing the MAX6675 Thermocouple to Temperature converter (http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3149).

I have created a project at Google Code (http://code.google.com/p/max6675-arduino-library/). There you can download the current version and check for updates. 10/5/2009: Updated the code at the googlecode site as well as added all code to SVN.

I now have breakout boards for the MAX6675 chip for sale on my [http://ryanjmclaughlin.com/2009/07/max6675-thermocouple-interface/ site]. These make it easy to interface the chip as well as provide a standard thermocouple connector on the board. I also have some thermocouples, and all the components for sale as well. http://ryanjmclaughlin.com/shop/

Please feel free to email me with any questions or suggestions for improvements <ryanjmclaughlin@gmail.com>.


Example:

 
/*
  Single_Temp.pde - Example using the MAX6675 Library.
  Created by Ryan McLaughlin <ryanjmclaughlin@gmail.com>
*/

#include <MAX6675.h>

int CS0 = 11;         // CS pin on MAX6675
int SO = 12;          // SO pin of MAX6675
int SCK = 13;         // SCK pin of MAX6675
int units = 0;        // Units to readout temp (0 = ÀöF, 1 = ÀöC)
float error = 0.0;    // Temperature compensation error
float temp_out = 0.0; // Temperature output varible

MAX6675 temp0(CS0,SO,SCK,units,error);

void setup() {
  Serial.begin(9600);
}

void loop() {
  temp_out = temp0.read_temp(5);  // Read the temp 5 times and return the average value to the var

  Serial.println( temp_out );         // Print the temperature to Serial 
  delay(1000);                    // Wait one second
}

Share