My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

thermistortables.h 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. #ifndef THERMISTORTABLES_H_
  2. #define THERMISTORTABLES_H_
  3. #include <avr/pgmspace.h>
  4. #define OVERSAMPLENR 16
  5. #if (THERMISTORHEATER_0 == 1) || (THERMISTORHEATER_1 == 1) || (THERMISTORHEATER_2 == 1) || (THERMISTORBED == 1) //100k bed thermistor
  6. const short temptable_1[][2] PROGMEM = {
  7. { 23*OVERSAMPLENR , 300 },
  8. { 25*OVERSAMPLENR , 295 },
  9. { 27*OVERSAMPLENR , 290 },
  10. { 28*OVERSAMPLENR , 285 },
  11. { 31*OVERSAMPLENR , 280 },
  12. { 33*OVERSAMPLENR , 275 },
  13. { 35*OVERSAMPLENR , 270 },
  14. { 38*OVERSAMPLENR , 265 },
  15. { 41*OVERSAMPLENR , 260 },
  16. { 44*OVERSAMPLENR , 255 },
  17. { 48*OVERSAMPLENR , 250 },
  18. { 52*OVERSAMPLENR , 245 },
  19. { 56*OVERSAMPLENR , 240 },
  20. { 61*OVERSAMPLENR , 235 },
  21. { 66*OVERSAMPLENR , 230 },
  22. { 71*OVERSAMPLENR , 225 },
  23. { 78*OVERSAMPLENR , 220 },
  24. { 84*OVERSAMPLENR , 215 },
  25. { 92*OVERSAMPLENR , 210 },
  26. { 100*OVERSAMPLENR , 205 },
  27. { 109*OVERSAMPLENR , 200 },
  28. { 120*OVERSAMPLENR , 195 },
  29. { 131*OVERSAMPLENR , 190 },
  30. { 143*OVERSAMPLENR , 185 },
  31. { 156*OVERSAMPLENR , 180 },
  32. { 171*OVERSAMPLENR , 175 },
  33. { 187*OVERSAMPLENR , 170 },
  34. { 205*OVERSAMPLENR , 165 },
  35. { 224*OVERSAMPLENR , 160 },
  36. { 245*OVERSAMPLENR , 155 },
  37. { 268*OVERSAMPLENR , 150 },
  38. { 293*OVERSAMPLENR , 145 },
  39. { 320*OVERSAMPLENR , 140 },
  40. { 348*OVERSAMPLENR , 135 },
  41. { 379*OVERSAMPLENR , 130 },
  42. { 411*OVERSAMPLENR , 125 },
  43. { 445*OVERSAMPLENR , 120 },
  44. { 480*OVERSAMPLENR , 115 },
  45. { 516*OVERSAMPLENR , 110 },
  46. { 553*OVERSAMPLENR , 105 },
  47. { 591*OVERSAMPLENR , 100 },
  48. { 628*OVERSAMPLENR , 95 },
  49. { 665*OVERSAMPLENR , 90 },
  50. { 702*OVERSAMPLENR , 85 },
  51. { 737*OVERSAMPLENR , 80 },
  52. { 770*OVERSAMPLENR , 75 },
  53. { 801*OVERSAMPLENR , 70 },
  54. { 830*OVERSAMPLENR , 65 },
  55. { 857*OVERSAMPLENR , 60 },
  56. { 881*OVERSAMPLENR , 55 },
  57. { 903*OVERSAMPLENR , 50 },
  58. { 922*OVERSAMPLENR , 45 },
  59. { 939*OVERSAMPLENR , 40 },
  60. { 954*OVERSAMPLENR , 35 },
  61. { 966*OVERSAMPLENR , 30 },
  62. { 977*OVERSAMPLENR , 25 },
  63. { 985*OVERSAMPLENR , 20 },
  64. { 993*OVERSAMPLENR , 15 },
  65. { 999*OVERSAMPLENR , 10 },
  66. { 1004*OVERSAMPLENR , 5 },
  67. { 1008*OVERSAMPLENR , 0 } //safety
  68. };
  69. #endif
  70. #if (THERMISTORHEATER_0 == 2) || (THERMISTORHEATER_1 == 2) || (THERMISTORHEATER_2 == 2) || (THERMISTORBED == 2) //200k bed thermistor
  71. const short temptable_2[][2] PROGMEM = {
  72. {1*OVERSAMPLENR, 848},
  73. {54*OVERSAMPLENR, 275},
  74. {107*OVERSAMPLENR, 228},
  75. {160*OVERSAMPLENR, 202},
  76. {213*OVERSAMPLENR, 185},
  77. {266*OVERSAMPLENR, 171},
  78. {319*OVERSAMPLENR, 160},
  79. {372*OVERSAMPLENR, 150},
  80. {425*OVERSAMPLENR, 141},
  81. {478*OVERSAMPLENR, 133},
  82. {531*OVERSAMPLENR, 125},
  83. {584*OVERSAMPLENR, 118},
  84. {637*OVERSAMPLENR, 110},
  85. {690*OVERSAMPLENR, 103},
  86. {743*OVERSAMPLENR, 95},
  87. {796*OVERSAMPLENR, 86},
  88. {849*OVERSAMPLENR, 77},
  89. {902*OVERSAMPLENR, 65},
  90. {955*OVERSAMPLENR, 49},
  91. {1008*OVERSAMPLENR, 17},
  92. {1020*OVERSAMPLENR, 0} //safety
  93. };
  94. #endif
  95. #if (THERMISTORHEATER_0 == 3) || (THERMISTORHEATER_1 == 3) || (THERMISTORHEATER_2 == 3) || (THERMISTORBED == 3) //mendel-parts
  96. const short temptable_3[][2] PROGMEM = {
  97. {1*OVERSAMPLENR,864},
  98. {21*OVERSAMPLENR,300},
  99. {25*OVERSAMPLENR,290},
  100. {29*OVERSAMPLENR,280},
  101. {33*OVERSAMPLENR,270},
  102. {39*OVERSAMPLENR,260},
  103. {46*OVERSAMPLENR,250},
  104. {54*OVERSAMPLENR,240},
  105. {64*OVERSAMPLENR,230},
  106. {75*OVERSAMPLENR,220},
  107. {90*OVERSAMPLENR,210},
  108. {107*OVERSAMPLENR,200},
  109. {128*OVERSAMPLENR,190},
  110. {154*OVERSAMPLENR,180},
  111. {184*OVERSAMPLENR,170},
  112. {221*OVERSAMPLENR,160},
  113. {265*OVERSAMPLENR,150},
  114. {316*OVERSAMPLENR,140},
  115. {375*OVERSAMPLENR,130},
  116. {441*OVERSAMPLENR,120},
  117. {513*OVERSAMPLENR,110},
  118. {588*OVERSAMPLENR,100},
  119. {734*OVERSAMPLENR,80},
  120. {856*OVERSAMPLENR,60},
  121. {938*OVERSAMPLENR,40},
  122. {986*OVERSAMPLENR,20},
  123. {1008*OVERSAMPLENR,0},
  124. {1018*OVERSAMPLENR,-20}
  125. };
  126. #endif
  127. #if (THERMISTORHEATER_0 == 4) || (THERMISTORHEATER_1 == 4) || (THERMISTORHEATER_2 == 4) || (THERMISTORBED == 4) //10k thermistor
  128. const short temptable_4[][2] PROGMEM = {
  129. {1*OVERSAMPLENR, 430},
  130. {54*OVERSAMPLENR, 137},
  131. {107*OVERSAMPLENR, 107},
  132. {160*OVERSAMPLENR, 91},
  133. {213*OVERSAMPLENR, 80},
  134. {266*OVERSAMPLENR, 71},
  135. {319*OVERSAMPLENR, 64},
  136. {372*OVERSAMPLENR, 57},
  137. {425*OVERSAMPLENR, 51},
  138. {478*OVERSAMPLENR, 46},
  139. {531*OVERSAMPLENR, 41},
  140. {584*OVERSAMPLENR, 35},
  141. {637*OVERSAMPLENR, 30},
  142. {690*OVERSAMPLENR, 25},
  143. {743*OVERSAMPLENR, 20},
  144. {796*OVERSAMPLENR, 14},
  145. {849*OVERSAMPLENR, 7},
  146. {902*OVERSAMPLENR, 0},
  147. {955*OVERSAMPLENR, -11},
  148. {1008*OVERSAMPLENR, -35}
  149. };
  150. #endif
  151. #if (THERMISTORHEATER_0 == 5) || (THERMISTORHEATER_1 == 5) || (THERMISTORHEATER_2 == 5) || (THERMISTORBED == 5) //100k ParCan thermistor (104GT-2)
  152. const short temptable_5[][2] PROGMEM = {
  153. {1*OVERSAMPLENR, 713},
  154. {18*OVERSAMPLENR, 316},
  155. {35*OVERSAMPLENR, 266},
  156. {52*OVERSAMPLENR, 239},
  157. {69*OVERSAMPLENR, 221},
  158. {86*OVERSAMPLENR, 208},
  159. {103*OVERSAMPLENR, 197},
  160. {120*OVERSAMPLENR, 188},
  161. {137*OVERSAMPLENR, 181},
  162. {154*OVERSAMPLENR, 174},
  163. {171*OVERSAMPLENR, 169},
  164. {188*OVERSAMPLENR, 163},
  165. {205*OVERSAMPLENR, 159},
  166. {222*OVERSAMPLENR, 154},
  167. {239*OVERSAMPLENR, 150},
  168. {256*OVERSAMPLENR, 147},
  169. {273*OVERSAMPLENR, 143},
  170. {290*OVERSAMPLENR, 140},
  171. {307*OVERSAMPLENR, 136},
  172. {324*OVERSAMPLENR, 133},
  173. {341*OVERSAMPLENR, 130},
  174. {358*OVERSAMPLENR, 128},
  175. {375*OVERSAMPLENR, 125},
  176. {392*OVERSAMPLENR, 122},
  177. {409*OVERSAMPLENR, 120},
  178. {426*OVERSAMPLENR, 117},
  179. {443*OVERSAMPLENR, 115},
  180. {460*OVERSAMPLENR, 112},
  181. {477*OVERSAMPLENR, 110},
  182. {494*OVERSAMPLENR, 108},
  183. {511*OVERSAMPLENR, 106},
  184. {528*OVERSAMPLENR, 103},
  185. {545*OVERSAMPLENR, 101},
  186. {562*OVERSAMPLENR, 99},
  187. {579*OVERSAMPLENR, 97},
  188. {596*OVERSAMPLENR, 95},
  189. {613*OVERSAMPLENR, 92},
  190. {630*OVERSAMPLENR, 90},
  191. {647*OVERSAMPLENR, 88},
  192. {664*OVERSAMPLENR, 86},
  193. {681*OVERSAMPLENR, 84},
  194. {698*OVERSAMPLENR, 81},
  195. {715*OVERSAMPLENR, 79},
  196. {732*OVERSAMPLENR, 77},
  197. {749*OVERSAMPLENR, 75},
  198. {766*OVERSAMPLENR, 72},
  199. {783*OVERSAMPLENR, 70},
  200. {800*OVERSAMPLENR, 67},
  201. {817*OVERSAMPLENR, 64},
  202. {834*OVERSAMPLENR, 61},
  203. {851*OVERSAMPLENR, 58},
  204. {868*OVERSAMPLENR, 55},
  205. {885*OVERSAMPLENR, 52},
  206. {902*OVERSAMPLENR, 48},
  207. {919*OVERSAMPLENR, 44},
  208. {936*OVERSAMPLENR, 40},
  209. {953*OVERSAMPLENR, 34},
  210. {970*OVERSAMPLENR, 28},
  211. {987*OVERSAMPLENR, 20},
  212. {1004*OVERSAMPLENR, 8},
  213. {1021*OVERSAMPLENR, 0}
  214. };
  215. #endif
  216. #if (THERMISTORHEATER_0 == 6) || (THERMISTORHEATER_1 == 6) || (THERMISTORHEATER_2 == 6) || (THERMISTORBED == 6) // 100k Epcos thermistor
  217. const short temptable_6[][2] PROGMEM = {
  218. {28*OVERSAMPLENR, 250},
  219. {31*OVERSAMPLENR, 245},
  220. {35*OVERSAMPLENR, 240},
  221. {39*OVERSAMPLENR, 235},
  222. {42*OVERSAMPLENR, 230},
  223. {44*OVERSAMPLENR, 225},
  224. {49*OVERSAMPLENR, 220},
  225. {53*OVERSAMPLENR, 215},
  226. {62*OVERSAMPLENR, 210},
  227. {73*OVERSAMPLENR, 205},
  228. {72*OVERSAMPLENR, 200},
  229. {94*OVERSAMPLENR, 190},
  230. {102*OVERSAMPLENR, 185},
  231. {116*OVERSAMPLENR, 170},
  232. {143*OVERSAMPLENR, 160},
  233. {183*OVERSAMPLENR, 150},
  234. {223*OVERSAMPLENR, 140},
  235. {270*OVERSAMPLENR, 130},
  236. {318*OVERSAMPLENR, 120},
  237. {383*OVERSAMPLENR, 110},
  238. {413*OVERSAMPLENR, 105},
  239. {439*OVERSAMPLENR, 100},
  240. {484*OVERSAMPLENR, 95},
  241. {513*OVERSAMPLENR, 90},
  242. {607*OVERSAMPLENR, 80},
  243. {664*OVERSAMPLENR, 70},
  244. {781*OVERSAMPLENR, 60},
  245. {810*OVERSAMPLENR, 55},
  246. {849*OVERSAMPLENR, 50},
  247. {914*OVERSAMPLENR, 45},
  248. {914*OVERSAMPLENR, 40},
  249. {935*OVERSAMPLENR, 35},
  250. {954*OVERSAMPLENR, 30},
  251. {970*OVERSAMPLENR, 25},
  252. {978*OVERSAMPLENR, 22},
  253. {1008*OVERSAMPLENR, 3}
  254. };
  255. #endif
  256. #if (THERMISTORHEATER_0 == 7) || (THERMISTORHEATER_1 == 7) || (THERMISTORHEATER_2 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01
  257. const short temptable_7[][2] PROGMEM = {
  258. {46*OVERSAMPLENR, 270},
  259. {50*OVERSAMPLENR, 265},
  260. {54*OVERSAMPLENR, 260},
  261. {58*OVERSAMPLENR, 255},
  262. {62*OVERSAMPLENR, 250},
  263. {67*OVERSAMPLENR, 245},
  264. {72*OVERSAMPLENR, 240},
  265. {79*OVERSAMPLENR, 235},
  266. {85*OVERSAMPLENR, 230},
  267. {91*OVERSAMPLENR, 225},
  268. {99*OVERSAMPLENR, 220},
  269. {107*OVERSAMPLENR, 215},
  270. {116*OVERSAMPLENR, 210},
  271. {126*OVERSAMPLENR, 205},
  272. {136*OVERSAMPLENR, 200},
  273. {149*OVERSAMPLENR, 195},
  274. {160*OVERSAMPLENR, 190},
  275. {175*OVERSAMPLENR, 185},
  276. {191*OVERSAMPLENR, 180},
  277. {209*OVERSAMPLENR, 175},
  278. {224*OVERSAMPLENR, 170},
  279. {246*OVERSAMPLENR, 165},
  280. {267*OVERSAMPLENR, 160},
  281. {293*OVERSAMPLENR, 155},
  282. {316*OVERSAMPLENR, 150},
  283. {340*OVERSAMPLENR, 145},
  284. {364*OVERSAMPLENR, 140},
  285. {396*OVERSAMPLENR, 135},
  286. {425*OVERSAMPLENR, 130},
  287. {460*OVERSAMPLENR, 125},
  288. {489*OVERSAMPLENR, 120},
  289. {526*OVERSAMPLENR, 115},
  290. {558*OVERSAMPLENR, 110},
  291. {591*OVERSAMPLENR, 105},
  292. {628*OVERSAMPLENR, 100},
  293. {660*OVERSAMPLENR, 95},
  294. {696*OVERSAMPLENR, 90},
  295. {733*OVERSAMPLENR, 85},
  296. {761*OVERSAMPLENR, 80},
  297. {794*OVERSAMPLENR, 75},
  298. {819*OVERSAMPLENR, 70},
  299. {847*OVERSAMPLENR, 65},
  300. {870*OVERSAMPLENR, 60},
  301. {892*OVERSAMPLENR, 55},
  302. {911*OVERSAMPLENR, 50},
  303. {929*OVERSAMPLENR, 45},
  304. {944*OVERSAMPLENR, 40},
  305. {959*OVERSAMPLENR, 35},
  306. {971*OVERSAMPLENR, 30},
  307. {981*OVERSAMPLENR, 25},
  308. {989*OVERSAMPLENR, 20},
  309. {994*OVERSAMPLENR, 15},
  310. {1001*OVERSAMPLENR, 10},
  311. {1005*OVERSAMPLENR, 5}
  312. };
  313. #endif
  314. #define _TT_NAME(_N) temptable_ ## _N
  315. #define TT_NAME(_N) _TT_NAME(_N)
  316. #ifdef THERMISTORHEATER_0
  317. #define heater_0_temptable TT_NAME(THERMISTORHEATER_0)
  318. #define heater_0_temptable_len (sizeof(heater_0_temptable)/sizeof(*heater_0_temptable))
  319. #else
  320. #ifdef HEATER_0_USES_THERMISTOR
  321. #error No heater 0 thermistor table specified
  322. #else // HEATER_0_USES_THERMISTOR
  323. #define heater_0_temptable 0
  324. #define heater_0_temptable_len 0
  325. #endif // HEATER_0_USES_THERMISTOR
  326. #endif
  327. #ifdef THERMISTORHEATER_1
  328. #define heater_1_temptable TT_NAME(THERMISTORHEATER_1)
  329. #define heater_1_temptable_len (sizeof(heater_1_temptable)/sizeof(*heater_1_temptable))
  330. #else
  331. #ifdef HEATER_1_USES_THERMISTOR
  332. #error No heater 1 thermistor table specified
  333. #else // HEATER_1_USES_THERMISTOR
  334. #define heater_1_temptable 0
  335. #define heater_1_temptable_len 0
  336. #endif // HEATER_1_USES_THERMISTOR
  337. #endif
  338. #ifdef THERMISTORHEATER_2
  339. #define heater_2_temptable TT_NAME(THERMISTORHEATER_2)
  340. #define heater_2_temptable_len (sizeof(heater_2_temptable)/sizeof(*heater_2_temptable))
  341. #else
  342. #ifdef HEATER_2_USES_THERMISTOR
  343. #error No heater 2 thermistor table specified
  344. #else // HEATER_2_USES_THERMISTOR
  345. #define heater_2_temptable 0
  346. #define heater_2_temptable_len 0
  347. #endif // HEATER_2_USES_THERMISTOR
  348. #endif
  349. #ifdef THERMISTORBED
  350. #define bedtemptable TT_NAME(THERMISTORBED)
  351. #define bedtemptable_len (sizeof(bedtemptable)/sizeof(*bedtemptable))
  352. #else
  353. #ifdef BED_USES_THERMISTOR
  354. #error No bed thermistor table specified
  355. #endif // BED_USES_THERMISTOR
  356. #endif
  357. #endif //THERMISTORTABLES_H_