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

thermistortables.h 42KB

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