« Close

Datasheets and User Guides

App Notes

Software & Driver


14.1.1 Thermocouple

Index: 20-24

The AIN extended features system can automatically perform the necessary calculations for Type E, J, K, R, and T thermocouples. 

Thermocouple modes read an analog input connected to a thermocouple and a second specified AIN connected to a CJC sensor. The CJC slope and offset are used to compute the CJC temperature then the thermocouple temperature is calculated. The on-board temperature sensor is the default CJC channel.

The thermocouple feature will use the normal analog input settings for negative channel, resolution-index, and settling.  For example, if you want a differential reading of AIN0-AIN1, set AIN0_NEGATIVE_CH = 1.

If the range of the applicable channel (AIN#_RANGE) is set to the default ±10 volts, the thermocouple feature will automatically use the ±0.1 volt range, otherwise the specified range will be used.

CJC calculations are always done in degrees K, regardless of whether Config-A is used to change the output units.  Config-D and Config-E should be used as needed to scale the CJ sensor reading to degrees K.

Thermocouple feature index values:
20: Thermocouple type E
21: Thermocouple type J
22: Thermocouple type K
23: Thermocouple type R
24: Thermocouple type T
25: Thermocouple type S
30: Thermocouple type C

Configuration Registers:
AIN#_EF_CONFIG_A: TC_Options – Bitmask containing additional options. Bits 0 and 1 change the units of the output of the calculations (READ_A & READ_C). The default is kelvin. Bit 0: 1 = Report in ºC, Bit 1: 1 = Report in ºF.
AIN#_EF_CONFIG_B: CJC_ModbusAddress – This is the modbus address that will be read to acquire the CJC reading. The default is 60052; TEMPERATURE_DEVICE_K.
AIN#_EF_CONFIG_D: CJC_Slope – Slope to be applied to the CJC reading. This value is always °K/volt regardless of CONFIG_A setting, so for the internal sensor will nominally be 1.00 and for an LM34 will be 55.56.  Default is 1.0.
AIN#_EF_CONFIG_E: CJC_Offset – Offset to be applied to the CJC reading. This value is always °K regardless of CONFIG_A setting, so for the internal sensor will nominally be 0.0 and for an LM34 will be 255.37.  Default is 0.0.

Result Registers:
AIN#_EF_READ_A: Final calculated temperature.
AIN#_EF_READ_B: Measured thermocouple voltage.
AIN#_EF_READ_C: CJC temperature.
AIN#_EF_READ_D: Thermocouple voltage calculated for CJC temperature.

Assume a type K thermocouple is connected to AIN3/GND.  First write some values to configure:

AIN3_EF_INDEX = 22                // feature index for type K thermocouple
AIN3_EF_CONFIG_B = 60052     // CJC source, address for device temperature sensor
AIN3_EF_CONFIG_D = 1.0         // slope for CJC reading
AIN3_EF_CONFIG_E = 0.0         // offset for CJC reading

Now each read of AIN3_EF_READ_A will cause a new measurement to happen and return the temperature of the remote end of the thermocouple.  If the remote end is at room temperature you should read about 298 degrees K.

For more information see the Thermocouples Application Note and its T7-specific child page.