Prusa MINI Firmware overview
|
Go to the documentation of this file.
24 #include "../../inc/MarlinConfig.h"
26 #define OVERSAMPLENR 16
27 #define OV(N) int16_t((N) * (OVERSAMPLENR))
29 #define ANY_THERMISTOR_IS(n) (THERMISTOR_HEATER_0 == n || THERMISTOR_HEATER_1 == n || THERMISTOR_HEATER_2 == n || THERMISTOR_HEATER_3 == n || THERMISTOR_HEATER_4 == n || THERMISTOR_HEATER_5 == n || THERMISTORBED == n || THERMISTORCHAMBER == n)
37 #define PtRt(T,R0) ((R0) * (1.0 + (PtA) * (T) + (PtB) * (T) * (T)))
38 #define PtAdVal(T,R0,Rup) (short)(1024 / (Rup / PtRt(T, R0) + 1))
39 #define PtLine(T,R0,Rup) { OV(PtAdVal(T, R0, Rup)), T }
41 #if ANY_THERMISTOR_IS(1) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "EPCOS"
44 #if ANY_THERMISTOR_IS(2) // 4338 K, R25 = 200 kOhm, Pull-up = 4.7 kOhm, "ATC Semitec 204GT-2"
47 #if ANY_THERMISTOR_IS(3) // beta25 = 4120 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Mendel-parts"
50 #if ANY_THERMISTOR_IS(4) // beta25 = 3950 K, R25 = 10 kOhm, Pull-up = 4.7 kOhm, "Generic"
53 #if ANY_THERMISTOR_IS(5) // beta25 = 4267 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "ParCan, ATC 104GT-2"
56 #if ANY_THERMISTOR_IS(501) // 100K Zonestar thermistor
59 #if ANY_THERMISTOR_IS(512) // 100k thermistor in RPW-Ultra hotend, Pull-up = 4.7 kOhm, "unknown model"
62 #if ANY_THERMISTOR_IS(6) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 8.2 kOhm, "EPCOS ?"
65 #if ANY_THERMISTOR_IS(7) // beta25 = 3974 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Honeywell 135-104LAG-J01"
68 #if ANY_THERMISTOR_IS(71) // beta25 = 3974 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Honeywell 135-104LAF-J01"
71 #if ANY_THERMISTOR_IS(8) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 10 kOhm, "Vishay E3104FHT"
74 #if ANY_THERMISTOR_IS(9) // beta25 = 3960 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "GE Sensing AL03006-58.2K-97-G1"
77 #if ANY_THERMISTOR_IS(10) // beta25 = 3960 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "RS 198-961"
80 #if ANY_THERMISTOR_IS(11) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "QU-BD silicone bed, QWG-104F-3950"
83 #if ANY_THERMISTOR_IS(13) // beta25 = 4100 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Hisens"
86 #if ANY_THERMISTOR_IS(15) // JGAurora A5 thermistor calibration
89 #if ANY_THERMISTOR_IS(18) // ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327
92 #if ANY_THERMISTOR_IS(20) // Pt100 with INA826 amp on Ultimaker v2.0 electronics
95 #if ANY_THERMISTOR_IS(51) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 1 kOhm, "EPCOS"
98 #if ANY_THERMISTOR_IS(52) // beta25 = 4338 K, R25 = 200 kOhm, Pull-up = 1 kOhm, "ATC Semitec 204GT-2"
101 #if ANY_THERMISTOR_IS(55) // beta25 = 4267 K, R25 = 100 kOhm, Pull-up = 1 kOhm, "ATC Semitec 104GT-2 (Used on ParCan)"
104 #if ANY_THERMISTOR_IS(60) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Maker's Tool Works Kapton Bed"
107 #if ANY_THERMISTOR_IS(61) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Formbot 350°C Thermistor"
110 #if ANY_THERMISTOR_IS(66) // beta25 = 4500 K, R25 = 2.5 MOhm, Pull-up = 4.7 kOhm, "DyzeDesign 500 °C Thermistor"
113 #if ANY_THERMISTOR_IS(67) // R25 = 500 KOhm, beta25 = 3800 K, 4.7 kOhm pull-up, SliceEngineering 450 °C Thermistor
116 #if ANY_THERMISTOR_IS(12) // beta25 = 4700 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Personal calibration for Makibox hot bed"
119 #if ANY_THERMISTOR_IS(70) // beta25 = 4100 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Hephestos 2, bqh2 stock thermistor"
122 #if ANY_THERMISTOR_IS(75) // beta25 = 4100 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "MGB18-104F39050L32 thermistor"
125 #if ANY_THERMISTOR_IS(99) // 100k bed thermistor with a 10K pull-up resistor (on some Wanhao i3 models)
128 #if ANY_THERMISTOR_IS(110) // Pt100 with 1k0 pullup
131 #if ANY_THERMISTOR_IS(147) // Pt100 with 4k7 pullup
134 #if ANY_THERMISTOR_IS(201) // Pt100 with LMV324 Overlord
137 #if ANY_THERMISTOR_IS(331) // Like table 1, but with 3V3 as input voltage
140 #if ANY_THERMISTOR_IS(666) // beta25 = UNK, R25 = 200K, Pull-up = 10 kOhm, "Unidentified 200K NTC thermistor (Einstart S)"
143 #if ANY_THERMISTOR_IS(1010) // Pt1000 with 1k0 pullup
146 #if ANY_THERMISTOR_IS(1047) // Pt1000 with 4k7 pullup
149 #if ANY_THERMISTOR_IS(998) // User-defined table 1
152 #if ANY_THERMISTOR_IS(999) // User-defined table 2
155 #if ANY_THERMISTOR_IS(1000) // Custom
156 const short temptable_1000[][2]
PROGMEM = { { 0, 0 } };
159 #define _TT_NAME(_N) temptable_ ## _N
160 #define TT_NAME(_N) _TT_NAME(_N)
162 #if THERMISTOR_HEATER_0
163 #define HEATER_0_TEMPTABLE TT_NAME(THERMISTOR_HEATER_0)
164 #define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE)
165 #elif defined(HEATER_0_USES_THERMISTOR)
166 #error "No heater 0 thermistor table specified"
168 #define HEATER_0_TEMPTABLE nullptr
169 #define HEATER_0_TEMPTABLE_LEN 0
172 #if THERMISTOR_HEATER_1
173 #define HEATER_1_TEMPTABLE TT_NAME(THERMISTOR_HEATER_1)
174 #define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE)
175 #elif defined(HEATER_1_USES_THERMISTOR)
176 #error "No heater 1 thermistor table specified"
178 #define HEATER_1_TEMPTABLE nullptr
179 #define HEATER_1_TEMPTABLE_LEN 0
182 #if THERMISTOR_HEATER_2
183 #define HEATER_2_TEMPTABLE TT_NAME(THERMISTOR_HEATER_2)
184 #define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE)
185 #elif defined(HEATER_2_USES_THERMISTOR)
186 #error "No heater 2 thermistor table specified"
188 #define HEATER_2_TEMPTABLE nullptr
189 #define HEATER_2_TEMPTABLE_LEN 0
192 #if THERMISTOR_HEATER_3
193 #define HEATER_3_TEMPTABLE TT_NAME(THERMISTOR_HEATER_3)
194 #define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE)
195 #elif defined(HEATER_3_USES_THERMISTOR)
196 #error "No heater 3 thermistor table specified"
198 #define HEATER_3_TEMPTABLE nullptr
199 #define HEATER_3_TEMPTABLE_LEN 0
202 #if THERMISTOR_HEATER_4
203 #define HEATER_4_TEMPTABLE TT_NAME(THERMISTOR_HEATER_4)
204 #define HEATER_4_TEMPTABLE_LEN COUNT(HEATER_4_TEMPTABLE)
205 #elif defined(HEATER_4_USES_THERMISTOR)
206 #error "No heater 4 thermistor table specified"
208 #define HEATER_4_TEMPTABLE nullptr
209 #define HEATER_4_TEMPTABLE_LEN 0
212 #if THERMISTOR_HEATER_5
213 #define HEATER_5_TEMPTABLE TT_NAME(THERMISTOR_HEATER_5)
214 #define HEATER_5_TEMPTABLE_LEN COUNT(HEATER_5_TEMPTABLE)
215 #elif defined(HEATER_5_USES_THERMISTOR)
216 #error "No heater 5 thermistor table specified"
218 #define HEATER_5_TEMPTABLE nullptr
219 #define HEATER_5_TEMPTABLE_LEN 0
223 #define BED_TEMPTABLE TT_NAME(THERMISTORBED)
224 #define BED_TEMPTABLE_LEN COUNT(BED_TEMPTABLE)
225 #elif defined(HEATER_BED_USES_THERMISTOR)
226 #error "No bed thermistor table specified"
228 #define BED_TEMPTABLE_LEN 0
231 #ifdef THERMISTORCHAMBER
232 #define CHAMBER_TEMPTABLE TT_NAME(THERMISTORCHAMBER)
233 #define CHAMBER_TEMPTABLE_LEN COUNT(CHAMBER_TEMPTABLE)
234 #elif defined(HEATER_CHAMBER_USES_THERMISTOR)
235 #error "No chamber thermistor table specified"
237 #define CHAMBER_TEMPTABLE_LEN 0
246 "Temperature conversion tables over 255 entries need special consideration."
252 #ifndef HEATER_0_RAW_HI_TEMP
253 #if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_0_USES_THERMISTOR)
254 #define HEATER_0_RAW_HI_TEMP 16383
255 #define HEATER_0_RAW_LO_TEMP 0
257 #define HEATER_0_RAW_HI_TEMP 0
258 #define HEATER_0_RAW_LO_TEMP 16383
261 #ifndef HEATER_1_RAW_HI_TEMP
262 #if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_1_USES_THERMISTOR)
263 #define HEATER_1_RAW_HI_TEMP 16383
264 #define HEATER_1_RAW_LO_TEMP 0
266 #define HEATER_1_RAW_HI_TEMP 0
267 #define HEATER_1_RAW_LO_TEMP 16383
270 #ifndef HEATER_2_RAW_HI_TEMP
271 #if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_2_USES_THERMISTOR)
272 #define HEATER_2_RAW_HI_TEMP 16383
273 #define HEATER_2_RAW_LO_TEMP 0
275 #define HEATER_2_RAW_HI_TEMP 0
276 #define HEATER_2_RAW_LO_TEMP 16383
279 #ifndef HEATER_3_RAW_HI_TEMP
280 #if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_3_USES_THERMISTOR)
281 #define HEATER_3_RAW_HI_TEMP 16383
282 #define HEATER_3_RAW_LO_TEMP 0
284 #define HEATER_3_RAW_HI_TEMP 0
285 #define HEATER_3_RAW_LO_TEMP 16383
288 #ifndef HEATER_4_RAW_HI_TEMP
289 #if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_4_USES_THERMISTOR)
290 #define HEATER_4_RAW_HI_TEMP 16383
291 #define HEATER_4_RAW_LO_TEMP 0
293 #define HEATER_4_RAW_HI_TEMP 0
294 #define HEATER_4_RAW_LO_TEMP 16383
297 #ifndef HEATER_5_RAW_HI_TEMP
298 #if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_5_USES_THERMISTOR)
299 #define HEATER_5_RAW_HI_TEMP 16383
300 #define HEATER_5_RAW_LO_TEMP 0
302 #define HEATER_5_RAW_HI_TEMP 0
303 #define HEATER_5_RAW_LO_TEMP 16383
306 #ifndef HEATER_BED_RAW_HI_TEMP
307 #if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_BED_USES_THERMISTOR)
308 #define HEATER_BED_RAW_HI_TEMP 16383
309 #define HEATER_BED_RAW_LO_TEMP 0
311 #define HEATER_BED_RAW_HI_TEMP 0
312 #define HEATER_BED_RAW_LO_TEMP 16383
315 #ifndef HEATER_CHAMBER_RAW_HI_TEMP
316 #if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_CHAMBER_USES_THERMISTOR)
317 #define HEATER_CHAMBER_RAW_HI_TEMP 16383
318 #define HEATER_CHAMBER_RAW_LO_TEMP 0
320 #define HEATER_CHAMBER_RAW_HI_TEMP 0
321 #define HEATER_CHAMBER_RAW_LO_TEMP 16383
325 #undef REVERSE_TEMP_SENSOR_RANGE
#define HEATER_2_TEMPTABLE_LEN
Definition: thermistors.h:189
#define PROGMEM
Definition: pgmspace.h:29
#define HEATER_0_TEMPTABLE_LEN
Definition: thermistors.h:169
#define HEATER_4_TEMPTABLE_LEN
Definition: thermistors.h:209
#define HEATER_3_TEMPTABLE_LEN
Definition: thermistors.h:199
#define CHAMBER_TEMPTABLE_LEN
Definition: thermistors.h:237
#define HEATER_1_TEMPTABLE_LEN
Definition: thermistors.h:179
#define HEATER_5_TEMPTABLE_LEN
Definition: thermistors.h:219
#define BED_TEMPTABLE_LEN
Definition: thermistors.h:228