|
@@ -857,6 +857,70 @@ const short temptable_60[][2] PROGMEM = {
|
857
|
857
|
};
|
858
|
858
|
#endif
|
859
|
859
|
|
|
860
|
+// Pt1000 and Pt100 handling
|
|
861
|
+//
|
|
862
|
+// Rt=R0*(1+a*T+b*T*T) [for T>0]
|
|
863
|
+// a=3.9083E-3, b=-5.775E-7
|
|
864
|
+
|
|
865
|
+#define PtA 3.9083E-3
|
|
866
|
+#define PtB -5.775E-7
|
|
867
|
+#define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T)))
|
|
868
|
+#define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1))
|
|
869
|
+#define PtLine(T,R0,Rup) { PtAdVal(T,R0,Rup)*OVERSAMPLENR, T },
|
|
870
|
+
|
|
871
|
+#if (THERMISTORHEATER_0 == 110) || (THERMISTORHEATER_1 == 110) || (THERMISTORHEATER_2 == 110) || (THERMISTORBED == 110) // Pt100 with 1k0 pullup
|
|
872
|
+const short temptable_110[][2] PROGMEM = {
|
|
873
|
+// only few values are needed as the curve is very flat
|
|
874
|
+ PtLine(0,100,1000)
|
|
875
|
+ PtLine(50,100,1000)
|
|
876
|
+ PtLine(100,100,1000)
|
|
877
|
+ PtLine(150,100,1000)
|
|
878
|
+ PtLine(200,100,1000)
|
|
879
|
+ PtLine(250,100,1000)
|
|
880
|
+ PtLine(300,100,1000)
|
|
881
|
+};
|
|
882
|
+#endif
|
|
883
|
+#if (THERMISTORHEATER_0 == 147) || (THERMISTORHEATER_1 == 147) || (THERMISTORHEATER_2 == 147) || (THERMISTORBED == 147) // Pt100 with 4k7 pullup
|
|
884
|
+const short temptable_147[][2] PROGMEM = {
|
|
885
|
+// only few values are needed as the curve is very flat
|
|
886
|
+ PtLine(0,100,4700)
|
|
887
|
+ PtLine(50,100,4700)
|
|
888
|
+ PtLine(100,100,4700)
|
|
889
|
+ PtLine(150,100,4700)
|
|
890
|
+ PtLine(200,100,4700)
|
|
891
|
+ PtLine(250,100,4700)
|
|
892
|
+ PtLine(300,100,4700)
|
|
893
|
+};
|
|
894
|
+#endif
|
|
895
|
+#if (THERMISTORHEATER_0 == 1010) || (THERMISTORHEATER_1 == 1010) || (THERMISTORHEATER_2 == 1010) || (THERMISTORBED == 1010) // Pt1000 with 1k0 pullup
|
|
896
|
+const short temptable_1010[][2] PROGMEM = {
|
|
897
|
+ PtLine(0,1000,1000)
|
|
898
|
+ PtLine(25,1000,1000)
|
|
899
|
+ PtLine(50,1000,1000)
|
|
900
|
+ PtLine(75,1000,1000)
|
|
901
|
+ PtLine(100,1000,1000)
|
|
902
|
+ PtLine(125,1000,1000)
|
|
903
|
+ PtLine(150,1000,1000)
|
|
904
|
+ PtLine(175,1000,1000)
|
|
905
|
+ PtLine(200,1000,1000)
|
|
906
|
+ PtLine(225,1000,1000)
|
|
907
|
+ PtLine(250,1000,1000)
|
|
908
|
+ PtLine(275,1000,1000)
|
|
909
|
+ PtLine(300,1000,1000)
|
|
910
|
+};
|
|
911
|
+#endif
|
|
912
|
+#if (THERMISTORHEATER_0 == 1047) || (THERMISTORHEATER_1 == 1047) || (THERMISTORHEATER_2 == 1047) || (THERMISTORBED == 1047) // Pt1000 with 4k7 pullup
|
|
913
|
+const short temptable_1047[][2] PROGMEM = {
|
|
914
|
+// only few values are needed as the curve is very flat
|
|
915
|
+ PtLine(0,1000,4700)
|
|
916
|
+ PtLine(50,1000,4700)
|
|
917
|
+ PtLine(100,1000,4700)
|
|
918
|
+ PtLine(150,1000,4700)
|
|
919
|
+ PtLine(200,1000,4700)
|
|
920
|
+ PtLine(250,1000,4700)
|
|
921
|
+ PtLine(300,1000,4700)
|
|
922
|
+};
|
|
923
|
+#endif
|
860
|
924
|
|
861
|
925
|
#define _TT_NAME(_N) temptable_ ## _N
|
862
|
926
|
#define TT_NAME(_N) _TT_NAME(_N)
|