My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

thermistortables.h 42KB

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