# How to use NTC 100k thermistor to measure high temperature?

Hello,

Hello,

I am using a NTC 100k 3950 thermistor to measure the temperature of the hotend of 3D printer. I just wire the heater, thermistor, and Arduino UNO to test if the reading relatively correct. I reference the code from Adafruit written by Lady ada: Thermistor

However, it seems doesn't work at high temperature (like 230-240), and I always get the temperature reading is -273.15 at high temperature. I think the B constant highly affects the reading, it should not be set still equal to 3950 even at 240 degree C. But I don't know how to fix it.

Is any one knows how to handle this or share some code to measure the high temperature. Thanks！！！

What is the value of the pull up resistor.
It should be about the same value of the thermistor at working temp (so not 100k).
Leo..

The thermistor in the tutorial is 10k and the fixed resistor is 10k, your thermistor is 100k, is your fixed R 100k? edgemoron:
...your thermistor is 100k, is your fixed R 100k? I think about 4k7 pull up is needed for those high temps.
Leo..

edgemoron:
The thermistor in the tutorial is 10k and the fixed resistor is 10k, your thermistor is 100k, is your fixed R 100k? Yes, I series a 988000 ohm resistor.

Boyce:
Yes, I series a 988000 ohm resistor.

Typo? that's almost 1Megohm.
~100k is ok for room temp measurements, but wrong for high temp printer head sensing.
Leo..

Normally the curve / equation for the device is in the datasheet.

You should measure the resistance of the thermistor in the center of the range of interest (e.g. 235 C) and use a pullup resistor of about the same value.

The code must be changed to match.

Hi :).
Now you can read any thermistor thanks to this library:

Use a basic example.
Connect the termistor to GND and A0 pin.
Connect a 4k7 resistor series to VCC.
Connect a 10Uf into A0 to GND.
And Have fun, the library works! :D.

Now if only that library had documentation on how to choose and set parameters for whatever NTC you happen to have...

Hi.
I'm trying to measure the temperature with 100k NTC.
I am using Temperature Sensor v2.0 - RepRap.
He's wrong after 170 degrees.
There is about 20 degree difference.
I am using pullup 4.7K ohm.
How can I fix?

Assuming you're using the code on that page: amend the values in

``````short temptable[NUMTEMPS]
``````

to match the properties of your specific thermistor.

Or ditch that poorly designed overkill piece of PCB, get a proper pull-up resistor (they appear to be using carbon film type - wtf?) and just wire it up to an analog input. That's really all you need. Then calibrate your thermistor, or look up a resistance vs. temperature table and use that as lookup table to calculate temperature.

And do have a look at Adafruit's great thermistor tutorial.

hi. I am using the following codes and many different temp table use. but I didn’t.

``````#define THERMISTOR_PIN 0
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 4092
#define NUMTEMPS 20
short temptable[NUMTEMPS] = {
{1, 821},
{54, 252},
{107, 207},
{160, 182},
{213, 165},
{266, 152},
{319, 141},
{372, 131},
{425, 123},
{478, 115},
{531, 107},
{584, 100},
{637, 93},
{690, 86},
{743, 78},
{796, 70},
{849, 60},
{902, 49},
{955, 34},
{1008, 3}
};
void setup()
{
Serial.begin(9600);
Serial.println("Starting temperature exerciser.");
}

void loop()
{
int fahrenheit = (((celsius * 9) / 5) + 32);

Serial.print("Current temp: ");
Serial.print(celsius);
Serial.print("C / ");
Serial.print(fahrenheit);
Serial.println("F");

Serial.print("Raw value: ");
Serial.println(rawvalue);
Serial.println(" ");

delay(1000);
}

{
int current_celsius = 0;

byte i;
for (i=1; i<NUMTEMPS; i++)
{
if (temptable[i] > rawtemp)
{
int realtemp  = temptable[i-1] + (rawtemp - temptable[i-1]) * (temptable[i] - temptable[i-1]) / (temptable[i] - temptable[i-1]);

if (realtemp > 255)
realtemp = 255;

current_celsius = realtemp;

break;
}
}

// Overflow: We just clamp to 0 degrees celsius
if (i == NUMTEMPS)
current_celsius = 0;

return current_celsius;
}
``````