|
@@ -4,8 +4,8 @@
|
4
|
4
|
|
5
|
5
|
|
6
|
6
|
// This determines the communication speed of the printer
|
7
|
|
-#define BAUDRATE 250000
|
8
|
|
-//#define BAUDRATE 115200
|
|
7
|
+//#define BAUDRATE 250000
|
|
8
|
+#define BAUDRATE 115200
|
9
|
9
|
//#define BAUDRATE 230400
|
10
|
10
|
|
11
|
11
|
#define EXTRUDERS 1
|
|
@@ -26,11 +26,11 @@
|
26
|
26
|
// MEGA/RAMPS up to 1.2 = 3,
|
27
|
27
|
// RAMPS 1.3 = 33
|
28
|
28
|
// Gen6 = 5,
|
29
|
|
-// Sanguinololu 1.2 and above = 62,
|
30
|
|
-// Ultimaker = 7,
|
|
29
|
+// Sanguinololu 1.2 and above = 62
|
31
|
30
|
// Gen7 = 77,
|
|
31
|
+// Ultimaker = 7,
|
32
|
32
|
// Teensylu = 8
|
33
|
|
-#define MOTHERBOARD 7
|
|
33
|
+#define MOTHERBOARD 77
|
34
|
34
|
|
35
|
35
|
//===========================================================================
|
36
|
36
|
//=============================Thermal Settings ============================
|
|
@@ -45,23 +45,23 @@
|
45
|
45
|
// 6 is EPCOS 100k
|
46
|
46
|
// 7 is 100k Honeywell thermistor 135-104LAG-J01
|
47
|
47
|
|
48
|
|
-//#define THERMISTORHEATER_0 3
|
|
48
|
+#define THERMISTORHEATER_0 1
|
49
|
49
|
//#define THERMISTORHEATER_1 1
|
50
|
50
|
//#define THERMISTORHEATER_2 1
|
51
|
51
|
|
52
|
|
-//#define HEATER_0_USES_THERMISTOR
|
|
52
|
+#define HEATER_0_USES_THERMISTOR
|
53
|
53
|
//#define HEATER_1_USES_THERMISTOR
|
54
|
54
|
//#define HEATER_2_USES_THERMISTOR
|
55
|
|
-#define HEATER_0_USES_AD595
|
|
55
|
+//#define HEATER_0_USES_AD595
|
56
|
56
|
//#define HEATER_1_USES_AD595
|
57
|
57
|
//#define HEATER_2_USES_AD595
|
58
|
58
|
|
59
|
59
|
// Select one of these only to define how the bed temp is read.
|
60
|
|
-//#define THERMISTORBED 1
|
61
|
|
-//#define BED_USES_THERMISTOR
|
|
60
|
+#define THERMISTORBED 1
|
|
61
|
+#define BED_USES_THERMISTOR
|
62
|
62
|
//#define BED_LIMIT_SWITCHING
|
63
|
63
|
#ifdef BED_LIMIT_SWITCHING
|
64
|
|
- #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
|
|
64
|
+#define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
|
65
|
65
|
#endif
|
66
|
66
|
//#define BED_USES_AD595
|
67
|
67
|
|
|
@@ -75,10 +75,10 @@
|
75
|
75
|
|
76
|
76
|
// Actual temperature must be close to target for this long before M109 returns success
|
77
|
77
|
#define TEMP_RESIDENCY_TIME 30 // (seconds)
|
78
|
|
-#define TEMP_HYSTERESIS 3 // (C°) range of +/- temperatures considered "close" to the target one
|
|
78
|
+#define TEMP_HYSTERESIS 3 // (C°) range of +/- temperatures considered "close" to the target one
|
79
|
79
|
|
80
|
80
|
//// The minimal temperature defines the temperature below which the heater will not be enabled
|
81
|
|
-#define HEATER_0_MINTEMP 5
|
|
81
|
+//#define HEATER_0_MINTEMP 5
|
82
|
82
|
//#define HEATER_1_MINTEMP 5
|
83
|
83
|
//#define HEATER_2_MINTEMP 5
|
84
|
84
|
//#define BED_MINTEMP 5
|
|
@@ -107,37 +107,37 @@
|
107
|
107
|
#define PIDTEMP
|
108
|
108
|
#define PID_MAX 255 // limits current to nozzle; 255=full current
|
109
|
109
|
#ifdef PIDTEMP
|
110
|
|
- //#define PID_DEBUG // Sends debug data to the serial port.
|
111
|
|
- //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
|
112
|
|
- #define PID_INTEGRAL_DRIVE_MAX 255 //limit for the integral term
|
113
|
|
- #define K1 0.95 //smoothing factor withing the PID
|
114
|
|
- #define PID_dT 0.128 //sampling period of the PID
|
115
|
|
-
|
116
|
|
- //To develop some PID settings for your machine, you can initiall follow
|
117
|
|
- // the Ziegler-Nichols method.
|
118
|
|
- // set Ki and Kd to zero.
|
119
|
|
- // heat with a defined Kp and see if the temperature stabilizes
|
120
|
|
- // ideally you do this graphically with repg.
|
121
|
|
- // the PID_CRITIAL_GAIN should be the Kp at which temperature oscillatins are not dampned out/decreas in amplitutde
|
122
|
|
- // PID_SWING_AT_CRITIAL is the time for a full period of the oscillations at the critical Gain
|
123
|
|
- // usually further manual tunine is necessary.
|
124
|
|
-
|
125
|
|
- #define PID_CRITIAL_GAIN 50
|
126
|
|
- #define PID_SWING_AT_CRITIAL 47 //seconds
|
127
|
|
-
|
128
|
|
- //#define PID_PI //no differentail term
|
129
|
|
- #define PID_PID //normal PID
|
130
|
|
-
|
131
|
|
- #ifdef PID_PID
|
132
|
|
- //PID according to Ziegler-Nichols method
|
|
110
|
+//#define PID_DEBUG // Sends debug data to the serial port.
|
|
111
|
+//#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
|
|
112
|
+#define PID_INTEGRAL_DRIVE_MAX 255 //limit for the integral term
|
|
113
|
+#define K1 0.95 //smoothing factor withing the PID
|
|
114
|
+#define PID_dT 0.128 //sampling period of the PID
|
|
115
|
+
|
|
116
|
+//To develop some PID settings for your machine, you can initiall follow
|
|
117
|
+// the Ziegler-Nichols method.
|
|
118
|
+// set Ki and Kd to zero.
|
|
119
|
+// heat with a defined Kp and see if the temperature stabilizes
|
|
120
|
+// ideally you do this graphically with repg.
|
|
121
|
+// the PID_CRITIAL_GAIN should be the Kp at which temperature oscillatins are not dampned out/decreas in amplitutde
|
|
122
|
+// PID_SWING_AT_CRITIAL is the time for a full period of the oscillations at the critical Gain
|
|
123
|
+// usually further manual tunine is necessary.
|
|
124
|
+
|
|
125
|
+#define PID_CRITIAL_GAIN 50
|
|
126
|
+#define PID_SWING_AT_CRITIAL 47 //seconds
|
|
127
|
+
|
|
128
|
+//#define PID_PI //no differentail term
|
|
129
|
+#define PID_PID //normal PID
|
|
130
|
+
|
|
131
|
+#ifdef PID_PID
|
|
132
|
+//PID according to Ziegler-Nichols method
|
133
|
133
|
// #define DEFAULT_Kp (0.6*PID_CRITIAL_GAIN)
|
134
|
134
|
// #define DEFAULT_Ki (2*Kp/PID_SWING_AT_CRITIAL*PID_dT)
|
135
|
135
|
// #define DEFAULT_Kd (PID_SWING_AT_CRITIAL/8./PID_dT)
|
136
|
136
|
|
137
|
137
|
// Ultitmaker
|
138
|
|
- #define DEFAULT_Kp 22.2
|
139
|
|
- #define DEFAULT_Ki (1.25*PID_dT)
|
140
|
|
- #define DEFAULT_Kd (99/PID_dT)
|
|
138
|
+#define DEFAULT_Kp 22.2
|
|
139
|
+#define DEFAULT_Ki (1.25*PID_dT)
|
|
140
|
+#define DEFAULT_Kd (99/PID_dT)
|
141
|
141
|
|
142
|
142
|
// Makergear
|
143
|
143
|
// #define DEFAULT_Kp 7.0
|
|
@@ -148,21 +148,21 @@
|
148
|
148
|
// #define DEFAULT_Kp 63.0
|
149
|
149
|
// #define DEFAULT_Ki (2.25*PID_dT)
|
150
|
150
|
// #define DEFAULT_Kd (440/PID_dT)
|
151
|
|
- #endif
|
152
|
|
-
|
153
|
|
- #ifdef PID_PI
|
154
|
|
- //PI according to Ziegler-Nichols method
|
155
|
|
- #define DEFAULT_Kp (PID_CRITIAL_GAIN/2.2)
|
156
|
|
- #define DEFAULT_Ki (1.2*Kp/PID_SWING_AT_CRITIAL*PID_dT)
|
157
|
|
- #define DEFAULT_Kd (0)
|
158
|
|
- #endif
|
159
|
|
-
|
160
|
|
- // this adds an experimental additional term to the heatingpower, proportional to the extrusion speed.
|
161
|
|
- // if Kc is choosen well, the additional required power due to increased melting should be compensated.
|
162
|
|
- #define PID_ADD_EXTRUSION_RATE
|
163
|
|
- #ifdef PID_ADD_EXTRUSION_RATE
|
164
|
|
- #define DEFAULT_Kc (1) //heatingpower=Kc*(e_speed)
|
165
|
|
- #endif
|
|
151
|
+#endif
|
|
152
|
+
|
|
153
|
+#ifdef PID_PI
|
|
154
|
+//PI according to Ziegler-Nichols method
|
|
155
|
+#define DEFAULT_Kp (PID_CRITIAL_GAIN/2.2)
|
|
156
|
+#define DEFAULT_Ki (1.2*Kp/PID_SWING_AT_CRITIAL*PID_dT)
|
|
157
|
+#define DEFAULT_Kd (0)
|
|
158
|
+#endif
|
|
159
|
+
|
|
160
|
+// this adds an experimental additional term to the heatingpower, proportional to the extrusion speed.
|
|
161
|
+// if Kc is choosen well, the additional required power due to increased melting should be compensated.
|
|
162
|
+#define PID_ADD_EXTRUSION_RATE
|
|
163
|
+#ifdef PID_ADD_EXTRUSION_RATE
|
|
164
|
+#define DEFAULT_Kc (1) //heatingpower=Kc*(e_speed)
|
|
165
|
+#endif
|
166
|
166
|
#endif // PIDTEMP
|
167
|
167
|
|
168
|
168
|
// extruder run-out prevention.
|
|
@@ -184,9 +184,9 @@
|
184
|
184
|
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
|
185
|
185
|
|
186
|
186
|
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
|
187
|
|
-const bool X_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
|
188
|
|
-const bool Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
|
189
|
|
-const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
|
|
187
|
+const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
|
|
188
|
+const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
|
|
189
|
+const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
|
190
|
190
|
// For optos H21LOB set to true, for Mendel-Parts newer optos TCST2103 set to false
|
191
|
191
|
|
192
|
192
|
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
|
|
@@ -209,9 +209,9 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
209
|
209
|
//#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
|
210
|
210
|
//#define INVERT_E*_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false, used for all extruders
|
211
|
211
|
|
212
|
|
-#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true
|
|
212
|
+#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
|
213
|
213
|
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
|
214
|
|
-#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true
|
|
214
|
+#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
|
215
|
215
|
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
|
216
|
216
|
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
|
217
|
217
|
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
|
|
@@ -256,7 +256,8 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
256
|
256
|
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
|
257
|
257
|
#define DEFAULT_MINTRAVELFEEDRATE 0.0
|
258
|
258
|
|
259
|
|
-// minimum time in microseconds that a movement needs to take if the buffer is emptied. Increase this number if you see blobs while printing high speed & high detail. It will slowdown on the detailed stuff.
|
|
259
|
+// minimum time in microseconds that a movement needs to take if the buffer is emptied. Increase this number if you see blobs while
|
|
260
|
+//printing high speed & high detail. It will slowdown on the detailed stuff.
|
260
|
261
|
#define DEFAULT_MINSEGMENTTIME 20000 // Obsolete delete this
|
261
|
262
|
#define DEFAULT_XYJERK 20.0 // (mm/sec)
|
262
|
263
|
#define DEFAULT_ZJERK 0.4 // (mm/sec)
|
|
@@ -290,7 +291,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
290
|
291
|
// this enables the watchdog interrupt.
|
291
|
292
|
//#define USE_WATCHDOG
|
292
|
293
|
//#ifdef USE_WATCHDOG
|
293
|
|
- // you cannot reboot on a mega2560 due to a bug in he bootloader. Hence, you have to reset manually, and this is done hereby:
|
|
294
|
+// you cannot reboot on a mega2560 due to a bug in he bootloader. Hence, you have to reset manually, and this is done hereby:
|
294
|
295
|
//#define RESET_MANUAL
|
295
|
296
|
//#define WATCHDOG_TIMEOUT 4 //seconds
|
296
|
297
|
//#endif
|
|
@@ -305,12 +306,12 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
305
|
306
|
//#define ADVANCE
|
306
|
307
|
|
307
|
308
|
#ifdef ADVANCE
|
308
|
|
- #define EXTRUDER_ADVANCE_K .0
|
|
309
|
+#define EXTRUDER_ADVANCE_K .0
|
309
|
310
|
|
310
|
|
- #define D_FILAMENT 2.85
|
311
|
|
- #define STEPS_MM_E 836
|
312
|
|
- #define EXTRUTION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
|
313
|
|
- #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUTION_AREA)
|
|
311
|
+#define D_FILAMENT 2.85
|
|
312
|
+#define STEPS_MM_E 836
|
|
313
|
+#define EXTRUTION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
|
|
314
|
+#define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUTION_AREA)
|
314
|
315
|
|
315
|
316
|
#endif // ADVANCE
|
316
|
317
|
|
|
@@ -321,18 +322,18 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
321
|
322
|
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
|
322
|
323
|
#define SD_FINISHED_RELEASECOMMAND "M84 X Y E" // no z because of layer shift.
|
323
|
324
|
|
324
|
|
-//#define ULTIPANEL
|
|
325
|
+#define ULTIPANEL
|
325
|
326
|
#ifdef ULTIPANEL
|
326
|
|
- //#define NEWPANEL //enable this if you have a click-encoder panel
|
327
|
|
- #define SDSUPPORT
|
328
|
|
- #define ULTRA_LCD
|
329
|
|
- #define LCD_WIDTH 20
|
330
|
|
- #define LCD_HEIGHT 4
|
|
327
|
+#define NEWPANEL //enable this if you have a click-encoder panel
|
|
328
|
+#define SDSUPPORT
|
|
329
|
+#define ULTRA_LCD
|
|
330
|
+#define LCD_WIDTH 20
|
|
331
|
+#define LCD_HEIGHT 4
|
331
|
332
|
#else //no panel but just lcd
|
332
|
|
- #ifdef ULTRA_LCD
|
333
|
|
- #define LCD_WIDTH 16
|
334
|
|
- #define LCD_HEIGHT 2
|
335
|
|
- #endif
|
|
333
|
+#ifdef ULTRA_LCD
|
|
334
|
+#define LCD_WIDTH 16
|
|
335
|
+#define LCD_HEIGHT 2
|
|
336
|
+#endif
|
336
|
337
|
#endif
|
337
|
338
|
|
338
|
339
|
// A debugging feature to compare calculated vs performed steps, to see if steps are lost by the software.
|
|
@@ -353,13 +354,13 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
353
|
354
|
// on an ultimaker, some initial testing worked with M109 S215 T260 F0.1 in the start.gcode
|
354
|
355
|
//#define AUTOTEMP
|
355
|
356
|
#ifdef AUTOTEMP
|
356
|
|
- #define AUTOTEMP_OLDWEIGHT 0.98
|
|
357
|
+#define AUTOTEMP_OLDWEIGHT 0.98
|
357
|
358
|
#endif
|
358
|
359
|
|
359
|
360
|
//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
|
360
|
361
|
//can be software-disabled for whatever purposes by
|
361
|
362
|
#define PREVENT_DANGEROUS_EXTRUDE
|
362
|
|
-#define EXTRUDE_MINTEMP 190
|
|
363
|
+#define EXTRUDE_MINTEMP 0
|
363
|
364
|
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
|
364
|
365
|
|
365
|
366
|
const int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
|
@@ -378,9 +379,9 @@ const int dropsegments=5; //everything with less than this number of steps will
|
378
|
379
|
// The number of linear motions that can be in the plan at any give time.
|
379
|
380
|
// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ringbuffering.
|
380
|
381
|
#if defined SDSUPPORT
|
381
|
|
- #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
|
|
382
|
+#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
|
382
|
383
|
#else
|
383
|
|
- #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
|
|
384
|
+#define BLOCK_BUFFER_SIZE 16 // maximize block buffer
|
384
|
385
|
#endif
|
385
|
386
|
|
386
|
387
|
|
|
@@ -392,3 +393,5 @@ const int dropsegments=5; //everything with less than this number of steps will
|
392
|
393
|
#include "thermistortables.h"
|
393
|
394
|
|
394
|
395
|
#endif //__CONFIGURATION_H
|
|
396
|
+
|
|
397
|
+
|