My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

thermistortables.h 40KB

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