Table of Contents

Getting Started with the MKR THERM Shield

The MKR THERM Shield allows a MKR board to acquire temperatures from a thermocouple of type K and a DS18Bxx digital one wire sensor.

MKRTHERM featured

Thermocouples are based on the thermoelectric properties of a junction between two different metals and are capable of measuring with good precision ranges from -270 to +1372 Celsius (K type) that are far beyond any digital sensors or NTC/PTC (thermistor) range. A typical application of thermocouples is in boilers, soldering stations and coolers. Also good quality 3D printers rely on thermocouples to measure the extruder temperature.

The K thermocouple has usually two wires, made of Alumel and Chromel that need to be connected with special care: no solder, just mechanical connection, therefore we support on the shield both the standard K type connector and a screw terminal.

TypeK Plug

This particular sensor has the junction between the two metals that is the part that should be put where the temperature reading has to be made. If the junction for some reason breaks, it can't be repaired. The tip of the thermocouple is where this junction is made, but there is also a second place where one metal is in contact with a different one: the connection with the K type plug or the screw terminal. Also in this junction between the two metals - one of the actual thermocouple alloy and one of the screw - the thermoelectric effect is present and some current is generated. That current is strictly related, as it should be, to the temperature of that junction.

ThermoEffect

The MAX chip we use on the shield takes all this in account and it returns the measured temperature at the tip (the junction) already compensated. For your reference, you can also read the temperature at the connector, value that is considered a reference.

As an addition, we have the standard connection available for the DS18xx digital temperature: 3V3, GND and SIG with the proper pull-up resistor already in place between 3V3 and SIG. You can solder directly the sensor or use a male female 3 pin pinstrip.

MKRTHERMPin Labels

Software

This shield has a dedicated Arduino_MKRTHERM library that manages the MAX31855 thermocouple digital interface. This chip measures the ambience temperature and the junction temperature so that you have an exact reading of the temperature already referenced to the temperature of the shield. Please refer to the library documentation for further details.

The digital temperature sensor of the DS18xx family can be easily managed with the libraries available in our Library Manager.

DS18 LibMan

Example

Here is a sketch that shows on the Serial Monitor the temperatures measured by the shield and the thermocouple.

/*

  MKR THERM Shield - Read Sensors

  This example reads the temperatures measured by the thermocouple

  connected to the MKR THERM shield and prints them to the Serial Monitor

  once a second.



  The circuit:

  - Arduino MKR board

  - Arduino MKR THERM Shield attached

  - A K Type thermocouple temperature sensor connected to the shield



  This example code is in the public domain.

*/

#include <Arduino_MKRTHERM.h>

void setup() {

  Serial.begin(9600);

  while (!Serial);

  if (!THERM.begin()) {

    Serial.println("Failed to initialize MKR THERM shield!");

    while (1);

  }
}

void loop() {

  Serial.print("Reference temperature ");

  Serial.print(THERM.readReferenceTemperature());

  Serial.println(" &#xB0;C");

  Serial.print("Temperature ");

  Serial.print(THERM.readTemperature());

  Serial.println(" &#xB0;C");

  Serial.println();

  delay(1000);
}

The text of the Arduino getting started guide is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the guide are released into the public domain.