Added thermistor tables

2.0.x
Erik van der Zalm 13 years ago
parent 094afe7c10
commit bf879ceaa9

@ -14,14 +14,23 @@
#define MOTHERBOARD 7 #define MOTHERBOARD 7
//#define MOTHERBOARD 5 //#define MOTHERBOARD 5
//// Thermistor settings: //// Thermistor settings:
// 1 is 100k thermistor // 1 is 100k thermistor
// 2 is 200k thermistor // 2 is 200k thermistor
// 3 is mendel-parts thermistor // 3 is mendel-parts thermistor
#define THERMISTORHEATER 3 // 4 is 10k thermistor
// Select one of these only to define how the nozzle temp is read. // 5 is ParCan supplied 104GT-2 100K
//#define HEATER_USES_THERMISTOR // 6 is EPCOS 100k
#define HEATER_USES_AD595 // 7 is 100k Honeywell thermistor 135-104LAG-J01
#define THERMISTORHEATER_1 3
#define THERMISTORHEATER_2 3
#define THERMISTORBED 3
//#define HEATER_1_USES_THERMISTOR
//#define HEATER_2_USES_THERMISTOR
#define HEATER_1_USES_AD595
//#define HEATER_2_USES_AD595
// Select one of these only to define how the bed temp is read. // Select one of these only to define how the bed temp is read.
//#define BED_USES_THERMISTOR //#define BED_USES_THERMISTOR
@ -29,8 +38,6 @@
#define HEATER_CHECK_INTERVAL 50 #define HEATER_CHECK_INTERVAL 50
#define BED_CHECK_INTERVAL 5000 #define BED_CHECK_INTERVAL 5000
#define BNUMTEMPS NUMTEMPS
#define bedtemptable temptable
//// Endstop Settings //// Endstop Settings
@ -50,7 +57,7 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the
#define LCD_WIDTH 16 #define LCD_WIDTH 16
#define LCD_HEIGHT 2 #define LCD_HEIGHT 2
#define ULTIPANEL //#define ULTIPANEL
#ifdef ULTIPANEL #ifdef ULTIPANEL
//#define NEWPANEL //enable this if you have a click-encoder panel //#define NEWPANEL //enable this if you have a click-encoder panel
#define SDSUPPORT #define SDSUPPORT

@ -174,28 +174,28 @@ CRITICAL_SECTION_END;
// This is needed because PID in hydra firmware hovers around a given analog value, not a temp value. // This is needed because PID in hydra firmware hovers around a given analog value, not a temp value.
// This function is derived from inversing the logic from a portion of getTemperature() in FiveD RepRap firmware. // This function is derived from inversing the logic from a portion of getTemperature() in FiveD RepRap firmware.
float temp2analog(int celsius) { float temp2analog(int celsius) {
#ifdef HEATER_USES_THERMISTOR #ifdef HEATER_USES_THERMISTOR_1
int raw = 0; int raw = 0;
byte i; byte i;
for (i=1; i<NUMTEMPS; i++) for (i=1; i<NUMTEMPS_HEATER_1; i++)
{ {
if (temptable[i][1] < celsius) if (temptable_1[i][1] < celsius)
{ {
raw = temptable[i-1][0] + raw = temptable_1[i-1][0] +
(celsius - temptable[i-1][1]) * (celsius - temptable_1[i-1][1]) *
(temptable[i][0] - temptable[i-1][0]) / (temptable_1[i][0] - temptable_1[i-1][0]) /
(temptable[i][1] - temptable[i-1][1]); (temptable_1[i][1] - temptable_1[i-1][1]);
break; break;
} }
} }
// Overflow: Set to last value in the table // Overflow: Set to last value in the table
if (i == NUMTEMPS) raw = temptable[i-1][0]; if (i == NUMTEMPS_1) raw = temptable_1[i-1][0];
return (1023 * OVERSAMPLENR) - raw; return (1023 * OVERSAMPLENR) - raw;
#elif defined HEATER_USES_AD595 #elif defined HEATER_1_USES_AD595
return celsius * (1024.0 / (5.0 * 100.0) ) * OVERSAMPLENR; return celsius * (1024.0 / (5.0 * 100.0) ) * OVERSAMPLENR;
#endif #endif
} }
@ -235,28 +235,28 @@ float temp2analogBed(int celsius) {
// Derived from RepRap FiveD extruder::getTemperature() // Derived from RepRap FiveD extruder::getTemperature()
// For hot end temperature measurement. // For hot end temperature measurement.
float analog2temp(int raw) { float analog2temp(int raw) {
#ifdef HEATER_USES_THERMISTOR #ifdef HEATER_1_USES_THERMISTOR
int celsius = 0; int celsius = 0;
byte i; byte i;
raw = (1023 * OVERSAMPLENR) - raw; raw = (1023 * OVERSAMPLENR) - raw;
for (i=1; i<NUMTEMPS; i++) for (i=1; i<NUMTEMPS_HEATER_1; i++)
{ {
if (temptable[i][0] > raw) if (temptable_1[i][0] > raw)
{ {
celsius = temptable[i-1][1] + celsius = temptable_1[i-1][1] +
(raw - temptable[i-1][0]) * (raw - temptable_1[i-1][0]) *
(temptable[i][1] - temptable[i-1][1]) / (temptable_1[i][1] - temptable_1[i-1][1]) /
(temptable[i][0] - temptable[i-1][0]); (temptable_1[i][0] - temptable_1[i-1][0]);
break; break;
} }
} }
// Overflow: Set to last value in the table // Overflow: Set to last value in the table
if (i == NUMTEMPS) celsius = temptable[i-1][1]; if (i == NUMTEMPS_HEATER_1) celsius = temptable_1[i-1][1];
return celsius; return celsius;
#elif defined HEATER_USES_AD595 #elif defined HEATER_1_USES_AD595
return raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR; return raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR;
#endif #endif
} }
@ -270,7 +270,7 @@ float analog2tempBed(int raw) {
raw = (1023 * OVERSAMPLENR) - raw; raw = (1023 * OVERSAMPLENR) - raw;
for (i=1; i<NUMTEMPS; i++) for (i=1; i<BNUMTEMPS; i++)
{ {
if (bedtemptable[i][0] > raw) if (bedtemptable[i][0] > raw)
{ {
@ -284,7 +284,7 @@ float analog2tempBed(int raw) {
} }
// Overflow: Set to last value in the table // Overflow: Set to last value in the table
if (i == NUMTEMPS) celsius = bedtemptable[i-1][1]; if (i == BNUMTEMPS) celsius = bedtemptable[i-1][1];
return celsius; return celsius;
@ -403,11 +403,15 @@ ISR(TIMER0_COMPB_vect)
if(temp_count >= 16) // 6 ms * 16 = 96ms. if(temp_count >= 16) // 6 ms * 16 = 96ms.
{ {
#ifdef HEATER_USES_AD595 #ifdef HEATER_1_USES_AD595
current_raw[0] = raw_temp_0_value; current_raw[0] = raw_temp_0_value;
current_raw[2] = raw_temp_2_value;
#else #else
current_raw[0] = 16383 - raw_temp_0_value; current_raw[0] = 16383 - raw_temp_0_value;
#endif
#ifdef HEATER_2_USES_AD595
current_raw[2] = raw_temp_2_value;
#else
current_raw[2] = 16383 - raw_temp_2_value; current_raw[2] = 16383 - raw_temp_2_value;
#endif #endif

@ -2,148 +2,409 @@
#define THERMISTORTABLES_H_ #define THERMISTORTABLES_H_
#define OVERSAMPLENR 16 #define OVERSAMPLENR 16
#if (THERMISTORHEATER == 1) || (THERMISTORBED == 1) //100k bed thermistor
#if (THERMISTORHEATER_1 == 1) || (THERMISTORHEATER_2 == 1) || (THERMISTORBED == 1) //100k bed thermistor
#define NUMTEMPS_1 61 #define NUMTEMPS_1 61
const short temptable_1[NUMTEMPS_1][2] = { const short temptable_1[NUMTEMPS_1][2] = {
{ (23*OVERSAMPLENR) , 300 }, { 23*OVERSAMPLENR , 300 },
{ (25*OVERSAMPLENR) , 295 }, { 25*OVERSAMPLENR , 295 },
{ (27*OVERSAMPLENR) , 290 }, { 27*OVERSAMPLENR , 290 },
{ (28*OVERSAMPLENR) , 285 }, { 28*OVERSAMPLENR , 285 },
{ (31*OVERSAMPLENR) , 280 }, { 31*OVERSAMPLENR , 280 },
{ (33*OVERSAMPLENR) , 275 }, { 33*OVERSAMPLENR , 275 },
{ (35*OVERSAMPLENR) , 270 }, { 35*OVERSAMPLENR , 270 },
{ (38*OVERSAMPLENR) , 265 }, { 38*OVERSAMPLENR , 265 },
{ (41*OVERSAMPLENR) , 260 }, { 41*OVERSAMPLENR , 260 },
{ (44*OVERSAMPLENR) , 255 }, { 44*OVERSAMPLENR , 255 },
{ (48*OVERSAMPLENR) , 250 }, { 48*OVERSAMPLENR , 250 },
{ (52*OVERSAMPLENR) , 245 }, { 52*OVERSAMPLENR , 245 },
{ (56*OVERSAMPLENR) , 240 }, { 56*OVERSAMPLENR , 240 },
{ (61*OVERSAMPLENR) , 235 }, { 61*OVERSAMPLENR , 235 },
{ (66*OVERSAMPLENR) , 230 }, { 66*OVERSAMPLENR , 230 },
{ (71*OVERSAMPLENR) , 225 }, { 71*OVERSAMPLENR , 225 },
{ (78*OVERSAMPLENR) , 220 }, { 78*OVERSAMPLENR , 220 },
{ (84*OVERSAMPLENR) , 215 }, { 84*OVERSAMPLENR , 215 },
{ (92*OVERSAMPLENR) , 210 }, { 92*OVERSAMPLENR , 210 },
{ (100*OVERSAMPLENR), 205 }, { 100*OVERSAMPLENR , 205 },
{ (109*OVERSAMPLENR), 200 }, { 109*OVERSAMPLENR , 200 },
{ (120*OVERSAMPLENR), 195 }, { 120*OVERSAMPLENR , 195 },
{ (131*OVERSAMPLENR), 190 }, { 131*OVERSAMPLENR , 190 },
{ (143*OVERSAMPLENR), 185 }, { 143*OVERSAMPLENR , 185 },
{ (156*OVERSAMPLENR), 180 }, { 156*OVERSAMPLENR , 180 },
{ (171*OVERSAMPLENR), 175 }, { 171*OVERSAMPLENR , 175 },
{ (187*OVERSAMPLENR), 170 }, { 187*OVERSAMPLENR , 170 },
{ (205*OVERSAMPLENR), 165 }, { 205*OVERSAMPLENR , 165 },
{ (224*OVERSAMPLENR), 160 }, { 224*OVERSAMPLENR , 160 },
{ (245*OVERSAMPLENR), 155 }, { 245*OVERSAMPLENR , 155 },
{ (268*OVERSAMPLENR), 150 }, { 268*OVERSAMPLENR , 150 },
{ (293*OVERSAMPLENR), 145 }, { 293*OVERSAMPLENR , 145 },
{ (320*OVERSAMPLENR), 140 }, { 320*OVERSAMPLENR , 140 },
{ (348*OVERSAMPLENR), 135 }, { 348*OVERSAMPLENR , 135 },
{ (379*OVERSAMPLENR), 130 }, { 379*OVERSAMPLENR , 130 },
{ (411*OVERSAMPLENR), 125 }, { 411*OVERSAMPLENR , 125 },
{ (445*OVERSAMPLENR), 120 }, { 445*OVERSAMPLENR , 120 },
{ (480*OVERSAMPLENR), 115 }, { 480*OVERSAMPLENR , 115 },
{ (516*OVERSAMPLENR), 110 }, { 516*OVERSAMPLENR , 110 },
{ (553*OVERSAMPLENR), 105 }, { 553*OVERSAMPLENR , 105 },
{ (591*OVERSAMPLENR), 100 }, { 591*OVERSAMPLENR , 100 },
{ (628*OVERSAMPLENR), 95 }, { 628*OVERSAMPLENR , 95 },
{ (665*OVERSAMPLENR), 90 }, { 665*OVERSAMPLENR , 90 },
{ (702*OVERSAMPLENR), 85 }, { 702*OVERSAMPLENR , 85 },
{ (737*OVERSAMPLENR), 80 }, { 737*OVERSAMPLENR , 80 },
{ (770*OVERSAMPLENR), 75 }, { 770*OVERSAMPLENR , 75 },
{ (801*OVERSAMPLENR), 70 }, { 801*OVERSAMPLENR , 70 },
{ (830*OVERSAMPLENR), 65 }, { 830*OVERSAMPLENR , 65 },
{ (857*OVERSAMPLENR), 60 }, { 857*OVERSAMPLENR , 60 },
{ (881*OVERSAMPLENR), 55 }, { 881*OVERSAMPLENR , 55 },
{ (903*OVERSAMPLENR), 50 }, { 903*OVERSAMPLENR , 50 },
{ (922*OVERSAMPLENR), 45 }, { 922*OVERSAMPLENR , 45 },
{ (939*OVERSAMPLENR), 40 }, { 939*OVERSAMPLENR , 40 },
{ (954*OVERSAMPLENR), 35 }, { 954*OVERSAMPLENR , 35 },
{ (966*OVERSAMPLENR), 30 }, { 966*OVERSAMPLENR , 30 },
{ (977*OVERSAMPLENR), 25 }, { 977*OVERSAMPLENR , 25 },
{ (985*OVERSAMPLENR), 20 }, { 985*OVERSAMPLENR , 20 },
{ (993*OVERSAMPLENR), 15 }, { 993*OVERSAMPLENR , 15 },
{ (999*OVERSAMPLENR), 10 }, { 999*OVERSAMPLENR , 10 },
{ (1004*OVERSAMPLENR), 5 }, { 1004*OVERSAMPLENR , 5 },
{ (1008*OVERSAMPLENR), 0 } //safety { 1008*OVERSAMPLENR , 0 } //safety
}; };
#endif #endif
#if (THERMISTORHEATER == 2) || (THERMISTORBED == 2) //200k bed thermistor #if (THERMISTORHEATER_1 == 2) || (THERMISTORHEATER_2 == 2) || (THERMISTORBED == 2) //200k bed thermistor
#define NUMTEMPS_2 21 #define NUMTEMPS_2 21
const short temptable_2[NUMTEMPS_2][2] = { const short temptable_2[NUMTEMPS_2][2] = {
{(1*OVERSAMPLENR), 848}, {1*OVERSAMPLENR, 848},
{(54*OVERSAMPLENR), 275}, {54*OVERSAMPLENR, 275},
{(107*OVERSAMPLENR), 228}, {107*OVERSAMPLENR, 228},
{(160*OVERSAMPLENR), 202}, {160*OVERSAMPLENR, 202},
{(213*OVERSAMPLENR), 185}, {213*OVERSAMPLENR, 185},
{(266*OVERSAMPLENR), 171}, {266*OVERSAMPLENR, 171},
{(319*OVERSAMPLENR), 160}, {319*OVERSAMPLENR, 160},
{(372*OVERSAMPLENR), 150}, {372*OVERSAMPLENR, 150},
{(425*OVERSAMPLENR), 141}, {425*OVERSAMPLENR, 141},
{(478*OVERSAMPLENR), 133}, {478*OVERSAMPLENR, 133},
{(531*OVERSAMPLENR), 125}, {531*OVERSAMPLENR, 125},
{(584*OVERSAMPLENR), 118}, {584*OVERSAMPLENR, 118},
{(637*OVERSAMPLENR), 110}, {637*OVERSAMPLENR, 110},
{(690*OVERSAMPLENR), 103}, {690*OVERSAMPLENR, 103},
{(743*OVERSAMPLENR), 95}, {743*OVERSAMPLENR, 95},
{(796*OVERSAMPLENR), 86}, {796*OVERSAMPLENR, 86},
{(849*OVERSAMPLENR), 77}, {849*OVERSAMPLENR, 77},
{(902*OVERSAMPLENR), 65}, {902*OVERSAMPLENR, 65},
{(955*OVERSAMPLENR), 49}, {955*OVERSAMPLENR, 49},
{(1008*OVERSAMPLENR), 17}, {1008*OVERSAMPLENR, 17},
{(1020*OVERSAMPLENR), 0} //safety {1020*OVERSAMPLENR, 0} //safety
}; };
#endif #endif
#if (THERMISTORHEATER == 3) || (THERMISTORBED == 3) //mendel-parts #if (THERMISTORHEATER_1 == 3) || (THERMISTORHEATER_2 == 3) || (THERMISTORBED == 3) //mendel-parts
#define NUMTEMPS_3 28 #define NUMTEMPS_3 28
const short temptable_3[NUMTEMPS_3][2] = { const short temptable_3[NUMTEMPS_3][2] = {
{(1*OVERSAMPLENR),864}, {1*OVERSAMPLENR,864},
{(21*OVERSAMPLENR),300}, {21*OVERSAMPLENR,300},
{(25*OVERSAMPLENR),290}, {25*OVERSAMPLENR,290},
{(29*OVERSAMPLENR),280}, {29*OVERSAMPLENR,280},
{(33*OVERSAMPLENR),270}, {33*OVERSAMPLENR,270},
{(39*OVERSAMPLENR),260}, {39*OVERSAMPLENR,260},
{(46*OVERSAMPLENR),250}, {46*OVERSAMPLENR,250},
{(54*OVERSAMPLENR),240}, {54*OVERSAMPLENR,240},
{(64*OVERSAMPLENR),230}, {64*OVERSAMPLENR,230},
{(75*OVERSAMPLENR),220}, {75*OVERSAMPLENR,220},
{(90*OVERSAMPLENR),210}, {90*OVERSAMPLENR,210},
{(107*OVERSAMPLENR),200}, {107*OVERSAMPLENR,200},
{(128*OVERSAMPLENR),190}, {128*OVERSAMPLENR,190},
{(154*OVERSAMPLENR),180}, {154*OVERSAMPLENR,180},
{(184*OVERSAMPLENR),170}, {184*OVERSAMPLENR,170},
{(221*OVERSAMPLENR),160}, {221*OVERSAMPLENR,160},
{(265*OVERSAMPLENR),150}, {265*OVERSAMPLENR,150},
{(316*OVERSAMPLENR),140}, {316*OVERSAMPLENR,140},
{(375*OVERSAMPLENR),130}, {375*OVERSAMPLENR,130},
{(441*OVERSAMPLENR),120}, {441*OVERSAMPLENR,120},
{(513*OVERSAMPLENR),110}, {513*OVERSAMPLENR,110},
{(588*OVERSAMPLENR),100}, {588*OVERSAMPLENR,100},
{(734*OVERSAMPLENR),80}, {734*OVERSAMPLENR,80},
{(856*OVERSAMPLENR),60}, {856*OVERSAMPLENR,60},
{(938*OVERSAMPLENR),40}, {938*OVERSAMPLENR,40},
{(986*OVERSAMPLENR),20}, {986*OVERSAMPLENR,20},
{(1008*OVERSAMPLENR),0}, {1008*OVERSAMPLENR,0},
{(1018*OVERSAMPLENR),-20} {1018*OVERSAMPLENR,-20}
}; };
#endif #endif
#if (THERMISTORHEATER_1 == 4) || (THERMISTORHEATER_2 == 4) || (THERMISTORBED == 4) //10k thermistor
#if THERMISTORHEATER == 1 #define NUMTEMPS_4 20
#define NUMTEMPS NUMTEMPS_1 short temptable_4[NUMTEMPS_4][2] = {
#define temptable temptable_1 {1*OVERSAMPLENR, 430},
#elif THERMISTORHEATER == 2 {54*OVERSAMPLENR, 137},
#define NUMTEMPS NUMTEMPS_2 {107*OVERSAMPLENR, 107},
#define temptable temptable_2 {160*OVERSAMPLENR, 91},
#elif THERMISTORHEATER == 3 {213*OVERSAMPLENR, 80},
#define NUMTEMPS NUMTEMPS_3 {266*OVERSAMPLENR, 71},
#define temptable temptable_3 {319*OVERSAMPLENR, 64},
#else {372*OVERSAMPLENR, 57},
#error No heater thermistor table specified {425*OVERSAMPLENR, 51},
{478*OVERSAMPLENR, 46},
{531*OVERSAMPLENR, 41},
{584*OVERSAMPLENR, 35},
{637*OVERSAMPLENR, 30},
{690*OVERSAMPLENR, 25},
{743*OVERSAMPLENR, 20},
{796*OVERSAMPLENR, 14},
{849*OVERSAMPLENR, 7},
{902*OVERSAMPLENR, 0},
{955*OVERSAMPLENR, -11},
{1008*OVERSAMPLENR, -35}
};
#endif
#if (THERMISTORHEATER_1 == 5) || (THERMISTORHEATER_2 == 5) || (THERMISTORBED == 5) //100k ParCan thermistor (104GT-2)
#define NUMTEMPS_5 61
const short temptable_5[NUMTEMPS_5][2] = {
{1*OVERSAMPLENR, 713},
{18*OVERSAMPLENR, 316},
{35*OVERSAMPLENR, 266},
{52*OVERSAMPLENR, 239},
{69*OVERSAMPLENR, 221},
{86*OVERSAMPLENR, 208},
{103*OVERSAMPLENR, 197},
{120*OVERSAMPLENR, 188},
{137*OVERSAMPLENR, 181},
{154*OVERSAMPLENR, 174},
{171*OVERSAMPLENR, 169},
{188*OVERSAMPLENR, 163},
{205*OVERSAMPLENR, 159},
{222*OVERSAMPLENR, 154},
{239*OVERSAMPLENR, 150},
{256*OVERSAMPLENR, 147},
{273*OVERSAMPLENR, 143},
{290*OVERSAMPLENR, 140},
{307*OVERSAMPLENR, 136},
{324*OVERSAMPLENR, 133},
{341*OVERSAMPLENR, 130},
{358*OVERSAMPLENR, 128},
{375*OVERSAMPLENR, 125},
{392*OVERSAMPLENR, 122},
{409*OVERSAMPLENR, 120},
{426*OVERSAMPLENR, 117},
{443*OVERSAMPLENR, 115},
{460*OVERSAMPLENR, 112},
{477*OVERSAMPLENR, 110},
{494*OVERSAMPLENR, 108},
{511*OVERSAMPLENR, 106},
{528*OVERSAMPLENR, 103},
{545*OVERSAMPLENR, 101},
{562*OVERSAMPLENR, 99},
{579*OVERSAMPLENR, 97},
{596*OVERSAMPLENR, 95},
{613*OVERSAMPLENR, 92},
{630*OVERSAMPLENR, 90},
{647*OVERSAMPLENR, 88},
{664*OVERSAMPLENR, 86},
{681*OVERSAMPLENR, 84},
{698*OVERSAMPLENR, 81},
{715*OVERSAMPLENR, 79},
{732*OVERSAMPLENR, 77},
{749*OVERSAMPLENR, 75},
{766*OVERSAMPLENR, 72},
{783*OVERSAMPLENR, 70},
{800*OVERSAMPLENR, 67},
{817*OVERSAMPLENR, 64},
{834*OVERSAMPLENR, 61},
{851*OVERSAMPLENR, 58},
{868*OVERSAMPLENR, 55},
{885*OVERSAMPLENR, 52},
{902*OVERSAMPLENR, 48},
{919*OVERSAMPLENR, 44},
{936*OVERSAMPLENR, 40},
{953*OVERSAMPLENR, 34},
{970*OVERSAMPLENR, 28},
{987*OVERSAMPLENR, 20},
{1004*OVERSAMPLENR, 8},
{1021*OVERSAMPLENR, 0}
};
#endif
#if (THERMISTORHEATER_1 == 6) || (THERMISTORHEATER_2 == 6) || (THERMISTORBED == 6) // 100k Epcos thermistor
#define NUMTEMPS_6 36
const short temptable_6[NUMTEMPS_6][2] = {
{28*OVERSAMPLENR, 250},
{31*OVERSAMPLENR, 245},
{35*OVERSAMPLENR, 240},
{39*OVERSAMPLENR, 235},
{42*OVERSAMPLENR, 230},
{44*OVERSAMPLENR, 225},
{49*OVERSAMPLENR, 220},
{53*OVERSAMPLENR, 215},
{62*OVERSAMPLENR, 210},
{73*OVERSAMPLENR, 205},
{72*OVERSAMPLENR, 200},
{94*OVERSAMPLENR, 190},
{102*OVERSAMPLENR, 185},
{116*OVERSAMPLENR, 170},
{143*OVERSAMPLENR, 160},
{183*OVERSAMPLENR, 150},
{223*OVERSAMPLENR, 140},
{270*OVERSAMPLENR, 130},
{318*OVERSAMPLENR, 120},
{383*OVERSAMPLENR, 110},
{413*OVERSAMPLENR, 105},
{439*OVERSAMPLENR, 100},
{484*OVERSAMPLENR, 95},
{513*OVERSAMPLENR, 90},
{607*OVERSAMPLENR, 80},
{664*OVERSAMPLENR, 70},
{781*OVERSAMPLENR, 60},
{810*OVERSAMPLENR, 55},
{849*OVERSAMPLENR, 50},
{914*OVERSAMPLENR, 45},
{914*OVERSAMPLENR, 40},
{935*OVERSAMPLENR, 35},
{954*OVERSAMPLENR, 30},
{970*OVERSAMPLENR, 25},
{978*OVERSAMPLENR, 22},
{1008*OVERSAMPLENR, 3}
};
#endif
#if (THERMISTORHEATER_1 == 7) || (THERMISTORHEATER_2 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01
#define NUMTEMPS_7 54
const short temptable_7[NUMTEMPS_7][2] = {
{46*OVERSAMPLENR, 270},
{50*OVERSAMPLENR, 265},
{54*OVERSAMPLENR, 260},
{58*OVERSAMPLENR, 255},
{62*OVERSAMPLENR, 250},
{67*OVERSAMPLENR, 245},
{72*OVERSAMPLENR, 240},
{79*OVERSAMPLENR, 235},
{85*OVERSAMPLENR, 230},
{91*OVERSAMPLENR, 225},
{99*OVERSAMPLENR, 220},
{107*OVERSAMPLENR, 215},
{116*OVERSAMPLENR, 210},
{126*OVERSAMPLENR, 205},
{136*OVERSAMPLENR, 200},
{149*OVERSAMPLENR, 195},
{160*OVERSAMPLENR, 190},
{175*OVERSAMPLENR, 185},
{191*OVERSAMPLENR, 180},
{209*OVERSAMPLENR, 175},
{224*OVERSAMPLENR, 170},
{246*OVERSAMPLENR, 165},
{267*OVERSAMPLENR, 160},
{293*OVERSAMPLENR, 155},
{316*OVERSAMPLENR, 150},
{340*OVERSAMPLENR, 145},
{364*OVERSAMPLENR, 140},
{396*OVERSAMPLENR, 135},
{425*OVERSAMPLENR, 130},
{460*OVERSAMPLENR, 125},
{489*OVERSAMPLENR, 120},
{526*OVERSAMPLENR, 115},
{558*OVERSAMPLENR, 110},
{591*OVERSAMPLENR, 105},
{628*OVERSAMPLENR, 100},
{660*OVERSAMPLENR, 95},
{696*OVERSAMPLENR, 90},
{733*OVERSAMPLENR, 85},
{761*OVERSAMPLENR, 80},
{794*OVERSAMPLENR, 75},
{819*OVERSAMPLENR, 70},
{847*OVERSAMPLENR, 65},
{870*OVERSAMPLENR, 60},
{892*OVERSAMPLENR, 55},
{911*OVERSAMPLENR, 50},
{929*OVERSAMPLENR, 45},
{944*OVERSAMPLENR, 40},
{959*OVERSAMPLENR, 35},
{971*OVERSAMPLENR, 30},
{981*OVERSAMPLENR, 25},
{989*OVERSAMPLENR, 20},
{994*OVERSAMPLENR, 15},
{1001*OVERSAMPLENR, 10},
{1005*OVERSAMPLENR, 5}
};
#endif
#if THERMISTORHEATER_1 == 1
#define NUMTEMPS_HEATER_1 NUMTEMPS_1
#define temptable_1 temptable_1
#elif THERMISTORHEATER_1 == 2
#define NUMTEMPS_HEATER_1 NUMTEMPS_2
#define temptable_1 temptable_2
#elif THERMISTORHEATER_1 == 3
#define NUMTEMPS_HEATER_1 NUMTEMPS_3
#define temptable_1 temptable_3
#elif THERMISTORHEATER_1 == 4
#define NUMTEMPS_HEATER_1 NUMTEMPS_4
#define temptable_1 temptable_4
#elif THERMISTORHEATER_1 == 5
#define NUMTEMPS_HEATER_1 NUMTEMPS_5
#define temptable_1 temptable_5
#elif THERMISTORHEATER_1 == 6
#define NUMTEMPS_HEATER_1 NUMTEMPS_6
#define temptable_1 temptable_6
#elif THERMISTORHEATER_1 == 7
#define NUMTEMPS_HEATER_1 NUMTEMPS_7
#define temptable_1 temptable_7
#elif defined HEATER_1_USES_THERMISTOR
#error No heater 1 thermistor table specified
#endif
#if THERMISTORHEATER_2 == 1
#define NUMTEMPS_HEATER_2 NUMTEMPS_1
#define temptable_2 temptable_1
#elif THERMISTORHEATER_2 == 2
#define NUMTEMPS_HEATER_2 NUMTEMPS_2
#define temptable_2 temptable_2
#elif THERMISTORHEATER_2 == 3
#define NUMTEMPS_HEATER_2 NUMTEMPS_3
#define temptable_2 temptable_3
#elif THERMISTORHEATER_2 == 4
#define NUMTEMPS_HEATER_2 NUMTEMPS_4
#define temptable_2 temptable_4
#elif THERMISTORHEATER_2 == 5
#define NUMTEMPS_HEATER_2 NUMTEMPS_5
#define temptable_2 temptable_5
#elif THERMISTORHEATER_2 == 6
#define NUMTEMPS_HEATER_2 NUMTEMPS_6
#define temptable_2 temptable_6
#elif THERMISTORHEATER_2 == 7
#define NUMTEMPS_HEATER22 NUMTEMPS_7
#define temptable_2 temptable_7
#elif defined HEATER_2_USES_THERMISTOR
#error No heater 2 thermistor table specified
#endif #endif
#if THERMISTORBED == 1
#define BNUMTEMPS NUMTEMPS_1
#define bedtemptable temptable_1
#elif THERMISTORBED == 2
#define BNUMTEMPS NUMTEMPS_2
#define bedtemptable temptable_2
#elif THERMISTORBED == 3
#define BNUMTEMPS NUMTEMPS_3
#define bedtemptable temptable_3
#elif THERMISTORBED == 4
#define BNUMTEMPS NUMTEMPS_4
#define bedtemptable temptable_4
#elif THERMISTORBED == 5
#define BNUMTEMPS NUMTEMPS_5
#define bedtemptable temptable_5
#elif THERMISTORBED == 6
#define BNUMTEMPS NUMTEMPS_6
#define bedtemptable temptable_6
#elif THERMISTORBED == 7
#define BNUMTEMPS NUMTEMPS_7
#define bedtemptable temptable_7
#elif defined BED_USES_THERMISTOR
#error No bed thermistor table specified
#endif
#endif //THERMISTORTABLES_H_ #endif //THERMISTORTABLES_H_

Loading…
Cancel
Save