TM-902C Type K Temperature Thermocouple Sensor

Hail , q12 here

const int input = A0; 
void setup() {
  Serial.begin(9600);
}
void loop() {
  float temp = analogRead(input);
  Serial.print("\ndata = " + (String)temp);  //°C
  delay(500);
}

but all I could read was either 0 when A0 is grounded, either 1024 when A0 is +5V, either some in between these 2 maxims (400 for ex) when using a resistor divider with a fixed 18R in series with this thermocouple. The middle values were all over the place, not stable, always going up to 450 and down to 320, so very large range, very unstable. When I squeeze the tip of the probe between my fingers, on the commercial device it is showing a stable 28°C raise from the very stable ambient of 25°C. But here, in my arduino setup, everything is randomly jumping up and down and with a large difference in values that is impossible to tell if something is indeed changing or not.
So, this is all I tried so far.

  • To be certain it is not a wire or A0 port creating an erroneous reading,
    I link A0 to a 10k test potentiometer

    and the values were maintaining very close to the dialed resistance division. The change was 400-405. So very small reading instability, compared with the thermocouple circuit.
  • This is a voltage divider; to ensure that we are speaking the same language.
    Also, instead of R1R2 imagine a pot with 3 legs that I checked the circuit stability.

    Any good suggestions are very appreciated.
  • Thank you !

  • Here is a close view on the tip of the probe that is performing the temperature reading. Its a bimetalic welding type of probe, very simple.

Hi, @q12

You need to Google;

K-Type Thermocouple Arduino

You need a specific amplifier to convert the mV of the Thermocouple to volts to read with your ARDUINO.

A thermcouple is not a resistor.

ALSO Google;

How does a thermocouple work?

Tom.... :smiley: :+1: :coffee: :australia:

You could use a MAX31850 / MAX31855 / MAX6675 amplifier.
(there are several more)

1 Like

Yes, I come across these driver ICs in my earlier searches.


But Im wondering how to make the driver from software, if possible.
And to answer to @TomGeorge, if you have such thermocouple in your house, try measuring it with a DMM and you will see only the ohm readings work, despite the voltage theory on the www !

I have written 4 thermocouple libraries, you could have a look at them how I did it.
(yes there are similarities in those libs).
This one is for the MAX6675 in your post

1 Like

I service and certify temperature instruments.
I know the mV of the thermocouple will cause the OHM measuring circuit to see what appears to be a change in "resistance".
It is not the couples resistance that is changing, it is the mV developed by the junction and its current from the couple influencing the DMM.

It will not be a linear resistance relationship to temperature.

Take @robtillaart offer and look at modules and libraries.

Tom.... :smiley: :+1: :coffee: :australia:

Oh, I only come across, in the sense I've seen it on the www.
I do not have the IC or that little prototyping board.
To be clear. So I was aware there might be some sort of special driver for it, I wasnt 100% but you confirm it here for me. So that is a + for me to know what other people actually use or do. I will look over your libraries but I'm afraid they are decoding the data from that IC and not dealing directly with the probe itself naked on the A0 pin like I originally suggested. Do correct me now, before entering in those files.

If you look at a table showing the output of a type K thermocouple at various temperatures, such as this one, then you will see that the output voltage is very low.

Assuming that you are using a 5V Arduino, then the code that you posted in the first post has a resolution of 5V/1024 = 4.88mV. That is the voltage that is needed to change the ADC reading by 1 count.

Look in the table to find the temperature that gives an output of 4.88mV - it is nearly 120°C.
That is why you can't detect any voltage with the Arduino when you warm the thermocouple with your fingers.

My multimeter has a thermocouple input, it can display the temperature and the actual voltage measured simultaneously.

Look what voltage I get when I warm the thermocouple with my fingers - it is only 295.85µV or 0.296mV. This is far to small to be measured directly with an Arduino.

You need to amplify the voltage before you can measure it using an Arduino.

1 Like

Indeed the library code interacts with the MAX6675 chip which amplifies and digitizes the raw milli / microvolts signal.

There is no harm looking into those files as you might learn from it.

If you want to interact more directly with the analog signal, you might try an ADS1115 == 16 bit ADC which digitizes the analog signal just as the analogRead() does.

Currently working on a 24 bit ADC library - LTC2485 - however the hardware tester and I did not get the tests stable yet. Unknown cause. In theory it has a precision that is sub microvolt so ideal to measure the thermocouple's voltage.

@robtillaart I looked over some example code of yours and indeed it is for that MAX6675 IC. Nice calling function "MAX6675 thermoCouple(selectPin, dataPin, clockPin);".
I also looked in the datasheet https://www.analog.com/media/en/technical-documentation/data-sheets/MAX6675.pdf and found this img:


So practically, A0 is a ADC like the one in this img ! All I need is a better circuit amplification to link up this thermocouple. Like those 2 opamps set as Voltage Follower and Buffer as we see in this img. This is just a very summarized circuit, not a final and working version one. So... this is the thing what Im after. To use the resources I have. Hmmm.... I dont care how hard it is to make the circuit, I only care to see it working correctly ! Thats my final goal.
to @JohnLincoln - thanks for the information. I was partially aware there are some very small voltage differences - your post there is very helpful !
@robtillaart yes, I did look in them, summarily for now. I do have some ADC's IC's in my arsenal , the A0 pin on ATmega328P from my arduino Uno is also an ADC so I can use that directly ! That was my original idea actually. Do tell me if its a bad idea; if using a stand alone ADC is more necessary or correct.
These are the 2 ADC I have:
ADC0832 10/10 8PIN DIP 8-Bit A/D Converter with 8-BIT resolution Multiplexer serial --in &--out
ADC0808 20/20 28PIN DIP 8-Bit A/D Converter with 8-Channel Multiplexer paralel //in &//out

You can use a simple op-amp circuit to amplify the voltage so you can use it with an Uno.
An cheap LM358 and 2 resistors is all you need.

1 Like

You can set the ADC of the Arduino UNO to INTERNAL reference of 1.1V so it will measure around 1 mV per step (1024 steps). I would definitely try that to get more insights in the possibilities and limits of the UNO ADC.

1 Like

So, like this one:


I actually took the data from @JohnLincoln , it's measured 300uV and imput it in my cct.
I am not sure how much to amplify it now - haha, but I have to put it in practice and see how it works and what new errors I will encounter next. Then I will correct the resolution. I believe 0.3V or 300mV step should be plenty enough for A0 arduino ADC ... right? We will see in a few minutes.
Here are the settings I used for a generic opamp in my Proteus:

By default it is +15V and -15V. So I made it a 'modern' opamp this way.

That will depend on the maximum temperature you want to measure.
For 500ºC the thermocouple output will be around 20mV, so a gain of 250 will give you 5V out

1 Like

-One of my immediate goals is to measure power transistors excess heat. More specifically, to not cross over 50ºC as my personal limit of overheating for everything electronics.
-But I also want this thermocouple test limits as well, like you mentioned, it's maximum as 500ºC. My heating Iron I think is up to 450ºC or about. So that will be interesting to see it. We will get there.
Thanks so far !

You can certainly read the voltage but in order to compute the temperature you need to know the temperature of the cold junction.

I'd been thinking about that too.

For reference, here is the output I got when measuring the tip temperature of my soldering iron (set to 325°C):

1 Like

Hah...
In my proteus simulator is easy to slap a power source on the input of that opamp to make it work.
In reality... where do I connect the 2 wires of the thermocouple? Ha- right?


I soved the problem with this new cct:


I also made it on my breadboard and run the arduino code with it, the same basic code I post originally.
And now I obtain relatively steady numbers

But the sensitivity is not there. When I catch between my fingers the end of the probe, I expect the numbers to increase. Instead they are randomly slightly change (as without touching the probe)....hmmmm.
I used on my breadboard the same values as in my skematic, with only exception the 18R probe I have... so I put a 180R in series with it (a 18R is getting a bit too hot).
Any advice at this point is very welcome.
I believe I need some sort of concentration circuit, to not let those numbers fluctuate so much and also to listen to my finger temperature.

Your circuit is wrong. It is for a thermistor NOT a thermocouple.

Use the circuit you show in post #13. Connect the thermocouple between the op-amp + input and ground.

1 Like
  • That was the very first thing I did, and the result in reality was a constant minimum reading of 0 on arduino serial monitor. Because these wires are 18ohms and practically Im grounding that + input, through them. The same goes for linking to +5V, I will get a constant 1024 maximum reading all the time.
  • Exception here in the simulator, which I made it right now after your intervention, I actually find this K- thermocouple component in it ! Which is super great. And I test it and I get a very clear difference in voltage.
  • Hmmmmmmm -