News:

Let's find out together what makes a PIC Tick!

Main Menu

High resolution Thermocouple type T chip

Started by TimB, May 22, 2021, 06:08 PM

Previous topic - Next topic

TimB

Hi all

Having had so much success with the max31865 RTD chip. I'm looking to see what is available for Type T thermocouples. I'm wondering what people have tried and what resolution its running at.

Thoughts and why..

Thanks

Tim

Giuseppe

In the past I tried the max 6675 but it is for K probes if I remember correctly.

TimB

#2
I found the MAX31855 chip. It produces a 14bit signed output. However it says it resolves to 0.25c I need sub 0.1c

The MAX31856 looks better

Tim

tebrand

Hi, TimB, I will try to get work a MAX31856 (for type S thermocouple) in Probasic and not very familiar (yet) with SPI. Can you pls give me some details how to read and write to this chip ?
Thanks in advance, ??? 

shantanu@india

MAX31856 looks really promising with. 07 degree resolution!!
Wistfully remember the times in late eighties when we used to built differential amplifiers using 3 OP07's, connect it to a ADC converter like 7109, connect the 12 bits of the 7109 to 8085 processor, burn look up tables in the external EPROM and painstakingly linearize and display the temperature. Life is so easy for young engineers nowadays!!
Regards
Shantanu


tebrand

Hi, all of you,
after having trouble with the max31856 in a certain temperature range I tried the MCP9600 as a replacement. I considered it to be more simple because the I2C protocol. Until now however I did not succeed to get this working with the I2Cin and I2Cout statements from PICbasic.Is there any of you who has been successful on the point and please may help me. To give an idea what I tried  untill with confusing results:

START:
; SDA and SCL are ports of the 18F46K22
DIM code01 AS WORD : code01 = 0
I2COUT SDA, SCL,%11000000,[%00000000]  ;type k thermocouple / min. filter
DELAYMS 500
I2CIN SDA,  SCL,%11000001,%00000000, [code01] ; hot temp
PRINT AT 1,1, "C= ",DEC code01
PRINT AT 2,1, BIN code01
GOTO START

top204

#7
I created a program, quite a few years ago, to interface with an MCP9800 temperature reading device, and it also uses an I2C interface so it may give you some clues for interfacing with an MCP9600 device:

'
'   /\\\\\\\\\
'  /\\\///////\\\
'  \/\\\     \/\\\                                                 /\\\          /\\\
'   \/\\\\\\\\\\\/        /\\\\\     /\\\\\\\\\\     /\\\\\\\\   /\\\\\\\\\\\  /\\\\\\\\\\\  /\\\\\\\\\
'    \/\\\//////\\\      /\\\///\\\  \/\\\//////    /\\\/////\\\ \////\\\////  \////\\\////  \////////\\\
'     \/\\\    \//\\\    /\\\  \//\\\ \/\\\\\\\\\\  /\\\\\\\\\\\     \/\\\         \/\\\        /\\\\\\\\\\
'      \/\\\     \//\\\  \//\\\  /\\\  \////////\\\ \//\\///////      \/\\\ /\\     \/\\\ /\\   /\\\/////\\\
'       \/\\\      \//\\\  \///\\\\\/    /\\\\\\\\\\  \//\\\\\\\\\\    \//\\\\\      \//\\\\\   \//\\\\\\\\/\\
'        \///        \///     \/////     \//////////    \//////////      \/////        \/////     \////////\//
'                                  Let's find out together what makes a PIC Tick!
'
' Interface to an MCP9800 temperature sensor using an I2C interface.
' Transmits the temperature (in degrees Centigrade) to a serial terminal.
'
' Written for the Positron8 compiler by Les Johnson.
'
    Device = 18F26K22                                           ' Tell the compiler what device to compile for
    Declare Xtal = 16                                           ' Tell the compiler what frequency the device is operating at (in MHz)
    Declare Float_Display_Type = Fast                           ' Set for faster and more accurate Floating Point to ASCII conversion
'
' Setup the I2C interface pins for the Busin and Busout commands
'
    Declare SDA_Pin = PORTB.1                                   ' Setup the I2C SDA pin
    Declare SCL_Pin = PORTB.0                                   ' Setup the I2C SCL pin
'
' Setup USART1
'
    Declare HSerial1_Baud = 9600
    Declare HSerout1_Pin = PORTC.6
'
' Create some constants for the MCP9800 device
'
$define cMCP9800_ADDRESS_WRITE       $90
$define cMCP9800_ADDRESS_READ        $91
$define cMCP9800_ALERT_ACTIVE_LOW    $00
$define cMCP9800_ALERT_ACTIVE_HIGH   $04
$define cMCP9800_COMP_MODE           $00
$define cMCP9800_CONFIGURATION       $01
$define cMCP9800_HYSTERESIS          $02
$define cMCP9800_INT_MODE            $02
$define cMCP9800_LIMITSET            $03
$define cMCP9800_ONESHOT_OFF         $00
$define cMCP9800_ONESHOT_ON          $80
$define cMCP9800_SHUTDOWN_OFF        $00
$define cMCP9800_SHUTDOWN_ON         $01
$define cMCP9800_TEMPERATURE         $00
$define cMCP9800_TSET_DEFAULT        $50
$define cMCP9800_CONFIG_BITS         $64

$define cMCP9800_RES_9bit            $00
$define cMCP9800_RES_10bit           $20
$define cMCP9800_RES_11bit           $40
$define cMCP9800_RES_12bit           $60
$define cMCP9800_FAULT_QUEUE_0       $00
$define cMCP9800_FAULT_QUEUE_2       $08
$define cMCP9800_FAULT_QUEUE_4       $10
$define cMCP9800_FAULT_QUEUE_6       $18

Symbol cMCP9800 = cMCP9800_ONESHOT_OFF | cMCP9800_RES_12bit | cMCP9800_FAULT_QUEUE_0 | cMCP9800_ALERT_ACTIVE_LOW | cMCP9800_COMP_MODE | cMCP9800_SHUTDOWN_OFF
'
' Create a variable for the demo
'
    Dim fTemperature As Float                               ' Holds the temperature

'--------------------------------------------------------------------------------
' The main program starts here
' Read the temperature of the MCP9800 device and transmit the temperature to a serial terminal
'
Main:
    MCP9800_Init()                                          ' Initialise the MCP9800 device

    Do                                                      ' Create a loop
        fTemperature = MCP9800_GetTemperature()             ' Read the temperature of the MCP9800 device
        HRSOutLn Dec2 fTemperature, " C"                    ' Transmit the temperature to a serial terminal
        DelayMS 500
    Loop                                                    ' Do it forever

'-------------------------------------------------------------------------------
' Setup the MCP9800 device
' Input     : None
' Output    : None
' Notes     : Sets up the MCP9800 device to read the temperature with a 12-bit accuracy.
'
Proc MCP9800_Init()
    BusOut cMCP9800_ADDRESS_WRITE, [cMCP9800_CONFIGURATION, cMCP9800]
    BusOut cMCP9800_ADDRESS_WRITE, [cMCP9800_TEMPERATURE]
EndProc

'--------------------------------------------------------------------------------
' Interface to an MCP9800 I2C temperature sensor
' Input     : None
' Output    : Returns the temperature (in degrees Centigrade)
' Notes     : None
'
Proc MCP9800_GetTemperature(), Float
    Dim wRaw As Word                                    ' Used for reading data from the device

    BusIn cMCP9800_ADDRESS_READ,[wRaw.Byte0, wRaw.Byte1]
    Result = wRaw.SByte0

    If wRaw.15 = 1 Then
        Result = Result + 0.5
    EndIf
    If wRaw.14 = 1 Then
        Result = Result + 0.25
    EndIf
    If wRaw.13 = 1 Then
        Result = Result + 0.125
    EndIf
    If wRaw.12 = 1 Then
        Result = Result + 0.0625
    EndIf
EndProc


tebrand

Top204, thanks a lot for this quick reply. Going to see if I understand it an if it works.