My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

thermistortables.h 13KB

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