Hi everybody,
I'm new to the community and just started using the Arduino to monitor a high-temperature - high-pressure system in out lab in the University (up to 950 °C / 1 kbar ). I'm doing my PhD in Volcanology, performing many experiments which I'm trying to monitor reliably.
For this purpose I have hooked up an Arduino nano with two Adafruit MAX31855 break-out boards. Each board has got its own three dedicated pins. We're using high quality K-type thermocouples from Omega which work really well with handheld thermocouple-readers. We used these with great success up to temperatures above 1000 °C.
In addition to the temperatures I'm also using one analog input to read the analog voltage coming from an Omega pressure sensor amplifier. It gives 0 - 10 V so I've included a 10k/10k voltage divider to half the voltages. The pressure read-out is working nicely and gives the same results as our other barometers.
When I tested the system lately everything seemed to work pretty well, the temperatures were quite accurate and were printed to the serial monitor reliably. But I recognised that at higher temperatures, say above 800 °C mainly one of the thermocouples would produce many "nan" values. Sometimes three measurements in a row would be an actual temperature, but then again 10 nans. I read the temperature every 2 minutes but changing the interval didn't change anything.
Interestingly, the nans were only printed from one of the thermocouple-boards, so I tried swapping the couples around, but it still was the same board producing the nans.
I tried running the readError command but got varying results, even showing numbers that are not explained in the datasheet.
The thermocouples are not in contact with ground.
However, here is the code I used to read the temperatures during a 6 day period:
#include <SPI.h>
#include <Adafruit_MAX31855.h>
#define tcDO1 5
#define tcCS1 6
#define tcCLK1 7
#define tcDO2 8
#define tcCS2 9
#define tcCLK2 10
Adafruit_MAX31855 couple1(tcCLK1, tcCS1, tcDO1);
Adafruit_MAX31855 couple2(tcCLK2, tcCS2, tcDO2);
int P_pin = A0;
int P_value = 0;
int P = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
analogReference(DEFAULT);
delay(1000);
Serial.println("MAX31855 test");
// wait for MAX chip to stabilize
delay(1000);
}
int x = 0;
void loop() {
// put your main code here, to run repeatedly:
P_value = analogRead(P_pin);
P = (2068/1023)*P_value;
// Serial.print("T(int) = ");
// Serial.print(couple1.readInternal());
Serial.print(x);
Serial.print(" T_1 = ");
Serial.print(couple1.readCelsius());
Serial.print(" T_2 = ");
Serial.print(couple2.readCelsius());
Serial.print(" P = ");
Serial.println(P);
//Serial.println(couple2.readError());
x++;
delay(120000);
//T1_value = analogRead(T1_pin);
}
And here's a typical example of what the output in the Serial monitor looked like (instead of "#N/A" the actual value was "nan", but I changed it in Excel):
1465 T_1 = #N/A T_2 = 947 P = 1002
1466 T_1 = #N/A T_2 = 947 P = 1002
1467 T_1 = #N/A T_2 = 947 P = 1002
1468 T_1 = #N/A T_2 = 946.75 P = 1002
1469 T_1 = #N/A T_2 = 947 P = 1002
1470 T_1 = #N/A T_2 = 946 P = 1000
1471 T_1 = #N/A T_2 = 947.25 P = 1004
1472 T_1 = #N/A T_2 = 946.25 P = 1000
1473 T_1 = 938.25 T_2 = 946.75 P = 1004
1474 T_1 = #N/A T_2 = 946.5 P = 1002
1475 T_1 = #N/A T_2 = 946.25 P = 1002
1476 T_1 = #N/A T_2 = 947.25 P = 1002
1477 T_1 = #N/A T_2 = 947 P = 1000
1478 T_1 = 938 T_2 = 946.25 P = 1004
1479 T_1 = 937 T_2 = 946 P = 1002
1480 T_1 = #N/A T_2 = 947.5 P = 1002
1481 T_1 = #N/A T_2 = 946.75 P = 1000
1482 T_1 = #N/A T_2 = 946.5 P = 1002
1483 T_1 = #N/A T_2 = 947.5 P = 1002
1484 T_1 = 939.25 T_2 = #N/A P = 1000
1485 T_1 = #N/A T_2 = 946.25 P = 1002
I also tried to hook everything up so that two of the three pins of the boards are shared, but this didn't help either.
Okay, that's it. I'd be really happy if somebody would have an idea of what I could try to get this thing running reliably. Or is it just that I can't expect such a simple system to work reliably at those hot conditions?
Ah, the thermocouples are attached with a special thermocouple-wire to each board. The wire on T1 is about 1m , the wire on T2 is about 40cm.
I tried inserting a cap (47n, didn't have a 10n on hand) across the couple-terminals, without success.