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);
}
2 Answers 2
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/
-
So, this means I could never measure it with some sort of accuracy?Bart– Bart2023年11月22日 07:37:15 +00:00Commented 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– st20002023年11月23日 13:33:47 +00:00Commented Nov 23, 2023 at 13:33
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).
Explore related questions
See similar questions with these tags.
it shows 00.0 millivolts on the multimeter
... how did you measure this?sensorValue * (5.0 / 32768.0)
.