Fix up some accuracy issues with PT100 temp sensors in relation to the Rambo v1.3a

This commit is contained in:
Aaron Yourk 2017-01-12 15:49:48 -07:00
parent 7d5affa12e
commit bcc0e83d76
3 changed files with 116 additions and 83 deletions

View file

@ -1033,7 +1033,9 @@ const short temptable_12[][2] PROGMEM = {
#define PtA 3.9083E-3 #define PtA 3.9083E-3
#define PtB -5.775E-7 #define PtB -5.775E-7
#define PtC -4.183E-12
#define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T))) #define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T)))
#define PtRtNew(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T) + (T-100)*PtC*(T)*(T)*(T)))
#define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1)) #define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1))
#define PtLine(T,R0,Rup) { PtAdVal(T,R0,Rup)*OVERSAMPLENR, T }, #define PtLine(T,R0,Rup) { PtAdVal(T,R0,Rup)*OVERSAMPLENR, T },
@ -1059,93 +1061,124 @@ const short temptable_147[][2] PROGMEM = {
PtLine(200,100,4700) PtLine(200,100,4700)
PtLine(250,100,4700) PtLine(250,100,4700)
PtLine(300,100,4700) PtLine(300,100,4700)
PtLine(350,100,4700)
PtLine(400,100,4700)
PtLine(450,100,4700)
PtLine(500,100,4700)
PtLine(550,100,4700)
PtLine(600,100,4700)
PtLine(650,100,4700)
PtLine(700,100,4700)
PtLine(750,100,4700)
PtLine(800,100,4700)
PtLine(850,100,4700)
PtLine(900,100,4700)
PtLine(950,100,4700)
PtLine(1000,100,4700)
PtLine(1050,100,4700)
PtLine(1100,100,4700)
}; };
#endif #endif
#if (THERMISTORHEATER_0 == 148) || (THERMISTORHEATER_1 == 148) || (THERMISTORHEATER_2 == 148) || (THERMISTORBED == 148) // Pt100 with 4k7 MiniRambo pullup, no Amp. // E3D Pt100 with 4k7 MiniRambo pullup, no Amp on the MiniRambo v1.3a
#if (THERMISTORHEATER_0 == 148) || (THERMISTORHEATER_1 == 148) || (THERMISTORHEATER_2 == 148) || (THERMISTORBED == 148)
const short temptable_148[][2] PROGMEM = { const short temptable_148[][2] PROGMEM = {
// More raw data values avaliable via http://www.micropik.com/PDF/pt100.pdf // These values have been calculated and tested over many days. See https://docs.google.com/spreadsheets/d/1MJXa6feEe0mGVCT2TrBwLxVOMoLDkJlvfQ4JXhAdV_E
// This information is taken from http://shop.prusa3d.com/forum/improvements-f14/mini-rambo-1-3-and-e3d-with-pt100-t700-s40.html#p20938 // Values that are missing from the 5C gap are missing due to resolution limits.
{292,0}, // first two entries are bogus, just to get the heater running {19.00000 * OVERSAMPLENR, 0},
{356,50}, {19.25000 * OVERSAMPLENR, 5},
{469,100}, {19.50000 * OVERSAMPLENR, 10},
{531,150}, {19.87500 * OVERSAMPLENR, 15},
{590,200}, {20.25000 * OVERSAMPLENR, 20},
{649,250}, {21.00000 * OVERSAMPLENR, 25},
{708,300}, {21.75000 * OVERSAMPLENR, 35},
{763,350}, {22.00000 * OVERSAMPLENR, 40},
{819,400}, {23.00000 * OVERSAMPLENR, 50}, // 55C is more commonly used.
{872,450}, {23.75000 * OVERSAMPLENR, 60},
{24.00000 * OVERSAMPLENR, 65},
{24.06250 * OVERSAMPLENR, 70},
{25.00000 * OVERSAMPLENR, 75},
{25.50000 * OVERSAMPLENR, 85},
{26.00000 * OVERSAMPLENR, 90},
{26.93750 * OVERSAMPLENR,100},
{27.00000 * OVERSAMPLENR,105},
{27.37500 * OVERSAMPLENR,110},
{28.00000 * OVERSAMPLENR,115},
{29.00000 * OVERSAMPLENR,125},
{29.25000 * OVERSAMPLENR,135},
{30.00000 * OVERSAMPLENR,140},
{35.50000 * OVERSAMPLENR,150},
{31.00000 * OVERSAMPLENR,155},
{32.00000 * OVERSAMPLENR,165},
{32.18750 * OVERSAMPLENR,175},
{33.00000 * OVERSAMPLENR,180},
{33.62500 * OVERSAMPLENR,190},
{34.00000 * OVERSAMPLENR,195},
{35.00000 * OVERSAMPLENR,205},
{35.50000 * OVERSAMPLENR,215},
{36.00000 * OVERSAMPLENR,220},
{36.75000 * OVERSAMPLENR,230},
{37.00000 * OVERSAMPLENR,235},
{37.75000 * OVERSAMPLENR,245},
{38.00000 * OVERSAMPLENR,250},
{38.12500 * OVERSAMPLENR,255},
{39.00000 * OVERSAMPLENR,260},
{40.00000 * OVERSAMPLENR,275},
{40.25000 * OVERSAMPLENR,285},
{41.00000 * OVERSAMPLENR,290},
{41.25000 * OVERSAMPLENR,300},
{42.00000 * OVERSAMPLENR,305},
{43.00000 * OVERSAMPLENR,315},
{43.25000 * OVERSAMPLENR,325},
{44.00000 * OVERSAMPLENR,330},
{44.18750 * OVERSAMPLENR,340},
{45.00000 * OVERSAMPLENR,345},
{45.25000 * OVERSAMPLENR,355},
{46.00000 * OVERSAMPLENR,360},
{46.62500 * OVERSAMPLENR,370},
{47.00000 * OVERSAMPLENR,375},
{47.25000 * OVERSAMPLENR,385},
{48.00000 * OVERSAMPLENR,390},
{48.75000 * OVERSAMPLENR,400},
{49.00000 * OVERSAMPLENR,405},
}; };
#endif #endif
#if (THERMISTORHEATER_0 == 247) || (THERMISTORHEATER_1 == 247) || (THERMISTORHEATER_2 == 247) || (THERMISTORBED == 247) // Pt100 with 4k7 MiniRambo pullup & PT100 Amplifier #if (THERMISTORHEATER_0 == 247) || (THERMISTORHEATER_1 == 247) || (THERMISTORHEATER_2 == 247) || (THERMISTORBED == 247) // Pt100 with 4k7 MiniRambo pullup & PT100 Amplifier
const short temptable_247[][2] PROGMEM = { const short temptable_247[][2] PROGMEM = {
// Calculated from Bob-the-Kuhn's PT100 calculator listed in https://github.com/MarlinFirmware/Marlin/issues/5543 // Calculated from Bob-the-Kuhn's PT100 calculator listed in https://github.com/MarlinFirmware/Marlin/issues/5543
// and the table provided by E3D at http://wiki.e3d-online.com/wiki/E3D_PT100_Amplifier_Documentation#Output_Characteristics. // and the table provided by E3D at http://wiki.e3d-online.com/wiki/E3D_PT100_Amplifier_Documentation#Output_Characteristics.
{ 0 * OVERSAMPLENR, 0 }, { 0 * OVERSAMPLENR, 0},
{ 244 * OVERSAMPLENR, 1 }, {241 * OVERSAMPLENR, 1},
{ 252 * OVERSAMPLENR, 10 }, {249 * OVERSAMPLENR, 10},
{ 262 * OVERSAMPLENR, 20 }, {259 * OVERSAMPLENR, 20},
{ 270 * OVERSAMPLENR, 30 }, {267 * OVERSAMPLENR, 30},
{ 278 * OVERSAMPLENR, 40 }, {275 * OVERSAMPLENR, 40},
{ 286 * OVERSAMPLENR, 50 }, {283 * OVERSAMPLENR, 50},
{ 294 * OVERSAMPLENR, 60 }, {291 * OVERSAMPLENR, 60},
{ 302 * OVERSAMPLENR, 70 }, {299 * OVERSAMPLENR, 70},
{ 310 * OVERSAMPLENR, 80 }, {307 * OVERSAMPLENR, 80},
{ 318 * OVERSAMPLENR, 90 }, {315 * OVERSAMPLENR, 90},
{ 326 * OVERSAMPLENR, 100 }, {323 * OVERSAMPLENR, 100},
{ 334 * OVERSAMPLENR, 110 }, {331 * OVERSAMPLENR, 110},
{ 344 * OVERSAMPLENR, 120 }, {340 * OVERSAMPLENR, 120},
{ 352 * OVERSAMPLENR, 130 }, {348 * OVERSAMPLENR, 130},
{ 358 * OVERSAMPLENR, 140 }, {354 * OVERSAMPLENR, 140},
{ 366 * OVERSAMPLENR, 150 }, {362 * OVERSAMPLENR, 150},
{ 374 * OVERSAMPLENR, 160 }, {370 * OVERSAMPLENR, 160},
{ 382 * OVERSAMPLENR, 170 }, {378 * OVERSAMPLENR, 170},
{ 390 * OVERSAMPLENR, 180 }, {386 * OVERSAMPLENR, 180},
{ 398 * OVERSAMPLENR, 190 }, {394 * OVERSAMPLENR, 190},
{ 406 * OVERSAMPLENR, 200 }, {402 * OVERSAMPLENR, 200},
{ 414 * OVERSAMPLENR, 210 }, {410 * OVERSAMPLENR, 210},
{ 422 * OVERSAMPLENR, 220 }, {418 * OVERSAMPLENR, 220},
{ 430 * OVERSAMPLENR, 230 }, {426 * OVERSAMPLENR, 230},
{ 436 * OVERSAMPLENR, 240 }, {432 * OVERSAMPLENR, 240},
{ 444 * OVERSAMPLENR, 250 }, {440 * OVERSAMPLENR, 250},
{ 452 * OVERSAMPLENR, 260 }, {448 * OVERSAMPLENR, 260},
{ 458 * OVERSAMPLENR, 270 }, {454 * OVERSAMPLENR, 270},
{ 466 * OVERSAMPLENR, 280 }, {462 * OVERSAMPLENR, 280},
{ 474 * OVERSAMPLENR, 290 }, {469 * OVERSAMPLENR, 290},
{ 480 * OVERSAMPLENR, 300 }, {475 * OVERSAMPLENR, 300},
{ 488 * OVERSAMPLENR, 310 }, {483 * OVERSAMPLENR, 310},
{ 496 * OVERSAMPLENR, 320 }, {491 * OVERSAMPLENR, 320},
{ 504 * OVERSAMPLENR, 330 }, {499 * OVERSAMPLENR, 330},
{ 510 * OVERSAMPLENR, 340 }, {505 * OVERSAMPLENR, 340},
{ 518 * OVERSAMPLENR, 350 }, {513 * OVERSAMPLENR, 350},
{ 524 * OVERSAMPLENR, 360 }, {519 * OVERSAMPLENR, 360},
{ 532 * OVERSAMPLENR, 370 }, {527 * OVERSAMPLENR, 370},
{ 538 * OVERSAMPLENR, 380 }, {533 * OVERSAMPLENR, 380},
{ 546 * OVERSAMPLENR, 390 }, {541 * OVERSAMPLENR, 390},
{ 554 * OVERSAMPLENR, 400 }, {549 * OVERSAMPLENR, 400},
{ 622 * OVERSAMPLENR, 500 }, {616 * OVERSAMPLENR, 500},
{ 688 * OVERSAMPLENR, 600 }, {682 * OVERSAMPLENR, 600},
{ 749 * OVERSAMPLENR, 700 }, {741 * OVERSAMPLENR, 700},
{ 809 * OVERSAMPLENR, 800 }, {801 * OVERSAMPLENR, 800},
{ 865 * OVERSAMPLENR, 900 }, {856 * OVERSAMPLENR, 900},
{ 919 * OVERSAMPLENR, 1000 }, {910 * OVERSAMPLENR, 1000},
{ 969 * OVERSAMPLENR, 1100 }, {960 * OVERSAMPLENR, 1100},
}; };
#endif #endif
#if (THERMISTORHEATER_0 == 1010) || (THERMISTORHEATER_1 == 1010) || (THERMISTORHEATER_2 == 1010) || (THERMISTORBED == 1010) // Pt1000 with 1k0 pullup #if (THERMISTORHEATER_0 == 1010) || (THERMISTORHEATER_1 == 1010) || (THERMISTORHEATER_2 == 1010) || (THERMISTORBED == 1010) // Pt1000 with 1k0 pullup

View file

@ -336,7 +336,7 @@ THERMISTORS SETTINGS
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) #if defined(E3D_PT100_EXTRUDER_WITH_AMP)
#define TEMP_SENSOR_0 247 #define TEMP_SENSOR_0 247
#elif defined(E3D_PT100_EXTRUDER_NO_AMP) #elif defined(E3D_PT100_EXTRUDER_NO_AMP)
#define TEMP_SENSOR_0 147 #define TEMP_SENSOR_0 148
#else #else
#define TEMP_SENSOR_0 5 #define TEMP_SENSOR_0 5
#endif #endif
@ -345,7 +345,7 @@ THERMISTORS SETTINGS
#if defined(E3D_PT100_BED_WITH_AMP) #if defined(E3D_PT100_BED_WITH_AMP)
#define TEMP_SENSOR_BED 247 #define TEMP_SENSOR_BED 247
#elif defined(E3D_PT100_BED_NO_AMP) #elif defined(E3D_PT100_BED_NO_AMP)
#define TEMP_SENSOR_BED 147 #define TEMP_SENSOR_BED 148
#else #else
#define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_BED 1
#endif #endif

View file

@ -329,14 +329,14 @@ THERMISTORS SETTINGS
// 1047 is Pt1000 with 4k7 pullup // 1047 is Pt1000 with 4k7 pullup
// 1010 is Pt1000 with 1k pullup (non standard) // 1010 is Pt1000 with 1k pullup (non standard)
// 147 is Pt100 with 4k7 pullup // 147 is Pt100 with 4k7 pullup
// 148 is Pt100 with 4k7 pullup and no PT100 Amplifier (in case type 147 doesn't work) // 148 is E3D Pt100 with 4k7 pullup and no PT100 Amplifier on a MiniRambo 1.3a
// 247 is Pt100 with 4k7 pullup and PT100 Amplifier // 247 is Pt100 with 4k7 pullup and PT100 Amplifier
// 110 is Pt100 with 1k pullup (non standard) // 110 is Pt100 with 1k pullup (non standard)
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) #if defined(E3D_PT100_EXTRUDER_WITH_AMP)
#define TEMP_SENSOR_0 247 #define TEMP_SENSOR_0 247
#elif defined(E3D_PT100_EXTRUDER_NO_AMP) #elif defined(E3D_PT100_EXTRUDER_NO_AMP)
#define TEMP_SENSOR_0 147 #define TEMP_SENSOR_0 148
#else #else
#define TEMP_SENSOR_0 5 #define TEMP_SENSOR_0 5
#endif #endif
@ -345,7 +345,7 @@ THERMISTORS SETTINGS
#if defined(E3D_PT100_BED_WITH_AMP) #if defined(E3D_PT100_BED_WITH_AMP)
#define TEMP_SENSOR_BED 247 #define TEMP_SENSOR_BED 247
#elif defined(E3D_PT100_BED_NO_AMP) #elif defined(E3D_PT100_BED_NO_AMP)
#define TEMP_SENSOR_BED 147 #define TEMP_SENSOR_BED 148
#else #else
#define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_BED 1
#endif #endif