2

I ordered a ADS1115 so I could measure temperature of a type K thermocouple, but I am not managing to get accurate readings. I had it working while having a normal A0 pin, but since the type K table shows pretty low voltages, the 0-1023 scale is not accurate.

When the thermocouple is at room temperature (around 22°c), it shows 00.0 millivolts on the multimeter (which I dont understand since it does not match with the table), and my program outputs a value of around -40 and a voltage of -0.005. When I heat it up until I measure 10.0 millivolts (around 250°c according table), the Arduino prints a value of 53 and a millivolts of 300.

What am I doing wrong? I suspect something with the calculation, but I am not able to find out how I should do it, I know very little about millivolts.

Can someone help me out what I am doing wrong here and what I should do?

I have the thermocouple and ADS1115 connected as shown in the image below. wiring

The code I am using is as following

#include <Adafruit_ADS1X15.h>

const int analogFruitPin = 0;

Adafruit_ADS1115 ads;

void setup()
{
  Serial.begin(9600);
  ads.begin();
  ads.setGain(GAIN_FOUR);
  ads.setDataRate(RATE_ADS1115_860SPS);
}

void loop()
{
  int sensorValue = ads.readADC_SingleEnded(analogFruitPin);
  float voltage = sensorValue * (5.0 / 32768.0);
  Serial.println(voltage,3);
  Serial.println(sensorValue);
  delay(500);
}
4
  • it shows 00.0 millivolts on the multimeter ... how did you measure this?
    – jsotola
    Nov 21, 2023 at 19:01
  • I just measure at the + and - of the thermocouple with a normal multinmeter, it does increase the measurement of the multimeter when i heat it up
    – Bart
    Nov 21, 2023 at 19:38
  • 1
    See the library function computeVols() on how the voltage is calculated versus your sensorValue * (5.0 / 32768.0).
    – hcheung
    Nov 22, 2023 at 6:01
  • @Bart, when you get around to it, you should accept an answer that addresses your question or rephrase your question. That will trigger emails to all so far involved to give them a chance to rephrase their answer. Also, if you were wondering why bother w/a thermocouple if you need a 2nd more conventional temperature sensor ... well, thermocouples can work in extreme heat (like a pottery kiln) and they are inexpensive.
    – st2000
    Nov 25, 2023 at 13:12

2 Answers 2

0

Welcome! Interesting but expected. Thermocouples need what is called a cold junction compensation. That is a circuit or another thermonuclear that compensates for the thermocouple effect where the lead wires are connected to your measuring device. These thermocouple lead wires should be the same metallic material as the wires in the thermocouple. The metals are different where you connect to the measuring device and will generate a voltage as the temperature changes regardless of the sensing probe, that is how the thermocouple works. This link will help: https://www.tegam.com/what-exactly-is-cold-junction-compensation/

For more information check this link: https://randomnerdtutorials.com/arduino-k-type-thermocouple-max6675/

2
  • So, this means I could never measure it with some sort of accuracy?
    – Bart
    Nov 22, 2023 at 7:37
  • 1
    ... not w/o a cold reference. For example, a DMM with a thermocouple feature has an additional temperature sensor close to where the thermocouple wire connects to the wires (creating the 2nd junction) that then connect to the ADC. Ideally we want to know the temperature of the 2nd junction. You should up-vote or accept @Gil's answer. But I'll add an answer pointing you to an Adafruit product that contains both the ADC and the cold junction temperature sensor.
    – st2000
    Nov 23, 2023 at 13:33
0

To simplify your thermocouple temperature sensor project, consider using an ADC which also contains a cold junction temperature sensor. This product from Adafuit.com integrates both into one package by using a Microchip.com MCP9601 integrated circuit.

In short, thermocouples generate small amounts of voltage where dissimilar metals touch. This is true where the thermocouple wires are touching each other. And is also true where the thermocuple wires are touching the metal connecting them to the ADC circuit (commonly called the "cold junction"). To find the temperature where the thermocouple wires are touching we need to subtract the effects of the "cold junction". To do that, we need to first know the temperature of the "cold junction". We commonly do this with a second temperature sensor as it is a more practical (and portable) solution than a traditional zero centigrade ice bath (likely where the term "cold junction" came from).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.