PT100 Thermistor

Hello, dear community.
I'm working on a sensor for the kitchen and the Arduino code that I use indeed shows good resistance values and updates them, but it stuck with the exact same temperature(When the temperature is depended on the resistance that is indeed changing, and I can see it in the serial monitor - resistance changes but the temperature stays the same.).
I really can't understand where the problem can hide.

The code is presented below:

Code

double A = 3.9083e-3; //steinhart coeficients
double B = -5.775e-8;
double C = -4.183e-12;
int analogPin = 0;
int raw = 0;
int Vin = 5;
float Vout = 0;
double R2 = 0;
float buffer = 0;
double T;
void setup(){
Serial.begin(9600);
}
void loop(){
raw = analogRead(analogPin);
if(raw){
buffer = raw * Vin;
Vout = (buffer)/1024.0;
buffer = (Vin/Vout) - 1;
R2= R1 * buffer;
//Serial.print("Vout: ");
//Serial.println(Vout);
Serial.print("R2: ");
Serial.println(R2);
delay(1000);
T = (1.0 / (A + Blog(R2) + Clog(R2)*log(R2)*log(R2))); //Steinhart formula for thermistors
T = T - 273.15;
Serial.print("T: ");
Serial.println(T);
}
}

Thank you very much for your kind attention.

Please post your code in line, using code tags, and a schematic diagram of the circuit.

If you are using a PT100 module, post a link to it.

It seems you read the PT100 thermistor with the 10-bit A/D of the Arduino.
So what is the value of the fixed resistor.
Even if that was ideal value for the temp of interest, then temp resolution with Arduino's 10-bit A/D is poor, at less than one A/D step per degree. With a lot of self-heating.
So what are you measuring in the kitchen, and why didn't you use a digital PT100 interface board.
Leo..

You should printout (to the serial monitor) the "raw" value, before you do any calculations. I think it will show you where the issue is.

Then you should verify your equations by entering a resistance from a table where the resulting temperature is known. Then see if you output agrees.

The Steinhart formula is for NTC (Negative Temperature Coefficient resistor). If you indeed have a P100 sensor it is a platinum PTC (positive Temperature Coefficient resistor), a totally different animal.

Please let us know more about your sensor.

Works like a Swiss watch!
Thank you very much!

Hi,

To help closet this thread, can you please tell us what you did and post your working code?

Thanks.. Tom... :grinning: :+1: :coffee: :australia:

Hallo vadimnave,

can i ask you to share the complete code?

becaue i need it .