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 PtB -5.775E-7
#define PtC -4.183E-12
#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 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(250,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
#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 = {
// More raw data values avaliable via http://www.micropik.com/PDF/pt100.pdf
// This information is taken from http://shop.prusa3d.com/forum/improvements-f14/mini-rambo-1-3-and-e3d-with-pt100-t700-s40.html#p20938
{292,0}, // first two entries are bogus, just to get the heater running
{356,50},
{469,100},
{531,150},
{590,200},
{649,250},
{708,300},
{763,350},
{819,400},
{872,450},
// These values have been calculated and tested over many days. See https://docs.google.com/spreadsheets/d/1MJXa6feEe0mGVCT2TrBwLxVOMoLDkJlvfQ4JXhAdV_E
// Values that are missing from the 5C gap are missing due to resolution limits.
{19.00000 * OVERSAMPLENR, 0},
{19.25000 * OVERSAMPLENR, 5},
{19.50000 * OVERSAMPLENR, 10},
{19.87500 * OVERSAMPLENR, 15},
{20.25000 * OVERSAMPLENR, 20},
{21.00000 * OVERSAMPLENR, 25},
{21.75000 * OVERSAMPLENR, 35},
{22.00000 * OVERSAMPLENR, 40},
{23.00000 * OVERSAMPLENR, 50}, // 55C is more commonly used.
{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
#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 = {
// 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.
{ 0 * OVERSAMPLENR, 0 },
{ 244 * OVERSAMPLENR, 1 },
{ 252 * OVERSAMPLENR, 10 },
{ 262 * OVERSAMPLENR, 20 },
{ 270 * OVERSAMPLENR, 30 },
{ 278 * OVERSAMPLENR, 40 },
{ 286 * OVERSAMPLENR, 50 },
{ 294 * OVERSAMPLENR, 60 },
{ 302 * OVERSAMPLENR, 70 },
{ 310 * OVERSAMPLENR, 80 },
{ 318 * OVERSAMPLENR, 90 },
{ 326 * OVERSAMPLENR, 100 },
{ 334 * OVERSAMPLENR, 110 },
{ 344 * OVERSAMPLENR, 120 },
{ 352 * OVERSAMPLENR, 130 },
{ 358 * OVERSAMPLENR, 140 },
{ 366 * OVERSAMPLENR, 150 },
{ 374 * OVERSAMPLENR, 160 },
{ 382 * OVERSAMPLENR, 170 },
{ 390 * OVERSAMPLENR, 180 },
{ 398 * OVERSAMPLENR, 190 },
{ 406 * OVERSAMPLENR, 200 },
{ 414 * OVERSAMPLENR, 210 },
{ 422 * OVERSAMPLENR, 220 },
{ 430 * OVERSAMPLENR, 230 },
{ 436 * OVERSAMPLENR, 240 },
{ 444 * OVERSAMPLENR, 250 },
{ 452 * OVERSAMPLENR, 260 },
{ 458 * OVERSAMPLENR, 270 },
{ 466 * OVERSAMPLENR, 280 },
{ 474 * OVERSAMPLENR, 290 },
{ 480 * OVERSAMPLENR, 300 },
{ 488 * OVERSAMPLENR, 310 },
{ 496 * OVERSAMPLENR, 320 },
{ 504 * OVERSAMPLENR, 330 },
{ 510 * OVERSAMPLENR, 340 },
{ 518 * OVERSAMPLENR, 350 },
{ 524 * OVERSAMPLENR, 360 },
{ 532 * OVERSAMPLENR, 370 },
{ 538 * OVERSAMPLENR, 380 },
{ 546 * OVERSAMPLENR, 390 },
{ 554 * OVERSAMPLENR, 400 },
{ 622 * OVERSAMPLENR, 500 },
{ 688 * OVERSAMPLENR, 600 },
{ 749 * OVERSAMPLENR, 700 },
{ 809 * OVERSAMPLENR, 800 },
{ 865 * OVERSAMPLENR, 900 },
{ 919 * OVERSAMPLENR, 1000 },
{ 969 * OVERSAMPLENR, 1100 },
{ 0 * OVERSAMPLENR, 0},
{241 * OVERSAMPLENR, 1},
{249 * OVERSAMPLENR, 10},
{259 * OVERSAMPLENR, 20},
{267 * OVERSAMPLENR, 30},
{275 * OVERSAMPLENR, 40},
{283 * OVERSAMPLENR, 50},
{291 * OVERSAMPLENR, 60},
{299 * OVERSAMPLENR, 70},
{307 * OVERSAMPLENR, 80},
{315 * OVERSAMPLENR, 90},
{323 * OVERSAMPLENR, 100},
{331 * OVERSAMPLENR, 110},
{340 * OVERSAMPLENR, 120},
{348 * OVERSAMPLENR, 130},
{354 * OVERSAMPLENR, 140},
{362 * OVERSAMPLENR, 150},
{370 * OVERSAMPLENR, 160},
{378 * OVERSAMPLENR, 170},
{386 * OVERSAMPLENR, 180},
{394 * OVERSAMPLENR, 190},
{402 * OVERSAMPLENR, 200},
{410 * OVERSAMPLENR, 210},
{418 * OVERSAMPLENR, 220},
{426 * OVERSAMPLENR, 230},
{432 * OVERSAMPLENR, 240},
{440 * OVERSAMPLENR, 250},
{448 * OVERSAMPLENR, 260},
{454 * OVERSAMPLENR, 270},
{462 * OVERSAMPLENR, 280},
{469 * OVERSAMPLENR, 290},
{475 * OVERSAMPLENR, 300},
{483 * OVERSAMPLENR, 310},
{491 * OVERSAMPLENR, 320},
{499 * OVERSAMPLENR, 330},
{505 * OVERSAMPLENR, 340},
{513 * OVERSAMPLENR, 350},
{519 * OVERSAMPLENR, 360},
{527 * OVERSAMPLENR, 370},
{533 * OVERSAMPLENR, 380},
{541 * OVERSAMPLENR, 390},
{549 * OVERSAMPLENR, 400},
{616 * OVERSAMPLENR, 500},
{682 * OVERSAMPLENR, 600},
{741 * OVERSAMPLENR, 700},
{801 * OVERSAMPLENR, 800},
{856 * OVERSAMPLENR, 900},
{910 * OVERSAMPLENR, 1000},
{960 * OVERSAMPLENR, 1100},
};
#endif
#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)
#define TEMP_SENSOR_0 247
#elif defined(E3D_PT100_EXTRUDER_NO_AMP)
#define TEMP_SENSOR_0 147
#define TEMP_SENSOR_0 148
#else
#define TEMP_SENSOR_0 5
#endif
@ -345,7 +345,7 @@ THERMISTORS SETTINGS
#if defined(E3D_PT100_BED_WITH_AMP)
#define TEMP_SENSOR_BED 247
#elif defined(E3D_PT100_BED_NO_AMP)
#define TEMP_SENSOR_BED 147
#define TEMP_SENSOR_BED 148
#else
#define TEMP_SENSOR_BED 1
#endif

View File

@ -329,14 +329,14 @@ THERMISTORS SETTINGS
// 1047 is Pt1000 with 4k7 pullup
// 1010 is Pt1000 with 1k pullup (non standard)
// 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
// 110 is Pt100 with 1k pullup (non standard)
#if defined(E3D_PT100_EXTRUDER_WITH_AMP)
#define TEMP_SENSOR_0 247
#elif defined(E3D_PT100_EXTRUDER_NO_AMP)
#define TEMP_SENSOR_0 147
#define TEMP_SENSOR_0 148
#else
#define TEMP_SENSOR_0 5
#endif
@ -345,7 +345,7 @@ THERMISTORS SETTINGS
#if defined(E3D_PT100_BED_WITH_AMP)
#define TEMP_SENSOR_BED 247
#elif defined(E3D_PT100_BED_NO_AMP)
#define TEMP_SENSOR_BED 147
#define TEMP_SENSOR_BED 148
#else
#define TEMP_SENSOR_BED 1
#endif