thermistortables.h 45 KB

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