My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

thermistortables.h 44KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #ifndef THERMISTORTABLES_H_
  23. #define THERMISTORTABLES_H_
  24. #include "Marlin.h"
  25. #include "macros.h"
  26. #define OVERSAMPLENR 16
  27. #if (THERMISTORHEATER_0 == 1) || (THERMISTORHEATER_1 == 1) || (THERMISTORHEATER_2 == 1) || (THERMISTORHEATER_3 == 1) || (THERMISTORBED == 1) //100k bed thermistor
  28. const short temptable_1[][2] PROGMEM = {
  29. { 23 * OVERSAMPLENR, 300 },
  30. { 25 * OVERSAMPLENR, 295 },
  31. { 27 * OVERSAMPLENR, 290 },
  32. { 28 * OVERSAMPLENR, 285 },
  33. { 31 * OVERSAMPLENR, 280 },
  34. { 33 * OVERSAMPLENR, 275 },
  35. { 35 * OVERSAMPLENR, 270 },
  36. { 38 * OVERSAMPLENR, 265 },
  37. { 41 * OVERSAMPLENR, 260 },
  38. { 44 * OVERSAMPLENR, 255 },
  39. { 48 * OVERSAMPLENR, 250 },
  40. { 52 * OVERSAMPLENR, 245 },
  41. { 56 * OVERSAMPLENR, 240 },
  42. { 61 * OVERSAMPLENR, 235 },
  43. { 66 * OVERSAMPLENR, 230 },
  44. { 71 * OVERSAMPLENR, 225 },
  45. { 78 * OVERSAMPLENR, 220 },
  46. { 84 * OVERSAMPLENR, 215 },
  47. { 92 * OVERSAMPLENR, 210 },
  48. { 100 * OVERSAMPLENR, 205 },
  49. { 109 * OVERSAMPLENR, 200 },
  50. { 120 * OVERSAMPLENR, 195 },
  51. { 131 * OVERSAMPLENR, 190 },
  52. { 143 * OVERSAMPLENR, 185 },
  53. { 156 * OVERSAMPLENR, 180 },
  54. { 171 * OVERSAMPLENR, 175 },
  55. { 187 * OVERSAMPLENR, 170 },
  56. { 205 * OVERSAMPLENR, 165 },
  57. { 224 * OVERSAMPLENR, 160 },
  58. { 245 * OVERSAMPLENR, 155 },
  59. { 268 * OVERSAMPLENR, 150 },
  60. { 293 * OVERSAMPLENR, 145 },
  61. { 320 * OVERSAMPLENR, 140 },
  62. { 348 * OVERSAMPLENR, 135 },
  63. { 379 * OVERSAMPLENR, 130 },
  64. { 411 * OVERSAMPLENR, 125 },
  65. { 445 * OVERSAMPLENR, 120 },
  66. { 480 * OVERSAMPLENR, 115 },
  67. { 516 * OVERSAMPLENR, 110 },
  68. { 553 * OVERSAMPLENR, 105 },
  69. { 591 * OVERSAMPLENR, 100 },
  70. { 628 * OVERSAMPLENR, 95 },
  71. { 665 * OVERSAMPLENR, 90 },
  72. { 702 * OVERSAMPLENR, 85 },
  73. { 737 * OVERSAMPLENR, 80 },
  74. { 770 * OVERSAMPLENR, 75 },
  75. { 801 * OVERSAMPLENR, 70 },
  76. { 830 * OVERSAMPLENR, 65 },
  77. { 857 * OVERSAMPLENR, 60 },
  78. { 881 * OVERSAMPLENR, 55 },
  79. { 903 * OVERSAMPLENR, 50 },
  80. { 922 * OVERSAMPLENR, 45 },
  81. { 939 * OVERSAMPLENR, 40 },
  82. { 954 * OVERSAMPLENR, 35 },
  83. { 966 * OVERSAMPLENR, 30 },
  84. { 977 * OVERSAMPLENR, 25 },
  85. { 985 * OVERSAMPLENR, 20 },
  86. { 993 * OVERSAMPLENR, 15 },
  87. { 999 * OVERSAMPLENR, 10 },
  88. { 1004 * OVERSAMPLENR, 5 },
  89. { 1008 * OVERSAMPLENR, 0 } // safety
  90. };
  91. #endif
  92. #if (THERMISTORHEATER_0 == 2) || (THERMISTORHEATER_1 == 2) || (THERMISTORHEATER_2 == 2) || (THERMISTORHEATER_3 == 2) || (THERMISTORBED == 2) //200k bed thermistor
  93. // 200k ATC Semitec 204GT-2
  94. // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
  95. // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance
  96. const short temptable_2[][2] PROGMEM = {
  97. { 1 * OVERSAMPLENR, 848 },
  98. { 30 * OVERSAMPLENR, 300 }, // top rating 300C
  99. { 34 * OVERSAMPLENR, 290 },
  100. { 39 * OVERSAMPLENR, 280 },
  101. { 46 * OVERSAMPLENR, 270 },
  102. { 53 * OVERSAMPLENR, 260 },
  103. { 63 * OVERSAMPLENR, 250 },
  104. { 74 * OVERSAMPLENR, 240 },
  105. { 87 * OVERSAMPLENR, 230 },
  106. { 104 * OVERSAMPLENR, 220 },
  107. { 124 * OVERSAMPLENR, 210 },
  108. { 148 * OVERSAMPLENR, 200 },
  109. { 176 * OVERSAMPLENR, 190 },
  110. { 211 * OVERSAMPLENR, 180 },
  111. { 252 * OVERSAMPLENR, 170 },
  112. { 301 * OVERSAMPLENR, 160 },
  113. { 357 * OVERSAMPLENR, 150 },
  114. { 420 * OVERSAMPLENR, 140 },
  115. { 489 * OVERSAMPLENR, 130 },
  116. { 562 * OVERSAMPLENR, 120 },
  117. { 636 * OVERSAMPLENR, 110 },
  118. { 708 * OVERSAMPLENR, 100 },
  119. { 775 * OVERSAMPLENR, 90 },
  120. { 835 * OVERSAMPLENR, 80 },
  121. { 884 * OVERSAMPLENR, 70 },
  122. { 924 * OVERSAMPLENR, 60 },
  123. { 955 * OVERSAMPLENR, 50 },
  124. { 977 * OVERSAMPLENR, 40 },
  125. { 993 * OVERSAMPLENR, 30 },
  126. { 1004 * OVERSAMPLENR, 20 },
  127. { 1012 * OVERSAMPLENR, 10 },
  128. { 1016 * OVERSAMPLENR, 0 }
  129. };
  130. #endif
  131. #if (THERMISTORHEATER_0 == 3) || (THERMISTORHEATER_1 == 3) || (THERMISTORHEATER_2 == 3) || (THERMISTORHEATER_3 == 3) || (THERMISTORBED == 3) //mendel-parts
  132. const short temptable_3[][2] PROGMEM = {
  133. { 1 * OVERSAMPLENR, 864 },
  134. { 21 * OVERSAMPLENR, 300 },
  135. { 25 * OVERSAMPLENR, 290 },
  136. { 29 * OVERSAMPLENR, 280 },
  137. { 33 * OVERSAMPLENR, 270 },
  138. { 39 * OVERSAMPLENR, 260 },
  139. { 46 * OVERSAMPLENR, 250 },
  140. { 54 * OVERSAMPLENR, 240 },
  141. { 64 * OVERSAMPLENR, 230 },
  142. { 75 * OVERSAMPLENR, 220 },
  143. { 90 * OVERSAMPLENR, 210 },
  144. { 107 * OVERSAMPLENR, 200 },
  145. { 128 * OVERSAMPLENR, 190 },
  146. { 154 * OVERSAMPLENR, 180 },
  147. { 184 * OVERSAMPLENR, 170 },
  148. { 221 * OVERSAMPLENR, 160 },
  149. { 265 * OVERSAMPLENR, 150 },
  150. { 316 * OVERSAMPLENR, 140 },
  151. { 375 * OVERSAMPLENR, 130 },
  152. { 441 * OVERSAMPLENR, 120 },
  153. { 513 * OVERSAMPLENR, 110 },
  154. { 588 * OVERSAMPLENR, 100 },
  155. { 734 * OVERSAMPLENR, 80 },
  156. { 856 * OVERSAMPLENR, 60 },
  157. { 938 * OVERSAMPLENR, 40 },
  158. { 986 * OVERSAMPLENR, 20 },
  159. { 1008 * OVERSAMPLENR, 0 },
  160. { 1018 * OVERSAMPLENR, -20 }
  161. };
  162. #endif
  163. #if (THERMISTORHEATER_0 == 4) || (THERMISTORHEATER_1 == 4) || (THERMISTORHEATER_2 == 4) || (THERMISTORHEATER_3 == 4) || (THERMISTORBED == 4) //10k thermistor
  164. const short temptable_4[][2] PROGMEM = {
  165. { 1 * OVERSAMPLENR, 430 },
  166. { 54 * OVERSAMPLENR, 137 },
  167. { 107 * OVERSAMPLENR, 107 },
  168. { 160 * OVERSAMPLENR, 91 },
  169. { 213 * OVERSAMPLENR, 80 },
  170. { 266 * OVERSAMPLENR, 71 },
  171. { 319 * OVERSAMPLENR, 64 },
  172. { 372 * OVERSAMPLENR, 57 },
  173. { 425 * OVERSAMPLENR, 51 },
  174. { 478 * OVERSAMPLENR, 46 },
  175. { 531 * OVERSAMPLENR, 41 },
  176. { 584 * OVERSAMPLENR, 35 },
  177. { 637 * OVERSAMPLENR, 30 },
  178. { 690 * OVERSAMPLENR, 25 },
  179. { 743 * OVERSAMPLENR, 20 },
  180. { 796 * OVERSAMPLENR, 14 },
  181. { 849 * OVERSAMPLENR, 7 },
  182. { 902 * OVERSAMPLENR, 0 },
  183. { 955 * OVERSAMPLENR, -11 },
  184. { 1008 * OVERSAMPLENR, -35 }
  185. };
  186. #endif
  187. #if (THERMISTORHEATER_0 == 5) || (THERMISTORHEATER_1 == 5) || (THERMISTORHEATER_2 == 5) || (THERMISTORHEATER_3 == 5) || (THERMISTORBED == 5) //100k ParCan thermistor (104GT-2)
  188. // ATC Semitec 104GT-2 (Used in ParCan)
  189. // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
  190. // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance
  191. const short temptable_5[][2] PROGMEM = {
  192. { 1 * OVERSAMPLENR, 713 },
  193. { 17 * OVERSAMPLENR, 300 }, // top rating 300C
  194. { 20 * OVERSAMPLENR, 290 },
  195. { 23 * OVERSAMPLENR, 280 },
  196. { 27 * OVERSAMPLENR, 270 },
  197. { 31 * OVERSAMPLENR, 260 },
  198. { 37 * OVERSAMPLENR, 250 },
  199. { 43 * OVERSAMPLENR, 240 },
  200. { 51 * OVERSAMPLENR, 230 },
  201. { 61 * OVERSAMPLENR, 220 },
  202. { 73 * OVERSAMPLENR, 210 },
  203. { 87 * OVERSAMPLENR, 200 },
  204. { 106 * OVERSAMPLENR, 190 },
  205. { 128 * OVERSAMPLENR, 180 },
  206. { 155 * OVERSAMPLENR, 170 },
  207. { 189 * OVERSAMPLENR, 160 },
  208. { 230 * OVERSAMPLENR, 150 },
  209. { 278 * OVERSAMPLENR, 140 },
  210. { 336 * OVERSAMPLENR, 130 },
  211. { 402 * OVERSAMPLENR, 120 },
  212. { 476 * OVERSAMPLENR, 110 },
  213. { 554 * OVERSAMPLENR, 100 },
  214. { 635 * OVERSAMPLENR, 90 },
  215. { 713 * OVERSAMPLENR, 80 },
  216. { 784 * OVERSAMPLENR, 70 },
  217. { 846 * OVERSAMPLENR, 60 },
  218. { 897 * OVERSAMPLENR, 50 },
  219. { 937 * OVERSAMPLENR, 40 },
  220. { 966 * OVERSAMPLENR, 30 },
  221. { 986 * OVERSAMPLENR, 20 },
  222. { 1000 * OVERSAMPLENR, 10 },
  223. { 1010 * OVERSAMPLENR, 0 }
  224. };
  225. #endif
  226. #if (THERMISTORHEATER_0 == 6) || (THERMISTORHEATER_1 == 6) || (THERMISTORHEATER_2 == 6) || (THERMISTORHEATER_3 == 6) || (THERMISTORBED == 6) // 100k Epcos thermistor
  227. const short temptable_6[][2] PROGMEM = {
  228. { 1 * OVERSAMPLENR, 350 },
  229. { 28 * OVERSAMPLENR, 250 }, // top rating 250C
  230. { 31 * OVERSAMPLENR, 245 },
  231. { 35 * OVERSAMPLENR, 240 },
  232. { 39 * OVERSAMPLENR, 235 },
  233. { 42 * OVERSAMPLENR, 230 },
  234. { 44 * OVERSAMPLENR, 225 },
  235. { 49 * OVERSAMPLENR, 220 },
  236. { 53 * OVERSAMPLENR, 215 },
  237. { 62 * OVERSAMPLENR, 210 },
  238. { 71 * OVERSAMPLENR, 205 }, // fitted graphically
  239. { 78 * OVERSAMPLENR, 200 }, // fitted graphically
  240. { 94 * OVERSAMPLENR, 190 },
  241. { 102 * OVERSAMPLENR, 185 },
  242. { 116 * OVERSAMPLENR, 170 },
  243. { 143 * OVERSAMPLENR, 160 },
  244. { 183 * OVERSAMPLENR, 150 },
  245. { 223 * OVERSAMPLENR, 140 },
  246. { 270 * OVERSAMPLENR, 130 },
  247. { 318 * OVERSAMPLENR, 120 },
  248. { 383 * OVERSAMPLENR, 110 },
  249. { 413 * OVERSAMPLENR, 105 },
  250. { 439 * OVERSAMPLENR, 100 },
  251. { 484 * OVERSAMPLENR, 95 },
  252. { 513 * OVERSAMPLENR, 90 },
  253. { 607 * OVERSAMPLENR, 80 },
  254. { 664 * OVERSAMPLENR, 70 },
  255. { 781 * OVERSAMPLENR, 60 },
  256. { 810 * OVERSAMPLENR, 55 },
  257. { 849 * OVERSAMPLENR, 50 },
  258. { 914 * OVERSAMPLENR, 45 },
  259. { 914 * OVERSAMPLENR, 40 },
  260. { 935 * OVERSAMPLENR, 35 },
  261. { 954 * OVERSAMPLENR, 30 },
  262. { 970 * OVERSAMPLENR, 25 },
  263. { 978 * OVERSAMPLENR, 22 },
  264. { 1008 * OVERSAMPLENR, 3 },
  265. { 1023 * OVERSAMPLENR, 0 } // to allow internal 0 degrees C
  266. };
  267. #endif
  268. #if (THERMISTORHEATER_0 == 7) || (THERMISTORHEATER_1 == 7) || (THERMISTORHEATER_2 == 7) || (THERMISTORHEATER_3 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01
  269. const short temptable_7[][2] PROGMEM = {
  270. { 1 * OVERSAMPLENR, 941 },
  271. { 19 * OVERSAMPLENR, 362 },
  272. { 37 * OVERSAMPLENR, 299 }, // top rating 300C
  273. { 55 * OVERSAMPLENR, 266 },
  274. { 73 * OVERSAMPLENR, 245 },
  275. { 91 * OVERSAMPLENR, 229 },
  276. { 109 * OVERSAMPLENR, 216 },
  277. { 127 * OVERSAMPLENR, 206 },
  278. { 145 * OVERSAMPLENR, 197 },
  279. { 163 * OVERSAMPLENR, 190 },
  280. { 181 * OVERSAMPLENR, 183 },
  281. { 199 * OVERSAMPLENR, 177 },
  282. { 217 * OVERSAMPLENR, 171 },
  283. { 235 * OVERSAMPLENR, 166 },
  284. { 253 * OVERSAMPLENR, 162 },
  285. { 271 * OVERSAMPLENR, 157 },
  286. { 289 * OVERSAMPLENR, 153 },
  287. { 307 * OVERSAMPLENR, 149 },
  288. { 325 * OVERSAMPLENR, 146 },
  289. { 343 * OVERSAMPLENR, 142 },
  290. { 361 * OVERSAMPLENR, 139 },
  291. { 379 * OVERSAMPLENR, 135 },
  292. { 397 * OVERSAMPLENR, 132 },
  293. { 415 * OVERSAMPLENR, 129 },
  294. { 433 * OVERSAMPLENR, 126 },
  295. { 451 * OVERSAMPLENR, 123 },
  296. { 469 * OVERSAMPLENR, 121 },
  297. { 487 * OVERSAMPLENR, 118 },
  298. { 505 * OVERSAMPLENR, 115 },
  299. { 523 * OVERSAMPLENR, 112 },
  300. { 541 * OVERSAMPLENR, 110 },
  301. { 559 * OVERSAMPLENR, 107 },
  302. { 577 * OVERSAMPLENR, 105 },
  303. { 595 * OVERSAMPLENR, 102 },
  304. { 613 * OVERSAMPLENR, 99 },
  305. { 631 * OVERSAMPLENR, 97 },
  306. { 649 * OVERSAMPLENR, 94 },
  307. { 667 * OVERSAMPLENR, 92 },
  308. { 685 * OVERSAMPLENR, 89 },
  309. { 703 * OVERSAMPLENR, 86 },
  310. { 721 * OVERSAMPLENR, 84 },
  311. { 739 * OVERSAMPLENR, 81 },
  312. { 757 * OVERSAMPLENR, 78 },
  313. { 775 * OVERSAMPLENR, 75 },
  314. { 793 * OVERSAMPLENR, 72 },
  315. { 811 * OVERSAMPLENR, 69 },
  316. { 829 * OVERSAMPLENR, 66 },
  317. { 847 * OVERSAMPLENR, 62 },
  318. { 865 * OVERSAMPLENR, 59 },
  319. { 883 * OVERSAMPLENR, 55 },
  320. { 901 * OVERSAMPLENR, 51 },
  321. { 919 * OVERSAMPLENR, 46 },
  322. { 937 * OVERSAMPLENR, 41 },
  323. { 955 * OVERSAMPLENR, 35 },
  324. { 973 * OVERSAMPLENR, 27 },
  325. { 991 * OVERSAMPLENR, 17 },
  326. { 1009 * OVERSAMPLENR, 1 },
  327. { 1023 * OVERSAMPLENR, 0 } // to allow internal 0 degrees C
  328. };
  329. #endif
  330. #if (THERMISTORHEATER_0 == 71) || (THERMISTORHEATER_1 == 71) || (THERMISTORHEATER_2 == 71) || (THERMISTORHEATER_3 == 71) || (THERMISTORBED == 71) // 100k Honeywell 135-104LAF-J01
  331. // R0 = 100000 Ohm
  332. // T0 = 25 °C
  333. // Beta = 3974
  334. // R1 = 0 Ohm
  335. // R2 = 4700 Ohm
  336. const short temptable_71[][2] PROGMEM = {
  337. { 35 * OVERSAMPLENR, 300 },
  338. { 51 * OVERSAMPLENR, 270 },
  339. { 54 * OVERSAMPLENR, 265 },
  340. { 58 * OVERSAMPLENR, 260 },
  341. { 59 * OVERSAMPLENR, 258 },
  342. { 61 * OVERSAMPLENR, 256 },
  343. { 63 * OVERSAMPLENR, 254 },
  344. { 64 * OVERSAMPLENR, 252 },
  345. { 66 * OVERSAMPLENR, 250 },
  346. { 67 * OVERSAMPLENR, 249 },
  347. { 68 * OVERSAMPLENR, 248 },
  348. { 69 * OVERSAMPLENR, 247 },
  349. { 70 * OVERSAMPLENR, 246 },
  350. { 71 * OVERSAMPLENR, 245 },
  351. { 72 * OVERSAMPLENR, 244 },
  352. { 73 * OVERSAMPLENR, 243 },
  353. { 74 * OVERSAMPLENR, 242 },
  354. { 75 * OVERSAMPLENR, 241 },
  355. { 76 * OVERSAMPLENR, 240 },
  356. { 77 * OVERSAMPLENR, 239 },
  357. { 78 * OVERSAMPLENR, 238 },
  358. { 79 * OVERSAMPLENR, 237 },
  359. { 80 * OVERSAMPLENR, 236 },
  360. { 81 * OVERSAMPLENR, 235 },
  361. { 82 * OVERSAMPLENR, 234 },
  362. { 84 * OVERSAMPLENR, 233 },
  363. { 85 * OVERSAMPLENR, 232 },
  364. { 86 * OVERSAMPLENR, 231 },
  365. { 87 * OVERSAMPLENR, 230 },
  366. { 89 * OVERSAMPLENR, 229 },
  367. { 90 * OVERSAMPLENR, 228 },
  368. { 91 * OVERSAMPLENR, 227 },
  369. { 92 * OVERSAMPLENR, 226 },
  370. { 94 * OVERSAMPLENR, 225 },
  371. { 95 * OVERSAMPLENR, 224 },
  372. { 97 * OVERSAMPLENR, 223 },
  373. { 98 * OVERSAMPLENR, 222 },
  374. { 99 * OVERSAMPLENR, 221 },
  375. { 101 * OVERSAMPLENR, 220 },
  376. { 102 * OVERSAMPLENR, 219 },
  377. { 104 * OVERSAMPLENR, 218 },
  378. { 106 * OVERSAMPLENR, 217 },
  379. { 107 * OVERSAMPLENR, 216 },
  380. { 109 * OVERSAMPLENR, 215 },
  381. { 110 * OVERSAMPLENR, 214 },
  382. { 112 * OVERSAMPLENR, 213 },
  383. { 114 * OVERSAMPLENR, 212 },
  384. { 115 * OVERSAMPLENR, 211 },
  385. { 117 * OVERSAMPLENR, 210 },
  386. { 119 * OVERSAMPLENR, 209 },
  387. { 121 * OVERSAMPLENR, 208 },
  388. { 123 * OVERSAMPLENR, 207 },
  389. { 125 * OVERSAMPLENR, 206 },
  390. { 126 * OVERSAMPLENR, 205 },
  391. { 128 * OVERSAMPLENR, 204 },
  392. { 130 * OVERSAMPLENR, 203 },
  393. { 132 * OVERSAMPLENR, 202 },
  394. { 134 * OVERSAMPLENR, 201 },
  395. { 136 * OVERSAMPLENR, 200 },
  396. { 139 * OVERSAMPLENR, 199 },
  397. { 141 * OVERSAMPLENR, 198 },
  398. { 143 * OVERSAMPLENR, 197 },
  399. { 145 * OVERSAMPLENR, 196 },
  400. { 147 * OVERSAMPLENR, 195 },
  401. { 150 * OVERSAMPLENR, 194 },
  402. { 152 * OVERSAMPLENR, 193 },
  403. { 154 * OVERSAMPLENR, 192 },
  404. { 157 * OVERSAMPLENR, 191 },
  405. { 159 * OVERSAMPLENR, 190 },
  406. { 162 * OVERSAMPLENR, 189 },
  407. { 164 * OVERSAMPLENR, 188 },
  408. { 167 * OVERSAMPLENR, 187 },
  409. { 170 * OVERSAMPLENR, 186 },
  410. { 172 * OVERSAMPLENR, 185 },
  411. { 175 * OVERSAMPLENR, 184 },
  412. { 178 * OVERSAMPLENR, 183 },
  413. { 181 * OVERSAMPLENR, 182 },
  414. { 184 * OVERSAMPLENR, 181 },
  415. { 187 * OVERSAMPLENR, 180 },
  416. { 190 * OVERSAMPLENR, 179 },
  417. { 193 * OVERSAMPLENR, 178 },
  418. { 196 * OVERSAMPLENR, 177 },
  419. { 199 * OVERSAMPLENR, 176 },
  420. { 202 * OVERSAMPLENR, 175 },
  421. { 205 * OVERSAMPLENR, 174 },
  422. { 208 * OVERSAMPLENR, 173 },
  423. { 212 * OVERSAMPLENR, 172 },
  424. { 215 * OVERSAMPLENR, 171 },
  425. { 219 * OVERSAMPLENR, 170 },
  426. { 237 * OVERSAMPLENR, 165 },
  427. { 256 * OVERSAMPLENR, 160 },
  428. { 300 * OVERSAMPLENR, 150 },
  429. { 351 * OVERSAMPLENR, 140 },
  430. { 470 * OVERSAMPLENR, 120 },
  431. { 504 * OVERSAMPLENR, 115 },
  432. { 538 * OVERSAMPLENR, 110 },
  433. { 552 * OVERSAMPLENR, 108 },
  434. { 566 * OVERSAMPLENR, 106 },
  435. { 580 * OVERSAMPLENR, 104 },
  436. { 594 * OVERSAMPLENR, 102 },
  437. { 608 * OVERSAMPLENR, 100 },
  438. { 622 * OVERSAMPLENR, 98 },
  439. { 636 * OVERSAMPLENR, 96 },
  440. { 650 * OVERSAMPLENR, 94 },
  441. { 664 * OVERSAMPLENR, 92 },
  442. { 678 * OVERSAMPLENR, 90 },
  443. { 712 * OVERSAMPLENR, 85 },
  444. { 745 * OVERSAMPLENR, 80 },
  445. { 758 * OVERSAMPLENR, 78 },
  446. { 770 * OVERSAMPLENR, 76 },
  447. { 783 * OVERSAMPLENR, 74 },
  448. { 795 * OVERSAMPLENR, 72 },
  449. { 806 * OVERSAMPLENR, 70 },
  450. { 818 * OVERSAMPLENR, 68 },
  451. { 829 * OVERSAMPLENR, 66 },
  452. { 840 * OVERSAMPLENR, 64 },
  453. { 850 * OVERSAMPLENR, 62 },
  454. { 860 * OVERSAMPLENR, 60 },
  455. { 870 * OVERSAMPLENR, 58 },
  456. { 879 * OVERSAMPLENR, 56 },
  457. { 888 * OVERSAMPLENR, 54 },
  458. { 897 * OVERSAMPLENR, 52 },
  459. { 905 * OVERSAMPLENR, 50 },
  460. { 924 * OVERSAMPLENR, 45 },
  461. { 940 * OVERSAMPLENR, 40 },
  462. { 955 * OVERSAMPLENR, 35 },
  463. { 967 * OVERSAMPLENR, 30 },
  464. { 970 * OVERSAMPLENR, 29 },
  465. { 972 * OVERSAMPLENR, 28 },
  466. { 974 * OVERSAMPLENR, 27 },
  467. { 976 * OVERSAMPLENR, 26 },
  468. { 978 * OVERSAMPLENR, 25 },
  469. { 980 * OVERSAMPLENR, 24 },
  470. { 982 * OVERSAMPLENR, 23 },
  471. { 984 * OVERSAMPLENR, 22 },
  472. { 985 * OVERSAMPLENR, 21 },
  473. { 987 * OVERSAMPLENR, 20 },
  474. { 995 * OVERSAMPLENR, 15 },
  475. { 1001 * OVERSAMPLENR, 10 },
  476. { 1006 * OVERSAMPLENR, 5 },
  477. { 1010 * OVERSAMPLENR, 0 }
  478. };
  479. #endif
  480. #if (THERMISTORHEATER_0 == 8) || (THERMISTORHEATER_1 == 8) || (THERMISTORHEATER_2 == 8) || (THERMISTORHEATER_3 == 8) || (THERMISTORBED == 8)
  481. // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
  482. const short temptable_8[][2] PROGMEM = {
  483. { 1 * OVERSAMPLENR, 704 },
  484. { 54 * OVERSAMPLENR, 216 },
  485. { 107 * OVERSAMPLENR, 175 },
  486. { 160 * OVERSAMPLENR, 152 },
  487. { 213 * OVERSAMPLENR, 137 },
  488. { 266 * OVERSAMPLENR, 125 },
  489. { 319 * OVERSAMPLENR, 115 },
  490. { 372 * OVERSAMPLENR, 106 },
  491. { 425 * OVERSAMPLENR, 99 },
  492. { 478 * OVERSAMPLENR, 91 },
  493. { 531 * OVERSAMPLENR, 85 },
  494. { 584 * OVERSAMPLENR, 78 },
  495. { 637 * OVERSAMPLENR, 71 },
  496. { 690 * OVERSAMPLENR, 65 },
  497. { 743 * OVERSAMPLENR, 58 },
  498. { 796 * OVERSAMPLENR, 50 },
  499. { 849 * OVERSAMPLENR, 42 },
  500. { 902 * OVERSAMPLENR, 31 },
  501. { 955 * OVERSAMPLENR, 17 },
  502. { 1008 * OVERSAMPLENR, 0 }
  503. };
  504. #endif
  505. #if (THERMISTORHEATER_0 == 9) || (THERMISTORHEATER_1 == 9) || (THERMISTORHEATER_2 == 9) || (THERMISTORHEATER_3 == 9) || (THERMISTORBED == 9)
  506. // 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
  507. const short temptable_9[][2] PROGMEM = {
  508. { 1 * OVERSAMPLENR, 936 },
  509. { 36 * OVERSAMPLENR, 300 },
  510. { 71 * OVERSAMPLENR, 246 },
  511. { 106 * OVERSAMPLENR, 218 },
  512. { 141 * OVERSAMPLENR, 199 },
  513. { 176 * OVERSAMPLENR, 185 },
  514. { 211 * OVERSAMPLENR, 173 },
  515. { 246 * OVERSAMPLENR, 163 },
  516. { 281 * OVERSAMPLENR, 155 },
  517. { 316 * OVERSAMPLENR, 147 },
  518. { 351 * OVERSAMPLENR, 140 },
  519. { 386 * OVERSAMPLENR, 134 },
  520. { 421 * OVERSAMPLENR, 128 },
  521. { 456 * OVERSAMPLENR, 122 },
  522. { 491 * OVERSAMPLENR, 117 },
  523. { 526 * OVERSAMPLENR, 112 },
  524. { 561 * OVERSAMPLENR, 107 },
  525. { 596 * OVERSAMPLENR, 102 },
  526. { 631 * OVERSAMPLENR, 97 },
  527. { 666 * OVERSAMPLENR, 92 },
  528. { 701 * OVERSAMPLENR, 87 },
  529. { 736 * OVERSAMPLENR, 81 },
  530. { 771 * OVERSAMPLENR, 76 },
  531. { 806 * OVERSAMPLENR, 70 },
  532. { 841 * OVERSAMPLENR, 63 },
  533. { 876 * OVERSAMPLENR, 56 },
  534. { 911 * OVERSAMPLENR, 48 },
  535. { 946 * OVERSAMPLENR, 38 },
  536. { 981 * OVERSAMPLENR, 23 },
  537. { 1005 * OVERSAMPLENR, 5 },
  538. { 1016 * OVERSAMPLENR, 0 }
  539. };
  540. #endif
  541. #if (THERMISTORHEATER_0 == 10) || (THERMISTORHEATER_1 == 10) || (THERMISTORHEATER_2 == 10) || (THERMISTORHEATER_3 == 10) || (THERMISTORBED == 10)
  542. // 100k RS thermistor 198-961 (4.7k pullup)
  543. const short temptable_10[][2] PROGMEM = {
  544. { 1 * OVERSAMPLENR, 929 },
  545. { 36 * OVERSAMPLENR, 299 },
  546. { 71 * OVERSAMPLENR, 246 },
  547. { 106 * OVERSAMPLENR, 217 },
  548. { 141 * OVERSAMPLENR, 198 },
  549. { 176 * OVERSAMPLENR, 184 },
  550. { 211 * OVERSAMPLENR, 173 },
  551. { 246 * OVERSAMPLENR, 163 },
  552. { 281 * OVERSAMPLENR, 154 },
  553. { 316 * OVERSAMPLENR, 147 },
  554. { 351 * OVERSAMPLENR, 140 },
  555. { 386 * OVERSAMPLENR, 134 },
  556. { 421 * OVERSAMPLENR, 128 },
  557. { 456 * OVERSAMPLENR, 122 },
  558. { 491 * OVERSAMPLENR, 117 },
  559. { 526 * OVERSAMPLENR, 112 },
  560. { 561 * OVERSAMPLENR, 107 },
  561. { 596 * OVERSAMPLENR, 102 },
  562. { 631 * OVERSAMPLENR, 97 },
  563. { 666 * OVERSAMPLENR, 91 },
  564. { 701 * OVERSAMPLENR, 86 },
  565. { 736 * OVERSAMPLENR, 81 },
  566. { 771 * OVERSAMPLENR, 76 },
  567. { 806 * OVERSAMPLENR, 70 },
  568. { 841 * OVERSAMPLENR, 63 },
  569. { 876 * OVERSAMPLENR, 56 },
  570. { 911 * OVERSAMPLENR, 48 },
  571. { 946 * OVERSAMPLENR, 38 },
  572. { 981 * OVERSAMPLENR, 23 },
  573. { 1005 * OVERSAMPLENR, 5 },
  574. { 1016 * OVERSAMPLENR, 0 }
  575. };
  576. #endif
  577. #if (THERMISTORHEATER_0 == 11) || (THERMISTORHEATER_1 == 11) || (THERMISTORHEATER_2 == 11) || (THERMISTORHEATER_3 == 11) || (THERMISTORBED == 11)
  578. // QU-BD silicone bed QWG-104F-3950 thermistor
  579. const short temptable_11[][2] PROGMEM = {
  580. { 1 * OVERSAMPLENR, 938 },
  581. { 31 * OVERSAMPLENR, 314 },
  582. { 41 * OVERSAMPLENR, 290 },
  583. { 51 * OVERSAMPLENR, 272 },
  584. { 61 * OVERSAMPLENR, 258 },
  585. { 71 * OVERSAMPLENR, 247 },
  586. { 81 * OVERSAMPLENR, 237 },
  587. { 91 * OVERSAMPLENR, 229 },
  588. { 101 * OVERSAMPLENR, 221 },
  589. { 111 * OVERSAMPLENR, 215 },
  590. { 121 * OVERSAMPLENR, 209 },
  591. { 131 * OVERSAMPLENR, 204 },
  592. { 141 * OVERSAMPLENR, 199 },
  593. { 151 * OVERSAMPLENR, 195 },
  594. { 161 * OVERSAMPLENR, 190 },
  595. { 171 * OVERSAMPLENR, 187 },
  596. { 181 * OVERSAMPLENR, 183 },
  597. { 191 * OVERSAMPLENR, 179 },
  598. { 201 * OVERSAMPLENR, 176 },
  599. { 221 * OVERSAMPLENR, 170 },
  600. { 241 * OVERSAMPLENR, 165 },
  601. { 261 * OVERSAMPLENR, 160 },
  602. { 281 * OVERSAMPLENR, 155 },
  603. { 301 * OVERSAMPLENR, 150 },
  604. { 331 * OVERSAMPLENR, 144 },
  605. { 361 * OVERSAMPLENR, 139 },
  606. { 391 * OVERSAMPLENR, 133 },
  607. { 421 * OVERSAMPLENR, 128 },
  608. { 451 * OVERSAMPLENR, 123 },
  609. { 491 * OVERSAMPLENR, 117 },
  610. { 531 * OVERSAMPLENR, 111 },
  611. { 571 * OVERSAMPLENR, 105 },
  612. { 611 * OVERSAMPLENR, 100 },
  613. { 641 * OVERSAMPLENR, 95 },
  614. { 681 * OVERSAMPLENR, 90 },
  615. { 711 * OVERSAMPLENR, 85 },
  616. { 751 * OVERSAMPLENR, 79 },
  617. { 791 * OVERSAMPLENR, 72 },
  618. { 811 * OVERSAMPLENR, 69 },
  619. { 831 * OVERSAMPLENR, 65 },
  620. { 871 * OVERSAMPLENR, 57 },
  621. { 881 * OVERSAMPLENR, 55 },
  622. { 901 * OVERSAMPLENR, 51 },
  623. { 921 * OVERSAMPLENR, 45 },
  624. { 941 * OVERSAMPLENR, 39 },
  625. { 971 * OVERSAMPLENR, 28 },
  626. { 981 * OVERSAMPLENR, 23 },
  627. { 991 * OVERSAMPLENR, 17 },
  628. { 1001 * OVERSAMPLENR, 9 },
  629. { 1021 * OVERSAMPLENR, -27 }
  630. };
  631. #endif
  632. #if (THERMISTORHEATER_0 == 13) || (THERMISTORHEATER_1 == 13) || (THERMISTORHEATER_2 == 13) || (THERMISTORHEATER_3 == 13) || (THERMISTORBED == 13)
  633. // Hisens thermistor B25/50 =3950 +/-1%
  634. const short temptable_13[][2] PROGMEM = {
  635. { 20.04 * OVERSAMPLENR, 300 },
  636. { 23.19 * OVERSAMPLENR, 290 },
  637. { 26.71 * OVERSAMPLENR, 280 },
  638. { 31.23 * OVERSAMPLENR, 270 },
  639. { 36.52 * OVERSAMPLENR, 260 },
  640. { 42.75 * OVERSAMPLENR, 250 },
  641. { 50.68 * OVERSAMPLENR, 240 },
  642. { 60.22 * OVERSAMPLENR, 230 },
  643. { 72.03 * OVERSAMPLENR, 220 },
  644. { 86.84 * OVERSAMPLENR, 210 },
  645. { 102.79 * OVERSAMPLENR, 200 },
  646. { 124.46 * OVERSAMPLENR, 190 },
  647. { 151.02 * OVERSAMPLENR, 180 },
  648. { 182.86 * OVERSAMPLENR, 170 },
  649. { 220.72 * OVERSAMPLENR, 160 },
  650. { 316.96 * OVERSAMPLENR, 140 },
  651. { 447.17 * OVERSAMPLENR, 120 },
  652. { 590.61 * OVERSAMPLENR, 100 },
  653. { 737.31 * OVERSAMPLENR, 80 },
  654. { 857.77 * OVERSAMPLENR, 60 },
  655. { 939.52 * OVERSAMPLENR, 40 },
  656. { 986.03 * OVERSAMPLENR, 20 },
  657. { 1008.7 * OVERSAMPLENR, 0 }
  658. };
  659. #endif
  660. #if (THERMISTORHEATER_0 == 20) || (THERMISTORHEATER_1 == 20) || (THERMISTORHEATER_2 == 20) || (THERMISTORBED == 20) // PT100 with INA826 amp on Ultimaker v2.0 electronics
  661. // The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature.
  662. // This does not match the normal thermistor behaviour so we need to set the following defines
  663. #if (THERMISTORHEATER_0 == 20)
  664. #define HEATER_0_RAW_HI_TEMP 16383
  665. #define HEATER_0_RAW_LO_TEMP 0
  666. #endif
  667. #if (THERMISTORHEATER_1 == 20)
  668. #define HEATER_1_RAW_HI_TEMP 16383
  669. #define HEATER_1_RAW_LO_TEMP 0
  670. #endif
  671. #if (THERMISTORHEATER_2 == 20)
  672. #define HEATER_2_RAW_HI_TEMP 16383
  673. #define HEATER_2_RAW_LO_TEMP 0
  674. #endif
  675. #if (THERMISTORHEATER_3 == 20)
  676. #define HEATER_3_RAW_HI_TEMP 16383
  677. #define HEATER_3_RAW_LO_TEMP 0
  678. #endif
  679. #if (THERMISTORBED == 20)
  680. #define HEATER_BED_RAW_HI_TEMP 16383
  681. #define HEATER_BED_RAW_LO_TEMP 0
  682. #endif
  683. const short temptable_20[][2] PROGMEM = {
  684. { 0 * OVERSAMPLENR, 0 },
  685. { 227 * OVERSAMPLENR, 1 },
  686. { 236 * OVERSAMPLENR, 10 },
  687. { 245 * OVERSAMPLENR, 20 },
  688. { 253 * OVERSAMPLENR, 30 },
  689. { 262 * OVERSAMPLENR, 40 },
  690. { 270 * OVERSAMPLENR, 50 },
  691. { 279 * OVERSAMPLENR, 60 },
  692. { 287 * OVERSAMPLENR, 70 },
  693. { 295 * OVERSAMPLENR, 80 },
  694. { 304 * OVERSAMPLENR, 90 },
  695. { 312 * OVERSAMPLENR, 100 },
  696. { 320 * OVERSAMPLENR, 110 },
  697. { 329 * OVERSAMPLENR, 120 },
  698. { 337 * OVERSAMPLENR, 130 },
  699. { 345 * OVERSAMPLENR, 140 },
  700. { 353 * OVERSAMPLENR, 150 },
  701. { 361 * OVERSAMPLENR, 160 },
  702. { 369 * OVERSAMPLENR, 170 },
  703. { 377 * OVERSAMPLENR, 180 },
  704. { 385 * OVERSAMPLENR, 190 },
  705. { 393 * OVERSAMPLENR, 200 },
  706. { 401 * OVERSAMPLENR, 210 },
  707. { 409 * OVERSAMPLENR, 220 },
  708. { 417 * OVERSAMPLENR, 230 },
  709. { 424 * OVERSAMPLENR, 240 },
  710. { 432 * OVERSAMPLENR, 250 },
  711. { 440 * OVERSAMPLENR, 260 },
  712. { 447 * OVERSAMPLENR, 270 },
  713. { 455 * OVERSAMPLENR, 280 },
  714. { 463 * OVERSAMPLENR, 290 },
  715. { 470 * OVERSAMPLENR, 300 },
  716. { 478 * OVERSAMPLENR, 310 },
  717. { 485 * OVERSAMPLENR, 320 },
  718. { 493 * OVERSAMPLENR, 330 },
  719. { 500 * OVERSAMPLENR, 340 },
  720. { 507 * OVERSAMPLENR, 350 },
  721. { 515 * OVERSAMPLENR, 360 },
  722. { 522 * OVERSAMPLENR, 370 },
  723. { 529 * OVERSAMPLENR, 380 },
  724. { 537 * OVERSAMPLENR, 390 },
  725. { 544 * OVERSAMPLENR, 400 },
  726. { 614 * OVERSAMPLENR, 500 },
  727. { 681 * OVERSAMPLENR, 600 },
  728. { 744 * OVERSAMPLENR, 700 },
  729. { 805 * OVERSAMPLENR, 800 },
  730. { 862 * OVERSAMPLENR, 900 },
  731. { 917 * OVERSAMPLENR, 1000 },
  732. { 968 * OVERSAMPLENR, 1100 }
  733. };
  734. #endif
  735. #if (THERMISTORHEATER_0 == 51) || (THERMISTORHEATER_1 == 51) || (THERMISTORHEATER_2 == 51) || (THERMISTORHEATER_3 == 51) || (THERMISTORBED == 51)
  736. // 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
  737. // Verified by linagee.
  738. // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
  739. // Advantage: Twice the resolution and better linearity from 150C to 200C
  740. const short temptable_51[][2] PROGMEM = {
  741. { 1 * OVERSAMPLENR, 350 },
  742. { 190 * OVERSAMPLENR, 250 }, // top rating 250C
  743. { 203 * OVERSAMPLENR, 245 },
  744. { 217 * OVERSAMPLENR, 240 },
  745. { 232 * OVERSAMPLENR, 235 },
  746. { 248 * OVERSAMPLENR, 230 },
  747. { 265 * OVERSAMPLENR, 225 },
  748. { 283 * OVERSAMPLENR, 220 },
  749. { 302 * OVERSAMPLENR, 215 },
  750. { 322 * OVERSAMPLENR, 210 },
  751. { 344 * OVERSAMPLENR, 205 },
  752. { 366 * OVERSAMPLENR, 200 },
  753. { 390 * OVERSAMPLENR, 195 },
  754. { 415 * OVERSAMPLENR, 190 },
  755. { 440 * OVERSAMPLENR, 185 },
  756. { 467 * OVERSAMPLENR, 180 },
  757. { 494 * OVERSAMPLENR, 175 },
  758. { 522 * OVERSAMPLENR, 170 },
  759. { 551 * OVERSAMPLENR, 165 },
  760. { 580 * OVERSAMPLENR, 160 },
  761. { 609 * OVERSAMPLENR, 155 },
  762. { 638 * OVERSAMPLENR, 150 },
  763. { 666 * OVERSAMPLENR, 145 },
  764. { 695 * OVERSAMPLENR, 140 },
  765. { 722 * OVERSAMPLENR, 135 },
  766. { 749 * OVERSAMPLENR, 130 },
  767. { 775 * OVERSAMPLENR, 125 },
  768. { 800 * OVERSAMPLENR, 120 },
  769. { 823 * OVERSAMPLENR, 115 },
  770. { 845 * OVERSAMPLENR, 110 },
  771. { 865 * OVERSAMPLENR, 105 },
  772. { 884 * OVERSAMPLENR, 100 },
  773. { 901 * OVERSAMPLENR, 95 },
  774. { 917 * OVERSAMPLENR, 90 },
  775. { 932 * OVERSAMPLENR, 85 },
  776. { 944 * OVERSAMPLENR, 80 },
  777. { 956 * OVERSAMPLENR, 75 },
  778. { 966 * OVERSAMPLENR, 70 },
  779. { 975 * OVERSAMPLENR, 65 },
  780. { 982 * OVERSAMPLENR, 60 },
  781. { 989 * OVERSAMPLENR, 55 },
  782. { 995 * OVERSAMPLENR, 50 },
  783. { 1000 * OVERSAMPLENR, 45 },
  784. { 1004 * OVERSAMPLENR, 40 },
  785. { 1007 * OVERSAMPLENR, 35 },
  786. { 1010 * OVERSAMPLENR, 30 },
  787. { 1013 * OVERSAMPLENR, 25 },
  788. { 1015 * OVERSAMPLENR, 20 },
  789. { 1017 * OVERSAMPLENR, 15 },
  790. { 1018 * OVERSAMPLENR, 10 },
  791. { 1019 * OVERSAMPLENR, 5 },
  792. { 1020 * OVERSAMPLENR, 0 },
  793. { 1021 * OVERSAMPLENR, -5 }
  794. };
  795. #endif
  796. #if (THERMISTORHEATER_0 == 52) || (THERMISTORHEATER_1 == 52) || (THERMISTORHEATER_2 == 52) || (THERMISTORHEATER_3 == 52) || (THERMISTORBED == 52)
  797. // 200k ATC Semitec 204GT-2 (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
  798. // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
  799. // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
  800. // Advantage: More resolution and better linearity from 150C to 200C
  801. const short temptable_52[][2] PROGMEM = {
  802. { 1 * OVERSAMPLENR, 500 },
  803. { 125 * OVERSAMPLENR, 300 }, // top rating 300C
  804. { 142 * OVERSAMPLENR, 290 },
  805. { 162 * OVERSAMPLENR, 280 },
  806. { 185 * OVERSAMPLENR, 270 },
  807. { 211 * OVERSAMPLENR, 260 },
  808. { 240 * OVERSAMPLENR, 250 },
  809. { 274 * OVERSAMPLENR, 240 },
  810. { 312 * OVERSAMPLENR, 230 },
  811. { 355 * OVERSAMPLENR, 220 },
  812. { 401 * OVERSAMPLENR, 210 },
  813. { 452 * OVERSAMPLENR, 200 },
  814. { 506 * OVERSAMPLENR, 190 },
  815. { 563 * OVERSAMPLENR, 180 },
  816. { 620 * OVERSAMPLENR, 170 },
  817. { 677 * OVERSAMPLENR, 160 },
  818. { 732 * OVERSAMPLENR, 150 },
  819. { 783 * OVERSAMPLENR, 140 },
  820. { 830 * OVERSAMPLENR, 130 },
  821. { 871 * OVERSAMPLENR, 120 },
  822. { 906 * OVERSAMPLENR, 110 },
  823. { 935 * OVERSAMPLENR, 100 },
  824. { 958 * OVERSAMPLENR, 90 },
  825. { 976 * OVERSAMPLENR, 80 },
  826. { 990 * OVERSAMPLENR, 70 },
  827. { 1000 * OVERSAMPLENR, 60 },
  828. { 1008 * OVERSAMPLENR, 50 },
  829. { 1013 * OVERSAMPLENR, 40 },
  830. { 1017 * OVERSAMPLENR, 30 },
  831. { 1019 * OVERSAMPLENR, 20 },
  832. { 1021 * OVERSAMPLENR, 10 },
  833. { 1022 * OVERSAMPLENR, 0 }
  834. };
  835. #endif
  836. #if (THERMISTORHEATER_0 == 55) || (THERMISTORHEATER_1 == 55) || (THERMISTORHEATER_2 == 55) || (THERMISTORHEATER_3 == 55) || (THERMISTORBED == 55)
  837. // 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
  838. // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
  839. // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
  840. // Advantage: More resolution and better linearity from 150C to 200C
  841. const short temptable_55[][2] PROGMEM = {
  842. { 1 * OVERSAMPLENR, 500 },
  843. { 76 * OVERSAMPLENR, 300 },
  844. { 87 * OVERSAMPLENR, 290 },
  845. { 100 * OVERSAMPLENR, 280 },
  846. { 114 * OVERSAMPLENR, 270 },
  847. { 131 * OVERSAMPLENR, 260 },
  848. { 152 * OVERSAMPLENR, 250 },
  849. { 175 * OVERSAMPLENR, 240 },
  850. { 202 * OVERSAMPLENR, 230 },
  851. { 234 * OVERSAMPLENR, 220 },
  852. { 271 * OVERSAMPLENR, 210 },
  853. { 312 * OVERSAMPLENR, 200 },
  854. { 359 * OVERSAMPLENR, 190 },
  855. { 411 * OVERSAMPLENR, 180 },
  856. { 467 * OVERSAMPLENR, 170 },
  857. { 527 * OVERSAMPLENR, 160 },
  858. { 590 * OVERSAMPLENR, 150 },
  859. { 652 * OVERSAMPLENR, 140 },
  860. { 713 * OVERSAMPLENR, 130 },
  861. { 770 * OVERSAMPLENR, 120 },
  862. { 822 * OVERSAMPLENR, 110 },
  863. { 867 * OVERSAMPLENR, 100 },
  864. { 905 * OVERSAMPLENR, 90 },
  865. { 936 * OVERSAMPLENR, 80 },
  866. { 961 * OVERSAMPLENR, 70 },
  867. { 979 * OVERSAMPLENR, 60 },
  868. { 993 * OVERSAMPLENR, 50 },
  869. { 1003 * OVERSAMPLENR, 40 },
  870. { 1010 * OVERSAMPLENR, 30 },
  871. { 1015 * OVERSAMPLENR, 20 },
  872. { 1018 * OVERSAMPLENR, 10 },
  873. { 1020 * OVERSAMPLENR, 0 }
  874. };
  875. #endif
  876. #if (THERMISTORHEATER_0 == 60) || (THERMISTORHEATER_1 == 60) || (THERMISTORHEATER_2 == 60) || (THERMISTORHEATER_3 == 60) || (THERMISTORBED == 60) // Maker's Tool Works Kapton Bed Thermistor
  877. // ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=3950
  878. // r0: 100000
  879. // t0: 25
  880. // r1: 0 (parallel with rTherm)
  881. // r2: 4700 (series with rTherm)
  882. // beta: 3950
  883. // min adc: 1 at 0.0048828125 V
  884. // max adc: 1023 at 4.9951171875 V
  885. const short temptable_60[][2] PROGMEM = {
  886. { 51 * OVERSAMPLENR, 272 },
  887. { 61 * OVERSAMPLENR, 258 },
  888. { 71 * OVERSAMPLENR, 247 },
  889. { 81 * OVERSAMPLENR, 237 },
  890. { 91 * OVERSAMPLENR, 229 },
  891. { 101 * OVERSAMPLENR, 221 },
  892. { 131 * OVERSAMPLENR, 204 },
  893. { 161 * OVERSAMPLENR, 190 },
  894. { 191 * OVERSAMPLENR, 179 },
  895. { 231 * OVERSAMPLENR, 167 },
  896. { 271 * OVERSAMPLENR, 157 },
  897. { 311 * OVERSAMPLENR, 148 },
  898. { 351 * OVERSAMPLENR, 140 },
  899. { 381 * OVERSAMPLENR, 135 },
  900. { 411 * OVERSAMPLENR, 130 },
  901. { 441 * OVERSAMPLENR, 125 },
  902. { 451 * OVERSAMPLENR, 123 },
  903. { 461 * OVERSAMPLENR, 122 },
  904. { 471 * OVERSAMPLENR, 120 },
  905. { 481 * OVERSAMPLENR, 119 },
  906. { 491 * OVERSAMPLENR, 117 },
  907. { 501 * OVERSAMPLENR, 116 },
  908. { 511 * OVERSAMPLENR, 114 },
  909. { 521 * OVERSAMPLENR, 113 },
  910. { 531 * OVERSAMPLENR, 111 },
  911. { 541 * OVERSAMPLENR, 110 },
  912. { 551 * OVERSAMPLENR, 108 },
  913. { 561 * OVERSAMPLENR, 107 },
  914. { 571 * OVERSAMPLENR, 105 },
  915. { 581 * OVERSAMPLENR, 104 },
  916. { 591 * OVERSAMPLENR, 102 },
  917. { 601 * OVERSAMPLENR, 101 },
  918. { 611 * OVERSAMPLENR, 100 },
  919. { 621 * OVERSAMPLENR, 98 },
  920. { 631 * OVERSAMPLENR, 97 },
  921. { 641 * OVERSAMPLENR, 95 },
  922. { 651 * OVERSAMPLENR, 94 },
  923. { 661 * OVERSAMPLENR, 92 },
  924. { 671 * OVERSAMPLENR, 91 },
  925. { 681 * OVERSAMPLENR, 90 },
  926. { 691 * OVERSAMPLENR, 88 },
  927. { 701 * OVERSAMPLENR, 87 },
  928. { 711 * OVERSAMPLENR, 85 },
  929. { 721 * OVERSAMPLENR, 84 },
  930. { 731 * OVERSAMPLENR, 82 },
  931. { 741 * OVERSAMPLENR, 81 },
  932. { 751 * OVERSAMPLENR, 79 },
  933. { 761 * OVERSAMPLENR, 77 },
  934. { 771 * OVERSAMPLENR, 76 },
  935. { 781 * OVERSAMPLENR, 74 },
  936. { 791 * OVERSAMPLENR, 72 },
  937. { 801 * OVERSAMPLENR, 71 },
  938. { 811 * OVERSAMPLENR, 69 },
  939. { 821 * OVERSAMPLENR, 67 },
  940. { 831 * OVERSAMPLENR, 65 },
  941. { 841 * OVERSAMPLENR, 63 },
  942. { 851 * OVERSAMPLENR, 62 },
  943. { 861 * OVERSAMPLENR, 60 },
  944. { 871 * OVERSAMPLENR, 57 },
  945. { 881 * OVERSAMPLENR, 55 },
  946. { 891 * OVERSAMPLENR, 53 },
  947. { 901 * OVERSAMPLENR, 51 },
  948. { 911 * OVERSAMPLENR, 48 },
  949. { 921 * OVERSAMPLENR, 45 },
  950. { 931 * OVERSAMPLENR, 42 },
  951. { 941 * OVERSAMPLENR, 39 },
  952. { 951 * OVERSAMPLENR, 36 },
  953. { 961 * OVERSAMPLENR, 32 },
  954. { 981 * OVERSAMPLENR, 23 },
  955. { 991 * OVERSAMPLENR, 17 },
  956. { 1001 * OVERSAMPLENR, 9 },
  957. { 1008 * OVERSAMPLENR, 0 }
  958. };
  959. #endif
  960. #if (THERMISTORHEATER_0 == 12) || (THERMISTORHEATER_1 == 12) || (THERMISTORHEATER_2 == 12) || (THERMISTORHEATER_3 == 12) || (THERMISTORBED == 12)
  961. // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
  962. const short temptable_12[][2] PROGMEM = {
  963. { 35 * OVERSAMPLENR, 180 }, // top rating 180C
  964. { 211 * OVERSAMPLENR, 140 },
  965. { 233 * OVERSAMPLENR, 135 },
  966. { 261 * OVERSAMPLENR, 130 },
  967. { 290 * OVERSAMPLENR, 125 },
  968. { 328 * OVERSAMPLENR, 120 },
  969. { 362 * OVERSAMPLENR, 115 },
  970. { 406 * OVERSAMPLENR, 110 },
  971. { 446 * OVERSAMPLENR, 105 },
  972. { 496 * OVERSAMPLENR, 100 },
  973. { 539 * OVERSAMPLENR, 95 },
  974. { 585 * OVERSAMPLENR, 90 },
  975. { 629 * OVERSAMPLENR, 85 },
  976. { 675 * OVERSAMPLENR, 80 },
  977. { 718 * OVERSAMPLENR, 75 },
  978. { 758 * OVERSAMPLENR, 70 },
  979. { 793 * OVERSAMPLENR, 65 },
  980. { 822 * OVERSAMPLENR, 60 },
  981. { 841 * OVERSAMPLENR, 55 },
  982. { 875 * OVERSAMPLENR, 50 },
  983. { 899 * OVERSAMPLENR, 45 },
  984. { 926 * OVERSAMPLENR, 40 },
  985. { 946 * OVERSAMPLENR, 35 },
  986. { 962 * OVERSAMPLENR, 30 },
  987. { 977 * OVERSAMPLENR, 25 },
  988. { 987 * OVERSAMPLENR, 20 },
  989. { 995 * OVERSAMPLENR, 15 },
  990. { 1001 * OVERSAMPLENR, 10 },
  991. { 1010 * OVERSAMPLENR, 0 },
  992. { 1023 * OVERSAMPLENR, -40 }
  993. };
  994. #endif
  995. #if (THERMISTORHEATER_0 == 70) || (THERMISTORHEATER_1 == 70) || (THERMISTORHEATER_2 == 70) || (THERMISTORHEATER_3 == 70) || (THERMISTORBED == 70) // bqh2 stock thermistor
  996. const short temptable_70[][2] PROGMEM = {
  997. { 22 * OVERSAMPLENR, 300 },
  998. { 24 * OVERSAMPLENR, 295 },
  999. { 25 * OVERSAMPLENR, 290 },
  1000. { 27 * OVERSAMPLENR, 285 },
  1001. { 29 * OVERSAMPLENR, 280 },
  1002. { 32 * OVERSAMPLENR, 275 },
  1003. { 34 * OVERSAMPLENR, 270 },
  1004. { 37 * OVERSAMPLENR, 265 },
  1005. { 40 * OVERSAMPLENR, 260 },
  1006. { 43 * OVERSAMPLENR, 255 },
  1007. { 46 * OVERSAMPLENR, 250 },
  1008. { 50 * OVERSAMPLENR, 245 },
  1009. { 54 * OVERSAMPLENR, 240 },
  1010. { 59 * OVERSAMPLENR, 235 },
  1011. { 64 * OVERSAMPLENR, 230 },
  1012. { 70 * OVERSAMPLENR, 225 },
  1013. { 76 * OVERSAMPLENR, 220 },
  1014. { 83 * OVERSAMPLENR, 215 },
  1015. { 90 * OVERSAMPLENR, 210 },
  1016. { 99 * OVERSAMPLENR, 205 },
  1017. { 108 * OVERSAMPLENR, 200 },
  1018. { 118 * OVERSAMPLENR, 195 },
  1019. { 129 * OVERSAMPLENR, 190 },
  1020. { 141 * OVERSAMPLENR, 185 },
  1021. { 154 * OVERSAMPLENR, 180 },
  1022. { 169 * OVERSAMPLENR, 175 },
  1023. { 185 * OVERSAMPLENR, 170 },
  1024. { 203 * OVERSAMPLENR, 165 },
  1025. { 222 * OVERSAMPLENR, 160 },
  1026. { 243 * OVERSAMPLENR, 155 },
  1027. { 266 * OVERSAMPLENR, 150 },
  1028. { 290 * OVERSAMPLENR, 145 },
  1029. { 317 * OVERSAMPLENR, 140 },
  1030. { 346 * OVERSAMPLENR, 135 },
  1031. { 376 * OVERSAMPLENR, 130 },
  1032. { 408 * OVERSAMPLENR, 125 },
  1033. { 442 * OVERSAMPLENR, 120 },
  1034. { 477 * OVERSAMPLENR, 115 },
  1035. { 513 * OVERSAMPLENR, 110 },
  1036. { 551 * OVERSAMPLENR, 105 },
  1037. { 588 * OVERSAMPLENR, 100 },
  1038. { 626 * OVERSAMPLENR, 95 },
  1039. { 663 * OVERSAMPLENR, 90 },
  1040. { 699 * OVERSAMPLENR, 85 },
  1041. { 735 * OVERSAMPLENR, 80 },
  1042. { 768 * OVERSAMPLENR, 75 },
  1043. { 800 * OVERSAMPLENR, 70 },
  1044. { 829 * OVERSAMPLENR, 65 },
  1045. { 856 * OVERSAMPLENR, 60 },
  1046. { 881 * OVERSAMPLENR, 55 },
  1047. { 903 * OVERSAMPLENR, 50 },
  1048. { 922 * OVERSAMPLENR, 45 },
  1049. { 939 * OVERSAMPLENR, 40 },
  1050. { 954 * OVERSAMPLENR, 35 },
  1051. { 966 * OVERSAMPLENR, 30 },
  1052. { 977 * OVERSAMPLENR, 25 },
  1053. { 986 * OVERSAMPLENR, 20 },
  1054. { 994 * OVERSAMPLENR, 15 },
  1055. { 1000 * OVERSAMPLENR, 10 },
  1056. { 1005 * OVERSAMPLENR, 5 },
  1057. { 1009 * OVERSAMPLENR, 0 } // safety
  1058. };
  1059. #endif
  1060. // Pt1000 and Pt100 handling
  1061. //
  1062. // Rt=R0*(1+a*T+b*T*T) [for T>0]
  1063. // a=3.9083E-3, b=-5.775E-7
  1064. #define PtA 3.9083E-3
  1065. #define PtB -5.775E-7
  1066. #define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T)))
  1067. #define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1))
  1068. #define PtLine(T,R0,Rup) { PtAdVal(T,R0,Rup)*OVERSAMPLENR, T },
  1069. #if (THERMISTORHEATER_0 == 110) || (THERMISTORHEATER_1 == 110) || (THERMISTORHEATER_2 == 110) || (THERMISTORHEATER_3 == 110) || (THERMISTORBED == 110) // Pt100 with 1k0 pullup
  1070. const short temptable_110[][2] PROGMEM = {
  1071. // only few values are needed as the curve is very flat
  1072. PtLine( 0, 100, 1000)
  1073. PtLine( 50, 100, 1000)
  1074. PtLine(100, 100, 1000)
  1075. PtLine(150, 100, 1000)
  1076. PtLine(200, 100, 1000)
  1077. PtLine(250, 100, 1000)
  1078. PtLine(300, 100, 1000)
  1079. };
  1080. #endif
  1081. #if (THERMISTORHEATER_0 == 147) || (THERMISTORHEATER_1 == 147) || (THERMISTORHEATER_2 == 147) || (THERMISTORHEATER_3 == 147) || (THERMISTORBED == 147) // Pt100 with 4k7 pullup
  1082. const short temptable_147[][2] PROGMEM = {
  1083. // only few values are needed as the curve is very flat
  1084. PtLine( 0, 100, 4700)
  1085. PtLine( 50, 100, 4700)
  1086. PtLine(100, 100, 4700)
  1087. PtLine(150, 100, 4700)
  1088. PtLine(200, 100, 4700)
  1089. PtLine(250, 100, 4700)
  1090. PtLine(300, 100, 4700)
  1091. };
  1092. #endif
  1093. #if (THERMISTORHEATER_0 == 1010) || (THERMISTORHEATER_1 == 1010) || (THERMISTORHEATER_2 == 1010) || (THERMISTORHEATER_3 == 1010) || (THERMISTORBED == 1010) // Pt1000 with 1k0 pullup
  1094. const short temptable_1010[][2] PROGMEM = {
  1095. PtLine( 0, 1000, 1000)
  1096. PtLine( 25, 1000, 1000)
  1097. PtLine( 50, 1000, 1000)
  1098. PtLine( 75, 1000, 1000)
  1099. PtLine(100, 1000, 1000)
  1100. PtLine(125, 1000, 1000)
  1101. PtLine(150, 1000, 1000)
  1102. PtLine(175, 1000, 1000)
  1103. PtLine(200, 1000, 1000)
  1104. PtLine(225, 1000, 1000)
  1105. PtLine(250, 1000, 1000)
  1106. PtLine(275, 1000, 1000)
  1107. PtLine(300, 1000, 1000)
  1108. };
  1109. #endif
  1110. #if (THERMISTORHEATER_0 == 1047) || (THERMISTORHEATER_1 == 1047) || (THERMISTORHEATER_2 == 1047) || (THERMISTORHEATER_3 == 1047) || (THERMISTORBED == 1047) // Pt1000 with 4k7 pullup
  1111. const short temptable_1047[][2] PROGMEM = {
  1112. // only few values are needed as the curve is very flat
  1113. PtLine( 0, 1000, 4700)
  1114. PtLine( 50, 1000, 4700)
  1115. PtLine(100, 1000, 4700)
  1116. PtLine(150, 1000, 4700)
  1117. PtLine(200, 1000, 4700)
  1118. PtLine(250, 1000, 4700)
  1119. PtLine(300, 1000, 4700)
  1120. };
  1121. #endif
  1122. #if (THERMISTORHEATER_0 == 999) || (THERMISTORHEATER_1 == 999) || (THERMISTORHEATER_2 == 999) || (THERMISTORHEATER_3 == 999) || (THERMISTORBED == 999) //User defined table
  1123. // Dummy Thermistor table.. It will ALWAYS read a fixed value.
  1124. #ifndef DUMMY_THERMISTOR_999_VALUE
  1125. #define DUMMY_THERMISTOR_999_VALUE 25
  1126. #endif
  1127. const short temptable_999[][2] PROGMEM = {
  1128. { 1 * OVERSAMPLENR, DUMMY_THERMISTOR_999_VALUE },
  1129. { 1023 * OVERSAMPLENR, DUMMY_THERMISTOR_999_VALUE }
  1130. };
  1131. #endif
  1132. #if (THERMISTORHEATER_0 == 998) || (THERMISTORHEATER_1 == 998) || (THERMISTORHEATER_2 == 998) || (THERMISTORHEATER_3 == 998) || (THERMISTORBED == 998) //User defined table
  1133. // Dummy Thermistor table.. It will ALWAYS read a fixed value.
  1134. #ifndef DUMMY_THERMISTOR_998_VALUE
  1135. #define DUMMY_THERMISTOR_998_VALUE 25
  1136. #endif
  1137. const short temptable_998[][2] PROGMEM = {
  1138. { 1 * OVERSAMPLENR, DUMMY_THERMISTOR_998_VALUE },
  1139. { 1023 * OVERSAMPLENR, DUMMY_THERMISTOR_998_VALUE }
  1140. };
  1141. #endif
  1142. #define _TT_NAME(_N) temptable_ ## _N
  1143. #define TT_NAME(_N) _TT_NAME(_N)
  1144. #ifdef THERMISTORHEATER_0
  1145. #define HEATER_0_TEMPTABLE TT_NAME(THERMISTORHEATER_0)
  1146. #define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE)
  1147. #else
  1148. #ifdef HEATER_0_USES_THERMISTOR
  1149. #error "No heater 0 thermistor table specified"
  1150. #else // HEATER_0_USES_THERMISTOR
  1151. #define HEATER_0_TEMPTABLE NULL
  1152. #define HEATER_0_TEMPTABLE_LEN 0
  1153. #endif // HEATER_0_USES_THERMISTOR
  1154. #endif
  1155. // Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature
  1156. #ifndef HEATER_0_RAW_HI_TEMP
  1157. #ifdef HEATER_0_USES_THERMISTOR // In case of a thermistor the highest temperature results in the lowest ADC value
  1158. #define HEATER_0_RAW_HI_TEMP 0
  1159. #define HEATER_0_RAW_LO_TEMP 16383
  1160. #else // In case of an thermocouple the highest temperature results in the highest ADC value
  1161. #define HEATER_0_RAW_HI_TEMP 16383
  1162. #define HEATER_0_RAW_LO_TEMP 0
  1163. #endif
  1164. #endif
  1165. #ifdef THERMISTORHEATER_1
  1166. #define HEATER_1_TEMPTABLE TT_NAME(THERMISTORHEATER_1)
  1167. #define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE)
  1168. #else
  1169. #ifdef HEATER_1_USES_THERMISTOR
  1170. #error "No heater 1 thermistor table specified"
  1171. #else // HEATER_1_USES_THERMISTOR
  1172. #define HEATER_1_TEMPTABLE NULL
  1173. #define HEATER_1_TEMPTABLE_LEN 0
  1174. #endif // HEATER_1_USES_THERMISTOR
  1175. #endif
  1176. // Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature
  1177. #ifndef HEATER_1_RAW_HI_TEMP
  1178. #ifdef HEATER_1_USES_THERMISTOR // In case of a thermistor the highest temperature results in the lowest ADC value
  1179. #define HEATER_1_RAW_HI_TEMP 0
  1180. #define HEATER_1_RAW_LO_TEMP 16383
  1181. #else // In case of an thermocouple the highest temperature results in the highest ADC value
  1182. #define HEATER_1_RAW_HI_TEMP 16383
  1183. #define HEATER_1_RAW_LO_TEMP 0
  1184. #endif
  1185. #endif
  1186. #ifdef THERMISTORHEATER_2
  1187. #define HEATER_2_TEMPTABLE TT_NAME(THERMISTORHEATER_2)
  1188. #define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE)
  1189. #else
  1190. #ifdef HEATER_2_USES_THERMISTOR
  1191. #error "No heater 2 thermistor table specified"
  1192. #else // HEATER_2_USES_THERMISTOR
  1193. #define HEATER_2_TEMPTABLE NULL
  1194. #define HEATER_2_TEMPTABLE_LEN 0
  1195. #endif // HEATER_2_USES_THERMISTOR
  1196. #endif
  1197. // Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature
  1198. #ifndef HEATER_2_RAW_HI_TEMP
  1199. #ifdef HEATER_2_USES_THERMISTOR // In case of a thermistor the highest temperature results in the lowest ADC value
  1200. #define HEATER_2_RAW_HI_TEMP 0
  1201. #define HEATER_2_RAW_LO_TEMP 16383
  1202. #else // In case of an thermocouple the highest temperature results in the highest ADC value
  1203. #define HEATER_2_RAW_HI_TEMP 16383
  1204. #define HEATER_2_RAW_LO_TEMP 0
  1205. #endif
  1206. #endif
  1207. #ifdef THERMISTORHEATER_3
  1208. #define HEATER_3_TEMPTABLE TT_NAME(THERMISTORHEATER_3)
  1209. #define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE)
  1210. #else
  1211. #ifdef HEATER_3_USES_THERMISTOR
  1212. #error "No heater 3 thermistor table specified"
  1213. #else // HEATER_3_USES_THERMISTOR
  1214. #define HEATER_3_TEMPTABLE NULL
  1215. #define HEATER_3_TEMPTABLE_LEN 0
  1216. #endif // HEATER_3_USES_THERMISTOR
  1217. #endif
  1218. // Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature
  1219. #ifndef HEATER_3_RAW_HI_TEMP
  1220. #ifdef HEATER_3_USES_THERMISTOR // In case of a thermistor the highest temperature results in the lowest ADC value
  1221. #define HEATER_3_RAW_HI_TEMP 0
  1222. #define HEATER_3_RAW_LO_TEMP 16383
  1223. #else // In case of an thermocouple the highest temperature results in the highest ADC value
  1224. #define HEATER_3_RAW_HI_TEMP 16383
  1225. #define HEATER_3_RAW_LO_TEMP 0
  1226. #endif
  1227. #endif
  1228. #ifdef THERMISTORBED
  1229. #define BEDTEMPTABLE TT_NAME(THERMISTORBED)
  1230. #define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE)
  1231. #else
  1232. #ifdef BED_USES_THERMISTOR
  1233. #error "No bed thermistor table specified"
  1234. #endif // BED_USES_THERMISTOR
  1235. #endif
  1236. // Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature
  1237. #ifndef HEATER_BED_RAW_HI_TEMP
  1238. #ifdef BED_USES_THERMISTOR // In case of a thermistor the highest temperature results in the lowest ADC value
  1239. #define HEATER_BED_RAW_HI_TEMP 0
  1240. #define HEATER_BED_RAW_LO_TEMP 16383
  1241. #else // In case of an thermocouple the highest temperature results in the highest ADC value
  1242. #define HEATER_BED_RAW_HI_TEMP 16383
  1243. #define HEATER_BED_RAW_LO_TEMP 0
  1244. #endif
  1245. #endif
  1246. #endif // THERMISTORTABLES_H_