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

thermistortables.h 39KB

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