MAX31855 thermocouple (K) temperature way out - doing my head in.

I am working on a MAX31855 based system, and I just can't get the right temperature.

I have a K probe connecting to a K socket about 1½" from the board, with about 0.5" of traces from the board entry point to the chip. The chip is powered from 3.3V, and properly decoupled, etc.

The temperature the probe reads is way off the real temperature.

I have a DMM with temperature probe. At room temperature (25° today) they both read the same value.

When the MAX31855 reads 100° the DMM reads 147°. When the MAX31855 reads 150° the DMM reads 244°. I have melted solder paste (reflow temperature ~220°) to confirm that the DMM is the right temperature, and the MAX3155 is wrong.

Things I have tried:

If I swap the probes (they are both K) I get exactly the same results.
As for wires that link the K socket to the PCB, I have used both normal 25AWG and proper K thermocouple wire (offcuts from an old thermocouple).
The chip is mounted to the underside of the board about 10mm from the enclosure. The enclosure has ventilation directly below the chip, so it stays at room temperature (this is a later addition to see if that helped the problem, to no avail).

A couple of degrees difference I can tolerate. Almost 100° difference is just taking the wet.

I have scoured the data sheet till it's made my eyes bleed. I have taken other people's example code (Lady ADA, RocketScream, etc) and checked and double checked my calculations, and it's all perfectly fine (shift right 18, mask, sign extend, convert to float, multiply by 0.25 - I mean it doesn't get much simpler). Analysing the data stream from the chip on my 'scope shows that the temperature it's reporting is what my program is calculating.

So where am I going wrong?!

I don't normally ask for help, but ... HELP...?

Seems like the cold-junction compensation gone wrong when the temperature is only valid if everything is at room temperature.
Do you use a breakout board or the chip ?
Can you upload a photo how the thermocouple is connected to the chip ?

Erdin:
Seems like the cold-junction compensation gone wrong when the temperature is only valid if everything is at room temperature.
Do you use a breakout board or the chip ?
Can you upload a photo how the thermocouple is connected to the chip ?

The chip on a custom board. It connects by a proper K connector, which has wires connecting to a screw terminal, which is soldered into the board about 1" from the chip.

There was a topic on this chip a few days ago, this chip can't handle a grounded termocouple. I assume you don't have one pin grounded.

Could you try the Adafruit code, and test what happens if you shortcut the input (result = room temperature) or could you touch both thermocouple wires to the metal of the pins of the chip (to avoid bad soldering).

I would use boiling water and ice-water for reference. You would need pure H2O (distilled water) at sea level, but tap water and some compensation for height should make a good reference.

Erdin:
There was a topic on this chip a few days ago, this chip can't handle a grounded termocouple. I assume you don't have one pin grounded.

Could you try the Adafruit code, and test what happens if you shortcut the input (result = room temperature) or could you touch both thermocouple wires to the metal of the pins of the chip (to avoid bad soldering).

I would use boiling water and ice-water for reference. You would need pure H2O (distilled water) at sea level, but tap water and some compensation for height should make a good reference.

No grounded connections, no shorts, no nothing. The MAX chip can detect T+/T- short, short to V+ and short to GND and sets flags accordingly. All is fine.

I even tried a second chip, but it was exactly the same (the blobby solder in the second picture is from that - I didn't bother doing a solder mask on this board).

Decoupling is 100µF, 1uF and 100nF. 10nF across T+ and T- as per the data sheet.

The TC controls heating elements, and I can select a precise temperature to heat to, so that in itself makes a good reference temperature - heat it and read it with a known good thermocouple (DMM) to see how far off it is - no messing with water :stuck_out_tongue:

I'm not really liking the idea of holding the TC connector against the pins - not really going to be possible (as you can see in the pics). There's mains being switched nearby (makes no difference to the readings - heat it up, then disconnect the mains but power from USB, and the readings are the same), and I don't want to meet my maker just yet. Plus, getting it to connect well to that circuit without shorting to ground is not going to be easy.

tc1.jpg

From the datasheet:

"The device is available in several versions, each optimized and trimmed for a specific thermocouple type (K, J, N, T, S, R, or E.). The thermocouple type is indicated in the suffix of the part number (e.g., MAX31855K)."

Are you certain that it is the K version of the MAX31855 that you have? Is it marked on the chip? If you were using the J version of the chip with a K thermocouple, then I would expect that sort of error, because J thermocouples produce nearly 50% more output than K thermocouples..

Hmmm

You could be on to something there. I ordered these as samples some time ago, and have no idea what I ordered back then.

Looks like it might be a E at the end of the number there. Damn!

Spent so long staring at the data sheet, but I never looked at that big...

sigh

Thanks guys.

Ah, you know what? That's so much better.

It really does help when you have the right chip :sweat_smile:

I nominate dc42 for the monthly clairvoyance award :smiley:

I don't know about that, but I've just rubbed his karma nodes... :blush: