Shop OBEX P1 Docs P2 Docs Learn Events
Thermocouple's — Parallax Forums

Thermocouple's

$WMc%$WMc% Posts: 1,884
edited 2015-02-05 18:48 in General Discussion
I really need a why to read and display the values of various T/C's. Type "K","J", etc...My attempts at amplifying a millivolt or microvolt signal to a TTL level have all failed. I just can't get any reasonable accuracy from my design.
'
I have 2 DS27xxxx units that Parallax use to sell but discontinued. It was my understanding that the chip maker quit making the chip. This little guy worked great .
'
Could your Engineers come up with something else to work with the Stamp and Prop. ????
'
«1

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2014-12-06 22:02
    Can you post a working schematic using the DS part number?
  • evanhevanh Posts: 15,916
    edited 2014-12-07 01:42
    I'd hazard a guess that one of the difficulties that's frustrating you is common mode noise. Thermocouples are often dangling like an aerial in harsh environments while at the same time one is trying to measure an unshielded signal in microvolts.

    This is the sort of application where an electrically isolated A/D converter really shines. Battery operated single channel meters can cheat and make the whole device an isolated circuit but once the circuit has a second point of reference then the converter itself is in need of being isolated.

    Insulating the whole probe usually helps a lot with this issue but it's still not noise-free and it brings with it slower thermal response, bulkier probes, another point of failure, and likely a smaller working temperature range. Isolated A/D is the superior method.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-12-07 11:52
    The DS2760 used in the thermocouple kit has been superseded by the DS2762, basically the same chip. The Parallax manual for the thermocouple interface, using the DS2760 with Stamp code & schematic, is attached. There was a article on using the same chip for thermocouples in Sensors magazine, based on a Dallas Semi App Note.
    http://archives.sensorsmag.com/articles/0102/29/main.shtml
    The DS2760 1-wire family is/was meant as a Li battery monitor. The thermocouple hack uses the sensitive voltage input (+/-64mV, 15µV per bit) meant for the current shunt, and the built-in reference temperature sensor. The program code calculates the working temperature based on the voltage and reference temperature readings.

    I agree with evanh, there are trick pitfalls in instrumenting with thermocouples. Best to avoid the noise by insulating, shielding and so on. Noise that comes in has to stay within the common mode range of the amplifier, best a differential input at Vsupply/2, with balanced impedance, finally, isolation for difficult situations. On the other hand, some situations are not that difficult. The DS2760 hack did not use any of that. The thermocouple was connected single ended to ground and to the sense input. There are better alternatives.
  • $WMc%$WMc% Posts: 1,884
    edited 2014-12-07 15:54
    So Parallax still offers this device and I just over looked it?
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-12-08 09:59
    I'm sure Parallax no longer sells the #28022 or a replacement. I don't know why, but the original chip, the DS2760 was discontinued by Dallas Semi. It would have taken re-engineering to upgrade the product to DS2762. Maybe it wasn't selling. Or, the product may have taken too much support, because people often expect plug-and-play as opposed to the sometimes thorny instrumentation issues with thermocouples.
  • JonnyMacJonnyMac Posts: 9,105
    edited 2014-12-08 12:10
    I wrote the attached Propeller object about five years ago for a customer project that used the MAX31855. It worked well in an industrial HVAC system, and I'm about to put it to use in a sous vide cooking controller -- just have to find a food-friendly thermocouple.

    This chip might be tricky to use with the Stamp, but not impossible.
  • $WMc%$WMc% Posts: 1,884
    edited 2014-12-08 16:29
    Thanks JonnyMac
    '
    Just what I was looking for.
    '
    My project is food based as well. I'm working on controlling the Temp. of a smoker/Grill.
    '
    Grainger, McMaster-Carr, Newark, Are just a few places you can find jacketed T/C's. The jacket is either 304 SS or 316 SS. They can range from 1/16" dia. to 1/2" and almost any length. I normally use type "k" just because I have a roll of this type T/C cable, And tend to make my own probs.
    '
    I'll check out this MAX31855 in more detail
    '
    Thanks again
  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2014-12-08 16:31
    JonnyMac wrote: »
    -- just have to find a food-friendly thermocouple.

    Try EGT http://www.exhaustgas.com, I bet they could make you a thermocouple with a stainless steel sheath to your specs,


    .
    Bill M.
  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2014-12-08 20:19
    The MAX31855 is the replacement for the max6675, but the max6675 works well with both
    the stamp and propeller so long as you don't try to measure your temps in less than 1/4
    second intervals.

    Tracy Allen has good max6675 code for the basic stamp on his web site.

    If you want to use the mini type k connectors like what Omega sells, http://www.newark.com
    sells individual pieces from Omega, so you don't have to purchase a bag of 100.


    Bill M.
  • $WMc%$WMc% Posts: 1,884
    edited 2014-12-09 17:28
    Thanks Bill
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-12-10 10:16
    Happy to see Walt on the forums!

    Ken Gracey
  • 4x5n4x5n Posts: 745
    edited 2014-12-10 10:43
    The MAX31855 is the replacement for the max6675, but the max6675 works well with both
    the stamp and propeller so long as you don't try to measure your temps in less than 1/4
    second intervals.

    Tracy Allen has good max6675 code for the basic stamp on his web site.

    If you want to use the mini type k connectors like what Omega sells, http://www.newark.com
    sells individual pieces from Omega, so you don't have to purchase a bag of 100.


    Bill M.

    I took a quick look at the max31855 and didn't see anyway to move the cold junction away from the chip. That would mean extending the thermocouple wires close enough to the chip
    so that the "cold junction" is at the same temperature as the chip. The best thing to do would be to mount the chip to the input jack itself.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-12-11 10:58
    Here is a MAX chip mounted on an soic to dip breakout board with 5 wires back to the µP and 0.1" screw terminals for the K couple. The terminals are pretty much in direct contact with the chip's cold junction provided the board itself is placed in a uniform environment. Maybe Parallax should consider adding a little breakout like this to their sensor offering. These chips are dead-simple to use for a lot of applications.

    I think BS2 code for this chip should be no more difficult than it is for the MAX6625. For the Stamp, the interface would need 3.3 volts and level shifting on CS\ and SCK.

    attachment.php?attachmentid=112246&d=1418323684
    320 x 211 - 30K
  • 4x5n4x5n Posts: 745
    edited 2014-12-13 15:45
    Very nice work Tracy. I spent a lot of years working with industrial controls and the manufacturers of temperature controllers and meters. The amount of effort that goes into accurately measuring the cold junction was very imaginative and elaborate and is very important to get right.
  • $WMc%$WMc% Posts: 1,884
    edited 2014-12-20 19:29
    @ Tracy
    Were did you get the break-out board?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-12-20 20:03
    Adafruit sells a small MAX31855 board. They also sell thermocouples.

    I purchased a set of the above a while ago. I soldered headers to the MAX31855 board just two days ago. I haven't tried using it with the Prop yet but I doubt it will be very hard to do so since Jon has already done the work of writing a driver.
  • $WMc%$WMc% Posts: 1,884
    edited 2014-12-21 17:06
    Thanks Duane
    '
    I'll check Adafruit out for this board.
    '
    As I start to really get into this, I find I need more and more Temperature readings and locations...This is Propeller territory.
  • 4x5n4x5n Posts: 745
    edited 2014-12-21 17:53
    $WMc% wrote: »
    Thanks Duane
    '
    I'll check Adafruit out for this board.
    '
    As I start to really get into this, I find I need more and more Temperature readings and locations...This is Propeller territory.

    Remember to connect the thermocouple wires (or thermocouple extension wire) directly to the connector soldered to the board.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-12-22 11:04
    My breakout board is simply an SOIC8 to DIP8 adapter. No on-board 3.3V regulator or level shifters. That is fine, better even, for use with the 3.3V Propeller. If you want to use it with the Stamp at 5V, you'll need a breakout like the Adafruit board. I've used exactly the same SOIC/DIP board with the original MAX6675 and MAX6674, which are in fact 5V parts good for the BASIC Stamp. You can still get them from Digikey etc., but they cost twice as much as the newer MAX31855.

    The Adafruit description is wrong about the chips having different pinout. They are the same in that respect, although the programing is a bit different.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-12-22 11:22
    This is a dual breakout board. Two of the MAX chips are on two soic8/dip8 adapters, which come on a strip. This adapter is one I had done on my own, but these adapters do customarily come in strips like that. The two units share power, sck and miso, and each has its own chip select. The 0.1" screwdown terminals are in close thermal proximity with the T+ and T- terminals of the chip.
    attachment.php?attachmentid=112451&d=1419275853
    640 x 480 - 90K
  • $WMc%$WMc% Posts: 1,884
    edited 2014-12-24 19:11
    The MAX31855 must have a built in look-up chart, Since there is nothing linear about a T/C...?
    '
    When my order shows up, I'll test this chip against a Fluke 744 for accuracy.
    '
    All I really need is a 1/4 % accuracy.
  • $WMc%$WMc% Posts: 1,884
    edited 2015-01-24 21:02
    Here is a MAX chip mounted on an soic to dip breakout board with 5 wires back to the µP and 0.1" screw terminals for the K couple. The terminals are pretty much in direct contact with the chip's cold junction provided the board itself is placed in a uniform environment. Maybe Parallax should consider adding a little breakout like this to their sensor offering. These chips are dead-simple to use for a lot of applications.

    I think BS2 code for this chip should be no more difficult than it is for the MAX6625. For the Stamp, the interface would need 3.3 volts and level shifting on CS\ and SCK.

    attachment.php?attachmentid=112246&d=1418323684
    '
    '
    I wrote a BS2 code for the MAX31855. It has a 3.3v pin and a Vin pin. Vin,CS, SO, and CLK pins are good for 6.3v MAX. The code is real short and real simple. I tested it for accuracy with a 724 Fluke meter. 0.15% accuracy from 0`C to 1025`C. Note it will not read below 0`C.
    '
    This is the MAX6675 to MAX31855 upgrade board from Adafruit.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2015-01-25 12:50
    Walt, I think the following alternative main would extend the result to negative temperatures and also get the full 0.25 °C resolution from the MAX31855. I haven't tried this, no chip available at the moment.
    [size=1]Alternative:
      DO
        LOW CS                                      ' selelct SPI
          SHIFTIN so, Clk, MSBPRE, [MAX_T\16]        ' shift in the data, MSB first, MSBPRE for sign bit.
        HIGH CS                                     ' enough SPI xfr.  Conversions occur in the background
        IF MAX_T.BIT0 = 1 THEN Fault         ' another way to capture all 3 fault conditons.
        MAX_T = MAX_T >> 2					  ' drop bits 0 and 1 to isolate the 14 bit result
        MAX_T.BIT15 = MAX_T.BIT13                   ' extend the sign to bits 14 and 15.
        MAX_T.BIT14 = MAX_T.BIT13
        MAX_T = MAX_T * 25                          ' resolution is 0.25 degC per bit
        DEBUG CR,"degC=",REP "-"\MAX_T.BIT15, DEC ABS MAX_T/100,".",DEC2 ABS MAX_T   ' display as sxxxx.xx +/-0.25 degC.
        MAX_T = MAX_T + 4000                        ' add 40 degC to make it positive.
        F_temp = MAX_T ** 52429 + MAX_T - 4000      ' multiply * 1.8 and offset back to -40 degF.   
        DEBUG CR,"degF=",REP "-"\F_temp.BIT15, DEC ABS F_temp/100,".",DEC2 ABS F_temp   ' display as sxxxx.xx +/-0.45 degF.
        PAUSE 1000
      LOOP
    [/size]
    
  • $WMc%$WMc% Posts: 1,884
    edited 2015-01-26 17:31
    The MAX6675/31855 Spec's indicate the range from 0`C to 1025`C. I figured the little chip was just using simple integer math, And it wouldn't display decimal values in C`. I'll try your Alternative code and see what happens.
    '
    Well I tried the code. It works great. I'm a little puzzled at how. All I see is whole numbers with my Oscope looking at the data out from the MAX31855?
    '
    I don't have the Fluke 724 with me to test below 0`C readings, I'll bring it home tomorrow and do some more testing.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2015-01-26 22:52
    While the old MAX6675 is good only for positive temperatures, 0 to 1024 °C, the newer MAX31855K covers -270 to +1372 °C, the full capability of the type K couple. Accuracy falls off at the extremes. And the response is linear, 41.276 µV/°C, that is, no correction for the kinks in the thermocouple curve. All in the data sheet. I'm interested what you find out about the accuracy when tested against the Fluke 724 source.

    I'm not sure what you mean by, "All I see is whole numbers with my Oscope looking at the data out from the MAX31855?". The digital output of the sensor a whole number with one bit representing a unit of 0.25°C.

    I realized that my code in post#25 will go up to 655.25°C and then go wacky due to 16 bit overflow. I'd want to redo it to round off to tenths of a degree instead of hundredths, or to 0.5°C resolution instead of 0.25°C.
  • $WMc%$WMc% Posts: 1,884
    edited 2015-01-28 03:38
    Adafruit is linking the MAX6675 data sheet to MAX31855. So I was reviewing the wrong specs. I thought the 31855 was the break-out board adafruit part #. I didn't know it was the MAX chip p#. I got my glasses out, And the chip is a MAX31855K. I'll have to find the rite spec sheet before I can add any more to my code. Thanks for the info you posted.
    '
    Brought the Fluke 724 home. Your code is good to 334 C`. It's way off after that. The F` reading is lost at 328`C...reads -167`F...0`C reads 1.25`C....-10`C reads -8.25`C...-100`C = -84.75`C...-200`C reads -141.00`C.
    '
    This isn't bad when you don't have a chip to play with, (Or an $800 calibrator)
    '
    -200`C is as low as the Fluke will go with a type "K" T/C.
  • $WMc%$WMc% Posts: 1,884
    edited 2015-01-28 16:12
    I found the rite spec sheet. I don't need negative values but it's worth writing a code that will read them for future use.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2015-01-28 17:21
    Now you can read between the lines of the correct data sheet with confidence!

    I see why it stopped at about 327 °C. That is when it hits the 32768 limit for positive values in 16 bit 2s complement math. I was thinking 655 degrees, but that would be for straight unsigned math.

    I'm not at all surprised about the errors you found at negative values. Here is the sensitivity curve of a type K thermocouple.
    attachment.php?attachmentid=112985&d=1422494171
    The sensitivity drops off like a rock below freezing. Yet the Maxim chip assumes a constant 41.3 µV per °C. Your Fluke calibrator feeds it the correct values, which the chip then vastly underestimates. You'd have to write a correction table on the Stamp to account for that. Same thing if you want the best accuracy over the whole range, to compensate for nonlinearity.
    534 x 307 - 18K
  • $WMc%$WMc% Posts: 1,884
    edited 2015-01-30 17:05
    @ Tracy
    '
    This is why I asked about a look-up chart in an earlier post (nothing real linear about a T/C). I couldn't believe MAXIM was claiming this range of Temp. with out a chart using only 41.3µV per °C to come up with a reading.
    '
    If you just need 0`C to 1025`C, My code works well and is accurate.
Sign In or Register to comment.