Hello, I am trying to use two MAX31856 temperature sensors with my Teensy 4.1 and I am getting odd results. I seem to get accurate ambient temperature measurements but when I try to heat up the thermocouple by blowing on it the sensor starts to ramp up in temperature until it gets to a point where it says either 31.99 or 47.99 and it will continue to report that value until the thermocouple cools back down below that value. I modified the example code for continuous operation from the MAX31856 library. Any thoughts?
#include <Adafruit_MAX31856.h>
// Use software SPI: CS, DI, DO, CLK
//Adafruit_MAX31856 maxthermo = Adafruit_MAX31856(10, 11, 12, 13);
// use hardware SPI, just pass in the CS pin
Adafruit_MAX31856 maxthermo1 = Adafruit_MAX31856(10);
Adafruit_MAX31856 maxthermo2 = Adafruit_MAX31856(9);
void setup() {
Serial.begin(115200);
maxthermo1.begin();
maxthermo2.begin();
maxthermo1.setThermocoupleType(MAX31856_TCTYPE_K);
maxthermo2.setThermocoupleType(MAX31856_TCTYPE_K);
maxthermo1.setConversionMode(MAX31856_CONTINUOUS);
maxthermo2.setConversionMode(MAX31856_CONTINUOUS);
delay(3000);
}
void loop() {
Serial.println(maxthermo1.readThermocoupleTemperature());
delay(500);
Serial.println(maxthermo2.readThermocoupleTemperature());
delay(500);
}