Max 31855 Reading High Temperatures

by TheDankDrank on Thu Aug 16, 2012 3:38 pm

Background:
I have used the Max31855 Thermocouple breakout board in a program in our research lab. Currently we have a PLatinell 2 Thermocouple in a furnace which is primarily used to control the digital PID and ramp rate control. I built an arduino board which uses a 2nd thermocouple in the furnace to take the temperature and transmit it to a LabVIEW VI which monitors and graphs the data.

The Problem:
The Thermcouple was tested against the Platinell 2, which is extremely accurate and does not fluctuate and is very trusted, in which the the Max31855 thermocouple was above the Platinell by
3-4 deg C Room Temp - 200C
Very Accurate 200-500 C
4 C above 500C
10 C above when at 850 C

I have read quite a bit on common issues and thermocouples so this may help:
I have the newest Max31855 Libraries
The Thermocouple does not fluctuate, except when cooling (which is expected)
The capacitor is in place.
The Thermocouple is Ktype

What should I look into to fixing this issue?
TheDankDrank
 
Posts: 2
Joined: Wed Jul 18, 2012 9:31 pm

Re: Max 31855 Reading High Temperatures

by adafruit on Thu Aug 16, 2012 3:58 pm

Thats well within the specifications of the maxim amp and K thermocouple. if you need higher precision, don't use a K thermocouple, use a RTD or something with highprecision.
User avatar
adafruit
 
Posts: 11509
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Max 31855 Reading High Temperatures

by TheDankDrank on Thu Aug 16, 2012 5:13 pm

Unfortunately I cant use RTDs since most only go up to 800C and we go to 1000C

I thought the accuracy of the K-Type for the Maxim is +-2 degrees withing the operational range.

Its rather important i increase the accuracy.
TheDankDrank
 
Posts: 2
Joined: Wed Jul 18, 2012 9:31 pm

Re: Max 31855 Reading High Temperatures

by adafruit_support_bill on Thu Aug 16, 2012 6:57 pm

Variability between sensors is pretty much a given in the world of instrumentation. Any time you change sensors, you need to calibrate against a standard. All the instrumentation and control packages I have used have calibration capabilities on their thermocouple inputs. I would expect that LabView does too.
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am

Re: Max 31855 Reading High Temperatures

by adafruit on Thu Aug 16, 2012 10:20 pm

K thermocouples have a 0.75% spec error, thats at least 6.5 degrees. Plus theres some error from the amplifier. ~10 degrees is what you can expect from ANY K thermocouple + amp

http://www.omega.com/thermocouples.html
User avatar
adafruit
 
Posts: 11509
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Max 31855 Reading High Temperatures

by diemkae on Sun Sep 08, 2013 3:26 pm

I am using an Arduino Uno, with an Adafruit MAX-31855 breakout board and library, with a 12" long type-K thermocouple (home-made, using commercial type-K thermocouple wire with a (hard) silver-soldered junction, dc resistance is 0.3 ohms measured at the open end) connected directly to the screw-connectors on the breakout board. I am running the Arduino board with a 9 volt battery (no AC noise). The MAX-31855 is connected to GND, 3.3v, with CLK, CS, DATA jumpered to Arduino pins: D6, D7 and D12, respectively, and I have installed a 0.1uF ceramic cap between Vcc & GND on the breakout board, as suggested in the MAX-31855 data sheet. The 2 x 20 LCD display is connected to an Adafruit "backpack", connected to the Arduino DAT->D9, CLK->D9, LAT->D10.

This all seems to work as expected, except that the temperatures read from the termocouple seem seriously off at temperatures lower and mich higher than room temperature.

Specifically, the sketch reads the MAX-31855 once per second using the Adafruit library's "readFahrenheit()" function and gives me perfect readings around room temperature when compared to a mercury-in-glas lab thermometer. However, at lower temperatures (e.g. an ice cube in near-freezing water), the lab thermometer reads 32F, and the thermocouple reads 20F (actual temp * 0.625) With water at a full, rolling boil over a gas flame, the lab thermometer reads 208F (we are about 2000 feet above sea level), and the thermocouple reading settles at 240F (actual temp * 1.15). A pot of molten metal at 750F (according to a Lyman lead melting thermometer), also heated with gas, the thermocouple reads 840F (actual temp * 1.12).

This seems to deny the accuracy claims for the MAX-31855 & type-K thermocouples. I have tried two different type-K junctions (e.g. silver-soldered, fused) with the same results.

Given that the temperature range I am currently concerned with is from 600F to 800F, and the "correction factor" in that range seems to be about thermocouple.readFahrenheit() / 1.13 and fairly linear, I can live with that, but I expected better after reading the 31855 data sheet.

Any suggestions to get better accuracy, or at least a linear response over the range 32F to 800F?

Thanks!
diemkae
 
Posts: 6
Joined: Wed Jan 25, 2012 3:55 pm

Re: Max 31855 Reading High Temperatures

by adafruit_support_bill on Mon Sep 09, 2013 6:30 am

Offsets are not uncommon with thermocouples. As long as they are linear, you can calibrate out the offset. But the K-type linearization of the Max31855 should be better than what you are seeing over the range. If you contact support@adafruit.com with a link to this thread we can send you a replacement 31855.
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am

Re: Max 31855 Reading High Temperatures

by ashurbr on Tue Sep 24, 2013 4:29 pm

Greetings diemkae,

I know all about this. Please see a post I did previously - search for 31855 chip transplant. The MAX 31855 modules use a constant conversion from measured emf to temperature. The actual emf is not linear. What you can do is back out the emf using the measured temperature and reference junction temperature, then use the primary NIST emf data as a lookup/interpolation or regress the NIST data to a better polynomial.

Adafruit support - this issue has arisen several times - do you want to work with me to develop a "better" library?
ashurbr
 
Posts: 16
Joined: Fri Jun 29, 2012 2:14 pm

Re: Max 31855 Reading High Temperatures

by adafruit_support_bill on Tue Sep 24, 2013 5:26 pm

Certainly, improvements are welcome. The best way to do this is through the githib repository. You can submit changes there.
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am

Re: Max 31855 Reading High Temperatures

by diemkae on Thu Sep 26, 2013 10:53 am

Bob, et al:

Thanks for the suggestions! I have the original NIST tables for type K, and I've tried both of the lower-order polynomial approximations and coefficients (for type-K) from mosaicIndustries (which produced different results, BTW), and both sets of results differed significantly (like by hundreds of degrees) from the "real" temps when given the mV values for specific temperatures from the original NIST tables.

I'd like to try the 22nd order polynomial function posted by ahsurbr, but I would need someone to provide the coefficients for type-K (or tell me how to derive them ... I'm no mathematician); and the code for the enticingly named "refineTemp()" function might be helpful (it is called by the correctedT() function, but missing from the posted code section.

Thanks!
diemkae
 
Posts: 6
Joined: Wed Jan 25, 2012 3:55 pm

Re: Max 31855 Reading High Temperatures

by ashurbr on Mon Sep 30, 2013 2:50 pm

Greetings Again,

Here are the coefficients for the 22nd order polynomial for type K (pasted in from Matlab, so you will need to reformat for C/C++):

Code: Select all

pTofEMF_K = [-0.0082281970233092794, 25.474017528389641, -0.69553270410021861, 0.30853609598244713, ...
    -0.11095345616297209, 0.020027324250294843, 0.00045789202083780284, -0.00097185412701983494, ...
    0.00022422784666353425, -2.9802553081244889e-005, 2.7255969879054596e-006, -1.8354422863047243e-007, ...
    9.419013784397439e-009, -3.753453148475663e-010, 1.1725169995244201e-011, -2.8782137272754439e-013, ...
    5.5298706908663325e-015, -8.224565604345118e-017, 9.2803886723854516e-019, -7.67902102143416e-021, ...
    4.3939464588308267e-023, -1.5534087061730742e-025, 2.5563505128412472e-028];



As for the refineTemp() function, I did not feel comfortable posting that. This is what I did: got a NIST traceable calibrated Fluke 714 thermocouple calibration unit, set it to simulate temperatures of 0:50:1600 C (for type S) and took 50 individual T readings with the MAX31855 (type S) for each specified temperature. I averaged the 50 readings, and differenced the measured T from the calibrator simulated T. I then noticed the error had a shape, that I captured by regression to a polynomial quotient. The refinement is anywhere from about 4 C down to less than a degree C. Fortunately for me, the error decreased as the temperature increased, so the 22nd order polynomial alone was within a degree of so above about 800 C. Your mileage may vary. I have no idea what the coefficients in the polynomial quotient would be for a type K chip. Unless you have a thermocouple calibrator, you will not be able to determine them. The refineTemp() function makes the final adjustment and now I actually read with the MAX whatever T I set the calibrator to simulate.

Post back if you have questions...

Good luck,

Bob A.
ashurbr
 
Posts: 16
Joined: Fri Jun 29, 2012 2:14 pm

Re: Max 31855 Reading High Temperatures

by diemkae on Mon Sep 30, 2013 6:31 pm

Bob,

Thanks very much! I'll give this all a try ASAP.

Right now, I'm working on another (electronic) puzzle with the 31855. In my testbed, the Arduino max31855 breakout board are set up to control an AC relay (rated at 25A @ 120V). When the relay controls a 175 watt heater everything works well, but when it controls a 1200 watt heater, the max31855works for 5 to 15 minutes, then returns "nan" to all readFarenheit() calls until I reset/reboot the Arduino.

This seems somehow to be related to the Arduino power source. Specifically, when the Arduino power is provided by the computer's USB, or a 9v wall-wort (both plugged into the same 20A/120V circuit as the 1200 watt heater) this problem occurs consistently. When the Arduino power supply is a 9v battery, the problem has not occurred. Currently, I'm speculating that the AC voltage drop from the larger 1200 watt load kicking on may be part of the problem, where, with the 175 watt heater, it was not.

Tomorrow, I plan to test with the 1200 watt heater/relay connected to a different 120VAC circuit...
diemkae
 
Posts: 6
Joined: Wed Jan 25, 2012 3:55 pm

Re: Max 31855 Reading High Temperatures

by redwire on Tue Oct 01, 2013 12:23 am

The MAX31855 is a convenient but very finicky chip. Because it has so much fault-detection, it ends up being very sensitive to common-mode interference. The 10nF "capacitor" does not address this issue.

So any source of RF/EMI - like a nearby cell/cordless phone, arcing relay contact, heater wiring... can cause dud readings from the MAX31855, which confuses most controller software.

1. Make sure your Arduino power is grounded to the oven chassis ground.
2. Keep thermocouple wiring away from heater wiring.
3. Use an RC snubber across the relay contacts to prevent arcing. Like 33nF 250VAC and 33R 1/2W. The relay should not be close to the Arduino or thermocouple wiring. Or use a solid-state relay.
redwire
 
Posts: 17
Joined: Tue Dec 18, 2012 1:24 pm

Re: Max 31855 Reading High Temperatures

by diemkae on Tue Oct 01, 2013 7:23 am

Hi RedWire!

Thanks for your suggestions.

I am using an opto-isolated SSR (FOTEK SSR-25DA).

However, I do not have a "chassis" yet, (totally breadboard) and have not connected the Arduino ground to the chassis ground, which I presume would be the 120VAC ground/green wire.

As for keeping the thermocouple wire away from the heater, I did notice early on that using a metal pan & water caused a disruption in the max31855 readings, so I am now using a pyrex pot with water on the heater. However, the thermocouple junction is in the water about 1/4" from the heating element. That said, I suspect the problem is electrical, not related to EMI from the hotplate, because the max31855 seems to work fine when Arduino power is from a 9v battery.

Today, I will test with the Arduino ground "grounded"...

Thanks!
diemkae
 
Posts: 6
Joined: Wed Jan 25, 2012 3:55 pm

Re: Max 31855 Reading High Temperatures

by diemkae on Tue Oct 01, 2013 12:04 pm

YES!

In tests run since I connected the Arduino GND to the power cord green wire ground I have not encountered the max-31855 shutdown problem.

Thanks again!
diemkae
 
Posts: 6
Joined: Wed Jan 25, 2012 3:55 pm