Thermocouple problem

Hi Everyone!
I have a hot air station wand that has a thermocouple in it. I read it with max31855 and most of the time it works fine. The problem is that randomly it doesn't read the temp and returns nan so the pid stops.
If I use an external thermocouple (from a digital multimeter) it never fails , but if I put the external thermocouple inside the wand it behaves in similar way.
Could the airflow affect so it doesn't read the temp? Why outside the wand it works fine and inside it not?
Any clues?

  1. Check the datasheet of the MAX31855 to see if it has error conditions
  2. post the (complete) code you use that shows the problem

Hello Mantzas,

Another thing to check is that you are using the correct MAX31855 chip for your thermocouple. For example a MAX31855T should be used for T types, a MAX31855K for K Types etc. it may be that your thermocouple is falling out of range when its heated. The thermocouples are colour coded usually....

Good luck, let us know how you get on.

Thanks for the answers!
The chip is k type as the thermocouples.
The error I get is error 2 but I looked at the data sheet and googled around but can't make out what error 2 is.
The code is a simple mix from the adafruit lib example and a pwm fan. It's working fine outside the wand.

Well the error 2 as i found out is that the TC is shorted to ground.
But this doesn't physically happen.
Could it be that the fan inside the wand makes a noisy environment and thus making the TC read error?
I have added a capacitor a shown in the data sheet between the TC ends but it doesn't change anything.

Hi, how sure are you that the thermocouple is not shorting to ground.
Can you post a picture of the thermocouple, and the wand, is the wand earthed?

Tom..... :slight_smile:

Pretty sure.
The wand is earthed but to a different earth point. On the 230v mains earth.
The thermocouple -max31855 circuit is grounded in ard gnd.
Anyhow the thermocouple doenst physically touch any of the two in any way.

Hi, measure the AC voltage between the MAX earth and the wand earth.

You may need a .1uF between the two, there may be some stray AC leakage or induced current.

Tom...... :slight_smile:

Ok, will do.
What values should I be looking for?

Hi, not sure could be 50V or so, it will be high impedance so you would not feel it, with hot air blowing it could be static electricity, a discharge ever so often causing the MAX chip to go into fault mode.

Tom....... :slight_smile:

Checked but i didn't find any Voltage. The issue happens even with the mains cable unplugged.
Anyway I have altered the code so if it reads error it will read again until it gets a value so it can compute the pid.
Thanks.

I know this thread is extremely old, but I wanted comment in case others experience similar problems. I suffered from the same behavior on the MAX31855 in a circuit that also ran a fan using PWM. At certain duty cycles on the PWM, ground errors would randomly generate on one or more of the MAX chips in the system (4 in that design). After a lot of testing and reading, I found the reference board design for that chip, and it included a 1 uF cap between each cold junction terminal and ground. Including these immediately fixed the problem. In addition to this, my circuit also included a 10 uF cap BETWEEN the two cold junction terminals and a 470 ohm ferrite bead in each trace after the junction before the chip. All of this combined kills any frequency noise that might occur and marginally slows down the response speed of the system. I would recommend anyone experiencing these problems looks at the reference board design at https://datasheets.maximintegrated.com/en/ds/MAX31855EVKIT.pdf

The problem is that randomly it doesn't read the temp and returns nan so the pid stops.

Add a 10nF/0.01mF ceramic surface-mount capacitor, placed across the T+ and T- pins, to filter noise on the thermocouple lines.

Library for MAX31855 - GitHub - enjoyneering/MAX31855: Arduino library for 14-bit MAX31855 K-thermocouple to digital converter