MAX6675 Thermocouple Shield and Arduino

image

a K type thermocouple is unlike other temperature sensors like thermistors and Digital Temperature sensors like the TMP36. A thermocouple is made by welding two wires made of Nickle and Chromium, hence NiChrom, to form a junction. A current proportional to the temperature is produced and this must be compared to a reference voltage called a cold junction.

Description

The MAX6675 performs cold-junction compensation and digitizes the signal from a type-K thermocouple. The data is output in a 12-bit resolution, SPI™-compatible, read-only format.

This converter resolves temperatures to 0.25°C, allows readings as high as +1024°C, and exhibits thermocouple accuracy of 8 LSBs for temperatures ranging from 0°C to +700°C.

This code is from the Adafruit, but it is my intention to use an OLED for display and will publish this soon. The library can be downloaded from here.


// MAX6675 Thermocouple

#include "max6675.h"
int thermoDO = 4;
int thermoCS = 5;
int thermoCLK = 6;

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
int vccPin = 3;
int gndPin = 2;

void setup() {
Serial.begin(9600);
pinMode(vccPin, OUTPUT); digitalWrite(vccPin, HIGH);
pinMode(gndPin, OUTPUT); digitalWrite(gndPin, LOW);
Serial.println("MAX6675 test");
// wait for MAX chip to stabilize
delay(500);
}

void loop() {

// basic readout test, just print the current temp
Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
Serial.println(thermocouple.readFahrenheit());
delay(1000);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s