|
|
|
@ -857,6 +857,70 @@ const short temptable_60[][2] PROGMEM = {
|
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// Pt1000 and Pt100 handling
|
|
|
|
|
//
|
|
|
|
|
// Rt=R0*(1+a*T+b*T*T) [for T>0]
|
|
|
|
|
// a=3.9083E-3, b=-5.775E-7
|
|
|
|
|
|
|
|
|
|
#define PtA 3.9083E-3
|
|
|
|
|
#define PtB -5.775E-7
|
|
|
|
|
#define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(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 },
|
|
|
|
|
|
|
|
|
|
#if (THERMISTORHEATER_0 == 110) || (THERMISTORHEATER_1 == 110) || (THERMISTORHEATER_2 == 110) || (THERMISTORBED == 110) // Pt100 with 1k0 pullup
|
|
|
|
|
const short temptable_110[][2] PROGMEM = {
|
|
|
|
|
// only few values are needed as the curve is very flat
|
|
|
|
|
PtLine(0,100,1000)
|
|
|
|
|
PtLine(50,100,1000)
|
|
|
|
|
PtLine(100,100,1000)
|
|
|
|
|
PtLine(150,100,1000)
|
|
|
|
|
PtLine(200,100,1000)
|
|
|
|
|
PtLine(250,100,1000)
|
|
|
|
|
PtLine(300,100,1000)
|
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
#if (THERMISTORHEATER_0 == 147) || (THERMISTORHEATER_1 == 147) || (THERMISTORHEATER_2 == 147) || (THERMISTORBED == 147) // Pt100 with 4k7 pullup
|
|
|
|
|
const short temptable_147[][2] PROGMEM = {
|
|
|
|
|
// only few values are needed as the curve is very flat
|
|
|
|
|
PtLine(0,100,4700)
|
|
|
|
|
PtLine(50,100,4700)
|
|
|
|
|
PtLine(100,100,4700)
|
|
|
|
|
PtLine(150,100,4700)
|
|
|
|
|
PtLine(200,100,4700)
|
|
|
|
|
PtLine(250,100,4700)
|
|
|
|
|
PtLine(300,100,4700)
|
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
#if (THERMISTORHEATER_0 == 1010) || (THERMISTORHEATER_1 == 1010) || (THERMISTORHEATER_2 == 1010) || (THERMISTORBED == 1010) // Pt1000 with 1k0 pullup
|
|
|
|
|
const short temptable_1010[][2] PROGMEM = {
|
|
|
|
|
PtLine(0,1000,1000)
|
|
|
|
|
PtLine(25,1000,1000)
|
|
|
|
|
PtLine(50,1000,1000)
|
|
|
|
|
PtLine(75,1000,1000)
|
|
|
|
|
PtLine(100,1000,1000)
|
|
|
|
|
PtLine(125,1000,1000)
|
|
|
|
|
PtLine(150,1000,1000)
|
|
|
|
|
PtLine(175,1000,1000)
|
|
|
|
|
PtLine(200,1000,1000)
|
|
|
|
|
PtLine(225,1000,1000)
|
|
|
|
|
PtLine(250,1000,1000)
|
|
|
|
|
PtLine(275,1000,1000)
|
|
|
|
|
PtLine(300,1000,1000)
|
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
#if (THERMISTORHEATER_0 == 1047) || (THERMISTORHEATER_1 == 1047) || (THERMISTORHEATER_2 == 1047) || (THERMISTORBED == 1047) // Pt1000 with 4k7 pullup
|
|
|
|
|
const short temptable_1047[][2] PROGMEM = {
|
|
|
|
|
// only few values are needed as the curve is very flat
|
|
|
|
|
PtLine(0,1000,4700)
|
|
|
|
|
PtLine(50,1000,4700)
|
|
|
|
|
PtLine(100,1000,4700)
|
|
|
|
|
PtLine(150,1000,4700)
|
|
|
|
|
PtLine(200,1000,4700)
|
|
|
|
|
PtLine(250,1000,4700)
|
|
|
|
|
PtLine(300,1000,4700)
|
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#define _TT_NAME(_N) temptable_ ## _N
|
|
|
|
|
#define TT_NAME(_N) _TT_NAME(_N)
|
|
|
|
|