0

MAX31856 board, B-type thermocouple
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MAX31856 board, B-type thermocouple

by flo311 on Wed Aug 07, 2019 6:14 am

Hello,

I am using the Adafruit MAX31856 with an Arduino Uno to record data from a B-type thermocouple (temperature range to read 30-1700oC).

When I connect everything, I get a reasonable temperature reading at the beginning (approx 28oC, so ambient), but the reading fluctuates between 27 and 32 oC when I heat the thermocouple up, even up to 100oC.

I manage to use the board with a K-type thermocouple for that temperature range, so the wiring and code are fine.

I suspect it could be a problem with the conversion from voltage to temperature for B-type thermocouples, but I couldn't find anything in the c++ library code. Any ideas on how to solve the issue?

Thanks,

Floriana

flo311
 
Posts: 8
Joined: Wed Aug 07, 2019 6:07 am

Re: MAX31856 board, B-type thermocouple

by adafruit_support_bill on Wed Aug 07, 2019 6:40 am

The conversion and linearization all take place internal to the chip. The library simply reads and writes registers.

Do the cold-junction readings look normal?
If you select one of the raw voltage modes (MAX31856_VMODE_G8 or MAX31856_VMODE_G32) do the readings increase relatively linearly?

Please post a sample of the output you are seeing.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX31856 board, B-type thermocouple

by flo311 on Wed Aug 07, 2019 7:04 am

Hello,

Thanks for your answer. These are the readings:
Type-B thermocouple mode (when the reading says 38oC, I think the temperature should be at least 80oC:
tbmode.PNG
Type-B thermocouple mode:
tbmode.PNG (26.41 KiB) Viewed 149 times


G8 mode (also in this case, the tewmperature should raise):
g8mode.PNG
g8mode.PNG (26.38 KiB) Viewed 149 times


G32 mode (here I reached higher temperatures starting from 27oC, but I believe the actual temperature was above 100oC:
g32mode.PNG
g32mode.PNG (22.84 KiB) Viewed 149 times


The sampling rate is 1 Hz

Thanks

flo311
 
Posts: 8
Joined: Wed Aug 07, 2019 6:07 am

Re: MAX31856 board, B-type thermocouple

by flo311 on Wed Aug 07, 2019 7:13 am

Sorry, I forgot to add: if I keep on heating (with temperature getting higher than 150oC probably), the read value goes down:

Code: Select all | TOGGLE FULL SIZE
Cold Junction Temp: 28.19
Thermocouple Temp: 28.25
Cold Junction Temp: 28.11
Thermocouple Temp: 28.18
Cold Junction Temp: 28.16
Thermocouple Temp: 28.31
Cold Junction Temp: 28.14
Thermocouple Temp: 28.18
Cold Junction Temp: 28.16
Thermocouple Temp: 28.23
Cold Junction Temp: 28.11
Thermocouple Temp: 28.23
Cold Junction Temp: 28.16
Thermocouple Temp: 28.20
Cold Junction Temp: 28.16
Thermocouple Temp: 28.25
Cold Junction Temp: 28.14
Thermocouple Temp: 28.14
Cold Junction Temp: 28.11
Thermocouple Temp: 28.21
Cold Junction Temp: 28.11
Thermocouple Temp: 28.31
Cold Junction Temp: 28.14
Thermocouple Temp: 28.27
Cold Junction Temp: 28.11
Thermocouple Temp: 28.31
Cold Junction Temp: 28.11
Thermocouple Temp: 28.45
Cold Junction Temp: 28.11
Thermocouple Temp: 28.92
Cold Junction Temp: 28.06
Thermocouple Temp: 28.90
Cold Junction Temp: 28.08
Thermocouple Temp: 32.54
Cold Junction Temp: 28.03
Thermocouple Temp: 38.19
Cold Junction Temp: 28.06
Thermocouple Temp: 42.09
Cold Junction Temp: 27.98
Thermocouple Temp: 42.70
Cold Junction Temp: 27.98
Thermocouple Temp: 42.51
Cold Junction Temp: 28.22
Thermocouple Temp: 45.02
Cold Junction Temp: 28.36
Thermocouple Temp: 46.20
Cold Junction Temp: 28.62
Thermocouple Temp: 47.50
Cold Junction Temp: 28.83
Thermocouple Temp: 49.15
Cold Junction Temp: 28.91
Thermocouple Temp: 51.19
Cold Junction Temp: 29.03
Thermocouple Temp: 52.55
Cold Junction Temp: 29.19
Thermocouple Temp: 53.02
Cold Junction Temp: 29.34
Thermocouple Temp: 53.76
Cold Junction Temp: 29.39
Thermocouple Temp: 54.09
Cold Junction Temp: 29.56
Thermocouple Temp: 54.61
Cold Junction Temp: 29.70
Thermocouple Temp: 55.17
Cold Junction Temp: 29.91
Thermocouple Temp: 56.23
Cold Junction Temp: 30.11
Thermocouple Temp: 56.97
Cold Junction Temp: 30.23
Thermocouple Temp: 57.93
Cold Junction Temp: 30.28
Thermocouple Temp: 57.80
Cold Junction Temp: 30.47
Thermocouple Temp: 58.65
Cold Junction Temp: 30.52
Thermocouple Temp: 59.49
Cold Junction Temp: 30.64
Thermocouple Temp: 60.23
Cold Junction Temp: 30.77
Thermocouple Temp: 60.48
Cold Junction Temp: 30.84
Thermocouple Temp: 61.26
Cold Junction Temp: 31.00
Thermocouple Temp: 61.63
Cold Junction Temp: 31.12
Thermocouple Temp: 62.07
Cold Junction Temp: 31.27
Thermocouple Temp: 62.21
Cold Junction Temp: 31.39
Thermocouple Temp: 62.12
Cold Junction Temp: 31.39
Thermocouple Temp: 61.74
Cold Junction Temp: 31.52
Thermocouple Temp: 61.11
Cold Junction Temp: 31.55
Thermocouple Temp: 59.55
Cold Junction Temp: 31.67
Thermocouple Temp: 59.54
Cold Junction Temp: 31.87
Thermocouple Temp: 59.37
Cold Junction Temp: 32.08
Thermocouple Temp: 53.26
Cold Junction Temp: 32.03
Thermocouple Temp: 49.72
Cold Junction Temp: 32.23
Thermocouple Temp: 47.75
Cold Junction Temp: 32.27
Thermocouple Temp: 46.70
Cold Junction Temp: 32.44
Thermocouple Temp: 51.50
Cold Junction Temp: 32.61
Thermocouple Temp: 49.63
Cold Junction Temp: 32.56
Thermocouple Temp: 54.95
Cold Junction Temp: 32.77
Thermocouple Temp: 51.12
Cold Junction Temp: 32.88
Thermocouple Temp: 47.98
Cold Junction Temp: 33.00
Thermocouple Temp: 46.49
Cold Junction Temp: 33.08
Thermocouple Temp: 45.54
Cold Junction Temp: 33.16
Thermocouple Temp: 43.91
Cold Junction Temp: 33.11
Thermocouple Temp: 44.03
Cold Junction Temp: 33.08
Thermocouple Temp: 44.83
Cold Junction Temp: 33.16
Thermocouple Temp: 41.77
Cold Junction Temp: 33.16
Thermocouple Temp: 40.23
Cold Junction Temp: 33.16
Thermocouple Temp: 40.67
Cold Junction Temp: 33.13
Thermocouple Temp: 43.11
Cold Junction Temp: 33.08
Thermocouple Temp: 44.29
Cold Junction Temp: 33.11
Thermocouple Temp: 41.23
Cold Junction Temp: 33.00
Thermocouple Temp: 39.82
Cold Junction Temp: 32.97
Thermocouple Temp: 42.07
Cold Junction Temp: 32.97
Thermocouple Temp: 49.31
Cold Junction Temp: 32.89
Thermocouple Temp: 43.64
Cold Junction Temp: 32.88
Thermocouple Temp: 41.37
Cold Junction Temp: 32.88
Thermocouple Temp: 40.12
Cold Junction Temp: 32.80
Thermocouple Temp: 39.05
Cold Junction Temp: 32.75
Thermocouple Temp: 38.14
Cold Junction Temp: 32.75
Thermocouple Temp: 37.43
Cold Junction Temp: 32.67
Thermocouple Temp: 36.65
Cold Junction Temp: 32.64
Thermocouple Temp: 36.12

flo311
 
Posts: 8
Joined: Wed Aug 07, 2019 6:07 am

Re: MAX31856 board, B-type thermocouple

by adafruit_support_bill on Wed Aug 07, 2019 7:48 am

The G8 and G32 modes are showing raw voltages - before conversion to temperatures. Since the raw voltages appear to be erratic as well, I suspect it may be a problem with your type B thermocouple.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX31856 board, B-type thermocouple

by flo311 on Wed Aug 07, 2019 7:58 am

Hello,

Thanks for your answer. Actually I do not think that the output is voltage, as I think I cannot have 30 to 50 V output. So what I get and put as a screenshot is the temperature.

Also, the Arduino functions called are always:

Serial.print("Cold Junction Temp: ");
Serial.println(maxthermo.readCJTemperature());

Serial.print("Thermocouple Temp: ");
Serial.println(maxthermo.readThermocoupleTemperature());

Is there any function that would give me the actual voltage?

flo311
 
Posts: 8
Joined: Wed Aug 07, 2019 6:07 am

Re: MAX31856 board, B-type thermocouple

by adafruit_support_bill on Wed Aug 07, 2019 9:15 am

Actually I do not think that the output is voltage, as I think I cannot have 30 to 50 V output. So what I get and put as a screenshot is the temperature.

If you are using the G8 and G32 modes, the readings are in raw ADC counts. They are not scaled or linearized to any thermocouple curve. The library re-scales them as if they were temperatures. But they represent the raw, unprocessed voltage input seen by the thermocouple amplifier.

To get the actual raw counts, you would need to comment out the final multiplication in this function of the library:

Code: Select all | TOGGLE FULL SIZE
float Adafruit_MAX31856::readThermocoupleTemperature(void) {
  oneShotTemperature();

  int32_t temp24 = readRegister24(MAX31856_LTCBH_REG);
  if (temp24 & 0x800000) {
    temp24 |= 0xFF000000;  // fix sign
  }

  temp24 >>= 5;  // bottom 5 bits are unused

  float tempfloat = temp24;
  tempfloat *= 0.0078125;

  return tempfloat;
}

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX31856 board, B-type thermocouple

by flo311 on Wed Aug 07, 2019 9:34 am

Thanks for this. I checked my thermocouple with a multimeter and the voltage rises from less than 0.01 to 0.7mV, so it should be working. Also, the board works fine with a K-type thermocouple.

Is there anything else that could be associated with the problem?

Thanks,

Floriana

flo311
 
Posts: 8
Joined: Wed Aug 07, 2019 6:07 am

Re: MAX31856 board, B-type thermocouple

by adafruit_support_bill on Wed Aug 07, 2019 9:39 am

the voltage rises from less than 0.01 to 0.7mV,

0.7mV at what temperature? For a type B, you shouldn't see that until nearly 380 °C
https://www.thermocoupleinfo.com/type-b ... couple.htm

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX31856 board, B-type thermocouple

by flo311 on Wed Aug 07, 2019 9:53 am

Yes, that is correct. I benchmarked it with a K-type thermocouple used with the MAX31856 board and while it was measuring about 260oC, the multimeter was returning about 0.4mV on the B-type thermocouple, so the thermocouple should work.

flo311
 
Posts: 8
Joined: Wed Aug 07, 2019 6:07 am

Re: MAX31856 board, B-type thermocouple

by adafruit_support_bill on Wed Aug 07, 2019 10:01 am

We can try replacing the board. Please contact support@adafruit.com with a link to this thread.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX31856 board, B-type thermocouple

by flo311 on Wed Aug 07, 2019 10:07 am

Hello,

Thanks for this. However I do have more than one board (as I use them for K-type thermocouples) and different boards give the same result. Do you reckon it could be an internal conversion problem?

flo311
 
Posts: 8
Joined: Wed Aug 07, 2019 6:07 am

Re: MAX31856 board, B-type thermocouple

by adafruit_support_bill on Wed Aug 07, 2019 10:20 am

Does this only occur with B-type thermocouples?
Have you tried this with a different B-type thermocouple?

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX31856 board, B-type thermocouple

by flo311 on Wed Aug 07, 2019 10:41 am

Yes, it occurs with B-type, while they work fine with K-type (can't say with others as I have not tried)

flo311
 
Posts: 8
Joined: Wed Aug 07, 2019 6:07 am

Re: MAX31856 board, B-type thermocouple

by adafruit_support_bill on Wed Aug 07, 2019 12:59 pm

Have you tried this with a different B-type thermocouple?

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.