My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

thermistortables.h 41KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237
  1. #ifndef THERMISTORTABLES_H_
  2. #define THERMISTORTABLES_H_
  3. #include "Marlin.h"
  4. #include "macros.h"
  5. #define OVERSAMPLENR 16
  6. #if (THERMISTORHEATER_0 == 1) || (THERMISTORHEATER_1 == 1) || (THERMISTORHEATER_2 == 1) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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) || (THERMISTORHEATER_3 == 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 (THERMISTORHEATER_3 == 20)
  693. # define HEATER_3_RAW_HI_TEMP 16383
  694. # define HEATER_3_RAW_LO_TEMP 0
  695. #endif
  696. #if (THERMISTORBED == 20)
  697. # define HEATER_BED_RAW_HI_TEMP 16383
  698. # define HEATER_BED_RAW_LO_TEMP 0
  699. #endif
  700. const short temptable_20[][2] PROGMEM = {
  701. { 0*OVERSAMPLENR , 0 },
  702. { 227*OVERSAMPLENR , 1 },
  703. { 236*OVERSAMPLENR , 10 },
  704. { 245*OVERSAMPLENR , 20 },
  705. { 253*OVERSAMPLENR , 30 },
  706. { 262*OVERSAMPLENR , 40 },
  707. { 270*OVERSAMPLENR , 50 },
  708. { 279*OVERSAMPLENR , 60 },
  709. { 287*OVERSAMPLENR , 70 },
  710. { 295*OVERSAMPLENR , 80 },
  711. { 304*OVERSAMPLENR , 90 },
  712. { 312*OVERSAMPLENR , 100 },
  713. { 320*OVERSAMPLENR , 110 },
  714. { 329*OVERSAMPLENR , 120 },
  715. { 337*OVERSAMPLENR , 130 },
  716. { 345*OVERSAMPLENR , 140 },
  717. { 353*OVERSAMPLENR , 150 },
  718. { 361*OVERSAMPLENR , 160 },
  719. { 369*OVERSAMPLENR , 170 },
  720. { 377*OVERSAMPLENR , 180 },
  721. { 385*OVERSAMPLENR , 190 },
  722. { 393*OVERSAMPLENR , 200 },
  723. { 401*OVERSAMPLENR , 210 },
  724. { 409*OVERSAMPLENR , 220 },
  725. { 417*OVERSAMPLENR , 230 },
  726. { 424*OVERSAMPLENR , 240 },
  727. { 432*OVERSAMPLENR , 250 },
  728. { 440*OVERSAMPLENR , 260 },
  729. { 447*OVERSAMPLENR , 270 },
  730. { 455*OVERSAMPLENR , 280 },
  731. { 463*OVERSAMPLENR , 290 },
  732. { 470*OVERSAMPLENR , 300 },
  733. { 478*OVERSAMPLENR , 310 },
  734. { 485*OVERSAMPLENR , 320 },
  735. { 493*OVERSAMPLENR , 330 },
  736. { 500*OVERSAMPLENR , 340 },
  737. { 507*OVERSAMPLENR , 350 },
  738. { 515*OVERSAMPLENR , 360 },
  739. { 522*OVERSAMPLENR , 370 },
  740. { 529*OVERSAMPLENR , 380 },
  741. { 537*OVERSAMPLENR , 390 },
  742. { 544*OVERSAMPLENR , 400 },
  743. { 614*OVERSAMPLENR , 500 },
  744. { 681*OVERSAMPLENR , 600 },
  745. { 744*OVERSAMPLENR , 700 },
  746. { 805*OVERSAMPLENR , 800 },
  747. { 862*OVERSAMPLENR , 900 },
  748. { 917*OVERSAMPLENR , 1000 },
  749. { 968*OVERSAMPLENR , 1100 }
  750. };
  751. #endif
  752. #if (THERMISTORHEATER_0 == 51) || (THERMISTORHEATER_1 == 51) || (THERMISTORHEATER_2 == 51) || (THERMISTORHEATER_3 == 51) || (THERMISTORBED == 51)
  753. // 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
  754. // Verified by linagee.
  755. // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
  756. // Advantage: Twice the resolution and better linearity from 150C to 200C
  757. const short temptable_51[][2] PROGMEM = {
  758. {1*OVERSAMPLENR, 350},
  759. {190*OVERSAMPLENR, 250}, //top rating 250C
  760. {203*OVERSAMPLENR, 245},
  761. {217*OVERSAMPLENR, 240},
  762. {232*OVERSAMPLENR, 235},
  763. {248*OVERSAMPLENR, 230},
  764. {265*OVERSAMPLENR, 225},
  765. {283*OVERSAMPLENR, 220},
  766. {302*OVERSAMPLENR, 215},
  767. {322*OVERSAMPLENR, 210},
  768. {344*OVERSAMPLENR, 205},
  769. {366*OVERSAMPLENR, 200},
  770. {390*OVERSAMPLENR, 195},
  771. {415*OVERSAMPLENR, 190},
  772. {440*OVERSAMPLENR, 185},
  773. {467*OVERSAMPLENR, 180},
  774. {494*OVERSAMPLENR, 175},
  775. {522*OVERSAMPLENR, 170},
  776. {551*OVERSAMPLENR, 165},
  777. {580*OVERSAMPLENR, 160},
  778. {609*OVERSAMPLENR, 155},
  779. {638*OVERSAMPLENR, 150},
  780. {666*OVERSAMPLENR, 145},
  781. {695*OVERSAMPLENR, 140},
  782. {722*OVERSAMPLENR, 135},
  783. {749*OVERSAMPLENR, 130},
  784. {775*OVERSAMPLENR, 125},
  785. {800*OVERSAMPLENR, 120},
  786. {823*OVERSAMPLENR, 115},
  787. {845*OVERSAMPLENR, 110},
  788. {865*OVERSAMPLENR, 105},
  789. {884*OVERSAMPLENR, 100},
  790. {901*OVERSAMPLENR, 95},
  791. {917*OVERSAMPLENR, 90},
  792. {932*OVERSAMPLENR, 85},
  793. {944*OVERSAMPLENR, 80},
  794. {956*OVERSAMPLENR, 75},
  795. {966*OVERSAMPLENR, 70},
  796. {975*OVERSAMPLENR, 65},
  797. {982*OVERSAMPLENR, 60},
  798. {989*OVERSAMPLENR, 55},
  799. {995*OVERSAMPLENR, 50},
  800. {1000*OVERSAMPLENR, 45},
  801. {1004*OVERSAMPLENR, 40},
  802. {1007*OVERSAMPLENR, 35},
  803. {1010*OVERSAMPLENR, 30},
  804. {1013*OVERSAMPLENR, 25},
  805. {1015*OVERSAMPLENR, 20},
  806. {1017*OVERSAMPLENR, 15},
  807. {1018*OVERSAMPLENR, 10},
  808. {1019*OVERSAMPLENR, 5},
  809. {1020*OVERSAMPLENR, 0},
  810. {1021*OVERSAMPLENR, -5}
  811. };
  812. #endif
  813. #if (THERMISTORHEATER_0 == 52) || (THERMISTORHEATER_1 == 52) || (THERMISTORHEATER_2 == 52) || (THERMISTORHEATER_3 == 52) || (THERMISTORBED == 52)
  814. // 200k ATC Semitec 204GT-2 (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
  815. // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
  816. // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
  817. // Advantage: More resolution and better linearity from 150C to 200C
  818. const short temptable_52[][2] PROGMEM = {
  819. {1*OVERSAMPLENR, 500},
  820. {125*OVERSAMPLENR, 300}, //top rating 300C
  821. {142*OVERSAMPLENR, 290},
  822. {162*OVERSAMPLENR, 280},
  823. {185*OVERSAMPLENR, 270},
  824. {211*OVERSAMPLENR, 260},
  825. {240*OVERSAMPLENR, 250},
  826. {274*OVERSAMPLENR, 240},
  827. {312*OVERSAMPLENR, 230},
  828. {355*OVERSAMPLENR, 220},
  829. {401*OVERSAMPLENR, 210},
  830. {452*OVERSAMPLENR, 200},
  831. {506*OVERSAMPLENR, 190},
  832. {563*OVERSAMPLENR, 180},
  833. {620*OVERSAMPLENR, 170},
  834. {677*OVERSAMPLENR, 160},
  835. {732*OVERSAMPLENR, 150},
  836. {783*OVERSAMPLENR, 140},
  837. {830*OVERSAMPLENR, 130},
  838. {871*OVERSAMPLENR, 120},
  839. {906*OVERSAMPLENR, 110},
  840. {935*OVERSAMPLENR, 100},
  841. {958*OVERSAMPLENR, 90},
  842. {976*OVERSAMPLENR, 80},
  843. {990*OVERSAMPLENR, 70},
  844. {1000*OVERSAMPLENR, 60},
  845. {1008*OVERSAMPLENR, 50},
  846. {1013*OVERSAMPLENR, 40},
  847. {1017*OVERSAMPLENR, 30},
  848. {1019*OVERSAMPLENR, 20},
  849. {1021*OVERSAMPLENR, 10},
  850. {1022*OVERSAMPLENR, 0}
  851. };
  852. #endif
  853. #if (THERMISTORHEATER_0 == 55) || (THERMISTORHEATER_1 == 55) || (THERMISTORHEATER_2 == 55) || (THERMISTORHEATER_3 == 55) || (THERMISTORBED == 55)
  854. // 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!)
  855. // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf
  856. // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
  857. // Advantage: More resolution and better linearity from 150C to 200C
  858. const short temptable_55[][2] PROGMEM = {
  859. {1*OVERSAMPLENR, 500},
  860. {76*OVERSAMPLENR, 300},
  861. {87*OVERSAMPLENR, 290},
  862. {100*OVERSAMPLENR, 280},
  863. {114*OVERSAMPLENR, 270},
  864. {131*OVERSAMPLENR, 260},
  865. {152*OVERSAMPLENR, 250},
  866. {175*OVERSAMPLENR, 240},
  867. {202*OVERSAMPLENR, 230},
  868. {234*OVERSAMPLENR, 220},
  869. {271*OVERSAMPLENR, 210},
  870. {312*OVERSAMPLENR, 200},
  871. {359*OVERSAMPLENR, 190},
  872. {411*OVERSAMPLENR, 180},
  873. {467*OVERSAMPLENR, 170},
  874. {527*OVERSAMPLENR, 160},
  875. {590*OVERSAMPLENR, 150},
  876. {652*OVERSAMPLENR, 140},
  877. {713*OVERSAMPLENR, 130},
  878. {770*OVERSAMPLENR, 120},
  879. {822*OVERSAMPLENR, 110},
  880. {867*OVERSAMPLENR, 100},
  881. {905*OVERSAMPLENR, 90},
  882. {936*OVERSAMPLENR, 80},
  883. {961*OVERSAMPLENR, 70},
  884. {979*OVERSAMPLENR, 60},
  885. {993*OVERSAMPLENR, 50},
  886. {1003*OVERSAMPLENR, 40},
  887. {1010*OVERSAMPLENR, 30},
  888. {1015*OVERSAMPLENR, 20},
  889. {1018*OVERSAMPLENR, 10},
  890. {1020*OVERSAMPLENR, 0}
  891. };
  892. #endif
  893. #if (THERMISTORHEATER_0 == 60) || (THERMISTORHEATER_1 == 60) || (THERMISTORHEATER_2 == 60) || (THERMISTORHEATER_3 == 60) || (THERMISTORBED == 60) // Maker's Tool Works Kapton Bed Thermister
  894. // ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=3950
  895. // r0: 100000
  896. // t0: 25
  897. // r1: 0 (parallel with rTherm)
  898. // r2: 4700 (series with rTherm)
  899. // beta: 3950
  900. // min adc: 1 at 0.0048828125 V
  901. // max adc: 1023 at 4.9951171875 V
  902. const short temptable_60[][2] PROGMEM = {
  903. {51*OVERSAMPLENR, 272},
  904. {61*OVERSAMPLENR, 258},
  905. {71*OVERSAMPLENR, 247},
  906. {81*OVERSAMPLENR, 237},
  907. {91*OVERSAMPLENR, 229},
  908. {101*OVERSAMPLENR, 221},
  909. {131*OVERSAMPLENR, 204},
  910. {161*OVERSAMPLENR, 190},
  911. {191*OVERSAMPLENR, 179},
  912. {231*OVERSAMPLENR, 167},
  913. {271*OVERSAMPLENR, 157},
  914. {311*OVERSAMPLENR, 148},
  915. {351*OVERSAMPLENR, 140},
  916. {381*OVERSAMPLENR, 135},
  917. {411*OVERSAMPLENR, 130},
  918. {441*OVERSAMPLENR, 125},
  919. {451*OVERSAMPLENR, 123},
  920. {461*OVERSAMPLENR, 122},
  921. {471*OVERSAMPLENR, 120},
  922. {481*OVERSAMPLENR, 119},
  923. {491*OVERSAMPLENR, 117},
  924. {501*OVERSAMPLENR, 116},
  925. {511*OVERSAMPLENR, 114},
  926. {521*OVERSAMPLENR, 113},
  927. {531*OVERSAMPLENR, 111},
  928. {541*OVERSAMPLENR, 110},
  929. {551*OVERSAMPLENR, 108},
  930. {561*OVERSAMPLENR, 107},
  931. {571*OVERSAMPLENR, 105},
  932. {581*OVERSAMPLENR, 104},
  933. {591*OVERSAMPLENR, 102},
  934. {601*OVERSAMPLENR, 101},
  935. {611*OVERSAMPLENR, 100},
  936. {621*OVERSAMPLENR, 98},
  937. {631*OVERSAMPLENR, 97},
  938. {641*OVERSAMPLENR, 95},
  939. {651*OVERSAMPLENR, 94},
  940. {661*OVERSAMPLENR, 92},
  941. {671*OVERSAMPLENR, 91},
  942. {681*OVERSAMPLENR, 90},
  943. {691*OVERSAMPLENR, 88},
  944. {701*OVERSAMPLENR, 87},
  945. {711*OVERSAMPLENR, 85},
  946. {721*OVERSAMPLENR, 84},
  947. {731*OVERSAMPLENR, 82},
  948. {741*OVERSAMPLENR, 81},
  949. {751*OVERSAMPLENR, 79},
  950. {761*OVERSAMPLENR, 77},
  951. {771*OVERSAMPLENR, 76},
  952. {781*OVERSAMPLENR, 74},
  953. {791*OVERSAMPLENR, 72},
  954. {801*OVERSAMPLENR, 71},
  955. {811*OVERSAMPLENR, 69},
  956. {821*OVERSAMPLENR, 67},
  957. {831*OVERSAMPLENR, 65},
  958. {841*OVERSAMPLENR, 63},
  959. {851*OVERSAMPLENR, 62},
  960. {861*OVERSAMPLENR, 60},
  961. {871*OVERSAMPLENR, 57},
  962. {881*OVERSAMPLENR, 55},
  963. {891*OVERSAMPLENR, 53},
  964. {901*OVERSAMPLENR, 51},
  965. {911*OVERSAMPLENR, 48},
  966. {921*OVERSAMPLENR, 45},
  967. {931*OVERSAMPLENR, 42},
  968. {941*OVERSAMPLENR, 39},
  969. {951*OVERSAMPLENR, 36},
  970. {961*OVERSAMPLENR, 32},
  971. {981*OVERSAMPLENR, 23},
  972. {991*OVERSAMPLENR, 17},
  973. {1001*OVERSAMPLENR, 9},
  974. {1008*OVERSAMPLENR, 0},
  975. };
  976. #endif
  977. #if (THERMISTORBED == 12)
  978. //100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
  979. const short temptable_12[][2] PROGMEM = {
  980. {35*OVERSAMPLENR, 180}, //top rating 180C
  981. {211*OVERSAMPLENR, 140},
  982. {233*OVERSAMPLENR, 135},
  983. {261*OVERSAMPLENR, 130},
  984. {290*OVERSAMPLENR, 125},
  985. {328*OVERSAMPLENR, 120},
  986. {362*OVERSAMPLENR, 115},
  987. {406*OVERSAMPLENR, 110},
  988. {446*OVERSAMPLENR, 105},
  989. {496*OVERSAMPLENR, 100},
  990. {539*OVERSAMPLENR, 95},
  991. {585*OVERSAMPLENR, 90},
  992. {629*OVERSAMPLENR, 85},
  993. {675*OVERSAMPLENR, 80},
  994. {718*OVERSAMPLENR, 75},
  995. {758*OVERSAMPLENR, 70},
  996. {793*OVERSAMPLENR, 65},
  997. {822*OVERSAMPLENR, 60},
  998. {841*OVERSAMPLENR, 55},
  999. {875*OVERSAMPLENR, 50},
  1000. {899*OVERSAMPLENR, 45},
  1001. {926*OVERSAMPLENR, 40},
  1002. {946*OVERSAMPLENR, 35},
  1003. {962*OVERSAMPLENR, 30},
  1004. {977*OVERSAMPLENR, 25},
  1005. {987*OVERSAMPLENR, 20},
  1006. {995*OVERSAMPLENR, 15},
  1007. {1001*OVERSAMPLENR, 10},
  1008. {1010*OVERSAMPLENR, 0},
  1009. {1023*OVERSAMPLENR, -40},
  1010. };
  1011. #endif
  1012. // Pt1000 and Pt100 handling
  1013. //
  1014. // Rt=R0*(1+a*T+b*T*T) [for T>0]
  1015. // a=3.9083E-3, b=-5.775E-7
  1016. #define PtA 3.9083E-3
  1017. #define PtB -5.775E-7
  1018. #define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T)))
  1019. #define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1))
  1020. #define PtLine(T,R0,Rup) { PtAdVal(T,R0,Rup)*OVERSAMPLENR, T },
  1021. #if (THERMISTORHEATER_0 == 110) || (THERMISTORHEATER_1 == 110) || (THERMISTORHEATER_2 == 110) || (THERMISTORHEATER_3 == 110) || (THERMISTORBED == 110) // Pt100 with 1k0 pullup
  1022. const short temptable_110[][2] PROGMEM = {
  1023. // only few values are needed as the curve is very flat
  1024. PtLine(0,100,1000)
  1025. PtLine(50,100,1000)
  1026. PtLine(100,100,1000)
  1027. PtLine(150,100,1000)
  1028. PtLine(200,100,1000)
  1029. PtLine(250,100,1000)
  1030. PtLine(300,100,1000)
  1031. };
  1032. #endif
  1033. #if (THERMISTORHEATER_0 == 147) || (THERMISTORHEATER_1 == 147) || (THERMISTORHEATER_2 == 147) || (THERMISTORHEATER_3 == 147) || (THERMISTORBED == 147) // Pt100 with 4k7 pullup
  1034. const short temptable_147[][2] PROGMEM = {
  1035. // only few values are needed as the curve is very flat
  1036. PtLine(0,100,4700)
  1037. PtLine(50,100,4700)
  1038. PtLine(100,100,4700)
  1039. PtLine(150,100,4700)
  1040. PtLine(200,100,4700)
  1041. PtLine(250,100,4700)
  1042. PtLine(300,100,4700)
  1043. };
  1044. #endif
  1045. #if (THERMISTORHEATER_0 == 1010) || (THERMISTORHEATER_1 == 1010) || (THERMISTORHEATER_2 == 1010) || (THERMISTORHEATER_3 == 1010) || (THERMISTORBED == 1010) // Pt1000 with 1k0 pullup
  1046. const short temptable_1010[][2] PROGMEM = {
  1047. PtLine(0,1000,1000)
  1048. PtLine(25,1000,1000)
  1049. PtLine(50,1000,1000)
  1050. PtLine(75,1000,1000)
  1051. PtLine(100,1000,1000)
  1052. PtLine(125,1000,1000)
  1053. PtLine(150,1000,1000)
  1054. PtLine(175,1000,1000)
  1055. PtLine(200,1000,1000)
  1056. PtLine(225,1000,1000)
  1057. PtLine(250,1000,1000)
  1058. PtLine(275,1000,1000)
  1059. PtLine(300,1000,1000)
  1060. };
  1061. #endif
  1062. #if (THERMISTORHEATER_0 == 1047) || (THERMISTORHEATER_1 == 1047) || (THERMISTORHEATER_2 == 1047) || (THERMISTORHEATER_3 == 1047) || (THERMISTORBED == 1047) // Pt1000 with 4k7 pullup
  1063. const short temptable_1047[][2] PROGMEM = {
  1064. // only few values are needed as the curve is very flat
  1065. PtLine(0,1000,4700)
  1066. PtLine(50,1000,4700)
  1067. PtLine(100,1000,4700)
  1068. PtLine(150,1000,4700)
  1069. PtLine(200,1000,4700)
  1070. PtLine(250,1000,4700)
  1071. PtLine(300,1000,4700)
  1072. };
  1073. #endif
  1074. #if (THERMISTORHEATER_0 == 999) || (THERMISTORHEATER_1 == 999) || (THERMISTORHEATER_2 == 999) || (THERMISTORHEATER_3 == 999) || (THERMISTORBED == 999) //User defined table
  1075. // Dummy Thermistor table.. It will ALWAYS read a fixed value.
  1076. #ifndef DUMMY_THERMISTOR_999_VALUE
  1077. #define DUMMY_THERMISTOR_999_VALUE 25
  1078. #endif
  1079. const short temptable_999[][2] PROGMEM = {
  1080. {1*OVERSAMPLENR, DUMMY_THERMISTOR_999_VALUE},
  1081. {1023*OVERSAMPLENR, DUMMY_THERMISTOR_999_VALUE}
  1082. };
  1083. #endif
  1084. #if (THERMISTORHEATER_0 == 998) || (THERMISTORHEATER_1 == 998) || (THERMISTORHEATER_2 == 998) || (THERMISTORHEATER_3 == 998) || (THERMISTORBED == 998) //User defined table
  1085. // Dummy Thermistor table.. It will ALWAYS read a fixed value.
  1086. #ifndef DUMMY_THERMISTOR_998_VALUE
  1087. #define DUMMY_THERMISTOR_998_VALUE 25
  1088. #endif
  1089. const short temptable_998[][2] PROGMEM = {
  1090. {1*OVERSAMPLENR, DUMMY_THERMISTOR_998_VALUE},
  1091. {1023*OVERSAMPLENR, DUMMY_THERMISTOR_998_VALUE}
  1092. };
  1093. #endif
  1094. #define _TT_NAME(_N) temptable_ ## _N
  1095. #define TT_NAME(_N) _TT_NAME(_N)
  1096. #ifdef THERMISTORHEATER_0
  1097. # define HEATER_0_TEMPTABLE TT_NAME(THERMISTORHEATER_0)
  1098. # define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE)
  1099. #else
  1100. # ifdef HEATER_0_USES_THERMISTOR
  1101. # error No heater 0 thermistor table specified
  1102. # else // HEATER_0_USES_THERMISTOR
  1103. # define HEATER_0_TEMPTABLE NULL
  1104. # define HEATER_0_TEMPTABLE_LEN 0
  1105. # endif // HEATER_0_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_0_RAW_HI_TEMP
  1109. # ifdef HEATER_0_USES_THERMISTOR //In case of a thermistor the highest temperature results in the lowest ADC value
  1110. # define HEATER_0_RAW_HI_TEMP 0
  1111. # define HEATER_0_RAW_LO_TEMP 16383
  1112. # else //In case of an thermocouple the highest temperature results in the highest ADC value
  1113. # define HEATER_0_RAW_HI_TEMP 16383
  1114. # define HEATER_0_RAW_LO_TEMP 0
  1115. # endif
  1116. #endif
  1117. #ifdef THERMISTORHEATER_1
  1118. # define HEATER_1_TEMPTABLE TT_NAME(THERMISTORHEATER_1)
  1119. # define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE)
  1120. #else
  1121. # ifdef HEATER_1_USES_THERMISTOR
  1122. # error No heater 1 thermistor table specified
  1123. # else // HEATER_1_USES_THERMISTOR
  1124. # define HEATER_1_TEMPTABLE NULL
  1125. # define HEATER_1_TEMPTABLE_LEN 0
  1126. # endif // HEATER_1_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_1_RAW_HI_TEMP
  1130. # ifdef HEATER_1_USES_THERMISTOR //In case of a thermistor the highest temperature results in the lowest ADC value
  1131. # define HEATER_1_RAW_HI_TEMP 0
  1132. # define HEATER_1_RAW_LO_TEMP 16383
  1133. # else //In case of an thermocouple the highest temperature results in the highest ADC value
  1134. # define HEATER_1_RAW_HI_TEMP 16383
  1135. # define HEATER_1_RAW_LO_TEMP 0
  1136. # endif
  1137. #endif
  1138. #ifdef THERMISTORHEATER_2
  1139. # define HEATER_2_TEMPTABLE TT_NAME(THERMISTORHEATER_2)
  1140. # define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE)
  1141. #else
  1142. # ifdef HEATER_2_USES_THERMISTOR
  1143. # error No heater 2 thermistor table specified
  1144. # else // HEATER_2_USES_THERMISTOR
  1145. # define HEATER_2_TEMPTABLE NULL
  1146. # define HEATER_2_TEMPTABLE_LEN 0
  1147. # endif // HEATER_2_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_2_RAW_HI_TEMP
  1151. # ifdef HEATER_2_USES_THERMISTOR //In case of a thermistor the highest temperature results in the lowest ADC value
  1152. # define HEATER_2_RAW_HI_TEMP 0
  1153. # define HEATER_2_RAW_LO_TEMP 16383
  1154. # else //In case of an thermocouple the highest temperature results in the highest ADC value
  1155. # define HEATER_2_RAW_HI_TEMP 16383
  1156. # define HEATER_2_RAW_LO_TEMP 0
  1157. # endif
  1158. #endif
  1159. #ifdef THERMISTORHEATER_3
  1160. # define HEATER_3_TEMPTABLE TT_NAME(THERMISTORHEATER_3)
  1161. # define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE)
  1162. #else
  1163. # ifdef HEATER_3_USES_THERMISTOR
  1164. # error No heater 3 thermistor table specified
  1165. # else // HEATER_3_USES_THERMISTOR
  1166. # define HEATER_3_TEMPTABLE NULL
  1167. # define HEATER_3_TEMPTABLE_LEN 0
  1168. # endif // HEATER_3_USES_THERMISTOR
  1169. #endif
  1170. //Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature
  1171. #ifndef HEATER_3_RAW_HI_TEMP
  1172. # ifdef HEATER_3_USES_THERMISTOR //In case of a thermistor the highest temperature results in the lowest ADC value
  1173. # define HEATER_3_RAW_HI_TEMP 0
  1174. # define HEATER_3_RAW_LO_TEMP 16383
  1175. # else //In case of an thermocouple the highest temperature results in the highest ADC value
  1176. # define HEATER_3_RAW_HI_TEMP 16383
  1177. # define HEATER_3_RAW_LO_TEMP 0
  1178. # endif
  1179. #endif
  1180. #ifdef THERMISTORBED
  1181. # define BEDTEMPTABLE TT_NAME(THERMISTORBED)
  1182. # define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE)
  1183. #else
  1184. # ifdef BED_USES_THERMISTOR
  1185. # error No bed thermistor table specified
  1186. # endif // BED_USES_THERMISTOR
  1187. #endif
  1188. //Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature
  1189. #ifndef HEATER_BED_RAW_HI_TEMP
  1190. # ifdef BED_USES_THERMISTOR //In case of a thermistor the highest temperature results in the lowest ADC value
  1191. # define HEATER_BED_RAW_HI_TEMP 0
  1192. # define HEATER_BED_RAW_LO_TEMP 16383
  1193. # else //In case of an thermocouple the highest temperature results in the highest ADC value
  1194. # define HEATER_BED_RAW_HI_TEMP 16383
  1195. # define HEATER_BED_RAW_LO_TEMP 0
  1196. # endif
  1197. #endif
  1198. #endif //THERMISTORTABLES_H_