22 |
23 |
23 |
24 |
24 // ------------------------------------------------------------------------------- |
25 // ------------------------------------------------------------------------------- |
25 |
26 |
26 #ifndef REPRAPPRO_HUXLEY |
27 #ifndef REPRAPPRO_HUXLEY |
27 #ifndef REPRAPPRO_MENDEL |
28 #ifndef REPRAPPRO_MENDEL |
28 #ifndef REPRAPPRO_MENDEL2 |
29 #ifndef REPRAPPRO_MENDEL2 |
29 #error Uncomment one of #define REPRAPPRO_HUXLEY, REPRAPPRO_MENDEL, or REPRAPPRO_MENDEL2 at the start of the file Configuration.h |
30 #ifndef NEOSOFT_MENDEL |
30 #endif |
31 #error Uncomment one of #define REPRAPPRO_HUXLEY, REPRAPPRO_MENDEL, or REPRAPPRO_MENDEL2 at the start of the file Configuration.h |
31 #endif |
32 #endif |
|
33 #endif |
|
34 #endif |
32 #endif |
35 #endif |
33 |
36 |
34 #ifndef REPRAPPRO_MELZI |
37 #ifndef REPRAPPRO_MELZI |
35 #ifndef REPRAPPRO_SANGUINOLOLU |
38 #ifndef REPRAPPRO_SANGUINOLOLU |
36 #error Uncomment one of #define REPRAPPRO_MELZI or REPRAPPRO_SANGUINOLOLU at the start of the file Configuration.h |
39 #error Uncomment one of #define REPRAPPRO_MELZI or REPRAPPRO_SANGUINOLOLU at the start of the file Configuration.h |
37 #endif |
40 #endif |
38 #endif |
41 #endif |
39 |
42 |
40 #ifndef SERIAL_R |
43 #ifndef SERIAL_R |
41 #error Uncomment one of #define SERIAL_R 10000 or 4700 at the start of the file Configuration.h |
44 #error Uncomment one of #define SERIAL_R 10000 or 4700 at the start of the file Configuration.h |
42 #endif |
45 #endif |
43 |
46 |
44 // ============================================================================== |
47 // ============================================================================== |
45 |
48 |
46 // Uncomment this if you are experimenting, know what you are doing, and want to switch off some safety |
49 // Uncomment this if you are experimenting, know what you are doing, and want to switch off some safety |
52 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration |
55 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration |
53 |
56 |
54 //User specified version info of THIS file to display in [Pronterface, etc] terminal window during startup. |
57 //User specified version info of THIS file to display in [Pronterface, etc] terminal window during startup. |
55 //Implementation of an idea by Prof Braino to inform user that any changes made |
58 //Implementation of an idea by Prof Braino to inform user that any changes made |
56 //to THIS file by the user have been successfully uploaded into firmware. |
59 //to THIS file by the user have been successfully uploaded into firmware. |
57 #define STRING_VERSION_CONFIG_H "2014-06-02-MB" //Personal revision number for changes to THIS file. |
60 #define STRING_VERSION_CONFIG_H "2017-11-18" //Personal revision number for changes to THIS file. |
58 #define STRING_CONFIG_H_AUTHOR "NEO" //Who made the changes. |
61 #define STRING_CONFIG_H_AUTHOR "NeoSoft, Malte Di Donato" //Who made the changes. |
59 |
62 |
60 // This determines the communication speed of the printer |
63 // This determines the communication speed of the printer |
61 //#define BAUDRATE 250000 |
64 #define BAUDRATE 250000 |
62 #define BAUDRATE 115200 |
65 //#define BAUDRATE 115200 |
63 |
66 |
64 //// The following define selects which electronics board you have. Please choose the one that matches your setup |
67 //// The following define selects which electronics board you have. Please choose the one that matches your setup |
65 // Sanguinololu 1.2 and above = 62 |
68 // Sanguinololu 1.2 and above = 62 |
66 // Melzi 63 |
69 // Melzi 63 |
67 |
70 |
68 #ifdef REPRAPPRO_SANGUINOLOLU |
71 #ifdef REPRAPPRO_SANGUINOLOLU |
69 #define MOTHERBOARD 62 |
72 #define MOTHERBOARD 62 |
70 #endif |
73 #endif |
71 |
74 |
72 #ifdef REPRAPPRO_MELZI |
75 #ifdef REPRAPPRO_MELZI |
73 #define MOTHERBOARD 63 |
76 #define MOTHERBOARD 63 |
74 #endif |
77 #endif |
75 |
78 |
76 |
79 |
77 |
80 |
78 //=========================================================================== |
81 //=========================================================================== |
101 #define ABS_ZERO -273.15 |
104 #define ABS_ZERO -273.15 |
102 #define AD_RANGE 16383 |
105 #define AD_RANGE 16383 |
103 |
106 |
104 |
107 |
105 #ifdef REPRAPPRO_HUXLEY |
108 #ifdef REPRAPPRO_HUXLEY |
106 |
109 #include "Configuration_huxley.h" |
107 // Bed thermistor: VISHAY BC COMPONENTS NTCS0603E3104FXT - All Huxleys with heated bed PCB |
110 #endif |
108 #define BED_BETA 4100.0 |
|
109 #define BED_NTC 100000.0 |
|
110 |
|
111 // Extruder thermistor: RS 198-961 100k ohm 10% DO-35 NTC thermistor - All Huxleys before 25/2/14 |
|
112 // #define E_BETA 3960.0 |
|
113 // #define E_NTC 100000.0 |
|
114 |
|
115 // Extruder thermistor: Digikey 480-3137-ND - All Huxleys shipped after 25/2/14 |
|
116 #define E_BETA 4138.0 |
|
117 #define E_NTC 100000.0 |
|
118 |
|
119 #endif |
|
120 |
|
121 |
|
122 #ifdef REPRAPPRO_MENDEL |
111 #ifdef REPRAPPRO_MENDEL |
123 |
112 #include "Configuration_mendel.h" |
124 // Extruder thermistor: RS 198-961 100k ohm 10% DO-35 NTC thermistor - All Mendels before 1/4/13 |
113 #endif |
125 #define E_BETA 3960.0 |
|
126 #define E_NTC 100000.0 |
|
127 |
|
128 // Bed thermistor: RS 484-0149; EPCOS B57550G103J - All Mendels before 1/4/13 |
|
129 #define BED_BETA 3480.0 |
|
130 #define BED_NTC 10000.0 |
|
131 |
|
132 #endif |
|
133 |
|
134 |
|
135 #ifdef REPRAPPRO_MENDEL2 |
114 #ifdef REPRAPPRO_MENDEL2 |
136 |
115 #include "Configuration_mendel2.h" |
137 // Bed thermistor: Rapid 61-0446 ; Semitec 103GT-2 - All Mendel2 shipped after 1/4/13 (launch) |
116 #endif |
138 // #define BED_BETA 4126.0 |
117 #ifdef NEOSOFT_MENDEL |
139 // #define BED_NTC 10000.0 |
118 #include "Configuration_neosoft_mendel.h" |
140 |
|
141 // Bed thermistor: Farnell 1299930 ; EPCOS B57863S103F040 - All Mendel2 shipped after 29/5/14 |
|
142 #define BED_BETA 3988.0 |
|
143 #define BED_NTC 10000.0 |
|
144 |
|
145 // Extruder thermistor: RS 198-961 100k ohm 10% DO-35 NTC thermistor - All Mendel2 shipped after 1/4/13 (launch) |
|
146 // #define E_BETA 3960.0 |
|
147 // #define E_NTC 100000.0 |
|
148 |
|
149 // Extruder thermistor: Digikey 480-3137-ND - All Mendels shipped after 25/2/14 |
|
150 #define E_BETA 4138.0 |
|
151 #define E_NTC 100000.0 |
|
152 |
|
153 #endif |
119 #endif |
154 |
120 |
155 |
121 |
156 #define E_RS SERIAL_R |
122 #define E_RS SERIAL_R |
157 #define E_R_INF ( E_NTC*exp(-E_BETA/298.15) ) |
123 #define E_R_INF ( E_NTC*exp(-E_BETA/298.15) ) |
158 |
124 |
159 #define BED_RS SERIAL_R |
125 #define BED_RS SERIAL_R |
160 #define BED_R_INF ( BED_NTC*exp(-BED_BETA/298.15) ) |
126 #define BED_R_INF ( BED_NTC*exp(-BED_BETA/298.15) ) |
161 |
|
162 |
|
163 |
127 |
164 #define BED_USES_THERMISTOR |
128 #define BED_USES_THERMISTOR |
165 #define HEATER_0_USES_THERMISTOR |
129 #define HEATER_0_USES_THERMISTOR |
166 #define HEATER_1_USES_THERMISTOR |
130 #define HEATER_1_USES_THERMISTOR |
167 #define HEATER_2_USES_THERMISTOR |
131 #define HEATER_2_USES_THERMISTOR |
168 |
|
169 |
|
170 |
132 |
171 // Actual temperature must be close to target for this long before M109 returns success |
133 // Actual temperature must be close to target for this long before M109 returns success |
172 #define TEMP_RESIDENCY_TIME 5 // (seconds) |
134 #define TEMP_RESIDENCY_TIME 5 // (seconds) |
173 #define TEMP_HYSTERESIS 5 // (C°) range of +/- temperatures considered "close" to the target one |
135 #define TEMP_HYSTERESIS 5 // (C°) range of +/- temperatures considered "close" to the target one |
174 #define TEMP_WINDOW 2 // (degC) Window around target to start the recidency timer x degC early. |
136 #define TEMP_WINDOW 2 // (degC) Window around target to start the recidency timer x degC early. |
176 // The minimal temperature defines the temperature below which the heater will not be enabled It is used |
138 // The minimal temperature defines the temperature below which the heater will not be enabled It is used |
177 // to check that the wiring to the thermistor is not broken. |
139 // to check that the wiring to the thermistor is not broken. |
178 // Otherwise this would lead to the heater being powered on all the time. |
140 // Otherwise this would lead to the heater being powered on all the time. |
179 #define HEATER_0_MINTEMP 1 |
141 #define HEATER_0_MINTEMP 1 |
180 #ifdef REPRAPPRO_MULTIMATERIALS |
142 #ifdef REPRAPPRO_MULTIMATERIALS |
181 #define HEATER_1_MINTEMP 1 |
143 #define HEATER_1_MINTEMP 1 |
182 #define HEATER_2_MINTEMP 1 |
144 #define HEATER_2_MINTEMP 1 |
183 #endif |
145 #endif |
184 #define BED_MINTEMP 1 |
146 #define BED_MINTEMP 1 |
185 |
147 |
186 // When temperature exceeds max temp, your heater will be switched off. |
148 // When temperature exceeds max temp, your heater will be switched off. |
187 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! |
149 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! |
188 // You should use MINTEMP for thermistor short/failure protection. |
150 // You should use MINTEMP for thermistor short/failure protection. |
189 #define HEATER_0_MAXTEMP 399 |
151 #define HEATER_0_MAXTEMP 399 |
190 #ifdef REPRAPPRO_MULTIMATERIALS |
152 #ifdef REPRAPPRO_MULTIMATERIALS |
191 #define HEATER_1_MAXTEMP 275 |
153 #define HEATER_1_MAXTEMP 275 |
192 #define HEATER_2_MAXTEMP 275 |
154 #define HEATER_2_MAXTEMP 275 |
193 #endif |
155 #endif |
194 #define BED_MAXTEMP 150 |
156 #define BED_MAXTEMP 150 |
195 |
157 |
196 |
158 |
197 // PID settings: |
159 // PID settings: |
203 //#define PID_DEBUG // Sends debug data to the serial port. |
165 //#define PID_DEBUG // Sends debug data to the serial port. |
204 #define PID_INTEGRAL_DRIVE_MAX 125 //limit for the integral term |
166 #define PID_INTEGRAL_DRIVE_MAX 125 //limit for the integral term |
205 #define K1 0.95 //smoothing factor withing the PID |
167 #define K1 0.95 //smoothing factor withing the PID |
206 #define PID_dT 0.122 //sampling period of the PID |
168 #define PID_dT 0.122 //sampling period of the PID |
207 |
169 |
208 |
170 // RepRapPro Huxley + Mendel |
209 // RepRapPro Huxley + Mendel |
171 #define DEFAULT_Kp 12.0 |
210 #define DEFAULT_Kp 12.0 |
172 #define DEFAULT_Ki (2.2*PID_dT) |
211 #define DEFAULT_Ki (2.2*PID_dT) |
173 #define DEFAULT_Kd (80/PID_dT) |
212 #define DEFAULT_Kd (80/PID_dT) |
|
213 |
|
214 #endif // PIDTEMP |
174 #endif // PIDTEMP |
215 |
175 |
216 #ifndef DEVELOPING |
176 #ifndef DEVELOPING |
217 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit |
177 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit |
218 //can be software-disabled for whatever purposes by |
178 //can be software-disabled for whatever purposes by |
219 #define PREVENT_DANGEROUS_EXTRUDE |
179 #define PREVENT_DANGEROUS_EXTRUDE |
220 #define EXTRUDE_MINTEMP 170 |
180 #define EXTRUDE_MINTEMP 170 |
221 #define EXTRUDE_MAXLENGTH (999) //prevent extrusion of very large distances. |
181 #define EXTRUDE_MAXLENGTH (999) //prevent extrusion of very large distances. |
222 #else |
182 #else |
223 #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE |
183 #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE |
224 #endif |
184 #endif |
225 |
185 |
226 //=========================================================================== |
186 //=========================================================================== |
227 //=============================Mechanical Settings=========================== |
187 //=============================Mechanical Settings=========================== |
228 //=========================================================================== |
188 //=========================================================================== |
245 #define DISABLE_X false |
205 #define DISABLE_X false |
246 #define DISABLE_Y false |
206 #define DISABLE_Y false |
247 #define DISABLE_Z true |
207 #define DISABLE_Z true |
248 #define DISABLE_E false // For all extruders |
208 #define DISABLE_E false // For all extruders |
249 |
209 |
250 #ifdef REPRAPPRO_MENDEL |
|
251 #define AXES_MAX_LENGTHS {210, 210, 140} |
|
252 #define INVERT_X_DIR false // for Mendel set to false, for Orca set to true |
|
253 //#define INVERT_Y_DIR true // for Mendel set to true, for Orca set to false |
|
254 #define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false |
|
255 #define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true |
|
256 #define INVERT_E0_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false |
|
257 #define INVERT_E1_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false |
|
258 #define INVERT_E2_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false |
|
259 #endif |
|
260 |
|
261 #ifdef REPRAPPRO_MENDEL2 |
|
262 #define AXES_MAX_LENGTHS {210, 210, 140} |
|
263 #define INVERT_X_DIR true // for Mendel set to false, for Orca set to true |
|
264 #define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false |
|
265 #define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true |
|
266 #define INVERT_E0_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false |
|
267 #define INVERT_E1_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false |
|
268 #define INVERT_E2_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false |
|
269 #endif |
|
270 |
|
271 #ifdef REPRAPPRO_HUXLEY |
|
272 #define AXES_MAX_LENGTHS {155, 150, 90} |
|
273 #define INVERT_X_DIR false // for Mendel set to false, for Orca set to true |
|
274 #define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false |
|
275 #define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true |
|
276 #define INVERT_E0_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false |
|
277 #define INVERT_E1_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false |
|
278 #define INVERT_E2_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false |
|
279 #endif |
|
280 |
|
281 |
|
282 // ENDSTOP SETTINGS: |
210 // ENDSTOP SETTINGS: |
283 // Sets direction of endstops when homing; 1=MAX, -1=MIN |
211 // Sets direction of endstops when homing; 1=MAX, -1=MIN |
284 #define X_HOME_DIR -1 |
212 #define X_HOME_DIR -1 |
285 #define Y_HOME_DIR -1 |
213 #define Y_HOME_DIR -1 |
286 #define Z_HOME_DIR -1 |
214 #define Z_HOME_DIR -1 |
294 #define Z_HOME_POS 0 |
222 #define Z_HOME_POS 0 |
295 |
223 |
296 //// MOVEMENT SETTINGS |
224 //// MOVEMENT SETTINGS |
297 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E |
225 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E |
298 |
226 |
299 /* |
|
300 We've shipped a number of different configurations of belt and pulley now, so probably need some ifdef statements! At the moment, they all get the same. |
|
301 |
|
302 White polyurethane belt (T2.5), 14-tooth printed pulley: 91.4286 step per mm (Original Huxley, Legacy Mendel) |
|
303 Black rubber belt (MXL), 17-tooth printed pulley: 92.635 step per mm (Huxley, Mendel Mono and Tri since 1/4/2013) |
|
304 Black rubber belt (MXL), 18-tooth aluminium pulley: 87.489 step per mm (Huxley, Mendel Mono and Tri since 1/1/2014) |
|
305 |
|
306 Also, two different extruders: |
|
307 |
|
308 Original eMaker/RepRapPro-style: 920 steps per mm (Original Huxley, Legacy Mendel) |
|
309 New version (NEMA14 and NEMA17): 660 steps per mm (Huxley, Mendel Mono and Tricolour since 1/4/2013) |
|
310 */ |
|
311 |
|
312 #ifdef REPRAPPRO_MENDEL |
|
313 |
|
314 #define X_MAX_LENGTH 210 |
|
315 #define Y_MAX_LENGTH 210 |
|
316 #define Z_MAX_LENGTH 110 |
|
317 #define HOMING_FEEDRATE {10*60, 10*60, 1*60, 0} // set the homing speeds (mm/min) |
|
318 #define FAST_HOME_FEEDRATE {50*60, 50*60, 1*60, 0} // set the homing speeds (mm/min) |
|
319 #define DEFAULT_MAX_FEEDRATE {500, 500, 3, 45} |
|
320 #define DEFAULT_MAX_FEEDRATE {300, 300, 3, 45} // (mm/sec) |
|
321 #define DEFAULT_MAX_ACCELERATION {800,800,30,250} // X, Y, Z, E maximum start speed for accelerated moves. E default values |
|
322 |
|
323 // X, Y, Z, E steps per mm |
|
324 |
|
325 #define DEFAULT_AXIS_STEPS_PER_UNIT {80, 91.4286, 4000, 950.0} // <- 14 tooth T2.5 belt + original extruder drive |
|
326 |
|
327 #else |
|
328 |
|
329 #ifdef REPRAPPRO_MENDEL2 |
|
330 |
|
331 #define X_MAX_LENGTH 210 |
|
332 #define Y_MAX_LENGTH 210 |
|
333 #define Z_MAX_LENGTH 110 |
|
334 #define HOMING_FEEDRATE {10*60, 10*60, 1*60, 0} // set the homing speeds (mm/min) |
|
335 #define FAST_HOME_FEEDRATE {50*60, 50*60, 1*60, 0} // set the homing speeds (mm/min) |
|
336 #define DEFAULT_MAX_FEEDRATE {500, 500, 3, 60} |
|
337 //#define DEFAULT_MAX_FEEDRATE {300, 300, 3, 45} // (mm/sec) |
|
338 #define DEFAULT_MAX_ACCELERATION {1000,1000,30,250} // X, Y, Z, E maximum start speed for accelerated moves. E default values |
|
339 |
|
340 // X, Y, Z, E steps per mm |
|
341 |
|
342 #define DEFAULT_AXIS_STEPS_PER_UNIT {80, 87.489, 4000, 950.0} // <- 18-tooth aluminium pulley |
|
343 //#define DEFAULT_AXIS_STEPS_PER_UNIT {92.635, 92.635, 4000, 660} // <- 17-tooth printed pulley |
|
344 |
|
345 #else |
|
346 |
|
347 #define X_MAX_LENGTH 155 |
|
348 #define Y_MAX_LENGTH 150 |
|
349 #define Z_MAX_LENGTH 90 |
|
350 #define HOMING_FEEDRATE {10*60, 10*60, 1*60, 0} // set the homing speeds (mm/min) |
|
351 #define FAST_HOME_FEEDRATE {80*60, 80*60, 4*60, 0} // set the homing speeds (mm/min) |
|
352 #define DEFAULT_MAX_FEEDRATE {500, 500, 5, 45} // (mm/sec) |
|
353 #define DEFAULT_MAX_FEEDRATE {500, 500, 5, 45} // (mm/sec) |
|
354 #define DEFAULT_MAX_ACCELERATION {1000,1000,50,250} // X, Y, Z, E maximum start speed for accelerated moves. E default values |
|
355 |
|
356 // X, Y, Z, E steps per mm |
|
357 |
|
358 #define DEFAULT_AXIS_STEPS_PER_UNIT {87.489, 87.489, 4000, 660.0} // <- 18-tooth aluminium pulley |
|
359 //#define DEFAULT_AXIS_STEPS_PER_UNIT {92.635, 92.635, 4000, 660} // <- 17-tooth printed pulley |
|
360 //#define DEFAULT_AXIS_STEPS_PER_UNIT {91.4286, 91.4286, 4000, 920.0} // <- 14 tooth T2.5 belt + original extruder drive |
|
361 |
|
362 |
|
363 #endif |
|
364 #endif |
|
365 |
|
366 |
|
367 |
|
368 // Defaults changed by the G10 command |
227 // Defaults changed by the G10 command |
369 |
|
370 #define X_EXTRUDER_OFFSET 0 |
228 #define X_EXTRUDER_OFFSET 0 |
371 #define Y_EXTRUDER_OFFSET 0 |
229 #define Y_EXTRUDER_OFFSET 0 |
372 #define Z_EXTRUDER_OFFSET 0 |
230 #define Z_EXTRUDER_OFFSET 0 |
373 #define STANDBY_TEMP 140 |
231 #define STANDBY_TEMP 140 |
374 #define PLA_TEMP 210 |
232 #define PLA_TEMP 210 |
375 #define ABS_TEMP 250 |
233 #define ABS_TEMP 250 |
376 #define DEFAULT_TEMP PLA_TEMP |
234 #define DEFAULT_TEMP PLA_TEMP |
377 |
|
378 |
235 |
379 #define DEFAULT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves |
236 #define DEFAULT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves |
380 #define DEFAULT_RETRACT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts |
237 #define DEFAULT_RETRACT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts |
381 |
238 |
382 // |
239 // |