Hello all, this is my first post on the Arduino forums so forgive me if this isn't the right place, but I've made these two units using 4 MAX6675's and another unit with 4 MAX31855's. Here are albums of them: MAX6675 andMAX31855. The two boards just read off of type K thermocouples, and then the Arduino's send the data and log it on the computer; they actually work extremely well and data collected on the unit with the MAX6675 boards will be submitted for publishing in a paper this week.
However, in the application that the units are used in, all of the thermocouples have to be put into a piece of metal and read the temperatures off of them. Referring to the configuration found the album linked above for the MAX6675, any board and any thermocouple put into slot 'B' will short out if it's connected to the thermocouple in slot 'D'. By that I mean that if the thermocouple in B is electrically connected to D at all, the readings on B will go down to 0. However all of the other thermocouples work totally fine and don't do anything funky at all. This problem can be reproduced with any MAX6675 board and any thermocouple. This problem is completely stumping me, I've looked at a ton of the issues with MAX6675's on the arduino forums and reddit and haven't really found anything that explains my problem, only a small handful of people with similar problems. Here's a photo of the Serial readings that show the temperature of "B" going down to 0. I've also tested all of the connections with a multimeter and there are no shorts. This problem has been persistent for about a month to two months now.
On my second board using the MAX31855's if ANY of the thermocouples are in contact it immediately spits out NaNs. This is huge bummer because the whole board is pretty much useless... Any help? I don't think the problem has anything to do with the code but here it is any ways for peace of mind. Theres also a Processing program for the serial interfacing that goes with it but I don't think it's necessary to include that into this.
Code for the MAX6675
#include <SPI.h>
#include <Wire.h>
#include "max6675.h"
#define MAXDO4 13
#define MAXCS4 12
#define MAXCLK4 11
#define MAXDO3 10
#define MAXCS3 9
#define MAXCLK3 8
#define MAXDO2 7
#define MAXCS2 6
#define MAXCLK2 5
#define MAXDO1 4
#define MAXCS1 3
#define MAXCLK1 2
// initialize the Thermocouple
MAX6675 thermocouple1(MAXCLK1, MAXCS1, MAXDO1);
MAX6675 thermocouple2(MAXCLK2, MAXCS2, MAXDO2);
MAX6675 thermocouple3(MAXCLK3, MAXCS3, MAXDO3);
MAX6675 thermocouple4(MAXCLK4, MAXCS4, MAXDO4);
void setup() {
Serial.begin(9600);
while (!Serial) delay(1);
//Serial.println("MAX31855 test");
// wait for MAX chip to stabilize
delay(10);
}
void loop() {
Serial.print(thermocouple1.readCelsius());
Serial.print("b");
Serial.print(thermocouple2.readCelsius());
Serial.print("c");
Serial.print(thermocouple3.readCelsius());
Serial.print("d");
Serial.print(thermocouple4.readCelsius());
Serial.print("e");
Serial.println("|");
delay(200);
}
Here's the code for the MAX31855 unit.
#include <SPI.h>
#include <Wire.h>
#include "Adafruit_MAX31855.h"
// Default connection is using software SPI, but comment and uncomment one of
// the two examples below to switch between software SPI and hardware SPI:
// Example creating a thermocouple instance with software SPI on any three
// digital IO pins.
#define MAXDO4 13
#define MAXCS4 5
#define MAXCLK4 4
#define MAXDO3 2
#define MAXCS3 3
#define MAXCLK3 6
#define MAXDO2 7
#define MAXCS2 8
#define MAXCLK2 9
#define MAXDO1 10
#define MAXCS1 11
#define MAXCLK1 12
// initialize the Thermocouple
Adafruit_MAX31855 thermocouple1(MAXCLK1, MAXCS1, MAXDO1);
Adafruit_MAX31855 thermocouple2(MAXCLK2, MAXCS2, MAXDO2);
Adafruit_MAX31855 thermocouple3(MAXCLK3, MAXCS3, MAXDO3);
Adafruit_MAX31855 thermocouple4(MAXCLK4, MAXCS4, MAXDO4);
// Example creating a thermocouple instance with hardware SPI
// on a given CS pin.
//#define MAXCS 10
//Adafruit_MAX31855 thermocouple(MAXCS);
void setup() {
Serial.begin(9600);
while (!Serial) delay(1); // wait for Serial on Leonardo/Zero, etc
Serial.println("MAX31855 test");
// wait for MAX chip to stabilize
delay(500);
}
void loop() {
// basic readout test, just print the current temp
Serial.print(thermocouple1.readCelsius());
Serial.print("f");
Serial.print(thermocouple2.readCelsius());
Serial.print("g");
Serial.print(thermocouple3.readCelsius());
Serial.print("h");
Serial.print(thermocouple4.readCelsius());
Serial.print("i");
Serial.println("|");
delay(200);
}