My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

thermistortables.h 42KB

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