Well my new 'Playing with Fusion' T type board and bi-directional level shifter arrived from US the other day so I rebuilt the circuit as the attached picture, connected up a T Type, loaded the sketch supplied by the guys at playing with fusion....
...and it reads with the same kind or error as the BBTech board.... arghh now I'm wondering if there is something fundamentally wrong with the MAX 31855. Has anyone out there ever got reliable readings from this chip?
I tried the code below based on Cory Fowler's library too, same result.
Noticing that the board doesnt like to be poked or moved (it results in error readings) I also wonder if there is something wrong with building this circuit on a breadboard - I've seen a few posts on the forum suggesting this can be problematic with some devices. Any experience of this anyone?
Any other suggestions anyone? This is driving me bonkers.....
Here's the hardware Im now using:
Playing with Fusion Level shifter : Playing With Fusion - Bi-Directional Level Translator with LDO (8ch)
Playing with Fusion 4 Channel T Type MAX31855T board : Playing With Fusion - MAX31855 T-Type Thermocouple Sensor Breakout (4ch)
There's a Playing with Fusion sketch at the site too.
...and here's the code adapted from Cory's example.
#include <SPI.h>
#include <MAX31855.h>
const int csPin1 = 10;//the pin asked to read CS
const byte scale = 0; // 0 is Celsius/Centigrade, ~80µs. 1 is Kelvin, ~108µs. 2 is Fahrenheit ~100µs. 3 is Rankine, ~100µs.
byte error;
double external;
double internal;
MAX31855 TC1(csPin1);
void setup(){
Serial.begin(57600);
pinMode(csPin1, OUTPUT);
digitalWrite(csPin1, HIGH);
}
void loop(){
TC1.getTemp(external, internal, scale, error);
Serial.print("Cold Junction Temp: ");
Serial.print(internal);
Serial.print("C ");
Serial.print("Thermocouple Temp: ");
Serial.print(external);
Serial.println("C");
if (error & 0x01){
Serial.println("ERROR: Thermocouple Open!!");
}else if (error & 0x02){
Serial.println("ERROR: Thermocouple Shorted To Ground!!");
}else if (error & 0x04){
Serial.println("ERROR: Thermocouple Shorted To Power!!");
}
delay(1000);
}
