Welcome! Log In Create A New Profile

Advanced

Where do I store a custom thermistor table

Posted by maboo 
Where do I store a custom thermistor table
November 17, 2013 05:44PM
This is the data I received for my hotend thermistor:


TEWA Thermistor lookup Table:


#if (THERMISTORHEATER == 1) || (THERMISTORBED == 1) //TEWA NTC 100K
#define NUMTEMPS_1 47
const short temptable_1[NUMTEMPS_1][2] = {
{22, 300},
{30, 270},
{33, 265},
{36, 260},
{39, 255},
{42, 250},
{47, 245},
{51, 240},
{56, 235},
{63, 230},
{69, 225},
{74, 220},
{81, 215},
{90, 210},
{98, 205},
{107, 200},
{119, 195},
{129, 190},
{142, 185},
{156, 180},
{171, 175},
{187, 170},
{204, 165},
{224, 160},
{245, 155},
{271, 150},
{297, 145},
{321, 140},
{351, 135},
{370, 130},
{402, 125},
{451, 120},
{502, 115},
{533, 110},
{551, 105},
{570, 100},
{610, 95},
{661, 90},
{731, 80},
{801, 70},
{856, 60},
{901, 50},
{950, 40},
{977, 30},
{991, 20},
{1003, 10},
{1011, 0} //safety
};
#endif


THERMISTOR TEWA NTC 100k 1%
Operating temperature : -40°C ~ +300°C
Tolerance: 1%
NTC thermistor sealed in Glass Body
TEWA TT2-100KC3H-7
Beta Constant: 4066

Now do I just have to copy and paste that to configuration.h ?
I wonder because I see no other table there:


(from my Marlin->configuration.h)

//===========================================================================
//=============================Thermal Settings ============================
//===========================================================================
//
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
//
//// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595
// 0 is not used
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
// 3 is mendel-parts thermistor (4.7k pullup)
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan) (4.7k pullup)
// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
// 10 is 100k RS thermistor 198-961 (4.7k pullup)
// 60 is 100k Maker's Tool Works Kapton Bed Thermister
//
// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
// (but gives greater accuracy and more stable PID)
// 51 is 100k thermistor - EPCOS (1k pullup)
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan) (1k pullup)

#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 0


Blogs:
Meine 3D Druck Abenteuer
[3dptb.blogspot.de]
FLSUN Delta Drucker für Deutschland
[flsun-deutschland.blogspot.com]
Books on 3D patents:
[goo.gl] (english)
[www.amazon.de] (deutsch)
Re: Where do I store a custom thermistor table
January 15, 2014 01:33PM
I see you never received a response and I am in the same boat only mine is from QU-BD and is in a pdf. Where do I store the custom table?


_______
I await Skynet and my last vision will be of a RepRap self replicating the robots that is destroying the human race.
Re: Where do I store a custom thermistor table
January 15, 2014 02:53PM
The thermistor tables themselves are, oddly enough, in a file named thermistortables.h.

You can actually over-write any table that is there, or add your own. Just make sure then the variable name agrees with the number you specify in configuration.h - that is if you specify 99 in config.h, name your table temptable_99. You might also want to surround it with the #if - #endif statements you see checking for your table numbers, but if you are never going to distribute the file, it's probably a bit easier to make the compilation unconditional by omitting these lines.

If you are going to over-write a table, make sure it is not the same number table that you might be using for some other thermistor

EDIT - I see the code you have already is written to replace table 1. This is fine as long as 1) you do not use the original table 1 for any other heater, and 2) you remove the original table 1 so that you don't end up with 2 temptable_1 declarations in the code. This will cause a compilation error.

Edited 1 time(s). Last edit at 01/15/2014 02:55PM by jbernardis.
Re: Where do I store a custom thermistor table
January 15, 2014 03:14PM
Quote
jbernardis
The thermistor tables themselves are, oddly enough, in a file named thermistortables.h.

You can actually over-write any table that is there, or add your own. Just make sure then the variable name agrees with the number you specify in configuration.h - that is if you specify 99 in config.h, name your table temptable_99. You might also want to surround it with the #if - #endif statements you see checking for your table numbers, but if you are never going to distribute the file, it's probably a bit easier to make the compilation unconditional by omitting these lines.

If you are going to over-write a table, make sure it is not the same number table that you might be using for some other thermistor

EDIT - I see the code you have already is written to replace table 1. This is fine as long as 1) you do not use the original table 1 for any other heater, and 2) you remove the original table 1 so that you don't end up with 2 temptable_1 declarations in the code. This will cause a compilation error.
Do I go ahead and use every value in the pdf? Someone mentioned every other one.


_______
I await Skynet and my last vision will be of a RepRap self replicating the robots that is destroying the human race.
Re: Where do I store a custom thermistor table
January 15, 2014 05:47PM
I don't know the arguments on one over the other. I guess it comes down to a shorter table takes less memory and is faster to search. The tradeoff is a loss of resolution, but it might not be so bad.
Re: Where do I store a custom thermistor table
January 15, 2014 05:51PM
Quote
jbernardis
I don't know the arguments on one over the other. I guess it comes down to a shorter table takes less memory and is faster to search. The tradeoff is a loss of resolution, but it might not be so bad.
I guess I could see how much the main one takes up but considering the Arduino will only be used for this memory may not be that much of an issue.


_______
I await Skynet and my last vision will be of a RepRap self replicating the robots that is destroying the human race.
Re: Where do I store a custom thermistor table
January 24, 2014 12:48AM
If the other tables in your thermistortables.h use an "*OVERSAMPLENR" constant, you will need that for your table as well.

Marlin reads the thermistor ADC 16 times and adds them up before interpolating between the left-hand values.
Sorry, only registered users may post in this forum.

Click here to login