Merge pull request #170 from linagee/Marlin_v1

Marlin v1
This commit is contained in:
Bernhard Kubicek 2012-06-02 03:46:56 -07:00
commit 6b14f95b3e
2 changed files with 232 additions and 90 deletions

View File

@ -38,18 +38,26 @@
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
//
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
//
//// Temperature sensor settings: //// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0) // -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595 // -1 is thermocouple with AD595
// 0 is not used // 0 is not used
// 1 is 100k thermistor // 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
// 2 is 200k thermistor // 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
// 3 is mendel-parts thermistor // 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. !! // 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is ParCan supplied 104GT-2 100K // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan) (4.7k pullup)
// 6 is EPCOS 100k // 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 // 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
//
// 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_0 -1
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0

View File

@ -73,27 +73,41 @@ const short temptable_1[][2] PROGMEM = {
#endif #endif
#if (THERMISTORHEATER_0 == 2) || (THERMISTORHEATER_1 == 2) || (THERMISTORHEATER_2 == 2) || (THERMISTORBED == 2) //200k bed thermistor #if (THERMISTORHEATER_0 == 2) || (THERMISTORHEATER_1 == 2) || (THERMISTORHEATER_2 == 2) || (THERMISTORBED == 2) //200k bed thermistor
const short temptable_2[][2] PROGMEM = { const short temptable_2[][2] PROGMEM = {
//200k ATC Semitec 204GT-2
//Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
// Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance
{1*OVERSAMPLENR, 848}, {1*OVERSAMPLENR, 848},
{54*OVERSAMPLENR, 275}, {30*OVERSAMPLENR, 300}, //top rating 300C
{107*OVERSAMPLENR, 228}, {34*OVERSAMPLENR, 290},
{160*OVERSAMPLENR, 202}, {39*OVERSAMPLENR, 280},
{213*OVERSAMPLENR, 185}, {46*OVERSAMPLENR, 270},
{266*OVERSAMPLENR, 171}, {53*OVERSAMPLENR, 260},
{319*OVERSAMPLENR, 160}, {63*OVERSAMPLENR, 250},
{372*OVERSAMPLENR, 150}, {74*OVERSAMPLENR, 240},
{425*OVERSAMPLENR, 141}, {87*OVERSAMPLENR, 230},
{478*OVERSAMPLENR, 133}, {104*OVERSAMPLENR, 220},
{531*OVERSAMPLENR, 125}, {124*OVERSAMPLENR, 210},
{584*OVERSAMPLENR, 118}, {148*OVERSAMPLENR, 200},
{637*OVERSAMPLENR, 110}, {176*OVERSAMPLENR, 190},
{690*OVERSAMPLENR, 103}, {211*OVERSAMPLENR, 180},
{743*OVERSAMPLENR, 95}, {252*OVERSAMPLENR, 170},
{796*OVERSAMPLENR, 86}, {301*OVERSAMPLENR, 160},
{849*OVERSAMPLENR, 77}, {357*OVERSAMPLENR, 150},
{902*OVERSAMPLENR, 65}, {420*OVERSAMPLENR, 140},
{955*OVERSAMPLENR, 49}, {489*OVERSAMPLENR, 130},
{1008*OVERSAMPLENR, 17}, {562*OVERSAMPLENR, 120},
{1020*OVERSAMPLENR, 0} //safety {636*OVERSAMPLENR, 110},
{708*OVERSAMPLENR, 100},
{775*OVERSAMPLENR, 90},
{835*OVERSAMPLENR, 80},
{884*OVERSAMPLENR, 70},
{924*OVERSAMPLENR, 60},
{955*OVERSAMPLENR, 50},
{977*OVERSAMPLENR, 40},
{993*OVERSAMPLENR, 30},
{1004*OVERSAMPLENR, 20},
{1012*OVERSAMPLENR, 10},
{1016*OVERSAMPLENR, 0},
}; };
#endif #endif
@ -157,73 +171,48 @@ const short temptable_4[][2] PROGMEM = {
#if (THERMISTORHEATER_0 == 5) || (THERMISTORHEATER_1 == 5) || (THERMISTORHEATER_2 == 5) || (THERMISTORBED == 5) //100k ParCan thermistor (104GT-2) #if (THERMISTORHEATER_0 == 5) || (THERMISTORHEATER_1 == 5) || (THERMISTORHEATER_2 == 5) || (THERMISTORBED == 5) //100k ParCan thermistor (104GT-2)
const short temptable_5[][2] PROGMEM = { const short temptable_5[][2] PROGMEM = {
{1*OVERSAMPLENR, 713}, // ATC Semitec 104GT-2 (Used in ParCan)
{18*OVERSAMPLENR, 316}, // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
{35*OVERSAMPLENR, 266}, // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance
{52*OVERSAMPLENR, 239}, {1*OVERSAMPLENR, 713},
{69*OVERSAMPLENR, 221}, {17*OVERSAMPLENR, 300}, //top rating 300C
{86*OVERSAMPLENR, 208}, {20*OVERSAMPLENR, 290},
{103*OVERSAMPLENR, 197}, {23*OVERSAMPLENR, 280},
{120*OVERSAMPLENR, 188}, {27*OVERSAMPLENR, 270},
{137*OVERSAMPLENR, 181}, {31*OVERSAMPLENR, 260},
{154*OVERSAMPLENR, 174}, {37*OVERSAMPLENR, 250},
{171*OVERSAMPLENR, 169}, {43*OVERSAMPLENR, 240},
{188*OVERSAMPLENR, 163}, {51*OVERSAMPLENR, 230},
{205*OVERSAMPLENR, 159}, {61*OVERSAMPLENR, 220},
{222*OVERSAMPLENR, 154}, {73*OVERSAMPLENR, 210},
{239*OVERSAMPLENR, 150}, {87*OVERSAMPLENR, 200},
{256*OVERSAMPLENR, 147}, {106*OVERSAMPLENR, 190},
{273*OVERSAMPLENR, 143}, {128*OVERSAMPLENR, 180},
{290*OVERSAMPLENR, 140}, {155*OVERSAMPLENR, 170},
{307*OVERSAMPLENR, 136}, {189*OVERSAMPLENR, 160},
{324*OVERSAMPLENR, 133}, {230*OVERSAMPLENR, 150},
{341*OVERSAMPLENR, 130}, {278*OVERSAMPLENR, 140},
{358*OVERSAMPLENR, 128}, {336*OVERSAMPLENR, 130},
{375*OVERSAMPLENR, 125}, {402*OVERSAMPLENR, 120},
{392*OVERSAMPLENR, 122}, {476*OVERSAMPLENR, 110},
{409*OVERSAMPLENR, 120}, {554*OVERSAMPLENR, 100},
{426*OVERSAMPLENR, 117}, {635*OVERSAMPLENR, 90},
{443*OVERSAMPLENR, 115}, {713*OVERSAMPLENR, 80},
{460*OVERSAMPLENR, 112}, {784*OVERSAMPLENR, 70},
{477*OVERSAMPLENR, 110}, {846*OVERSAMPLENR, 60},
{494*OVERSAMPLENR, 108}, {897*OVERSAMPLENR, 50},
{511*OVERSAMPLENR, 106}, {937*OVERSAMPLENR, 40},
{528*OVERSAMPLENR, 103}, {966*OVERSAMPLENR, 30},
{545*OVERSAMPLENR, 101}, {986*OVERSAMPLENR, 20},
{562*OVERSAMPLENR, 99}, {1000*OVERSAMPLENR, 10},
{579*OVERSAMPLENR, 97}, {1010*OVERSAMPLENR, 0}
{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 #endif
#if (THERMISTORHEATER_0 == 6) || (THERMISTORHEATER_1 == 6) || (THERMISTORHEATER_2 == 6) || (THERMISTORBED == 6) // 100k Epcos thermistor #if (THERMISTORHEATER_0 == 6) || (THERMISTORHEATER_1 == 6) || (THERMISTORHEATER_2 == 6) || (THERMISTORBED == 6) // 100k Epcos thermistor
const short temptable_6[][2] PROGMEM = { const short temptable_6[][2] PROGMEM = {
{28*OVERSAMPLENR, 250}, {1*OVERSAMPLENR, 350},
{28*OVERSAMPLENR, 250}, //top rating 250C
{31*OVERSAMPLENR, 245}, {31*OVERSAMPLENR, 245},
{35*OVERSAMPLENR, 240}, {35*OVERSAMPLENR, 240},
{39*OVERSAMPLENR, 235}, {39*OVERSAMPLENR, 235},
@ -264,7 +253,8 @@ const short temptable_6[][2] PROGMEM = {
#if (THERMISTORHEATER_0 == 7) || (THERMISTORHEATER_1 == 7) || (THERMISTORHEATER_2 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01 #if (THERMISTORHEATER_0 == 7) || (THERMISTORHEATER_1 == 7) || (THERMISTORHEATER_2 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01
const short temptable_7[][2] PROGMEM = { const short temptable_7[][2] PROGMEM = {
{46*OVERSAMPLENR, 270}, {1*OVERSAMPLENR, 500},
{46*OVERSAMPLENR, 270}, //top rating 300C
{50*OVERSAMPLENR, 265}, {50*OVERSAMPLENR, 265},
{54*OVERSAMPLENR, 260}, {54*OVERSAMPLENR, 260},
{58*OVERSAMPLENR, 255}, {58*OVERSAMPLENR, 255},
@ -321,6 +311,150 @@ const short temptable_7[][2] PROGMEM = {
}; };
#endif #endif
#if (THERMISTORHEATER_0 == 51) || (THERMISTORHEATER_1 == 51) || (THERMISTORHEATER_2 == 51) || (THERMISTORBED == 51)
// 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
// Verified by linagee.
// Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
// Advantage: Twice the resolution and better linearity from 150C to 200C
const short temptable_51[][2] PROGMEM = {
{1*OVERSAMPLENR, 350},
{190*OVERSAMPLENR, 250}, //top rating 250C
{203*OVERSAMPLENR, 245},
{217*OVERSAMPLENR, 240},
{232*OVERSAMPLENR, 235},
{248*OVERSAMPLENR, 230},
{265*OVERSAMPLENR, 225},
{283*OVERSAMPLENR, 220},
{302*OVERSAMPLENR, 215},
{322*OVERSAMPLENR, 210},
{344*OVERSAMPLENR, 205},
{366*OVERSAMPLENR, 200},
{390*OVERSAMPLENR, 195},
{415*OVERSAMPLENR, 190},
{440*OVERSAMPLENR, 185},
{467*OVERSAMPLENR, 180},
{494*OVERSAMPLENR, 175},
{522*OVERSAMPLENR, 170},
{551*OVERSAMPLENR, 165},
{580*OVERSAMPLENR, 160},
{609*OVERSAMPLENR, 155},
{638*OVERSAMPLENR, 150},
{666*OVERSAMPLENR, 145},
{695*OVERSAMPLENR, 140},
{722*OVERSAMPLENR, 135},
{749*OVERSAMPLENR, 130},
{775*OVERSAMPLENR, 125},
{800*OVERSAMPLENR, 120},
{823*OVERSAMPLENR, 115},
{845*OVERSAMPLENR, 110},
{865*OVERSAMPLENR, 105},
{884*OVERSAMPLENR, 100},
{901*OVERSAMPLENR, 95},
{917*OVERSAMPLENR, 90},
{932*OVERSAMPLENR, 85},
{944*OVERSAMPLENR, 80},
{956*OVERSAMPLENR, 75},
{966*OVERSAMPLENR, 70},
{975*OVERSAMPLENR, 65},
{982*OVERSAMPLENR, 60},
{989*OVERSAMPLENR, 55},
{995*OVERSAMPLENR, 50},
{1000*OVERSAMPLENR, 45},
{1004*OVERSAMPLENR, 40},
{1007*OVERSAMPLENR, 35},
{1010*OVERSAMPLENR, 30},
{1013*OVERSAMPLENR, 25},
{1015*OVERSAMPLENR, 20},
{1017*OVERSAMPLENR, 15},
{1018*OVERSAMPLENR, 10},
{1019*OVERSAMPLENR, 5},
{1020*OVERSAMPLENR, 0},
{1021*OVERSAMPLENR, -5}
};
#endif
#if (THERMISTORHEATER_0 == 52) || (THERMISTORHEATER_1 == 52) || (THERMISTORHEATER_2 == 52) || (THERMISTORBED == 52)
// 200k ATC Semitec 204GT-2 (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
// Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
// Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
// Advantage: More resolution and better linearity from 150C to 200C
const short temptable_52[][2] PROGMEM = {
{1*OVERSAMPLENR, 500},
{125*OVERSAMPLENR, 300}, //top rating 300C
{142*OVERSAMPLENR, 290},
{162*OVERSAMPLENR, 280},
{185*OVERSAMPLENR, 270},
{211*OVERSAMPLENR, 260},
{240*OVERSAMPLENR, 250},
{274*OVERSAMPLENR, 240},
{312*OVERSAMPLENR, 230},
{355*OVERSAMPLENR, 220},
{401*OVERSAMPLENR, 210},
{452*OVERSAMPLENR, 200},
{506*OVERSAMPLENR, 190},
{563*OVERSAMPLENR, 180},
{620*OVERSAMPLENR, 170},
{677*OVERSAMPLENR, 160},
{732*OVERSAMPLENR, 150},
{783*OVERSAMPLENR, 140},
{830*OVERSAMPLENR, 130},
{871*OVERSAMPLENR, 120},
{906*OVERSAMPLENR, 110},
{935*OVERSAMPLENR, 100},
{958*OVERSAMPLENR, 90},
{976*OVERSAMPLENR, 80},
{990*OVERSAMPLENR, 70},
{1000*OVERSAMPLENR, 60},
{1008*OVERSAMPLENR, 50},
{1013*OVERSAMPLENR, 40},
{1017*OVERSAMPLENR, 30},
{1019*OVERSAMPLENR, 20},
{1021*OVERSAMPLENR, 10},
{1022*OVERSAMPLENR, 0}
};
#endif
#if (THERMISTORHEATER_0 == 55) || (THERMISTORHEATER_1 == 55) || (THERMISTORHEATER_2 == 55) || (THERMISTORBED == 55)
// 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
// Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
// Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
// Advantage: More resolution and better linearity from 150C to 200C
const short temptable_52[][2] PROGMEM = {
{1*OVERSAMPLENR, 500},
{76*OVERSAMPLENR, 300},
{87*OVERSAMPLENR, 290},
{100*OVERSAMPLENR, 280},
{114*OVERSAMPLENR, 270},
{131*OVERSAMPLENR, 260},
{152*OVERSAMPLENR, 250},
{175*OVERSAMPLENR, 240},
{202*OVERSAMPLENR, 230},
{234*OVERSAMPLENR, 220},
{271*OVERSAMPLENR, 210},
{312*OVERSAMPLENR, 200},
{359*OVERSAMPLENR, 190},
{411*OVERSAMPLENR, 180},
{467*OVERSAMPLENR, 170},
{527*OVERSAMPLENR, 160},
{590*OVERSAMPLENR, 150},
{652*OVERSAMPLENR, 140},
{713*OVERSAMPLENR, 130},
{770*OVERSAMPLENR, 120},
{822*OVERSAMPLENR, 110},
{867*OVERSAMPLENR, 100},
{905*OVERSAMPLENR, 90},
{936*OVERSAMPLENR, 80},
{961*OVERSAMPLENR, 70},
{979*OVERSAMPLENR, 60},
{993*OVERSAMPLENR, 50},
{1003*OVERSAMPLENR, 40},
{1010*OVERSAMPLENR, 30},
{1015*OVERSAMPLENR, 20},
{1018*OVERSAMPLENR, 10},
{1020*OVERSAMPLENR, 0}
};
#endif
#define _TT_NAME(_N) temptable_ ## _N #define _TT_NAME(_N) temptable_ ## _N
#define TT_NAME(_N) _TT_NAME(_N) #define TT_NAME(_N) _TT_NAME(_N)