I'm currently using the MAX31855 cold-junction compensated thermocouple-to-digital converter in a project (datasheet). Using SPI, I'm able to read the temperature feedback. From an electronics standpoint, everything appears to be work fine and I can even breath on the thermocouple and the temperature will go up. However, the problem I've noticed is that the temperature readings aren't very accurate.

My setup: enter image description here

U1 is the MAX31855.

X2 is a two pin female header link

Using this type K thermocouple (link)

This chip then communicates with an arduino via SPI.

My relevant code:

float SensorMAX31855::read(void)
  uint16_t temp;

  digitalWrite(PIN_SPI_CHAN0_MAIN, LOW);
  temp = SPI.transfer16(0x00);
  Serial.println("First two bytes:");
  digitalWrite(PIN_SPI_CHAN0_MAIN, HIGH);

  temp &= MASK_MAX31855; // MASK_MAX31855 = 0hFFFC

  return (float)(temp * 0.0625);

Note: I should probably be using a signed integer for the temperature (per the data sheet), however, I'm just trying to do validation in which I know my temperature should be positive.

Problems: First off, over the course of 20 seconds, I'm getting temperature readings that range from 12C - 18C without even touching the device (I assume vibrations may affect the reading). Should the temperature reading be this jittery? My guess is no.

Second, the temperature should actually be 21C room temperature. However, my readings all appear to be below this number. Should I be expecting an absolute temperature? Or do I need to adjust for an offset?

Third, when reading the internal reference temperature, it came out to be a value of 26C. Does this seem warm given that the device is at room temperature?

Possible Answers It's possible that I've introduced some bad junction during the physical assembly. Would landing a K type thermocouple into a female header introduce an offset error or noisy reading?

Is it possible that this behavior should be expected? I realize the thermocouple can read a large range of temperatures, however, it still seems pretty noisy.

Any thoughts/ideas would be appreciated!


1 Answer 1


I worked with a guy who had 8 degree C error on his type-K thermocouple PCB. His tempsensor was in a corner, well away from the type-K connector; a HOT MCU sat in between, but quite near the tempSensor. He did have the ADC near the type-K. We thought and drew diagrams of heat flow for a few days; we moved the Tempsensor to be between the two (wide thick copper) pins of type-K; we installed a 2cm thermal_gap between MCU and type-K/TempSensor; we used lots of vias to thermally short the 3 GRND foil layers under the type-K to create an isothermal regions(about 50 vias, one every centimeter); he also changed the MCU to a low-power version. Result? Next pass of PCB was less than 1degree C error. We had developed the understanding of thermal shorts and thermal opens.


simulate this circuit – Schematic created using CircuitLab

Your MAXIM IC needs to measure the temperature of the K_connector. Copper foil has thermal resistance of 70 degree Centigrade per watt, per square of foil (any size square). A heat flow of 0.1 watt will cause 7 degree C error.

Simply putting your face near the PCB or junction or header or MAX will cause the "temperature" to change. Our heads dump 100 watts into the environment; at 0.2meter by 0.2meter area, or 20 by 20cm (400cm^2), our face is 1/4 watt per square centimeter. Your face, or you hands, or a soldering iron, causes errors.

What else is around, needing to dump heat?

  • \$\begingroup\$ Hello, can you provide any reference citation to the 100W emitted by a human head? \$\endgroup\$ Commented Feb 25, 2022 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.