Browse Source

Merge pull request #1750 from thinkyhead/fixup_config

Bring all configs up to date
Scott Lahteine 9 years ago
parent
commit
21ab44cfa7
25 changed files with 3054 additions and 1342 deletions
  1. 1
    1
      Marlin/Conditionals.h
  2. 14
    16
      Marlin/Configuration.h
  3. 52
    49
      Marlin/Configuration_adv.h
  4. 42
    34
      Marlin/configurator/config/Configuration.h
  5. 227
    71
      Marlin/configurator/config/Configuration_adv.h
  6. 73
    61
      Marlin/example_configurations/Felix/Configuration.h
  7. 73
    62
      Marlin/example_configurations/Felix/Configuration_DUAL.h
  8. 227
    86
      Marlin/example_configurations/Felix/Configuration_adv.h
  9. 47
    41
      Marlin/example_configurations/Hephestos/Configuration.h
  10. 230
    73
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  11. 46
    38
      Marlin/example_configurations/K8200/Configuration.h
  12. 227
    66
      Marlin/example_configurations/K8200/Configuration_adv.h
  13. 47
    42
      Marlin/example_configurations/SCARA/Configuration.h
  14. 232
    71
      Marlin/example_configurations/SCARA/Configuration_adv.h
  15. 45
    37
      Marlin/example_configurations/WITBOX/Configuration.h
  16. 228
    71
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  17. 81
    46
      Marlin/example_configurations/delta/generic/Configuration.h
  18. 257
    99
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  19. 85
    46
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  20. 257
    99
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  21. 46
    38
      Marlin/example_configurations/makibox/Configuration.h
  22. 234
    74
      Marlin/example_configurations/makibox/Configuration_adv.h
  23. 48
    41
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  24. 232
    79
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  25. 3
    1
      Marlin/stepper.cpp

+ 1
- 1
Marlin/Conditionals.h View File

@@ -257,7 +257,7 @@
257 257
   #endif
258 258
 
259 259
   #ifdef ULTIPANEL
260
-   #undef SDCARDDETECTINVERTED
260
+    #undef SDCARDDETECTINVERTED
261 261
   #endif
262 262
 
263 263
   // Power Signal Control Definitions

+ 14
- 16
Marlin/Configuration.h View File

@@ -104,7 +104,7 @@ Here are some standard links for getting your machine calibrated:
104 104
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
105 105
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
106 106
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
107
-// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
107
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
108 108
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
109 109
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
110 110
 //
@@ -118,7 +118,7 @@ Here are some standard links for getting your machine calibrated:
118 118
 // 1010 is Pt1000 with 1k pullup (non standard)
119 119
 // 147 is Pt100 with 4k7 pullup
120 120
 // 110 is Pt100 with 1k pullup (non standard)
121
-// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
122 122
 //     Use it for Testing or Development purposes. NEVER for production machine.
123 123
 //     #define DUMMY_THERMISTOR_998_VALUE 25
124 124
 //     #define DUMMY_THERMISTOR_999_VALUE 100
@@ -264,15 +264,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
264 264
 The system will turn the heater on forever, burning up the filament and anything
265 265
 else around.
266 266
 
267
-After the temperature reaches the target for the first time, this feature will 
268
-start measuring for how long the current temperature stays below the target 
267
+After the temperature reaches the target for the first time, this feature will
268
+start measuring for how long the current temperature stays below the target
269 269
 minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
270 270
 
271 271
 If it stays longer than _PERIOD, it means the thermistor temperature
272 272
 cannot catch up with the target, so something *may be* wrong. Then, to be on the
273 273
 safe side, the system will he halt.
274 274
 
275
-Bear in mind the count down will just start AFTER the first time the 
275
+Bear in mind the count down will just start AFTER the first time the
276 276
 thermistor temperature is over the target, so you will have no problem if
277 277
 your extruder heater takes 2 minutes to hit the target on heating.
278 278
 
@@ -338,7 +338,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
338 338
 #define DISABLE_E false // For all extruders
339 339
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
340 340
 
341
-// If you motor turns to wrong direction, you can invert it here:
341
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
342 342
 #define INVERT_X_DIR false
343 343
 #define INVERT_Y_DIR false
344 344
 #define INVERT_Z_DIR false
@@ -421,14 +421,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
421 421
     #define RIGHT_PROBE_BED_POSITION 170
422 422
     #define FRONT_PROBE_BED_POSITION 20
423 423
     #define BACK_PROBE_BED_POSITION 170
424
-    
424
+
425 425
     #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
426 426
 
427 427
     // Set the number of grid points per dimension
428 428
     // You probably don't need more than 3 (squared=9)
429 429
     #define AUTO_BED_LEVELING_GRID_POINTS 2
430 430
 
431
-
432 431
   #else  // !AUTO_BED_LEVELING_GRID
433 432
 
434 433
       // Arbitrary points to probe. A simple cross-product
@@ -442,7 +441,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
442 441
 
443 442
   #endif // AUTO_BED_LEVELING_GRID
444 443
 
445
-
446 444
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
447 445
   // X and Y offsets must be integers
448 446
   #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
@@ -454,7 +452,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
454 452
 
455 453
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
456 454
 
457
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
455
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
458 456
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
459 457
   #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
460 458
 
@@ -572,7 +570,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
572 570
 // See also language.h
573 571
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
574 572
 
575
-// Chose ONE of the next three charsets. This has to match your hardware. In case of a full graphic display this information is not important.
573
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
576 574
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
577 575
 // See also documentation/LCDLanguageFont.md
578 576
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
@@ -645,7 +643,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
645 643
 // Shift register panels
646 644
 // ---------------------
647 645
 // 2 wire Non-latching LCD SR from:
648
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
646
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
649 647
 
650 648
 //#define SAV_3DLCD
651 649
 
@@ -653,7 +651,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
653 651
 //#define FAST_PWM_FAN
654 652
 
655 653
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
656
-// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
654
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
657 655
 // is too low, you should also increment SOFT_PWM_SCALE.
658 656
 //#define FAN_SOFT_PWM
659 657
 
@@ -707,9 +705,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
707 705
  * Support for a filament diameter sensor
708 706
  * Also allows adjustment of diameter at print time (vs  at slicing)
709 707
  * Single extruder only at this point (extruder 0)
710
- * 
708
+ *
711 709
  * Motherboards
712
- * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
710
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
713 711
  * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
714 712
  * 301 - Rambo  - uses Analog input 3
715 713
  * Note may require analog pins to be defined for different motherboards
@@ -726,7 +724,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
726 724
 #define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
727 725
 
728 726
 //defines used in the code
729
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
727
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
730 728
 
731 729
 //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
732 730
 //#define FILAMENT_LCD_DISPLAY

+ 52
- 49
Marlin/Configuration_adv.h View File

@@ -102,28 +102,27 @@
102 102
 
103 103
 #ifdef Z_DUAL_STEPPER_DRIVERS
104 104
 
105
-// Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
-// That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
-// There is also an implementation of M666 (software endstops adjustment) to this feature.
108
-// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
-// One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
-// If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
-// Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
-// The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
-
114
-#define Z_DUAL_ENDSTOPS
115
-
116
-#ifdef Z_DUAL_ENDSTOPS
117
-  #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
-  #define Z2_DIR_PIN E2_DIR_PIN
119
-  #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
-  #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
-  const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
-  #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
-#endif
124
-
105
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
108
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
+
114
+  #define Z_DUAL_ENDSTOPS
115
+
116
+  #ifdef Z_DUAL_ENDSTOPS
117
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
+    #define Z2_DIR_PIN E2_DIR_PIN
119
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
+  #endif
125 124
 
126
-#endif
125
+#endif // Z_DUAL_STEPPER_DRIVERS
127 126
 
128 127
 // Same again but for Y Axis.
129 128
 //#define Y_DUAL_STEPPER_DRIVERS
@@ -242,27 +241,37 @@
242 241
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
243 242
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
244 243
 
245
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
246
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
247
-
248
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
249
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
250
-// using:
251
-//#define MENU_ADDAUTOSTART
252
-
253
-// Show a progress bar on HD44780 LCDs for SD printing
254
-//#define LCD_PROGRESS_BAR
255
-
256
-#ifdef LCD_PROGRESS_BAR
257
-  // Amount of time (ms) to show the bar
258
-  #define PROGRESS_BAR_BAR_TIME 2000
259
-  // Amount of time (ms) to show the status message
260
-  #define PROGRESS_BAR_MSG_TIME 3000
261
-  // Amount of time (ms) to retain the status message (0=forever)
262
-  #define PROGRESS_MSG_EXPIRE   0
263
-  // Enable this to show messages for MSG_TIME then hide them
264
-  //#define PROGRESS_MSG_ONCE
265
-#endif
244
+#ifdef SDSUPPORT
245
+
246
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
247
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
248
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
249
+  // be commented out otherwise
250
+  #define SDCARDDETECTINVERTED
251
+
252
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
253
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
254
+
255
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
256
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
257
+  // using:
258
+  //#define MENU_ADDAUTOSTART
259
+
260
+  // Show a progress bar on HD44780 LCDs for SD printing
261
+  //#define LCD_PROGRESS_BAR
262
+
263
+  #ifdef LCD_PROGRESS_BAR
264
+    // Amount of time (ms) to show the bar
265
+    #define PROGRESS_BAR_BAR_TIME 2000
266
+    // Amount of time (ms) to show the status message
267
+    #define PROGRESS_BAR_MSG_TIME 3000
268
+    // Amount of time (ms) to retain the status message (0=forever)
269
+    #define PROGRESS_MSG_EXPIRE   0
270
+    // Enable this to show messages for MSG_TIME then hide them
271
+    //#define PROGRESS_MSG_ONCE
272
+  #endif
273
+
274
+#endif // SDSUPPORT
266 275
 
267 276
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
268 277
 //#define USE_WATCHDOG
@@ -300,7 +309,7 @@
300 309
   #define EXTRUDER_ADVANCE_K .0
301 310
   #define D_FILAMENT 2.85
302 311
   #define STEPS_MM_E 836
303
-#endif // ADVANCE
312
+#endif
304 313
 
305 314
 // Arc interpretation settings:
306 315
 #define MM_PER_ARC_SEGMENT 1
@@ -308,12 +317,6 @@
308 317
 
309 318
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
310 319
 
311
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
312
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
313
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
314
-// be commented out otherwise
315
-#define SDCARDDETECTINVERTED
316
-
317 320
 // Control heater 0 and heater 1 in parallel.
318 321
 //#define HEATERS_PARALLEL
319 322
 

+ 42
- 34
Marlin/configurator/config/Configuration.h View File

@@ -113,7 +113,7 @@ Here are some standard links for getting your machine calibrated:
113 113
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
114 114
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
115 115
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
116
-// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
116
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
117 117
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
118 118
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
119 119
 //
@@ -127,7 +127,7 @@ Here are some standard links for getting your machine calibrated:
127 127
 // 1010 is Pt1000 with 1k pullup (non standard)
128 128
 // 147 is Pt100 with 4k7 pullup
129 129
 // 110 is Pt100 with 1k pullup (non standard)
130
-// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
130
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
131 131
 //     Use it for Testing or Development purposes. NEVER for production machine.
132 132
 //     #define DUMMY_THERMISTOR_998_VALUE 25
133 133
 //     #define DUMMY_THERMISTOR_999_VALUE 100
@@ -274,15 +274,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
274 274
 The system will turn the heater on forever, burning up the filament and anything
275 275
 else around.
276 276
 
277
-After the temperature reaches the target for the first time, this feature will 
278
-start measuring for how long the current temperature stays below the target 
277
+After the temperature reaches the target for the first time, this feature will
278
+start measuring for how long the current temperature stays below the target
279 279
 minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
280 280
 
281 281
 If it stays longer than _PERIOD, it means the thermistor temperature
282 282
 cannot catch up with the target, so something *may be* wrong. Then, to be on the
283 283
 safe side, the system will he halt.
284 284
 
285
-Bear in mind the count down will just start AFTER the first time the 
285
+Bear in mind the count down will just start AFTER the first time the
286 286
 thermistor temperature is over the target, so you will have no problem if
287 287
 your extruder heater takes 2 minutes to hit the target on heating.
288 288
 
@@ -329,13 +329,13 @@ your extruder heater takes 2 minutes to hit the target on heating.
329 329
   // #define ENDSTOPPULLUP_ZMIN
330 330
 #endif
331 331
 
332
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
333
-const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
334
-const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
335
-const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
336
-const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
337
-const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
338
-const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
332
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
333
+const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
334
+const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
335
+const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
336
+const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
337
+const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
338
+const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
339 339
 //#define DISABLE_MAX_ENDSTOPS
340 340
 //#define DISABLE_MIN_ENDSTOPS
341 341
 
@@ -361,17 +361,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
361 361
 // @section machine
362 362
 
363 363
 // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
364
-#define INVERT_X_DIR true     // for Mendel set to false, for Orca set to true
365
-#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
366
-#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
364
+#define INVERT_X_DIR true
365
+#define INVERT_Y_DIR false
366
+#define INVERT_Z_DIR true
367 367
 
368 368
 // @section extruder
369 369
 
370 370
 // For direct drive extruder v9 set to true, for geared extruder set to false.
371
-#define INVERT_E0_DIR false   // Direct drive extruder v9: true. Geared extruder: false
372
-#define INVERT_E1_DIR false   // Direct drive extruder v9: true. Geared extruder: false
373
-#define INVERT_E2_DIR false   // Direct drive extruder v9: true. Geared extruder: false
374
-#define INVERT_E3_DIR false   // Direct drive extruder v9: true. Geared extruder: false
371
+#define INVERT_E0_DIR false
372
+#define INVERT_E1_DIR false
373
+#define INVERT_E2_DIR false
374
+#define INVERT_E3_DIR false
375 375
 
376 376
 // @section homing
377 377
 
@@ -455,11 +455,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
455 455
     #define FRONT_PROBE_BED_POSITION 20
456 456
     #define BACK_PROBE_BED_POSITION 170
457 457
 
458
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
459
+
458 460
     // Set the number of grid points per dimension
459 461
     // You probably don't need more than 3 (squared=9)
460 462
     #define AUTO_BED_LEVELING_GRID_POINTS 2
461 463
 
462
-
463 464
   #else  // !AUTO_BED_LEVELING_GRID
464 465
 
465 466
       // Arbitrary points to probe. A simple cross-product
@@ -473,11 +474,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
473 474
 
474 475
   #endif // AUTO_BED_LEVELING_GRID
475 476
 
476
-
477 477
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
478 478
   // X and Y offsets must be integers
479
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
480
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
479
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
480
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Probe on: -front +behind
481 481
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
482 482
 
483 483
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
@@ -485,9 +485,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
485 485
 
486 486
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
487 487
 
488
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
488
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
489 489
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
490
+  #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
490 491
 
492
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
493
+                                                                            //Useful to retract a deployable probe.
494
+                                                                           
491 495
   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
492 496
   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
493 497
 
@@ -571,8 +575,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
571 575
 #ifdef CUSTOM_M_CODES
572 576
   #ifdef ENABLE_AUTO_BED_LEVELING
573 577
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
574
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
575
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
578
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
579
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
576 580
   #endif
577 581
 #endif
578 582
 
@@ -604,13 +608,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
604 608
 // @section lcd
605 609
 
606 610
 // Define your display language below. Replace (en) with your language code and uncomment.
607
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
611
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
608 612
 // See also language.h
609 613
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
610 614
 
611
-// Character based displays can have different extended charsets.
612
-#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
613
-//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
615
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
616
+// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
617
+// See also documentation/LCDLanguageFont.md
618
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
619
+  //#define DISPLAY_CHARSET_HD44780_WESTERN
620
+  //#define DISPLAY_CHARSET_HD44780_CYRILLIC
614 621
 
615 622
 //#define ULTRA_LCD  //general LCD support, also 16x2
616 623
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@@ -623,6 +630,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
623 630
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
624 631
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
625 632
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
633
+                                               // 0 to disable buzzer feedback  
626 634
 
627 635
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
628 636
 // http://reprap.org/wiki/PanelOne
@@ -677,7 +685,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
677 685
 // Shift register panels
678 686
 // ---------------------
679 687
 // 2 wire Non-latching LCD SR from:
680
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
688
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
681 689
 
682 690
 //#define SAV_3DLCD
683 691
 
@@ -687,7 +695,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
687 695
 //#define FAST_PWM_FAN
688 696
 
689 697
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
690
-// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
698
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
691 699
 // is too low, you should also increment SOFT_PWM_SCALE.
692 700
 //#define FAN_SOFT_PWM
693 701
 
@@ -741,9 +749,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
741 749
  * Support for a filament diameter sensor
742 750
  * Also allows adjustment of diameter at print time (vs  at slicing)
743 751
  * Single extruder only at this point (extruder 0)
744
- * 
752
+ *
745 753
  * Motherboards
746
- * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
754
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
747 755
  * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
748 756
  * 301 - Rambo  - uses Analog input 3
749 757
  * Note may require analog pins to be defined for different motherboards

+ 227
- 71
Marlin/configurator/config/Configuration_adv.h View File

@@ -112,6 +112,30 @@
112 112
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
113 113
 //#define Z_DUAL_STEPPER_DRIVERS
114 114
 
115
+#ifdef Z_DUAL_STEPPER_DRIVERS
116
+
117
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
118
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
119
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
120
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
121
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
122
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
123
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
124
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
125
+
126
+  #define Z_DUAL_ENDSTOPS
127
+
128
+  #ifdef Z_DUAL_ENDSTOPS
129
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
130
+    #define Z2_DIR_PIN E2_DIR_PIN
131
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
132
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
133
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
134
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
135
+  #endif
136
+
137
+#endif // Z_DUAL_STEPPER_DRIVERS
138
+
115 139
 // Same again but for Y Axis.
116 140
 //#define Y_DUAL_STEPPER_DRIVERS
117 141
 
@@ -124,41 +148,41 @@
124 148
 // allowing faster printing speeds.
125 149
 //#define DUAL_X_CARRIAGE
126 150
 #ifdef DUAL_X_CARRIAGE
127
-// Configuration for second X-carriage
128
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
129
-// the second x-carriage always homes to the maximum endstop.
130
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
131
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
132
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
133
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
134
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
135
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
136
-    // without modifying the firmware (through the "M218 T1 X???" command).
137
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
138
-
139
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
140
-#define X2_ENABLE_PIN 29
141
-#define X2_STEP_PIN 25
142
-#define X2_DIR_PIN 23
143
-
144
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
145
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
146
-//                           as long as it supports dual x-carriages. (M605 S0)
147
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
148
-//                           that additional slicer support is not required. (M605 S1)
149
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
150
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
151
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
152
-
153
-// This is the default power-up mode which can be later using M605.
154
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
155
-
156
-// Default settings in "Auto-park Mode"
157
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
158
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
159
-
160
-// Default x offset in duplication mode (typically set to half print bed width)
161
-#define DEFAULT_DUPLICATION_X_OFFSET 100
151
+  // Configuration for second X-carriage
152
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
153
+  // the second x-carriage always homes to the maximum endstop.
154
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
155
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
156
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
157
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
158
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
159
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
160
+      // without modifying the firmware (through the "M218 T1 X???" command).
161
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
162
+
163
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
164
+  #define X2_ENABLE_PIN 29
165
+  #define X2_STEP_PIN 25
166
+  #define X2_DIR_PIN 23
167
+
168
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
169
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
170
+  //                           as long as it supports dual x-carriages. (M605 S0)
171
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
172
+  //                           that additional slicer support is not required. (M605 S1)
173
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
174
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
175
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
176
+
177
+  // This is the default power-up mode which can be later using M605.
178
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
179
+
180
+  // Default settings in "Auto-park Mode"
181
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
182
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
183
+
184
+  // Default x offset in duplication mode (typically set to half print bed width)
185
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
162 186
 
163 187
 #endif //DUAL_X_CARRIAGE
164 188
 
@@ -168,6 +192,7 @@
168 192
 #define X_HOME_RETRACT_MM 5
169 193
 #define Y_HOME_RETRACT_MM 5
170 194
 #define Z_HOME_RETRACT_MM 2
195
+#define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
171 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
172 197
 
173 198
 // @section machine
@@ -231,8 +256,8 @@
231 256
 //===========================================================================
232 257
 
233 258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
234
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
235
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
259
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
236 261
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
237 262
 
238 263
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
@@ -240,27 +265,37 @@
240 265
 
241 266
 // @section lcd
242 267
 
243
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
244
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
245
-
246
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
247
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
248
-// using:
249
-//#define MENU_ADDAUTOSTART
250
-
251
-// Show a progress bar on HD44780 LCDs for SD printing
252
-//#define LCD_PROGRESS_BAR
253
-
254
-#ifdef LCD_PROGRESS_BAR
255
-  // Amount of time (ms) to show the bar
256
-  #define PROGRESS_BAR_BAR_TIME 2000
257
-  // Amount of time (ms) to show the status message
258
-  #define PROGRESS_BAR_MSG_TIME 3000
259
-  // Amount of time (ms) to retain the status message (0=forever)
260
-  #define PROGRESS_MSG_EXPIRE   0
261
-  // Enable this to show messages for MSG_TIME then hide them
262
-  //#define PROGRESS_MSG_ONCE
263
-#endif
268
+#ifdef SDSUPPORT
269
+
270
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
271
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
272
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
273
+  // be commented out otherwise
274
+  #define SDCARDDETECTINVERTED
275
+
276
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
277
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
278
+
279
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
280
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
281
+  // using:
282
+  //#define MENU_ADDAUTOSTART
283
+
284
+  // Show a progress bar on HD44780 LCDs for SD printing
285
+  //#define LCD_PROGRESS_BAR
286
+
287
+  #ifdef LCD_PROGRESS_BAR
288
+    // Amount of time (ms) to show the bar
289
+    #define PROGRESS_BAR_BAR_TIME 2000
290
+    // Amount of time (ms) to show the status message
291
+    #define PROGRESS_BAR_MSG_TIME 3000
292
+    // Amount of time (ms) to retain the status message (0=forever)
293
+    #define PROGRESS_MSG_EXPIRE   0
294
+    // Enable this to show messages for MSG_TIME then hide them
295
+    //#define PROGRESS_MSG_ONCE
296
+  #endif
297
+
298
+#endif // SDSUPPORT
264 299
 
265 300
 // @section more
266 301
 
@@ -298,12 +333,8 @@
298 333
 
299 334
 #ifdef ADVANCE
300 335
   #define EXTRUDER_ADVANCE_K .0
301
-
302 336
   #define D_FILAMENT 2.85
303 337
   #define STEPS_MM_E 836
304
-  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
305
-  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
306
-
307 338
 #endif // ADVANCE
308 339
 
309 340
 // Arc interpretation settings:
@@ -312,14 +343,6 @@
312 343
 
313 344
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
314 345
 
315
-// @section lcd
316
-
317
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
318
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
319
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
320
-// be commented out otherwise
321
-#define SDCARDDETECTINVERTED
322
-
323 346
 // @section temperature
324 347
 
325 348
 // Control heater 0 and heater 1 in parallel.
@@ -333,7 +356,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
333 356
 
334 357
 // The number of linear motions that can be in the plan at any give time.
335 358
 // 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 ring-buffering.
336
-#if defined SDSUPPORT
359
+#ifdef SDSUPPORT
337 360
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
338 361
 #else
339 362
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
@@ -377,6 +400,139 @@ const unsigned int dropsegments=5; //everything with less than this number of st
377 400
   #endif
378 401
 #endif
379 402
 
403
+/******************************************************************************\
404
+ * enable this section if you have TMC26X motor drivers. 
405
+ * you need to import the TMC26XStepper library into the arduino IDE for this
406
+ ******************************************************************************/
407
+
408
+//#define HAVE_TMCDRIVER
409
+#ifdef HAVE_TMCDRIVER
410
+
411
+//	#define X_IS_TMC
412
+	#define X_MAX_CURRENT 1000  //in mA
413
+	#define X_SENSE_RESISTOR 91 //in mOhms
414
+	#define X_MICROSTEPS 16     //number of microsteps
415
+	
416
+//	#define X2_IS_TMC
417
+	#define X2_MAX_CURRENT 1000  //in mA
418
+	#define X2_SENSE_RESISTOR 91 //in mOhms
419
+	#define X2_MICROSTEPS 16     //number of microsteps
420
+	
421
+//	#define Y_IS_TMC
422
+	#define Y_MAX_CURRENT 1000  //in mA
423
+	#define Y_SENSE_RESISTOR 91 //in mOhms
424
+	#define Y_MICROSTEPS 16     //number of microsteps
425
+	
426
+//	#define Y2_IS_TMC
427
+	#define Y2_MAX_CURRENT 1000  //in mA
428
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
429
+	#define Y2_MICROSTEPS 16     //number of microsteps	
430
+	
431
+//	#define Z_IS_TMC
432
+	#define Z_MAX_CURRENT 1000  //in mA
433
+	#define Z_SENSE_RESISTOR 91 //in mOhms
434
+	#define Z_MICROSTEPS 16     //number of microsteps
435
+	
436
+//	#define Z2_IS_TMC
437
+	#define Z2_MAX_CURRENT 1000  //in mA
438
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
439
+	#define Z2_MICROSTEPS 16     //number of microsteps
440
+	
441
+//	#define E0_IS_TMC
442
+	#define E0_MAX_CURRENT 1000  //in mA
443
+	#define E0_SENSE_RESISTOR 91 //in mOhms
444
+	#define E0_MICROSTEPS 16     //number of microsteps
445
+	
446
+//	#define E1_IS_TMC
447
+	#define E1_MAX_CURRENT 1000  //in mA
448
+	#define E1_SENSE_RESISTOR 91 //in mOhms
449
+	#define E1_MICROSTEPS 16     //number of microsteps	
450
+	
451
+//	#define E2_IS_TMC
452
+	#define E2_MAX_CURRENT 1000  //in mA
453
+	#define E2_SENSE_RESISTOR 91 //in mOhms
454
+	#define E2_MICROSTEPS 16     //number of microsteps	
455
+	
456
+//	#define E3_IS_TMC
457
+	#define E3_MAX_CURRENT 1000  //in mA
458
+	#define E3_SENSE_RESISTOR 91 //in mOhms
459
+	#define E3_MICROSTEPS 16     //number of microsteps		
460
+
461
+#endif
462
+
463
+/******************************************************************************\
464
+ * enable this section if you have L6470  motor drivers. 
465
+ * you need to import the L6470 library into the arduino IDE for this
466
+ ******************************************************************************/
467
+
468
+//#define HAVE_L6470DRIVER
469
+#ifdef HAVE_L6470DRIVER
470
+
471
+//	#define X_IS_L6470
472
+	#define X_MICROSTEPS 16     //number of microsteps
473
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
474
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
475
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
476
+	
477
+//	#define X2_IS_L6470
478
+	#define X2_MICROSTEPS 16     //number of microsteps
479
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
480
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
481
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
482
+	
483
+//	#define Y_IS_L6470
484
+	#define Y_MICROSTEPS 16     //number of microsteps
485
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
486
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
487
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
488
+	
489
+//	#define Y2_IS_L6470
490
+	#define Y2_MICROSTEPS 16     //number of microsteps	
491
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
492
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
493
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
494
+	
495
+//	#define Z_IS_L6470
496
+	#define Z_MICROSTEPS 16     //number of microsteps
497
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
498
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
499
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
500
+	
501
+//	#define Z2_IS_L6470
502
+	#define Z2_MICROSTEPS 16     //number of microsteps
503
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
504
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
505
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
506
+	
507
+//	#define E0_IS_L6470
508
+	#define E0_MICROSTEPS 16     //number of microsteps
509
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
510
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
511
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
512
+	
513
+//	#define E1_IS_L6470
514
+	#define E1_MICROSTEPS 16     //number of microsteps	
515
+	#define E1_MICROSTEPS 16     //number of microsteps
516
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
517
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
518
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
519
+	
520
+//	#define E2_IS_L6470
521
+	#define E2_MICROSTEPS 16     //number of microsteps	
522
+	#define E2_MICROSTEPS 16     //number of microsteps
523
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
524
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
525
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
526
+	
527
+//	#define E3_IS_L6470
528
+	#define E3_MICROSTEPS 16     //number of microsteps		
529
+	#define E3_MICROSTEPS 16     //number of microsteps
530
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
531
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
532
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
533
+	
534
+#endif
535
+
380 536
 #include "Conditionals.h"
381 537
 #include "SanityCheck.h"
382 538
 

+ 73
- 61
Marlin/example_configurations/Felix/Configuration.h View File

@@ -264,24 +264,27 @@ your extruder heater takes 2 minutes to hit the target on heating.
264 264
 // uncomment the 2 defines below:
265 265
 
266 266
 // Parameters for all extruder heaters
267
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 60 //in seconds
268
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 5 // in degree Celsius
267
+//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
268
+//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
269 269
 
270 270
 // If you want to enable this feature for your bed heater,
271 271
 // uncomment the 2 defines below:
272 272
 
273 273
 // Parameters for the bed heater
274
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 30 //in seconds
275
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 5// in degree Celsius
274
+//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
275
+//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
276 276
 
277 277
 
278 278
 //===========================================================================
279 279
 //============================= Mechanical Settings =========================
280 280
 //===========================================================================
281 281
 
282
-// Uncomment the following line to enable CoreXY kinematics
282
+// Uncomment this option to enable CoreXY kinematics
283 283
 // #define COREXY
284 284
 
285
+// Enable this option for Toshiba steppers
286
+// #define CONFIG_STEPPERS_TOSHIBA
287
+
285 288
 // coarse Endstop Settings
286 289
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
287 290
 
@@ -295,7 +298,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
295 298
   // #define ENDSTOPPULLUP_ZMIN
296 299
 #endif
297 300
 
298
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
301
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
299 302
 const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
300 303
 const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
301 304
 const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@@ -318,13 +321,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
318 321
 #define DISABLE_E false // For all extruders
319 322
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
320 323
 
321
-#define INVERT_X_DIR true     // for Mendel set to false, for Orca set to true
322
-#define INVERT_Y_DIR true    // for Mendel set to true, for Orca set to false
323
-#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
324
-#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
325
-#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
326
-#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
327
-#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
324
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
325
+#define INVERT_X_DIR true
326
+#define INVERT_Y_DIR true
327
+#define INVERT_Z_DIR true
328
+#define INVERT_E0_DIR false
329
+#define INVERT_E1_DIR false
330
+#define INVERT_E2_DIR false
331
+#define INVERT_E3_DIR false
328 332
 
329 333
 // ENDSTOP SETTINGS:
330 334
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -336,12 +340,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
336 340
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
337 341
 
338 342
 // Travel limits after homing (units are in mm)
339
-#define X_MAX_POS 255
340 343
 #define X_MIN_POS 0
341
-#define Y_MAX_POS 205
342 344
 #define Y_MIN_POS 0
343
-#define Z_MAX_POS 235
344 345
 #define Z_MIN_POS 0
346
+#define X_MAX_POS 255
347
+#define Y_MAX_POS 205
348
+#define Z_MAX_POS 235
345 349
 
346 350
 //===========================================================================
347 351
 //============================= Filament Runout Sensor ======================
@@ -379,39 +383,38 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
379 383
 
380 384
 #ifdef ENABLE_AUTO_BED_LEVELING
381 385
 
382
-// There are 2 different ways to pick the X and Y locations to probe:
383
-
384
-//  - "grid" mode
385
-//    Probe every point in a rectangular grid
386
-//    You must specify the rectangle, and the density of sample points
387
-//    This mode is preferred because there are more measurements.
388
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
389
-
390
-//  - "3-point" mode
391
-//    Probe 3 arbitrary points on the bed (that aren't colinear)
392
-//    You must specify the X & Y coordinates of all 3 points
393
-
386
+  // There are 2 different ways to specify probing locations
387
+  //
388
+  // - "grid" mode
389
+  //   Probe several points in a rectangular grid.
390
+  //   You specify the rectangle and the density of sample points.
391
+  //   This mode is preferred because there are more measurements.
392
+  //
393
+  // - "3-point" mode
394
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
395
+  //   You specify the XY coordinates of all 3 points.
396
+
397
+  // Enable this to sample the bed in a grid (least squares solution)
398
+  // Note: this feature generates 10KB extra code size
394 399
   #define AUTO_BED_LEVELING_GRID
395
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
396
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
397
-  // and least squares solution is calculated
398
-  // Note: this feature occupies 10'206 byte
400
+
399 401
   #ifdef AUTO_BED_LEVELING_GRID
400 402
 
401 403
     #define LEFT_PROBE_BED_POSITION 15
402 404
     #define RIGHT_PROBE_BED_POSITION 170
403
-    #define BACK_PROBE_BED_POSITION 180
404 405
     #define FRONT_PROBE_BED_POSITION 20
406
+    #define BACK_PROBE_BED_POSITION 180
405 407
 
406
-     // set the number of grid points per dimension
407
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
408
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
408
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
409 409
 
410
+    // Set the number of grid points per dimension
411
+    // You probably don't need more than 3 (squared=9)
412
+    #define AUTO_BED_LEVELING_GRID_POINTS 2
410 413
 
411
-  #else  // not AUTO_BED_LEVELING_GRID
412
-    // with no grid, just probe 3 arbitrary points.  A simple cross-product
413
-    // is used to esimate the plane of the print bed
414
+  #else  // !AUTO_BED_LEVELING_GRID
414 415
 
416
+      // Arbitrary points to probe. A simple cross-product
417
+      // is used to estimate the plane of the bed.
415 418
       #define ABL_PROBE_PT_1_X 15
416 419
       #define ABL_PROBE_PT_1_Y 180
417 420
       #define ABL_PROBE_PT_2_X 15
@@ -421,21 +424,24 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
421 424
 
422 425
   #endif // AUTO_BED_LEVELING_GRID
423 426
 
424
-
425
-  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
427
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
426 428
   // X and Y offsets must be integers
427
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
428
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
429
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
429
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
430
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Probe on: -front +behind
431
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
430 432
 
431 433
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
432 434
                                         // Be sure you have this distance over your Z_MAX_POS in case
433 435
 
434 436
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
435 437
 
436
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
438
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
437 439
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
440
+  #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
438 441
 
442
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
443
+                                                                            //Useful to retract a deployable probe.
444
+                                                                           
439 445
   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
440 446
   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
441 447
 
@@ -470,12 +476,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
470 476
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
471 477
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
472 478
 
473
-//Manual homing switch locations:
479
+// Manual homing switch locations:
474 480
 // For deltabots this means top and center of the Cartesian print volume.
475
-#define MANUAL_X_HOME_POS 0
476
-#define MANUAL_Y_HOME_POS 0
477
-#define MANUAL_Z_HOME_POS 0
478
-//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
481
+#ifdef MANUAL_HOME_POSITIONS
482
+  #define MANUAL_X_HOME_POS 0
483
+  #define MANUAL_Y_HOME_POS 0
484
+  #define MANUAL_Z_HOME_POS 0
485
+  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
486
+#endif
479 487
 
480 488
 //// MOVEMENT SETTINGS
481 489
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -513,8 +521,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
513 521
 #ifdef CUSTOM_M_CODES
514 522
   #ifdef ENABLE_AUTO_BED_LEVELING
515 523
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
516
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
517
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
524
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
525
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
518 526
   #endif
519 527
 #endif
520 528
 
@@ -542,13 +550,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
542 550
 //==============================LCD and SD support=============================
543 551
 
544 552
 // Define your display language below. Replace (en) with your language code and uncomment.
545
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
553
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
546 554
 // See also language.h
547 555
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
548 556
 
549
-// Character based displays can have different extended charsets.
550
-//#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
551
-//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
557
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
558
+// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
559
+// See also documentation/LCDLanguageFont.md
560
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
561
+  //#define DISPLAY_CHARSET_HD44780_WESTERN
562
+  //#define DISPLAY_CHARSET_HD44780_CYRILLIC
552 563
 
553 564
 //#define ULTRA_LCD  //general LCD support, also 16x2
554 565
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@@ -561,6 +572,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
561 572
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
562 573
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
563 574
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
575
+                                               // 0 to disable buzzer feedback  
564 576
 
565 577
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
566 578
 // http://reprap.org/wiki/PanelOne
@@ -622,11 +634,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
622 634
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
623 635
 #define FAST_PWM_FAN
624 636
 
625
-// Temperature status LEDs that display the hotend and bet temperature.
626
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
627
-// Otherwise the RED led is on. There is 1C hysteresis.
628
-//#define TEMP_STAT_LEDS
629
-
630 637
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
631 638
 // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
632 639
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -638,6 +645,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
638 645
 // at zero value, there are 128 effective control positions.
639 646
 #define SOFT_PWM_SCALE 0
640 647
 
648
+// Temperature status LEDs that display the hotend and bet temperature.
649
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
650
+// Otherwise the RED led is on. There is 1C hysteresis.
651
+//#define TEMP_STAT_LEDS
652
+
641 653
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
642 654
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
643 655
 // #define PHOTOGRAPH_PIN     23

+ 73
- 62
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -264,24 +264,27 @@ your extruder heater takes 2 minutes to hit the target on heating.
264 264
 // uncomment the 2 defines below:
265 265
 
266 266
 // Parameters for all extruder heaters
267
-//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 60 //in seconds
268
-//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 5 // in degree Celsius
267
+//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
268
+//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
269 269
 
270 270
 // If you want to enable this feature for your bed heater,
271 271
 // uncomment the 2 defines below:
272 272
 
273 273
 // Parameters for the bed heater
274
-//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 30 //in seconds
275
-//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 5// in degree Celsius
274
+//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
275
+//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
276 276
 
277 277
 
278 278
 //===========================================================================
279 279
 //============================= Mechanical Settings =========================
280 280
 //===========================================================================
281 281
 
282
-// Uncomment the following line to enable CoreXY kinematics
282
+// Uncomment this option to enable CoreXY kinematics
283 283
 // #define COREXY
284 284
 
285
+// Enable this option for Toshiba steppers
286
+// #define CONFIG_STEPPERS_TOSHIBA
287
+
285 288
 // coarse Endstop Settings
286 289
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
287 290
 
@@ -295,7 +298,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
295 298
   // #define ENDSTOPPULLUP_ZMIN
296 299
 #endif
297 300
 
298
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
301
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
299 302
 const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
300 303
 const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
301 304
 const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@@ -318,13 +321,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
318 321
 #define DISABLE_E false // For all extruders
319 322
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
320 323
 
321
-#define INVERT_X_DIR true     // for Mendel set to false, for Orca set to true
322
-#define INVERT_Y_DIR true     // for Mendel set to true, for Orca set to false
323
-#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
324
-#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
325
-#define INVERT_E1_DIR true    // for direct drive extruder v9 set to true, for geared extruder set to false
326
-#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
327
-#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
324
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
325
+#define INVERT_X_DIR true
326
+#define INVERT_Y_DIR true
327
+#define INVERT_Z_DIR true
328
+#define INVERT_E0_DIR false
329
+#define INVERT_E1_DIR true
330
+#define INVERT_E2_DIR false
331
+#define INVERT_E3_DIR false
328 332
 
329 333
 // ENDSTOP SETTINGS:
330 334
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -336,12 +340,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
336 340
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
337 341
 
338 342
 // Travel limits after homing (units are in mm)
339
-#define X_MAX_POS 255
340 343
 #define X_MIN_POS 0
341
-#define Y_MAX_POS 205
342 344
 #define Y_MIN_POS 0
343
-#define Z_MAX_POS 235
344 345
 #define Z_MIN_POS 0
346
+#define X_MAX_POS 255
347
+#define Y_MAX_POS 205
348
+#define Z_MAX_POS 235
345 349
 
346 350
 //===========================================================================
347 351
 //============================= Filament Runout Sensor ======================
@@ -379,39 +383,38 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
379 383
 
380 384
 #ifdef ENABLE_AUTO_BED_LEVELING
381 385
 
382
-// There are 2 different ways to pick the X and Y locations to probe:
383
-
384
-//  - "grid" mode
385
-//    Probe every point in a rectangular grid
386
-//    You must specify the rectangle, and the density of sample points
387
-//    This mode is preferred because there are more measurements.
388
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
389
-
390
-//  - "3-point" mode
391
-//    Probe 3 arbitrary points on the bed (that aren't colinear)
392
-//    You must specify the X & Y coordinates of all 3 points
393
-
386
+  // There are 2 different ways to specify probing locations
387
+  //
388
+  // - "grid" mode
389
+  //   Probe several points in a rectangular grid.
390
+  //   You specify the rectangle and the density of sample points.
391
+  //   This mode is preferred because there are more measurements.
392
+  //
393
+  // - "3-point" mode
394
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
395
+  //   You specify the XY coordinates of all 3 points.
396
+
397
+  // Enable this to sample the bed in a grid (least squares solution)
398
+  // Note: this feature generates 10KB extra code size
394 399
   #define AUTO_BED_LEVELING_GRID
395
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
396
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
397
-  // and least squares solution is calculated
398
-  // Note: this feature occupies 10'206 byte
400
+
399 401
   #ifdef AUTO_BED_LEVELING_GRID
400 402
 
401 403
     #define LEFT_PROBE_BED_POSITION 15
402 404
     #define RIGHT_PROBE_BED_POSITION 170
403
-    #define BACK_PROBE_BED_POSITION 180
404 405
     #define FRONT_PROBE_BED_POSITION 20
406
+    #define BACK_PROBE_BED_POSITION 180
405 407
 
406
-     // set the number of grid points per dimension
407
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
408
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
408
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this      
409 409
 
410
+    // Set the number of grid points per dimension
411
+    // You probably don't need more than 3 (squared=9)
412
+    #define AUTO_BED_LEVELING_GRID_POINTS 2
410 413
 
411
-  #else  // not AUTO_BED_LEVELING_GRID
412
-    // with no grid, just probe 3 arbitrary points.  A simple cross-product
413
-    // is used to esimate the plane of the print bed
414
+  #else  // !AUTO_BED_LEVELING_GRID
414 415
 
416
+      // Arbitrary points to probe. A simple cross-product
417
+      // is used to estimate the plane of the bed.
415 418
       #define ABL_PROBE_PT_1_X 15
416 419
       #define ABL_PROBE_PT_1_Y 180
417 420
       #define ABL_PROBE_PT_2_X 15
@@ -421,21 +424,24 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
421 424
 
422 425
   #endif // AUTO_BED_LEVELING_GRID
423 426
 
424
-
425
-  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
427
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
426 428
   // X and Y offsets must be integers
427
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
428
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
429
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
429
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
430
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Probe on: -front +behind
431
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
430 432
 
431 433
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
432 434
                                         // Be sure you have this distance over your Z_MAX_POS in case
433 435
 
434 436
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
435 437
 
436
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
438
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
437 439
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
440
+  #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
438 441
 
442
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
443
+                                                                            //Useful to retract a deployable probe.
444
+                                                                           
439 445
   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
440 446
   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
441 447
 
@@ -470,12 +476,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
470 476
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
471 477
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
472 478
 
473
-//Manual homing switch locations:
479
+// Manual homing switch locations:
474 480
 // For deltabots this means top and center of the Cartesian print volume.
475
-#define MANUAL_X_HOME_POS 0
476
-#define MANUAL_Y_HOME_POS 0
477
-#define MANUAL_Z_HOME_POS 0
478
-//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
481
+#ifdef MANUAL_HOME_POSITIONS
482
+  #define MANUAL_X_HOME_POS 0
483
+  #define MANUAL_Y_HOME_POS 0
484
+  #define MANUAL_Z_HOME_POS 0
485
+  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
486
+#endif
479 487
 
480 488
 //// MOVEMENT SETTINGS
481 489
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -513,8 +521,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
513 521
 #ifdef CUSTOM_M_CODES
514 522
   #ifdef ENABLE_AUTO_BED_LEVELING
515 523
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
516
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
517
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
524
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
525
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
518 526
   #endif
519 527
 #endif
520 528
 
@@ -542,13 +550,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
542 550
 //==============================LCD and SD support=============================
543 551
 
544 552
 // Define your display language below. Replace (en) with your language code and uncomment.
545
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
553
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
546 554
 // See also language.h
547 555
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
548 556
 
549
-// Character based displays can have different extended charsets.
550
-//#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
551
-//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
557
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
558
+// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
559
+// See also documentation/LCDLanguageFont.md
560
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
561
+  //#define DISPLAY_CHARSET_HD44780_WESTERN
562
+  //#define DISPLAY_CHARSET_HD44780_CYRILLIC
552 563
 
553 564
 //#define ULTRA_LCD  //general LCD support, also 16x2
554 565
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@@ -561,6 +572,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
561 572
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
562 573
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
563 574
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
575
+                                               // 0 to disable buzzer feedback  
564 576
 
565 577
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
566 578
 // http://reprap.org/wiki/PanelOne
@@ -619,15 +631,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
619 631
 
620 632
 //#define SAV_3DLCD
621 633
 
622
-
623 634
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
624 635
 #define FAST_PWM_FAN
625 636
 
626
-// Temperature status LEDs that display the hotend and bet temperature.
627
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
628
-// Otherwise the RED led is on. There is 1C hysteresis.
629
-//#define TEMP_STAT_LEDS
630
-
631 637
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
632 638
 // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
633 639
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -639,6 +645,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
639 645
 // at zero value, there are 128 effective control positions.
640 646
 #define SOFT_PWM_SCALE 0
641 647
 
648
+// Temperature status LEDs that display the hotend and bet temperature.
649
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
650
+// Otherwise the RED led is on. There is 1C hysteresis.
651
+//#define TEMP_STAT_LEDS
652
+
642 653
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
643 654
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
644 655
 // #define PHOTOGRAPH_PIN     23

+ 227
- 86
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -100,6 +100,30 @@
100 100
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
101 101
 //#define Z_DUAL_STEPPER_DRIVERS
102 102
 
103
+#ifdef Z_DUAL_STEPPER_DRIVERS
104
+
105
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
108
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
+
114
+  #define Z_DUAL_ENDSTOPS
115
+
116
+  #ifdef Z_DUAL_ENDSTOPS
117
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
+    #define Z2_DIR_PIN E2_DIR_PIN
119
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
+  #endif
124
+
125
+#endif // Z_DUAL_STEPPER_DRIVERS
126
+
103 127
 // Same again but for Y Axis.
104 128
 //#define Y_DUAL_STEPPER_DRIVERS
105 129
 
@@ -112,41 +136,41 @@
112 136
 // allowing faster printing speeds.
113 137
 //#define DUAL_X_CARRIAGE
114 138
 #ifdef DUAL_X_CARRIAGE
115
-// Configuration for second X-carriage
116
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
117
-// the second x-carriage always homes to the maximum endstop.
118
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
119
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
120
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
121
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
122
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
123
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
124
-    // without modifying the firmware (through the "M218 T1 X???" command).
125
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
126
-
127
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
128
-#define X2_ENABLE_PIN 29
129
-#define X2_STEP_PIN 25
130
-#define X2_DIR_PIN 23
131
-
132
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
133
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
134
-//                           as long as it supports dual x-carriages. (M605 S0)
135
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
136
-//                           that additional slicer support is not required. (M605 S1)
137
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
138
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
139
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
140
-
141
-// This is the default power-up mode which can be later using M605.
142
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
143
-
144
-// Default settings in "Auto-park Mode"
145
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
146
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
147
-
148
-// Default x offset in duplication mode (typically set to half print bed width)
149
-#define DEFAULT_DUPLICATION_X_OFFSET 100
139
+  // Configuration for second X-carriage
140
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
141
+  // the second x-carriage always homes to the maximum endstop.
142
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
143
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
144
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
145
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
146
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
147
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
148
+      // without modifying the firmware (through the "M218 T1 X???" command).
149
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
150
+
151
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
152
+  #define X2_ENABLE_PIN 29
153
+  #define X2_STEP_PIN 25
154
+  #define X2_DIR_PIN 23
155
+
156
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
157
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
158
+  //                           as long as it supports dual x-carriages. (M605 S0)
159
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
160
+  //                           that additional slicer support is not required. (M605 S1)
161
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
162
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
163
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
164
+
165
+  // This is the default power-up mode which can be later using M605.
166
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
167
+
168
+  // Default settings in "Auto-park Mode"
169
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
170
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
171
+
172
+  // Default x offset in duplication mode (typically set to half print bed width)
173
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
150 174
 
151 175
 #endif //DUAL_X_CARRIAGE
152 176
 
@@ -210,34 +234,44 @@
210 234
 //===========================================================================
211 235
 
212 236
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
213
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
214
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
237
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
238
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
215 239
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
216 240
 
217 241
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
218 242
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
219 243
 
220
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
221
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
222
-
223
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
224
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
225
-// using:
226
-//#define MENU_ADDAUTOSTART
227
-
228
-// Show a progress bar on HD44780 LCDs for SD printing
229
-//#define LCD_PROGRESS_BAR
230
-
231
-#ifdef LCD_PROGRESS_BAR
232
-  // Amount of time (ms) to show the bar
233
-  #define PROGRESS_BAR_BAR_TIME 2000
234
-  // Amount of time (ms) to show the status message
235
-  #define PROGRESS_BAR_MSG_TIME 3000
236
-  // Amount of time (ms) to retain the status message (0=forever)
237
-  #define PROGRESS_MSG_EXPIRE   0
238
-  // Enable this to show messages for MSG_TIME then hide them
239
-  //#define PROGRESS_MSG_ONCE
240
-#endif
244
+#ifdef SDSUPPORT
245
+
246
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
247
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
248
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
249
+  // be commented out otherwise
250
+  #define SDCARDDETECTINVERTED
251
+
252
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
253
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
254
+
255
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
256
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
257
+  // using:
258
+  //#define MENU_ADDAUTOSTART
259
+
260
+  // Show a progress bar on HD44780 LCDs for SD printing
261
+  //#define LCD_PROGRESS_BAR
262
+
263
+  #ifdef LCD_PROGRESS_BAR
264
+    // Amount of time (ms) to show the bar
265
+    #define PROGRESS_BAR_BAR_TIME 2000
266
+    // Amount of time (ms) to show the status message
267
+    #define PROGRESS_BAR_MSG_TIME 3000
268
+    // Amount of time (ms) to retain the status message (0=forever)
269
+    #define PROGRESS_MSG_EXPIRE   0
270
+    // Enable this to show messages for MSG_TIME then hide them
271
+    //#define PROGRESS_MSG_ONCE
272
+  #endif
273
+
274
+#endif // SDSUPPORT
241 275
 
242 276
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
243 277
 //#define USE_WATCHDOG
@@ -275,7 +309,7 @@
275 309
   #define EXTRUDER_ADVANCE_K .0
276 310
   #define D_FILAMENT 2.85
277 311
   #define STEPS_MM_E 836
278
-#endif // ADVANCE
312
+#endif
279 313
 
280 314
 // Arc interpretation settings:
281 315
 #define MM_PER_ARC_SEGMENT 1
@@ -283,32 +317,6 @@
283 317
 
284 318
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
285 319
 
286
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
287
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
288
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
289
-// be commented out otherwise
290
-#define SDCARDDETECTINVERTED
291
-
292
-//#ifdef ULTIPANEL
293
-// #undef SDCARDDETECTINVERTED
294
-//#endif
295
-
296
-// Power Signal Control Definitions
297
-// By default use ATX definition
298
-#ifndef POWER_SUPPLY
299
-  #define POWER_SUPPLY 1
300
-#endif
301
-// 1 = ATX
302
-#if (POWER_SUPPLY == 1)
303
-  #define PS_ON_AWAKE  LOW
304
-  #define PS_ON_ASLEEP HIGH
305
-#endif
306
-// 2 = X-Box 360 203W
307
-#if (POWER_SUPPLY == 2)
308
-  #define PS_ON_AWAKE  HIGH
309
-  #define PS_ON_ASLEEP LOW
310
-#endif
311
-
312 320
 // Control heater 0 and heater 1 in parallel.
313 321
 //#define HEATERS_PARALLEL
314 322
 
@@ -318,7 +326,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
318 326
 
319 327
 // The number of linear motions that can be in the plan at any give time.
320 328
 // 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 ring-buffering.
321
-#if defined SDSUPPORT
329
+#ifdef SDSUPPORT
322 330
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
323 331
 #else
324 332
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
@@ -360,6 +368,139 @@ const unsigned int dropsegments=5; //everything with less than this number of st
360 368
   #endif
361 369
 #endif
362 370
 
371
+/******************************************************************************\
372
+ * enable this section if you have TMC26X motor drivers. 
373
+ * you need to import the TMC26XStepper library into the arduino IDE for this
374
+ ******************************************************************************/
375
+
376
+//#define HAVE_TMCDRIVER
377
+#ifdef HAVE_TMCDRIVER
378
+
379
+//	#define X_IS_TMC
380
+	#define X_MAX_CURRENT 1000  //in mA
381
+	#define X_SENSE_RESISTOR 91 //in mOhms
382
+	#define X_MICROSTEPS 16     //number of microsteps
383
+	
384
+//	#define X2_IS_TMC
385
+	#define X2_MAX_CURRENT 1000  //in mA
386
+	#define X2_SENSE_RESISTOR 91 //in mOhms
387
+	#define X2_MICROSTEPS 16     //number of microsteps
388
+	
389
+//	#define Y_IS_TMC
390
+	#define Y_MAX_CURRENT 1000  //in mA
391
+	#define Y_SENSE_RESISTOR 91 //in mOhms
392
+	#define Y_MICROSTEPS 16     //number of microsteps
393
+	
394
+//	#define Y2_IS_TMC
395
+	#define Y2_MAX_CURRENT 1000  //in mA
396
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
397
+	#define Y2_MICROSTEPS 16     //number of microsteps	
398
+	
399
+//	#define Z_IS_TMC
400
+	#define Z_MAX_CURRENT 1000  //in mA
401
+	#define Z_SENSE_RESISTOR 91 //in mOhms
402
+	#define Z_MICROSTEPS 16     //number of microsteps
403
+	
404
+//	#define Z2_IS_TMC
405
+	#define Z2_MAX_CURRENT 1000  //in mA
406
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
407
+	#define Z2_MICROSTEPS 16     //number of microsteps
408
+	
409
+//	#define E0_IS_TMC
410
+	#define E0_MAX_CURRENT 1000  //in mA
411
+	#define E0_SENSE_RESISTOR 91 //in mOhms
412
+	#define E0_MICROSTEPS 16     //number of microsteps
413
+	
414
+//	#define E1_IS_TMC
415
+	#define E1_MAX_CURRENT 1000  //in mA
416
+	#define E1_SENSE_RESISTOR 91 //in mOhms
417
+	#define E1_MICROSTEPS 16     //number of microsteps	
418
+	
419
+//	#define E2_IS_TMC
420
+	#define E2_MAX_CURRENT 1000  //in mA
421
+	#define E2_SENSE_RESISTOR 91 //in mOhms
422
+	#define E2_MICROSTEPS 16     //number of microsteps	
423
+	
424
+//	#define E3_IS_TMC
425
+	#define E3_MAX_CURRENT 1000  //in mA
426
+	#define E3_SENSE_RESISTOR 91 //in mOhms
427
+	#define E3_MICROSTEPS 16     //number of microsteps		
428
+
429
+#endif
430
+
431
+/******************************************************************************\
432
+ * enable this section if you have L6470  motor drivers. 
433
+ * you need to import the L6470 library into the arduino IDE for this
434
+ ******************************************************************************/
435
+
436
+//#define HAVE_L6470DRIVER
437
+#ifdef HAVE_L6470DRIVER
438
+
439
+//	#define X_IS_L6470
440
+	#define X_MICROSTEPS 16     //number of microsteps
441
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
442
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
443
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
444
+	
445
+//	#define X2_IS_L6470
446
+	#define X2_MICROSTEPS 16     //number of microsteps
447
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
448
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
449
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
450
+	
451
+//	#define Y_IS_L6470
452
+	#define Y_MICROSTEPS 16     //number of microsteps
453
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
454
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
455
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
456
+	
457
+//	#define Y2_IS_L6470
458
+	#define Y2_MICROSTEPS 16     //number of microsteps	
459
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
460
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
461
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
462
+	
463
+//	#define Z_IS_L6470
464
+	#define Z_MICROSTEPS 16     //number of microsteps
465
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
466
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
467
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
468
+	
469
+//	#define Z2_IS_L6470
470
+	#define Z2_MICROSTEPS 16     //number of microsteps
471
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
472
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
473
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
474
+	
475
+//	#define E0_IS_L6470
476
+	#define E0_MICROSTEPS 16     //number of microsteps
477
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
478
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
479
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
480
+	
481
+//	#define E1_IS_L6470
482
+	#define E1_MICROSTEPS 16     //number of microsteps	
483
+	#define E1_MICROSTEPS 16     //number of microsteps
484
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
485
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
486
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
487
+	
488
+//	#define E2_IS_L6470
489
+	#define E2_MICROSTEPS 16     //number of microsteps	
490
+	#define E2_MICROSTEPS 16     //number of microsteps
491
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
492
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
493
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
494
+	
495
+//	#define E3_IS_L6470
496
+	#define E3_MICROSTEPS 16     //number of microsteps		
497
+	#define E3_MICROSTEPS 16     //number of microsteps
498
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
499
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
500
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
501
+	
502
+#endif
503
+
363 504
 #include "Conditionals.h"
364 505
 #include "SanityCheck.h"
365 506
 

+ 47
- 41
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -104,7 +104,7 @@ Here are some standard links for getting your machine calibrated:
104 104
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
105 105
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
106 106
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
107
-// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
107
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
108 108
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
109 109
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
110 110
 //
@@ -118,7 +118,7 @@ Here are some standard links for getting your machine calibrated:
118 118
 // 1010 is Pt1000 with 1k pullup (non standard)
119 119
 // 147 is Pt100 with 4k7 pullup
120 120
 // 110 is Pt100 with 1k pullup (non standard)
121
-// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
122 122
 //     Use it for Testing or Development purposes. NEVER for production machine.
123 123
 //     #define DUMMY_THERMISTOR_998_VALUE 25
124 124
 //     #define DUMMY_THERMISTOR_999_VALUE 100
@@ -270,15 +270,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
270 270
 The system will turn the heater on forever, burning up the filament and anything
271 271
 else around.
272 272
 
273
-After the temperature reaches the target for the first time, this feature will 
274
-start measuring for how long the current temperature stays below the target 
273
+After the temperature reaches the target for the first time, this feature will
274
+start measuring for how long the current temperature stays below the target
275 275
 minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
276 276
 
277 277
 If it stays longer than _PERIOD, it means the thermistor temperature
278 278
 cannot catch up with the target, so something *may be* wrong. Then, to be on the
279 279
 safe side, the system will he halt.
280 280
 
281
-Bear in mind the count down will just start AFTER the first time the 
281
+Bear in mind the count down will just start AFTER the first time the
282 282
 thermistor temperature is over the target, so you will have no problem if
283 283
 your extruder heater takes 2 minutes to hit the target on heating.
284 284
 
@@ -321,7 +321,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
321 321
   // #define ENDSTOPPULLUP_ZMIN
322 322
 #endif
323 323
 
324
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
324
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
325 325
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
326 326
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
327 327
 const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -344,13 +344,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
344 344
 #define DISABLE_E false // For all extruders
345 345
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
346 346
 
347
-#define INVERT_X_DIR true    // for Mendel set to false, for Orca set to true
348
-#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
349
-#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
350
-#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
351
-#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
352
-#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
353
-#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
347
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
348
+#define INVERT_X_DIR true
349
+#define INVERT_Y_DIR false
350
+#define INVERT_Z_DIR true
351
+#define INVERT_E0_DIR false
352
+#define INVERT_E1_DIR false
353
+#define INVERT_E2_DIR false
354
+#define INVERT_E3_DIR false
354 355
 
355 356
 // ENDSTOP SETTINGS:
356 357
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -361,13 +362,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
361 362
 #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
362 363
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
363 364
 
364
-// Travel limits after homing (units in mm)
365
-#define X_MAX_POS 215
365
+// Travel limits after homing (units are in mm)
366 366
 #define X_MIN_POS 0
367
-#define Y_MAX_POS 210
368 367
 #define Y_MIN_POS 0
369
-#define Z_MAX_POS 180
370 368
 #define Z_MIN_POS 0
369
+#define X_MAX_POS 215
370
+#define Y_MAX_POS 210
371
+#define Z_MAX_POS 180
371 372
 
372 373
 //===========================================================================
373 374
 //============================= Filament Runout Sensor ======================
@@ -426,14 +427,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
426 427
     #define RIGHT_PROBE_BED_POSITION 170
427 428
     #define FRONT_PROBE_BED_POSITION 20
428 429
     #define BACK_PROBE_BED_POSITION 170
429
-    
430
+
430 431
     #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
431 432
 
432 433
     // Set the number of grid points per dimension
433 434
     // You probably don't need more than 3 (squared=9)
434 435
     #define AUTO_BED_LEVELING_GRID_POINTS 2
435 436
 
436
-
437 437
   #else  // !AUTO_BED_LEVELING_GRID
438 438
 
439 439
       // Arbitrary points to probe. A simple cross-product
@@ -447,11 +447,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
447 447
 
448 448
   #endif // AUTO_BED_LEVELING_GRID
449 449
 
450
-
451 450
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
452 451
   // X and Y offsets must be integers
453
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
454
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
452
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
453
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Probe on: -front +behind
455 454
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
456 455
 
457 456
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
@@ -459,10 +458,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
459 458
 
460 459
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
461 460
 
462
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
461
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
463 462
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
464 463
   #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
465 464
 
465
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
466
+                                                                            //Useful to retract a deployable probe.
467
+                                                                           
466 468
   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
467 469
   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
468 470
 
@@ -497,12 +499,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
497 499
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
498 500
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
499 501
 
500
-//Manual homing switch locations:
502
+// Manual homing switch locations:
501 503
 // For deltabots this means top and center of the Cartesian print volume.
502
-#define MANUAL_X_HOME_POS 0
503
-#define MANUAL_Y_HOME_POS 0
504
-#define MANUAL_Z_HOME_POS 0
505
-//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
504
+#ifdef MANUAL_HOME_POSITIONS
505
+  #define MANUAL_X_HOME_POS 0
506
+  #define MANUAL_Y_HOME_POS 0
507
+  #define MANUAL_Z_HOME_POS 0
508
+  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
509
+#endif
506 510
 
507 511
 //// MOVEMENT SETTINGS
508 512
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -518,8 +522,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
518 522
 #define DEFAULT_RETRACT_ACCELERATION  1000   // E acceleration in mm/s^2 for retracts
519 523
 #define DEFAULT_TRAVEL_ACCELERATION   1000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
520 524
 
521
-
522
-
523 525
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
524 526
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
525 527
 // For the other hotends it is their distance from the extruder 0 hotend.
@@ -541,8 +543,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
541 543
 #ifdef CUSTOM_M_CODES
542 544
   #ifdef ENABLE_AUTO_BED_LEVELING
543 545
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
544
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
545
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
546
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
547
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
546 548
   #endif
547 549
 #endif
548 550
 
@@ -570,13 +572,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
570 572
 //==============================LCD and SD support=============================
571 573
 
572 574
 // Define your display language below. Replace (en) with your language code and uncomment.
573
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
575
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
574 576
 // See also language.h
575 577
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
576 578
 
577
-// Character based displays can have different extended charsets.
578
-#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
579
-//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
579
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
580
+// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
581
+// See also documentation/LCDLanguageFont.md
582
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
583
+  //#define DISPLAY_CHARSET_HD44780_WESTERN
584
+  //#define DISPLAY_CHARSET_HD44780_CYRILLIC
580 585
 
581 586
 #define ULTRA_LCD  //general LCD support, also 16x2
582 587
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@@ -589,6 +594,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
589 594
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
590 595
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
591 596
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
597
+                                               // 0 to disable buzzer feedback  
592 598
 
593 599
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
594 600
 // http://reprap.org/wiki/PanelOne
@@ -643,7 +649,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
643 649
 // Shift register panels
644 650
 // ---------------------
645 651
 // 2 wire Non-latching LCD SR from:
646
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
652
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
647 653
 
648 654
 //#define SAV_3DLCD
649 655
 
@@ -651,7 +657,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
651 657
 //#define FAST_PWM_FAN
652 658
 
653 659
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
654
-// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
660
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
655 661
 // is too low, you should also increment SOFT_PWM_SCALE.
656 662
 //#define FAN_SOFT_PWM
657 663
 
@@ -705,9 +711,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
705 711
  * Support for a filament diameter sensor
706 712
  * Also allows adjustment of diameter at print time (vs  at slicing)
707 713
  * Single extruder only at this point (extruder 0)
708
- * 
714
+ *
709 715
  * Motherboards
710
- * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
716
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
711 717
  * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
712 718
  * 301 - Rambo  - uses Analog input 3
713 719
  * Note may require analog pins to be defined for different motherboards
@@ -724,7 +730,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
724 730
 #define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
725 731
 
726 732
 //defines used in the code
727
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
733
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
728 734
 
729 735
 //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
730 736
 //#define FILAMENT_LCD_DISPLAY

+ 230
- 73
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -100,6 +100,30 @@
100 100
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
101 101
 //#define Z_DUAL_STEPPER_DRIVERS
102 102
 
103
+#ifdef Z_DUAL_STEPPER_DRIVERS
104
+
105
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
108
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
+
114
+  #define Z_DUAL_ENDSTOPS
115
+
116
+  #ifdef Z_DUAL_ENDSTOPS
117
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
+    #define Z2_DIR_PIN E2_DIR_PIN
119
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
+  #endif
124
+
125
+#endif // Z_DUAL_STEPPER_DRIVERS
126
+
103 127
 // Same again but for Y Axis.
104 128
 //#define Y_DUAL_STEPPER_DRIVERS
105 129
 
@@ -112,41 +136,41 @@
112 136
 // allowing faster printing speeds.
113 137
 //#define DUAL_X_CARRIAGE
114 138
 #ifdef DUAL_X_CARRIAGE
115
-// Configuration for second X-carriage
116
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
117
-// the second x-carriage always homes to the maximum endstop.
118
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
119
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
120
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
121
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
122
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
123
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
124
-    // without modifying the firmware (through the "M218 T1 X???" command).
125
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
126
-
127
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
128
-#define X2_ENABLE_PIN 29
129
-#define X2_STEP_PIN 25
130
-#define X2_DIR_PIN 23
131
-
132
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
133
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
134
-//                           as long as it supports dual x-carriages. (M605 S0)
135
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
136
-//                           that additional slicer support is not required. (M605 S1)
137
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
138
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
139
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
140
-
141
-// This is the default power-up mode which can be later using M605.
142
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
143
-
144
-// Default settings in "Auto-park Mode"
145
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
146
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
147
-
148
-// Default x offset in duplication mode (typically set to half print bed width)
149
-#define DEFAULT_DUPLICATION_X_OFFSET 100
139
+  // Configuration for second X-carriage
140
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
141
+  // the second x-carriage always homes to the maximum endstop.
142
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
143
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
144
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
145
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
146
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
147
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
148
+      // without modifying the firmware (through the "M218 T1 X???" command).
149
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
150
+
151
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
152
+  #define X2_ENABLE_PIN 29
153
+  #define X2_STEP_PIN 25
154
+  #define X2_DIR_PIN 23
155
+
156
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
157
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
158
+  //                           as long as it supports dual x-carriages. (M605 S0)
159
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
160
+  //                           that additional slicer support is not required. (M605 S1)
161
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
162
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
163
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
164
+
165
+  // This is the default power-up mode which can be later using M605.
166
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
167
+
168
+  // Default settings in "Auto-park Mode"
169
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
170
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
171
+
172
+  // Default x offset in duplication mode (typically set to half print bed width)
173
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
150 174
 
151 175
 #endif //DUAL_X_CARRIAGE
152 176
 
@@ -158,11 +182,7 @@
158 182
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
159 183
 
160 184
 #define AXIS_RELATIVE_MODES {false, false, false, false}
161
-#ifdef CONFIG_STEPPERS_TOSHIBA
162
-#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
163
-#else
164
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
165
-#endif
185
+
166 186
 //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
167 187
 #define INVERT_X_STEP_PIN false
168 188
 #define INVERT_Y_STEP_PIN false
@@ -214,34 +234,44 @@
214 234
 //===========================================================================
215 235
 
216 236
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
217
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
218
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
237
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
238
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
219 239
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
220 240
 
221 241
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
222 242
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
223 243
 
224
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
225
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
226
-
227
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
228
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
229
-// using:
230
-#define MENU_ADDAUTOSTART
231
-
232
-// Show a progress bar on HD44780 LCDs for SD printing
233
-//#define LCD_PROGRESS_BAR
234
-
235
-#ifdef LCD_PROGRESS_BAR
236
-  // Amount of time (ms) to show the bar
237
-  #define PROGRESS_BAR_BAR_TIME 2000
238
-  // Amount of time (ms) to show the status message
239
-  #define PROGRESS_BAR_MSG_TIME 3000
240
-  // Amount of time (ms) to retain the status message (0=forever)
241
-  #define PROGRESS_MSG_EXPIRE   0
242
-  // Enable this to show messages for MSG_TIME then hide them
243
-  //#define PROGRESS_MSG_ONCE
244
-#endif
244
+#ifdef SDSUPPORT
245
+
246
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
247
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
248
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
249
+  // be commented out otherwise
250
+  #define SDCARDDETECTINVERTED
251
+
252
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
253
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
254
+
255
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
256
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
257
+  // using:
258
+  //#define MENU_ADDAUTOSTART
259
+
260
+  // Show a progress bar on HD44780 LCDs for SD printing
261
+  //#define LCD_PROGRESS_BAR
262
+
263
+  #ifdef LCD_PROGRESS_BAR
264
+    // Amount of time (ms) to show the bar
265
+    #define PROGRESS_BAR_BAR_TIME 2000
266
+    // Amount of time (ms) to show the status message
267
+    #define PROGRESS_BAR_MSG_TIME 3000
268
+    // Amount of time (ms) to retain the status message (0=forever)
269
+    #define PROGRESS_MSG_EXPIRE   0
270
+    // Enable this to show messages for MSG_TIME then hide them
271
+    //#define PROGRESS_MSG_ONCE
272
+  #endif
273
+
274
+#endif // SDSUPPORT
245 275
 
246 276
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
247 277
 //#define USE_WATCHDOG
@@ -279,7 +309,7 @@
279 309
   #define EXTRUDER_ADVANCE_K .0
280 310
   #define D_FILAMENT 1.75
281 311
   #define STEPS_MM_E 100.47095761381482
282
-#endif // ADVANCE
312
+#endif
283 313
 
284 314
 // Arc interpretation settings:
285 315
 #define MM_PER_ARC_SEGMENT 1
@@ -287,12 +317,6 @@
287 317
 
288 318
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
289 319
 
290
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
291
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
292
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
293
-// be commented out otherwise
294
-#define SDCARDDETECTINVERTED
295
-
296 320
 // Control heater 0 and heater 1 in parallel.
297 321
 //#define HEATERS_PARALLEL
298 322
 
@@ -302,7 +326,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
302 326
 
303 327
 // The number of linear motions that can be in the plan at any give time.
304 328
 // 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 ring-buffering.
305
-#if defined SDSUPPORT
329
+#ifdef SDSUPPORT
306 330
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
307 331
 #else
308 332
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
@@ -325,11 +349,11 @@ const unsigned int dropsegments=5; //everything with less than this number of st
325 349
   #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
326 350
   #define RETRACT_LENGTH 3               //default retract length (positive mm)
327 351
   #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
328
-  #define RETRACT_FEEDRATE 80*60            //default feedrate for retracting (mm/s)
352
+  #define RETRACT_FEEDRATE 80*60         //default feedrate for retracting (mm/s)
329 353
   #define RETRACT_ZLIFT 0                //default retract Z-lift
330 354
   #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
331 355
   //#define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
332
-  #define RETRACT_RECOVER_FEEDRATE 8*60     //default feedrate for recovering from retraction (mm/s)
356
+  #define RETRACT_RECOVER_FEEDRATE 8*60  //default feedrate for recovering from retraction (mm/s)
333 357
 #endif
334 358
 
335 359
 // Add support for experimental filament exchange support M600; requires display
@@ -344,6 +368,139 @@ const unsigned int dropsegments=5; //everything with less than this number of st
344 368
   #endif
345 369
 #endif
346 370
 
371
+/******************************************************************************\
372
+ * enable this section if you have TMC26X motor drivers. 
373
+ * you need to import the TMC26XStepper library into the arduino IDE for this
374
+ ******************************************************************************/
375
+
376
+//#define HAVE_TMCDRIVER
377
+#ifdef HAVE_TMCDRIVER
378
+
379
+//	#define X_IS_TMC
380
+	#define X_MAX_CURRENT 1000  //in mA
381
+	#define X_SENSE_RESISTOR 91 //in mOhms
382
+	#define X_MICROSTEPS 16     //number of microsteps
383
+	
384
+//	#define X2_IS_TMC
385
+	#define X2_MAX_CURRENT 1000  //in mA
386
+	#define X2_SENSE_RESISTOR 91 //in mOhms
387
+	#define X2_MICROSTEPS 16     //number of microsteps
388
+	
389
+//	#define Y_IS_TMC
390
+	#define Y_MAX_CURRENT 1000  //in mA
391
+	#define Y_SENSE_RESISTOR 91 //in mOhms
392
+	#define Y_MICROSTEPS 16     //number of microsteps
393
+	
394
+//	#define Y2_IS_TMC
395
+	#define Y2_MAX_CURRENT 1000  //in mA
396
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
397
+	#define Y2_MICROSTEPS 16     //number of microsteps	
398
+	
399
+//	#define Z_IS_TMC
400
+	#define Z_MAX_CURRENT 1000  //in mA
401
+	#define Z_SENSE_RESISTOR 91 //in mOhms
402
+	#define Z_MICROSTEPS 16     //number of microsteps
403
+	
404
+//	#define Z2_IS_TMC
405
+	#define Z2_MAX_CURRENT 1000  //in mA
406
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
407
+	#define Z2_MICROSTEPS 16     //number of microsteps
408
+	
409
+//	#define E0_IS_TMC
410
+	#define E0_MAX_CURRENT 1000  //in mA
411
+	#define E0_SENSE_RESISTOR 91 //in mOhms
412
+	#define E0_MICROSTEPS 16     //number of microsteps
413
+	
414
+//	#define E1_IS_TMC
415
+	#define E1_MAX_CURRENT 1000  //in mA
416
+	#define E1_SENSE_RESISTOR 91 //in mOhms
417
+	#define E1_MICROSTEPS 16     //number of microsteps	
418
+	
419
+//	#define E2_IS_TMC
420
+	#define E2_MAX_CURRENT 1000  //in mA
421
+	#define E2_SENSE_RESISTOR 91 //in mOhms
422
+	#define E2_MICROSTEPS 16     //number of microsteps	
423
+	
424
+//	#define E3_IS_TMC
425
+	#define E3_MAX_CURRENT 1000  //in mA
426
+	#define E3_SENSE_RESISTOR 91 //in mOhms
427
+	#define E3_MICROSTEPS 16     //number of microsteps		
428
+
429
+#endif
430
+
431
+/******************************************************************************\
432
+ * enable this section if you have L6470  motor drivers. 
433
+ * you need to import the L6470 library into the arduino IDE for this
434
+ ******************************************************************************/
435
+
436
+//#define HAVE_L6470DRIVER
437
+#ifdef HAVE_L6470DRIVER
438
+
439
+//	#define X_IS_L6470
440
+	#define X_MICROSTEPS 16     //number of microsteps
441
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
442
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
443
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
444
+	
445
+//	#define X2_IS_L6470
446
+	#define X2_MICROSTEPS 16     //number of microsteps
447
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
448
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
449
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
450
+	
451
+//	#define Y_IS_L6470
452
+	#define Y_MICROSTEPS 16     //number of microsteps
453
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
454
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
455
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
456
+	
457
+//	#define Y2_IS_L6470
458
+	#define Y2_MICROSTEPS 16     //number of microsteps	
459
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
460
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
461
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
462
+	
463
+//	#define Z_IS_L6470
464
+	#define Z_MICROSTEPS 16     //number of microsteps
465
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
466
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
467
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
468
+	
469
+//	#define Z2_IS_L6470
470
+	#define Z2_MICROSTEPS 16     //number of microsteps
471
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
472
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
473
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
474
+	
475
+//	#define E0_IS_L6470
476
+	#define E0_MICROSTEPS 16     //number of microsteps
477
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
478
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
479
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
480
+	
481
+//	#define E1_IS_L6470
482
+	#define E1_MICROSTEPS 16     //number of microsteps	
483
+	#define E1_MICROSTEPS 16     //number of microsteps
484
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
485
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
486
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
487
+	
488
+//	#define E2_IS_L6470
489
+	#define E2_MICROSTEPS 16     //number of microsteps	
490
+	#define E2_MICROSTEPS 16     //number of microsteps
491
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
492
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
493
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
494
+	
495
+//	#define E3_IS_L6470
496
+	#define E3_MICROSTEPS 16     //number of microsteps		
497
+	#define E3_MICROSTEPS 16     //number of microsteps
498
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
499
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
500
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
501
+	
502
+#endif
503
+
347 504
 #include "Conditionals.h"
348 505
 #include "SanityCheck.h"
349 506
 

+ 46
- 38
Marlin/example_configurations/K8200/Configuration.h View File

@@ -104,7 +104,7 @@ Here are some standard links for getting your machine calibrated:
104 104
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
105 105
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
106 106
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
107
-// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
107
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
108 108
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
109 109
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
110 110
 //
@@ -118,7 +118,7 @@ Here are some standard links for getting your machine calibrated:
118 118
 // 1010 is Pt1000 with 1k pullup (non standard)
119 119
 // 147 is Pt100 with 4k7 pullup
120 120
 // 110 is Pt100 with 1k pullup (non standard)
121
-// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
122 122
 //     Use it for Testing or Development purposes. NEVER for production machine.
123 123
 //     #define DUMMY_THERMISTOR_998_VALUE 25
124 124
 //     #define DUMMY_THERMISTOR_999_VALUE 100
@@ -275,15 +275,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
275 275
 The system will turn the heater on forever, burning up the filament and anything
276 276
 else around.
277 277
 
278
-After the temperature reaches the target for the first time, this feature will 
279
-start measuring for how long the current temperature stays below the target 
278
+After the temperature reaches the target for the first time, this feature will
279
+start measuring for how long the current temperature stays below the target
280 280
 minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
281 281
 
282 282
 If it stays longer than _PERIOD, it means the thermistor temperature
283 283
 cannot catch up with the target, so something *may be* wrong. Then, to be on the
284 284
 safe side, the system will he halt.
285 285
 
286
-Bear in mind the count down will just start AFTER the first time the 
286
+Bear in mind the count down will just start AFTER the first time the
287 287
 thermistor temperature is over the target, so you will have no problem if
288 288
 your extruder heater takes 2 minutes to hit the target on heating.
289 289
 
@@ -326,7 +326,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
326 326
   #define ENDSTOPPULLUP_ZMIN
327 327
 #endif
328 328
 
329
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
329
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
330 330
 const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
331 331
 const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
332 332
 const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@@ -349,13 +349,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
349 349
 #define DISABLE_E false // For all extruders
350 350
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
351 351
 
352
-#define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
353
-#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
354
-#define INVERT_Z_DIR false    // for Mendel set to false, for Orca set to true
355
-#define INVERT_E0_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
356
-#define INVERT_E1_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
357
-#define INVERT_E2_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
358
-#define INVERT_E3_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
352
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
353
+#define INVERT_X_DIR false
354
+#define INVERT_Y_DIR false
355
+#define INVERT_Z_DIR false
356
+#define INVERT_E0_DIR true
357
+#define INVERT_E1_DIR true
358
+#define INVERT_E2_DIR true
359
+#define INVERT_E3_DIR true
359 360
 
360 361
 // ENDSTOP SETTINGS:
361 362
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -367,12 +368,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
367 368
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
368 369
 
369 370
 // Travel limits after homing (units are in mm)
370
-#define X_MAX_POS 200
371 371
 #define X_MIN_POS 0
372
-#define Y_MAX_POS 200
373 372
 #define Y_MIN_POS 0
374
-#define Z_MAX_POS 200
375 373
 #define Z_MIN_POS 0
374
+#define X_MAX_POS 200
375
+#define Y_MAX_POS 200
376
+#define Z_MAX_POS 200
376 377
 
377 378
 //===========================================================================
378 379
 //============================= Filament Runout Sensor ======================
@@ -432,13 +433,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
432 433
     #define FRONT_PROBE_BED_POSITION 20
433 434
     #define BACK_PROBE_BED_POSITION 170
434 435
 
435
-    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this    
436
-    
436
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
437
+
437 438
     // Set the number of grid points per dimension
438 439
     // You probably don't need more than 3 (squared=9)
439 440
     #define AUTO_BED_LEVELING_GRID_POINTS 2
440 441
 
441
-
442 442
   #else  // !AUTO_BED_LEVELING_GRID
443 443
 
444 444
       // Arbitrary points to probe. A simple cross-product
@@ -452,11 +452,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
452 452
 
453 453
   #endif // AUTO_BED_LEVELING_GRID
454 454
 
455
-
456 455
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
457 456
   // X and Y offsets must be integers
458
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
459
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
457
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
458
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Probe on: -front +behind
460 459
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
461 460
 
462 461
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
@@ -464,10 +463,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
464 463
 
465 464
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
466 465
 
467
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
466
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
468 467
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
469 468
   #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
470 469
 
470
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
471
+                                                                            //Useful to retract a deployable probe.
472
+                                                                           
471 473
   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
472 474
   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
473 475
 
@@ -502,12 +504,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
502 504
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
503 505
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
504 506
 
505
-//Manual homing switch locations:
507
+// Manual homing switch locations:
506 508
 // For deltabots this means top and center of the Cartesian print volume.
507
-#define MANUAL_X_HOME_POS 0
508
-#define MANUAL_Y_HOME_POS 0
509
-#define MANUAL_Z_HOME_POS 0
510
-//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
509
+#ifdef MANUAL_HOME_POSITIONS
510
+  #define MANUAL_X_HOME_POS 0
511
+  #define MANUAL_Y_HOME_POS 0
512
+  #define MANUAL_Z_HOME_POS 0
513
+  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
514
+#endif
511 515
 
512 516
 //// MOVEMENT SETTINGS
513 517
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -545,8 +549,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
545 549
 #ifdef CUSTOM_M_CODES
546 550
   #ifdef ENABLE_AUTO_BED_LEVELING
547 551
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
548
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
549
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
552
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
553
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
550 554
   #endif
551 555
 #endif
552 556
 
@@ -574,13 +578,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
574 578
 //==============================LCD and SD support=============================
575 579
 
576 580
 // Define your display language below. Replace (en) with your language code and uncomment.
577
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
581
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
578 582
 // See also language.h
579 583
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
580 584
 
581
-// Character based displays can have different extended charsets.
582
-#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
583
-//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
585
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
586
+// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
587
+// See also documentation/LCDLanguageFont.md
588
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
589
+  //#define DISPLAY_CHARSET_HD44780_WESTERN
590
+  //#define DISPLAY_CHARSET_HD44780_CYRILLIC
584 591
 
585 592
 //#define ULTRA_LCD  //general LCD support, also 16x2
586 593
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@@ -593,6 +600,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
593 600
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
594 601
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
595 602
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
603
+                                               // 0 to disable buzzer feedback  
596 604
 
597 605
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
598 606
 // http://reprap.org/wiki/PanelOne
@@ -647,7 +655,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
647 655
 // Shift register panels
648 656
 // ---------------------
649 657
 // 2 wire Non-latching LCD SR from:
650
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
658
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
651 659
 
652 660
 //#define SAV_3DLCD
653 661
 
@@ -655,7 +663,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
655 663
 //#define FAST_PWM_FAN
656 664
 
657 665
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
658
-// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
666
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
659 667
 // is too low, you should also increment SOFT_PWM_SCALE.
660 668
 //#define FAN_SOFT_PWM
661 669
 
@@ -709,9 +717,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
709 717
  * Support for a filament diameter sensor
710 718
  * Also allows adjustment of diameter at print time (vs  at slicing)
711 719
  * Single extruder only at this point (extruder 0)
712
- * 
720
+ *
713 721
  * Motherboards
714
- * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
722
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
715 723
  * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
716 724
  * 301 - Rambo  - uses Analog input 3
717 725
  * Note may require analog pins to be defined for different motherboards

+ 227
- 66
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -100,6 +100,30 @@
100 100
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
101 101
 //#define Z_DUAL_STEPPER_DRIVERS
102 102
 
103
+#ifdef Z_DUAL_STEPPER_DRIVERS
104
+
105
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
108
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
+
114
+  #define Z_DUAL_ENDSTOPS
115
+
116
+  #ifdef Z_DUAL_ENDSTOPS
117
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
+    #define Z2_DIR_PIN E2_DIR_PIN
119
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
+  #endif
124
+
125
+#endif // Z_DUAL_STEPPER_DRIVERS
126
+
103 127
 // Same again but for Y Axis.
104 128
 //#define Y_DUAL_STEPPER_DRIVERS
105 129
 
@@ -112,41 +136,41 @@
112 136
 // allowing faster printing speeds.
113 137
 //#define DUAL_X_CARRIAGE
114 138
 #ifdef DUAL_X_CARRIAGE
115
-// Configuration for second X-carriage
116
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
117
-// the second x-carriage always homes to the maximum endstop.
118
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
119
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
120
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
121
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
122
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
123
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
124
-    // without modifying the firmware (through the "M218 T1 X???" command).
125
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
126
-
127
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
128
-#define X2_ENABLE_PIN 29
129
-#define X2_STEP_PIN 25
130
-#define X2_DIR_PIN 23
131
-
132
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
133
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
134
-//                           as long as it supports dual x-carriages. (M605 S0)
135
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
136
-//                           that additional slicer support is not required. (M605 S1)
137
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
138
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
139
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
140
-
141
-// This is the default power-up mode which can be later using M605.
142
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
143
-
144
-// Default settings in "Auto-park Mode"
145
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
146
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
147
-
148
-// Default x offset in duplication mode (typically set to half print bed width)
149
-#define DEFAULT_DUPLICATION_X_OFFSET 100
139
+  // Configuration for second X-carriage
140
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
141
+  // the second x-carriage always homes to the maximum endstop.
142
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
143
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
144
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
145
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
146
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
147
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
148
+      // without modifying the firmware (through the "M218 T1 X???" command).
149
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
150
+
151
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
152
+  #define X2_ENABLE_PIN 29
153
+  #define X2_STEP_PIN 25
154
+  #define X2_DIR_PIN 23
155
+
156
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
157
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
158
+  //                           as long as it supports dual x-carriages. (M605 S0)
159
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
160
+  //                           that additional slicer support is not required. (M605 S1)
161
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
162
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
163
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
164
+
165
+  // This is the default power-up mode which can be later using M605.
166
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
167
+
168
+  // Default settings in "Auto-park Mode"
169
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
170
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
171
+
172
+  // Default x offset in duplication mode (typically set to half print bed width)
173
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
150 174
 
151 175
 #endif //DUAL_X_CARRIAGE
152 176
 
@@ -210,34 +234,44 @@
210 234
 //===========================================================================
211 235
 
212 236
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
213
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
214
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
237
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
238
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
215 239
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
216 240
 
217 241
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
218 242
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
219 243
 
220
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
221
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
222
-
223
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
224
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
225
-// using:
226
-//#define MENU_ADDAUTOSTART
227
-
228
-// Show a progress bar on HD44780 LCDs for SD printing
229
-//#define LCD_PROGRESS_BAR
230
-
231
-#ifdef LCD_PROGRESS_BAR
232
-  // Amount of time (ms) to show the bar
233
-  #define PROGRESS_BAR_BAR_TIME 2000
234
-  // Amount of time (ms) to show the status message
235
-  #define PROGRESS_BAR_MSG_TIME 3000
236
-  // Amount of time (ms) to retain the status message (0=forever)
237
-  #define PROGRESS_MSG_EXPIRE   0
238
-  // Enable this to show messages for MSG_TIME then hide them
239
-  //#define PROGRESS_MSG_ONCE
240
-#endif
244
+#ifdef SDSUPPORT
245
+
246
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
247
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
248
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
249
+  // be commented out otherwise
250
+  #define SDCARDDETECTINVERTED
251
+
252
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
253
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
254
+
255
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
256
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
257
+  // using:
258
+  //#define MENU_ADDAUTOSTART
259
+
260
+  // Show a progress bar on HD44780 LCDs for SD printing
261
+  //#define LCD_PROGRESS_BAR
262
+
263
+  #ifdef LCD_PROGRESS_BAR
264
+    // Amount of time (ms) to show the bar
265
+    #define PROGRESS_BAR_BAR_TIME 2000
266
+    // Amount of time (ms) to show the status message
267
+    #define PROGRESS_BAR_MSG_TIME 3000
268
+    // Amount of time (ms) to retain the status message (0=forever)
269
+    #define PROGRESS_MSG_EXPIRE   0
270
+    // Enable this to show messages for MSG_TIME then hide them
271
+    //#define PROGRESS_MSG_ONCE
272
+  #endif
273
+
274
+#endif // SDSUPPORT
241 275
 
242 276
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
243 277
 //#define USE_WATCHDOG
@@ -275,7 +309,7 @@
275 309
   #define EXTRUDER_ADVANCE_K .0
276 310
   #define D_FILAMENT 2.85
277 311
   #define STEPS_MM_E 836
278
-#endif // ADVANCE
312
+#endif
279 313
 
280 314
 // Arc interpretation settings:
281 315
 #define MM_PER_ARC_SEGMENT 1
@@ -283,12 +317,6 @@
283 317
 
284 318
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
285 319
 
286
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
287
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
288
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
289
-// be commented out otherwise
290
-#define SDCARDDETECTINVERTED
291
-
292 320
 // Control heater 0 and heater 1 in parallel.
293 321
 //#define HEATERS_PARALLEL
294 322
 
@@ -298,7 +326,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
298 326
 
299 327
 // The number of linear motions that can be in the plan at any give time.
300 328
 // 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 ring-buffering.
301
-#if defined SDSUPPORT
329
+#ifdef SDSUPPORT
302 330
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
303 331
 #else
304 332
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
@@ -340,6 +368,139 @@ const unsigned int dropsegments=5; //everything with less than this number of st
340 368
   #endif
341 369
 #endif
342 370
 
371
+/******************************************************************************\
372
+ * enable this section if you have TMC26X motor drivers. 
373
+ * you need to import the TMC26XStepper library into the arduino IDE for this
374
+ ******************************************************************************/
375
+
376
+//#define HAVE_TMCDRIVER
377
+#ifdef HAVE_TMCDRIVER
378
+
379
+//	#define X_IS_TMC
380
+	#define X_MAX_CURRENT 1000  //in mA
381
+	#define X_SENSE_RESISTOR 91 //in mOhms
382
+	#define X_MICROSTEPS 16     //number of microsteps
383
+	
384
+//	#define X2_IS_TMC
385
+	#define X2_MAX_CURRENT 1000  //in mA
386
+	#define X2_SENSE_RESISTOR 91 //in mOhms
387
+	#define X2_MICROSTEPS 16     //number of microsteps
388
+	
389
+//	#define Y_IS_TMC
390
+	#define Y_MAX_CURRENT 1000  //in mA
391
+	#define Y_SENSE_RESISTOR 91 //in mOhms
392
+	#define Y_MICROSTEPS 16     //number of microsteps
393
+	
394
+//	#define Y2_IS_TMC
395
+	#define Y2_MAX_CURRENT 1000  //in mA
396
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
397
+	#define Y2_MICROSTEPS 16     //number of microsteps	
398
+	
399
+//	#define Z_IS_TMC
400
+	#define Z_MAX_CURRENT 1000  //in mA
401
+	#define Z_SENSE_RESISTOR 91 //in mOhms
402
+	#define Z_MICROSTEPS 16     //number of microsteps
403
+	
404
+//	#define Z2_IS_TMC
405
+	#define Z2_MAX_CURRENT 1000  //in mA
406
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
407
+	#define Z2_MICROSTEPS 16     //number of microsteps
408
+	
409
+//	#define E0_IS_TMC
410
+	#define E0_MAX_CURRENT 1000  //in mA
411
+	#define E0_SENSE_RESISTOR 91 //in mOhms
412
+	#define E0_MICROSTEPS 16     //number of microsteps
413
+	
414
+//	#define E1_IS_TMC
415
+	#define E1_MAX_CURRENT 1000  //in mA
416
+	#define E1_SENSE_RESISTOR 91 //in mOhms
417
+	#define E1_MICROSTEPS 16     //number of microsteps	
418
+	
419
+//	#define E2_IS_TMC
420
+	#define E2_MAX_CURRENT 1000  //in mA
421
+	#define E2_SENSE_RESISTOR 91 //in mOhms
422
+	#define E2_MICROSTEPS 16     //number of microsteps	
423
+	
424
+//	#define E3_IS_TMC
425
+	#define E3_MAX_CURRENT 1000  //in mA
426
+	#define E3_SENSE_RESISTOR 91 //in mOhms
427
+	#define E3_MICROSTEPS 16     //number of microsteps		
428
+
429
+#endif
430
+
431
+/******************************************************************************\
432
+ * enable this section if you have L6470  motor drivers. 
433
+ * you need to import the L6470 library into the arduino IDE for this
434
+ ******************************************************************************/
435
+
436
+//#define HAVE_L6470DRIVER
437
+#ifdef HAVE_L6470DRIVER
438
+
439
+//	#define X_IS_L6470
440
+	#define X_MICROSTEPS 16     //number of microsteps
441
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
442
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
443
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
444
+	
445
+//	#define X2_IS_L6470
446
+	#define X2_MICROSTEPS 16     //number of microsteps
447
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
448
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
449
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
450
+	
451
+//	#define Y_IS_L6470
452
+	#define Y_MICROSTEPS 16     //number of microsteps
453
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
454
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
455
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
456
+	
457
+//	#define Y2_IS_L6470
458
+	#define Y2_MICROSTEPS 16     //number of microsteps	
459
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
460
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
461
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
462
+	
463
+//	#define Z_IS_L6470
464
+	#define Z_MICROSTEPS 16     //number of microsteps
465
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
466
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
467
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
468
+	
469
+//	#define Z2_IS_L6470
470
+	#define Z2_MICROSTEPS 16     //number of microsteps
471
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
472
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
473
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
474
+	
475
+//	#define E0_IS_L6470
476
+	#define E0_MICROSTEPS 16     //number of microsteps
477
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
478
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
479
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
480
+	
481
+//	#define E1_IS_L6470
482
+	#define E1_MICROSTEPS 16     //number of microsteps	
483
+	#define E1_MICROSTEPS 16     //number of microsteps
484
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
485
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
486
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
487
+	
488
+//	#define E2_IS_L6470
489
+	#define E2_MICROSTEPS 16     //number of microsteps	
490
+	#define E2_MICROSTEPS 16     //number of microsteps
491
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
492
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
493
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
494
+	
495
+//	#define E3_IS_L6470
496
+	#define E3_MICROSTEPS 16     //number of microsteps		
497
+	#define E3_MICROSTEPS 16     //number of microsteps
498
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
499
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
500
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
501
+	
502
+#endif
503
+
343 504
 #include "Conditionals.h"
344 505
 #include "SanityCheck.h"
345 506
 

+ 47
- 42
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -122,7 +122,7 @@ Here are some standard links for getting your machine calibrated:
122 122
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
123 123
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
124 124
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
125
-// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
125
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
126 126
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
127 127
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
128 128
 //
@@ -136,7 +136,7 @@ Here are some standard links for getting your machine calibrated:
136 136
 // 1010 is Pt1000 with 1k pullup (non standard)
137 137
 // 147 is Pt100 with 4k7 pullup
138 138
 // 110 is Pt100 with 1k pullup (non standard)
139
-// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
139
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
140 140
 //     Use it for Testing or Development purposes. NEVER for production machine.
141 141
 //     #define DUMMY_THERMISTOR_998_VALUE 25
142 142
 //     #define DUMMY_THERMISTOR_999_VALUE 100
@@ -299,15 +299,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
299 299
 The system will turn the heater on forever, burning up the filament and anything
300 300
 else around.
301 301
 
302
-After the temperature reaches the target for the first time, this feature will 
303
-start measuring for how long the current temperature stays below the target 
302
+After the temperature reaches the target for the first time, this feature will
303
+start measuring for how long the current temperature stays below the target
304 304
 minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
305 305
 
306 306
 If it stays longer than _PERIOD, it means the thermistor temperature
307 307
 cannot catch up with the target, so something *may be* wrong. Then, to be on the
308 308
 safe side, the system will he halt.
309 309
 
310
-Bear in mind the count down will just start AFTER the first time the 
310
+Bear in mind the count down will just start AFTER the first time the
311 311
 thermistor temperature is over the target, so you will have no problem if
312 312
 your extruder heater takes 2 minutes to hit the target on heating.
313 313
 
@@ -350,7 +350,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
350 350
   // #define ENDSTOPPULLUP_ZMIN
351 351
 #endif
352 352
 
353
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
353
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
354 354
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
355 355
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
356 356
 const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -373,13 +373,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
373 373
 #define DISABLE_E false // For all extruders
374 374
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
375 375
 
376
-#define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
377
-#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
378
-#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
379
-#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
380
-#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
381
-#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
382
-#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
376
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
377
+#define INVERT_X_DIR false
378
+#define INVERT_Y_DIR false
379
+#define INVERT_Z_DIR true
380
+#define INVERT_E0_DIR false
381
+#define INVERT_E1_DIR false
382
+#define INVERT_E2_DIR false
383
+#define INVERT_E3_DIR false
383 384
 
384 385
 // ENDSTOP SETTINGS:
385 386
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -391,12 +392,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
391 392
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
392 393
 
393 394
 // Travel limits after homing (units are in mm)
394
-#define X_MAX_POS 200
395 395
 #define X_MIN_POS 0
396
-#define Y_MAX_POS 200
397 396
 #define Y_MIN_POS 0
398
-#define Z_MAX_POS 225
399 397
 #define Z_MIN_POS MANUAL_Z_HOME_POS
398
+#define X_MAX_POS 200
399
+#define Y_MAX_POS 200
400
+#define Z_MAX_POS 225
400 401
 
401 402
 //===========================================================================
402 403
 //============================= Filament Runout Sensor ======================
@@ -456,13 +457,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
456 457
     #define FRONT_PROBE_BED_POSITION 20
457 458
     #define BACK_PROBE_BED_POSITION 170
458 459
 
459
-    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this    
460
-    
460
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
461
+
461 462
     // Set the number of grid points per dimension
462 463
     // You probably don't need more than 3 (squared=9)
463 464
     #define AUTO_BED_LEVELING_GRID_POINTS 2
464 465
 
465
-
466 466
   #else  // !AUTO_BED_LEVELING_GRID
467 467
 
468 468
       // Arbitrary points to probe. A simple cross-product
@@ -476,11 +476,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
476 476
 
477 477
   #endif // AUTO_BED_LEVELING_GRID
478 478
 
479
-
480 479
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
481 480
   // X and Y offsets must be integers
482
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
483
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
481
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
482
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Probe on: -front +behind
484 483
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
485 484
 
486 485
   //#define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
@@ -488,10 +487,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
488 487
 
489 488
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
490 489
 
491
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
490
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
492 491
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
493 492
   #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
494 493
 
494
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
495
+                                                                            //Useful to retract a deployable probe.
496
+                                                                           
495 497
   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
496 498
   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
497 499
 
@@ -526,13 +528,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
526 528
 #define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
527 529
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
528 530
 
529
-//Manual homing switch locations:
531
+// Manual homing switch locations:
530 532
 // For deltabots this means top and center of the Cartesian print volume.
531
-// For SCARA: Offset between HomingPosition and Bed X=0 / Y=0
532
-#define MANUAL_X_HOME_POS -22.
533
-#define MANUAL_Y_HOME_POS -52.
534
-#define MANUAL_Z_HOME_POS 0.1  // Distance between nozzle and print surface after homing.
535
-
533
+#ifdef MANUAL_HOME_POSITIONS
534
+  // For SCARA: Offset between HomingPosition and Bed X=0 / Y=0
535
+  #define MANUAL_X_HOME_POS -22.
536
+  #define MANUAL_Y_HOME_POS -52.
537
+  #define MANUAL_Z_HOME_POS 0.1  // Distance between nozzle and print surface after homing.
538
+#endif
536 539
 
537 540
 //// MOVEMENT SETTINGS
538 541
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -548,8 +551,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
548 551
 #define DEFAULT_RETRACT_ACCELERATION  2000   // E acceleration in mm/s^2 for retracts
549 552
 #define DEFAULT_TRAVEL_ACCELERATION   400    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
550 553
 
551
-
552
-
553 554
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
554 555
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
555 556
 // For the other hotends it is their distance from the extruder 0 hotend.
@@ -571,8 +572,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
571 572
 #ifdef CUSTOM_M_CODES
572 573
   #ifdef ENABLE_AUTO_BED_LEVELING
573 574
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
574
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
575
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
575
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
576
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
576 577
   #endif
577 578
 #endif
578 579
 
@@ -600,13 +601,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
600 601
 //==============================LCD and SD support=============================
601 602
 
602 603
 // Define your display language below. Replace (en) with your language code and uncomment.
603
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
604
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
604 605
 // See also language.h
605 606
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
606 607
 
607
-// Character based displays can have different extended charsets.
608
-#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
609
-//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
608
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
609
+// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
610
+// See also documentation/LCDLanguageFont.md
611
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
612
+  //#define DISPLAY_CHARSET_HD44780_WESTERN
613
+  //#define DISPLAY_CHARSET_HD44780_CYRILLIC
610 614
 
611 615
 //#define ULTRA_LCD  //general LCD support, also 16x2
612 616
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@@ -619,6 +623,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
619 623
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
620 624
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
621 625
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
626
+                                               // 0 to disable buzzer feedback  
622 627
 
623 628
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
624 629
 // http://reprap.org/wiki/PanelOne
@@ -673,7 +678,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
673 678
 // Shift register panels
674 679
 // ---------------------
675 680
 // 2 wire Non-latching LCD SR from:
676
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
681
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
677 682
 
678 683
 //#define SAV_3DLCD
679 684
 
@@ -681,7 +686,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
681 686
 //#define FAST_PWM_FAN
682 687
 
683 688
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
684
-// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
689
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
685 690
 // is too low, you should also increment SOFT_PWM_SCALE.
686 691
 //#define FAN_SOFT_PWM
687 692
 
@@ -735,9 +740,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
735 740
  * Support for a filament diameter sensor
736 741
  * Also allows adjustment of diameter at print time (vs  at slicing)
737 742
  * Single extruder only at this point (extruder 0)
738
- * 
743
+ *
739 744
  * Motherboards
740
- * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
745
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
741 746
  * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
742 747
  * 301 - Rambo  - uses Analog input 3
743 748
  * Note may require analog pins to be defined for different motherboards
@@ -754,7 +759,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
754 759
 #define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
755 760
 
756 761
 //defines used in the code
757
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
762
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
758 763
 
759 764
 //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
760 765
 //#define FILAMENT_LCD_DISPLAY

+ 232
- 71
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -77,10 +77,10 @@
77 77
 // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
78 78
 // Multiple extruders can be assigned to the same pin in which case
79 79
 // the fan will turn on when any selected extruder is above the threshold.
80
-#define EXTRUDER_0_AUTO_FAN_PIN   -1
81
-#define EXTRUDER_1_AUTO_FAN_PIN   -1
82
-#define EXTRUDER_2_AUTO_FAN_PIN   -1
83
-#define EXTRUDER_3_AUTO_FAN_PIN   -1
80
+#define EXTRUDER_0_AUTO_FAN_PIN -1
81
+#define EXTRUDER_1_AUTO_FAN_PIN -1
82
+#define EXTRUDER_2_AUTO_FAN_PIN -1
83
+#define EXTRUDER_3_AUTO_FAN_PIN -1
84 84
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
85 85
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
86 86
 
@@ -100,6 +100,30 @@
100 100
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
101 101
 //#define Z_DUAL_STEPPER_DRIVERS
102 102
 
103
+#ifdef Z_DUAL_STEPPER_DRIVERS
104
+
105
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
108
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
+
114
+  #define Z_DUAL_ENDSTOPS
115
+
116
+  #ifdef Z_DUAL_ENDSTOPS
117
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
+    #define Z2_DIR_PIN E2_DIR_PIN
119
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
+  #endif
124
+
125
+#endif // Z_DUAL_STEPPER_DRIVERS
126
+
103 127
 // Same again but for Y Axis.
104 128
 //#define Y_DUAL_STEPPER_DRIVERS
105 129
 
@@ -112,41 +136,41 @@
112 136
 // allowing faster printing speeds.
113 137
 //#define DUAL_X_CARRIAGE
114 138
 #ifdef DUAL_X_CARRIAGE
115
-// Configuration for second X-carriage
116
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
117
-// the second x-carriage always homes to the maximum endstop.
118
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
119
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
120
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
121
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
122
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
123
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
124
-    // without modifying the firmware (through the "M218 T1 X???" command).
125
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
126
-
127
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
128
-#define X2_ENABLE_PIN 29
129
-#define X2_STEP_PIN 25
130
-#define X2_DIR_PIN 23
131
-
132
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
133
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
134
-//                           as long as it supports dual x-carriages. (M605 S0)
135
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
136
-//                           that additional slicer support is not required. (M605 S1)
137
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
138
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
139
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
140
-
141
-// This is the default power-up mode which can be later using M605.
142
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
143
-
144
-// Default settings in "Auto-park Mode"
145
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
146
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
147
-
148
-// Default x offset in duplication mode (typically set to half print bed width)
149
-#define DEFAULT_DUPLICATION_X_OFFSET 100
139
+  // Configuration for second X-carriage
140
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
141
+  // the second x-carriage always homes to the maximum endstop.
142
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
143
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
144
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
145
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
146
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
147
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
148
+      // without modifying the firmware (through the "M218 T1 X???" command).
149
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
150
+
151
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
152
+  #define X2_ENABLE_PIN 29
153
+  #define X2_STEP_PIN 25
154
+  #define X2_DIR_PIN 23
155
+
156
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
157
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
158
+  //                           as long as it supports dual x-carriages. (M605 S0)
159
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
160
+  //                           that additional slicer support is not required. (M605 S1)
161
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
162
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
163
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
164
+
165
+  // This is the default power-up mode which can be later using M605.
166
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
167
+
168
+  // Default settings in "Auto-park Mode"
169
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
170
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
171
+
172
+  // Default x offset in duplication mode (typically set to half print bed width)
173
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
150 174
 
151 175
 #endif //DUAL_X_CARRIAGE
152 176
 
@@ -159,8 +183,6 @@
159 183
 
160 184
 #define AXIS_RELATIVE_MODES {false, false, false, false}
161 185
 
162
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
163
-
164 186
 //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
165 187
 #define INVERT_X_STEP_PIN false
166 188
 #define INVERT_Y_STEP_PIN false
@@ -212,34 +234,44 @@
212 234
 //===========================================================================
213 235
 
214 236
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
215
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
216
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
237
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
238
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
217 239
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
218 240
 
219 241
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
220 242
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
221 243
 
222
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
223
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
224
-
225
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
226
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
227
-// using:
228
-//#define MENU_ADDAUTOSTART
229
-
230
-// Show a progress bar on the LCD when printing from SD?
231
-//#define LCD_PROGRESS_BAR
232
-
233
-#ifdef LCD_PROGRESS_BAR
234
-  // Amount of time (ms) to show the bar
235
-  #define PROGRESS_BAR_BAR_TIME 2000
236
-  // Amount of time (ms) to show the status message
237
-  #define PROGRESS_BAR_MSG_TIME 3000
238
-  // Amount of time (ms) to retain the status message (0=forever)
239
-  #define PROGRESS_MSG_EXPIRE   0
240
-  // Enable this to show messages for MSG_TIME then hide them
241
-  //#define PROGRESS_MSG_ONCE
242
-#endif
244
+#ifdef SDSUPPORT
245
+
246
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
247
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
248
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
249
+  // be commented out otherwise
250
+  #define SDCARDDETECTINVERTED
251
+
252
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
253
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
254
+
255
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
256
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
257
+  // using:
258
+  //#define MENU_ADDAUTOSTART
259
+
260
+  // Show a progress bar on HD44780 LCDs for SD printing
261
+  //#define LCD_PROGRESS_BAR
262
+
263
+  #ifdef LCD_PROGRESS_BAR
264
+    // Amount of time (ms) to show the bar
265
+    #define PROGRESS_BAR_BAR_TIME 2000
266
+    // Amount of time (ms) to show the status message
267
+    #define PROGRESS_BAR_MSG_TIME 3000
268
+    // Amount of time (ms) to retain the status message (0=forever)
269
+    #define PROGRESS_MSG_EXPIRE   0
270
+    // Enable this to show messages for MSG_TIME then hide them
271
+    //#define PROGRESS_MSG_ONCE
272
+  #endif
273
+
274
+#endif // SDSUPPORT
243 275
 
244 276
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
245 277
 //#define USE_WATCHDOG
@@ -285,12 +317,6 @@
285 317
 
286 318
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
287 319
 
288
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
289
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
290
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
291
-// be commented out otherwise
292
-#define SDCARDDETECTINVERTED
293
-
294 320
 // Control heater 0 and heater 1 in parallel.
295 321
 //#define HEATERS_PARALLEL
296 322
 
@@ -300,7 +326,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
300 326
 
301 327
 // The number of linear motions that can be in the plan at any give time.
302 328
 // 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 ring-buffering.
303
-#if defined SDSUPPORT
329
+#ifdef SDSUPPORT
304 330
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
305 331
 #else
306 332
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
@@ -322,9 +348,11 @@ const unsigned int dropsegments=5; //everything with less than this number of st
322 348
 #ifdef FWRETRACT
323 349
   #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
324 350
   #define RETRACT_LENGTH 3               //default retract length (positive mm)
351
+  #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
325 352
   #define RETRACT_FEEDRATE 35            //default feedrate for retracting (mm/s)
326 353
   #define RETRACT_ZLIFT 0                //default retract Z-lift
327 354
   #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
355
+  #define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
328 356
   #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
329 357
 #endif
330 358
 
@@ -340,6 +368,139 @@ const unsigned int dropsegments=5; //everything with less than this number of st
340 368
   #endif
341 369
 #endif
342 370
 
371
+/******************************************************************************\
372
+ * enable this section if you have TMC26X motor drivers. 
373
+ * you need to import the TMC26XStepper library into the arduino IDE for this
374
+ ******************************************************************************/
375
+
376
+//#define HAVE_TMCDRIVER
377
+#ifdef HAVE_TMCDRIVER
378
+
379
+//	#define X_IS_TMC
380
+	#define X_MAX_CURRENT 1000  //in mA
381
+	#define X_SENSE_RESISTOR 91 //in mOhms
382
+	#define X_MICROSTEPS 16     //number of microsteps
383
+	
384
+//	#define X2_IS_TMC
385
+	#define X2_MAX_CURRENT 1000  //in mA
386
+	#define X2_SENSE_RESISTOR 91 //in mOhms
387
+	#define X2_MICROSTEPS 16     //number of microsteps
388
+	
389
+//	#define Y_IS_TMC
390
+	#define Y_MAX_CURRENT 1000  //in mA
391
+	#define Y_SENSE_RESISTOR 91 //in mOhms
392
+	#define Y_MICROSTEPS 16     //number of microsteps
393
+	
394
+//	#define Y2_IS_TMC
395
+	#define Y2_MAX_CURRENT 1000  //in mA
396
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
397
+	#define Y2_MICROSTEPS 16     //number of microsteps	
398
+	
399
+//	#define Z_IS_TMC
400
+	#define Z_MAX_CURRENT 1000  //in mA
401
+	#define Z_SENSE_RESISTOR 91 //in mOhms
402
+	#define Z_MICROSTEPS 16     //number of microsteps
403
+	
404
+//	#define Z2_IS_TMC
405
+	#define Z2_MAX_CURRENT 1000  //in mA
406
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
407
+	#define Z2_MICROSTEPS 16     //number of microsteps
408
+	
409
+//	#define E0_IS_TMC
410
+	#define E0_MAX_CURRENT 1000  //in mA
411
+	#define E0_SENSE_RESISTOR 91 //in mOhms
412
+	#define E0_MICROSTEPS 16     //number of microsteps
413
+	
414
+//	#define E1_IS_TMC
415
+	#define E1_MAX_CURRENT 1000  //in mA
416
+	#define E1_SENSE_RESISTOR 91 //in mOhms
417
+	#define E1_MICROSTEPS 16     //number of microsteps	
418
+	
419
+//	#define E2_IS_TMC
420
+	#define E2_MAX_CURRENT 1000  //in mA
421
+	#define E2_SENSE_RESISTOR 91 //in mOhms
422
+	#define E2_MICROSTEPS 16     //number of microsteps	
423
+	
424
+//	#define E3_IS_TMC
425
+	#define E3_MAX_CURRENT 1000  //in mA
426
+	#define E3_SENSE_RESISTOR 91 //in mOhms
427
+	#define E3_MICROSTEPS 16     //number of microsteps		
428
+
429
+#endif
430
+
431
+/******************************************************************************\
432
+ * enable this section if you have L6470  motor drivers. 
433
+ * you need to import the L6470 library into the arduino IDE for this
434
+ ******************************************************************************/
435
+
436
+//#define HAVE_L6470DRIVER
437
+#ifdef HAVE_L6470DRIVER
438
+
439
+//	#define X_IS_L6470
440
+	#define X_MICROSTEPS 16     //number of microsteps
441
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
442
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
443
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
444
+	
445
+//	#define X2_IS_L6470
446
+	#define X2_MICROSTEPS 16     //number of microsteps
447
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
448
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
449
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
450
+	
451
+//	#define Y_IS_L6470
452
+	#define Y_MICROSTEPS 16     //number of microsteps
453
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
454
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
455
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
456
+	
457
+//	#define Y2_IS_L6470
458
+	#define Y2_MICROSTEPS 16     //number of microsteps	
459
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
460
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
461
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
462
+	
463
+//	#define Z_IS_L6470
464
+	#define Z_MICROSTEPS 16     //number of microsteps
465
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
466
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
467
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
468
+	
469
+//	#define Z2_IS_L6470
470
+	#define Z2_MICROSTEPS 16     //number of microsteps
471
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
472
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
473
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
474
+	
475
+//	#define E0_IS_L6470
476
+	#define E0_MICROSTEPS 16     //number of microsteps
477
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
478
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
479
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
480
+	
481
+//	#define E1_IS_L6470
482
+	#define E1_MICROSTEPS 16     //number of microsteps	
483
+	#define E1_MICROSTEPS 16     //number of microsteps
484
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
485
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
486
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
487
+	
488
+//	#define E2_IS_L6470
489
+	#define E2_MICROSTEPS 16     //number of microsteps	
490
+	#define E2_MICROSTEPS 16     //number of microsteps
491
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
492
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
493
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
494
+	
495
+//	#define E3_IS_L6470
496
+	#define E3_MICROSTEPS 16     //number of microsteps		
497
+	#define E3_MICROSTEPS 16     //number of microsteps
498
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
499
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
500
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
501
+	
502
+#endif
503
+
343 504
 #include "Conditionals.h"
344 505
 #include "SanityCheck.h"
345 506
 

+ 45
- 37
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -104,7 +104,7 @@ Here are some standard links for getting your machine calibrated:
104 104
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
105 105
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
106 106
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
107
-// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
107
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
108 108
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
109 109
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
110 110
 //
@@ -118,7 +118,7 @@ Here are some standard links for getting your machine calibrated:
118 118
 // 1010 is Pt1000 with 1k pullup (non standard)
119 119
 // 147 is Pt100 with 4k7 pullup
120 120
 // 110 is Pt100 with 1k pullup (non standard)
121
-// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
122 122
 //     Use it for Testing or Development purposes. NEVER for production machine.
123 123
 //     #define DUMMY_THERMISTOR_998_VALUE 25
124 124
 //     #define DUMMY_THERMISTOR_999_VALUE 100
@@ -269,15 +269,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
269 269
 The system will turn the heater on forever, burning up the filament and anything
270 270
 else around.
271 271
 
272
-After the temperature reaches the target for the first time, this feature will 
273
-start measuring for how long the current temperature stays below the target 
272
+After the temperature reaches the target for the first time, this feature will
273
+start measuring for how long the current temperature stays below the target
274 274
 minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
275 275
 
276 276
 If it stays longer than _PERIOD, it means the thermistor temperature
277 277
 cannot catch up with the target, so something *may be* wrong. Then, to be on the
278 278
 safe side, the system will he halt.
279 279
 
280
-Bear in mind the count down will just start AFTER the first time the 
280
+Bear in mind the count down will just start AFTER the first time the
281 281
 thermistor temperature is over the target, so you will have no problem if
282 282
 your extruder heater takes 2 minutes to hit the target on heating.
283 283
 
@@ -320,7 +320,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
320 320
   // #define ENDSTOPPULLUP_ZMIN
321 321
 #endif
322 322
 
323
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
323
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
324 324
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
325 325
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
326 326
 const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -343,13 +343,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
343 343
 #define DISABLE_E false // For all extruders
344 344
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
345 345
 
346
-#define INVERT_X_DIR true     // for Mendel set to false, for Orca set to true
347
-#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
348
-#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
349
-#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
350
-#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
351
-#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
352
-#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
346
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
347
+#define INVERT_X_DIR true
348
+#define INVERT_Y_DIR false
349
+#define INVERT_Z_DIR true
350
+#define INVERT_E0_DIR false
351
+#define INVERT_E1_DIR false
352
+#define INVERT_E2_DIR false
353
+#define INVERT_E3_DIR false
353 354
 
354 355
 // ENDSTOP SETTINGS:
355 356
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -361,12 +362,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
361 362
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
362 363
 
363 364
 // Travel limits after homing (units are in mm)
364
-#define X_MAX_POS 297
365 365
 #define X_MIN_POS 0
366
-#define Y_MAX_POS 210
367 366
 #define Y_MIN_POS 0
368
-#define Z_MAX_POS 200
369 367
 #define Z_MIN_POS 0
368
+#define X_MAX_POS 297
369
+#define Y_MAX_POS 210
370
+#define Z_MAX_POS 200
370 371
 
371 372
 //===========================================================================
372 373
 //============================= Filament Runout Sensor ======================
@@ -427,12 +428,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
427 428
     #define BACK_PROBE_BED_POSITION 170
428 429
 
429 430
     #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
430
-    
431
+
431 432
     // Set the number of grid points per dimension
432 433
     // You probably don't need more than 3 (squared=9)
433 434
     #define AUTO_BED_LEVELING_GRID_POINTS 2
434 435
 
435
-
436 436
   #else  // !AUTO_BED_LEVELING_GRID
437 437
 
438 438
       // Arbitrary points to probe. A simple cross-product
@@ -446,11 +446,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
446 446
 
447 447
   #endif // AUTO_BED_LEVELING_GRID
448 448
 
449
-
450 449
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
451 450
   // X and Y offsets must be integers
452
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
453
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
451
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
452
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Probe on: -front +behind
454 453
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
455 454
 
456 455
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
@@ -458,10 +457,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
458 457
 
459 458
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
460 459
 
461
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
460
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
462 461
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
463 462
   #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
464 463
 
464
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
465
+                                                                            //Useful to retract a deployable probe.
466
+                                                                           
465 467
   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
466 468
   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
467 469
 
@@ -496,12 +498,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
496 498
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
497 499
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
498 500
 
499
-//Manual homing switch locations:
501
+// Manual homing switch locations:
500 502
 // For deltabots this means top and center of the Cartesian print volume.
501
-#define MANUAL_X_HOME_POS 0
502
-#define MANUAL_Y_HOME_POS 0
503
-#define MANUAL_Z_HOME_POS 0
504
-//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
503
+#ifdef MANUAL_HOME_POSITIONS
504
+  #define MANUAL_X_HOME_POS 0
505
+  #define MANUAL_Y_HOME_POS 0
506
+  #define MANUAL_Z_HOME_POS 0
507
+  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
508
+#endif
505 509
 
506 510
 //// MOVEMENT SETTINGS
507 511
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -538,8 +542,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
538 542
 #ifdef CUSTOM_M_CODES
539 543
   #ifdef ENABLE_AUTO_BED_LEVELING
540 544
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
541
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
542
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
545
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
546
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
543 547
   #endif
544 548
 #endif
545 549
 
@@ -567,13 +571,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
567 571
 //==============================LCD and SD support=============================
568 572
 
569 573
 // Define your display language below. Replace (en) with your language code and uncomment.
570
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
574
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
571 575
 // See also language.h
572 576
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
573 577
 
574
-// Character based displays can have different extended charsets.
575
-#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
576
-//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
578
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
579
+// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
580
+// See also documentation/LCDLanguageFont.md
581
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
582
+  //#define DISPLAY_CHARSET_HD44780_WESTERN
583
+  //#define DISPLAY_CHARSET_HD44780_CYRILLIC
577 584
 
578 585
 #define ULTRA_LCD  //general LCD support, also 16x2
579 586
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@@ -586,6 +593,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
586 593
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
587 594
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
588 595
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
596
+                                               // 0 to disable buzzer feedback  
589 597
 
590 598
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
591 599
 // http://reprap.org/wiki/PanelOne
@@ -640,7 +648,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
640 648
 // Shift register panels
641 649
 // ---------------------
642 650
 // 2 wire Non-latching LCD SR from:
643
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
651
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
644 652
 
645 653
 //#define SAV_3DLCD
646 654
 
@@ -648,7 +656,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
648 656
 //#define FAST_PWM_FAN
649 657
 
650 658
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
651
-// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
659
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
652 660
 // is too low, you should also increment SOFT_PWM_SCALE.
653 661
 //#define FAN_SOFT_PWM
654 662
 
@@ -702,9 +710,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
702 710
  * Support for a filament diameter sensor
703 711
  * Also allows adjustment of diameter at print time (vs  at slicing)
704 712
  * Single extruder only at this point (extruder 0)
705
- * 
713
+ *
706 714
  * Motherboards
707
- * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
715
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
708 716
  * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
709 717
  * 301 - Rambo  - uses Analog input 3
710 718
  * Note may require analog pins to be defined for different motherboards

+ 228
- 71
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -100,6 +100,30 @@
100 100
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
101 101
 //#define Z_DUAL_STEPPER_DRIVERS
102 102
 
103
+#ifdef Z_DUAL_STEPPER_DRIVERS
104
+
105
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
108
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
+
114
+  #define Z_DUAL_ENDSTOPS
115
+
116
+  #ifdef Z_DUAL_ENDSTOPS
117
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
+    #define Z2_DIR_PIN E2_DIR_PIN
119
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
+  #endif
124
+
125
+#endif // Z_DUAL_STEPPER_DRIVERS
126
+
103 127
 // Same again but for Y Axis.
104 128
 //#define Y_DUAL_STEPPER_DRIVERS
105 129
 
@@ -112,41 +136,41 @@
112 136
 // allowing faster printing speeds.
113 137
 //#define DUAL_X_CARRIAGE
114 138
 #ifdef DUAL_X_CARRIAGE
115
-// Configuration for second X-carriage
116
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
117
-// the second x-carriage always homes to the maximum endstop.
118
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
119
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
120
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
121
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
122
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
123
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
124
-    // without modifying the firmware (through the "M218 T1 X???" command).
125
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
126
-
127
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
128
-#define X2_ENABLE_PIN 29
129
-#define X2_STEP_PIN 25
130
-#define X2_DIR_PIN 23
131
-
132
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
133
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
134
-//                           as long as it supports dual x-carriages. (M605 S0)
135
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
136
-//                           that additional slicer support is not required. (M605 S1)
137
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
138
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
139
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
140
-
141
-// This is the default power-up mode which can be later using M605.
142
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
143
-
144
-// Default settings in "Auto-park Mode"
145
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
146
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
147
-
148
-// Default x offset in duplication mode (typically set to half print bed width)
149
-#define DEFAULT_DUPLICATION_X_OFFSET 100
139
+  // Configuration for second X-carriage
140
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
141
+  // the second x-carriage always homes to the maximum endstop.
142
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
143
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
144
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
145
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
146
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
147
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
148
+      // without modifying the firmware (through the "M218 T1 X???" command).
149
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
150
+
151
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
152
+  #define X2_ENABLE_PIN 29
153
+  #define X2_STEP_PIN 25
154
+  #define X2_DIR_PIN 23
155
+
156
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
157
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
158
+  //                           as long as it supports dual x-carriages. (M605 S0)
159
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
160
+  //                           that additional slicer support is not required. (M605 S1)
161
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
162
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
163
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
164
+
165
+  // This is the default power-up mode which can be later using M605.
166
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
167
+
168
+  // Default settings in "Auto-park Mode"
169
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
170
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
171
+
172
+  // Default x offset in duplication mode (typically set to half print bed width)
173
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
150 174
 
151 175
 #endif //DUAL_X_CARRIAGE
152 176
 
@@ -158,11 +182,7 @@
158 182
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
159 183
 
160 184
 #define AXIS_RELATIVE_MODES {false, false, false, false}
161
-#ifdef CONFIG_STEPPERS_TOSHIBA
162
-#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
163
-#else
164
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
165
-#endif
185
+
166 186
 //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
167 187
 #define INVERT_X_STEP_PIN false
168 188
 #define INVERT_Y_STEP_PIN false
@@ -214,34 +234,44 @@
214 234
 //===========================================================================
215 235
 
216 236
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
217
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
218
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
237
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
238
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
219 239
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
220 240
 
221 241
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
222 242
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
223 243
 
224
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
225
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
226
-
227
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
228
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
229
-// using:
230
-#define MENU_ADDAUTOSTART
231
-
232
-// Show a progress bar on HD44780 LCDs for SD printing
233
-//#define LCD_PROGRESS_BAR
234
-
235
-#ifdef LCD_PROGRESS_BAR
236
-  // Amount of time (ms) to show the bar
237
-  #define PROGRESS_BAR_BAR_TIME 2000
238
-  // Amount of time (ms) to show the status message
239
-  #define PROGRESS_BAR_MSG_TIME 3000
240
-  // Amount of time (ms) to retain the status message (0=forever)
241
-  #define PROGRESS_MSG_EXPIRE   0
242
-  // Enable this to show messages for MSG_TIME then hide them
243
-  //#define PROGRESS_MSG_ONCE
244
-#endif
244
+#ifdef SDSUPPORT
245
+
246
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
247
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
248
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
249
+  // be commented out otherwise
250
+  #define SDCARDDETECTINVERTED
251
+
252
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
253
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
254
+
255
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
256
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
257
+  // using:
258
+  //#define MENU_ADDAUTOSTART
259
+
260
+  // Show a progress bar on HD44780 LCDs for SD printing
261
+  //#define LCD_PROGRESS_BAR
262
+
263
+  #ifdef LCD_PROGRESS_BAR
264
+    // Amount of time (ms) to show the bar
265
+    #define PROGRESS_BAR_BAR_TIME 2000
266
+    // Amount of time (ms) to show the status message
267
+    #define PROGRESS_BAR_MSG_TIME 3000
268
+    // Amount of time (ms) to retain the status message (0=forever)
269
+    #define PROGRESS_MSG_EXPIRE   0
270
+    // Enable this to show messages for MSG_TIME then hide them
271
+    //#define PROGRESS_MSG_ONCE
272
+  #endif
273
+
274
+#endif // SDSUPPORT
245 275
 
246 276
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
247 277
 //#define USE_WATCHDOG
@@ -279,7 +309,7 @@
279 309
   #define EXTRUDER_ADVANCE_K .0
280 310
   #define D_FILAMENT 1.75
281 311
   #define STEPS_MM_E 100.47095761381482
282
-#endif // ADVANCE
312
+#endif
283 313
 
284 314
 // Arc interpretation settings:
285 315
 #define MM_PER_ARC_SEGMENT 1
@@ -287,12 +317,6 @@
287 317
 
288 318
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
289 319
 
290
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
291
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
292
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
293
-// be commented out otherwise
294
-#define SDCARDDETECTINVERTED
295
-
296 320
 // Control heater 0 and heater 1 in parallel.
297 321
 //#define HEATERS_PARALLEL
298 322
 
@@ -302,7 +326,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
302 326
 
303 327
 // The number of linear motions that can be in the plan at any give time.
304 328
 // 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 ring-buffering.
305
-#if defined SDSUPPORT
329
+#ifdef SDSUPPORT
306 330
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
307 331
 #else
308 332
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
@@ -344,6 +368,139 @@ const unsigned int dropsegments=5; //everything with less than this number of st
344 368
   #endif
345 369
 #endif
346 370
 
371
+/******************************************************************************\
372
+ * enable this section if you have TMC26X motor drivers. 
373
+ * you need to import the TMC26XStepper library into the arduino IDE for this
374
+ ******************************************************************************/
375
+
376
+//#define HAVE_TMCDRIVER
377
+#ifdef HAVE_TMCDRIVER
378
+
379
+//	#define X_IS_TMC
380
+	#define X_MAX_CURRENT 1000  //in mA
381
+	#define X_SENSE_RESISTOR 91 //in mOhms
382
+	#define X_MICROSTEPS 16     //number of microsteps
383
+	
384
+//	#define X2_IS_TMC
385
+	#define X2_MAX_CURRENT 1000  //in mA
386
+	#define X2_SENSE_RESISTOR 91 //in mOhms
387
+	#define X2_MICROSTEPS 16     //number of microsteps
388
+	
389
+//	#define Y_IS_TMC
390
+	#define Y_MAX_CURRENT 1000  //in mA
391
+	#define Y_SENSE_RESISTOR 91 //in mOhms
392
+	#define Y_MICROSTEPS 16     //number of microsteps
393
+	
394
+//	#define Y2_IS_TMC
395
+	#define Y2_MAX_CURRENT 1000  //in mA
396
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
397
+	#define Y2_MICROSTEPS 16     //number of microsteps	
398
+	
399
+//	#define Z_IS_TMC
400
+	#define Z_MAX_CURRENT 1000  //in mA
401
+	#define Z_SENSE_RESISTOR 91 //in mOhms
402
+	#define Z_MICROSTEPS 16     //number of microsteps
403
+	
404
+//	#define Z2_IS_TMC
405
+	#define Z2_MAX_CURRENT 1000  //in mA
406
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
407
+	#define Z2_MICROSTEPS 16     //number of microsteps
408
+	
409
+//	#define E0_IS_TMC
410
+	#define E0_MAX_CURRENT 1000  //in mA
411
+	#define E0_SENSE_RESISTOR 91 //in mOhms
412
+	#define E0_MICROSTEPS 16     //number of microsteps
413
+	
414
+//	#define E1_IS_TMC
415
+	#define E1_MAX_CURRENT 1000  //in mA
416
+	#define E1_SENSE_RESISTOR 91 //in mOhms
417
+	#define E1_MICROSTEPS 16     //number of microsteps	
418
+	
419
+//	#define E2_IS_TMC
420
+	#define E2_MAX_CURRENT 1000  //in mA
421
+	#define E2_SENSE_RESISTOR 91 //in mOhms
422
+	#define E2_MICROSTEPS 16     //number of microsteps	
423
+	
424
+//	#define E3_IS_TMC
425
+	#define E3_MAX_CURRENT 1000  //in mA
426
+	#define E3_SENSE_RESISTOR 91 //in mOhms
427
+	#define E3_MICROSTEPS 16     //number of microsteps		
428
+
429
+#endif
430
+
431
+/******************************************************************************\
432
+ * enable this section if you have L6470  motor drivers. 
433
+ * you need to import the L6470 library into the arduino IDE for this
434
+ ******************************************************************************/
435
+
436
+//#define HAVE_L6470DRIVER
437
+#ifdef HAVE_L6470DRIVER
438
+
439
+//	#define X_IS_L6470
440
+	#define X_MICROSTEPS 16     //number of microsteps
441
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
442
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
443
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
444
+	
445
+//	#define X2_IS_L6470
446
+	#define X2_MICROSTEPS 16     //number of microsteps
447
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
448
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
449
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
450
+	
451
+//	#define Y_IS_L6470
452
+	#define Y_MICROSTEPS 16     //number of microsteps
453
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
454
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
455
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
456
+	
457
+//	#define Y2_IS_L6470
458
+	#define Y2_MICROSTEPS 16     //number of microsteps	
459
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
460
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
461
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
462
+	
463
+//	#define Z_IS_L6470
464
+	#define Z_MICROSTEPS 16     //number of microsteps
465
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
466
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
467
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
468
+	
469
+//	#define Z2_IS_L6470
470
+	#define Z2_MICROSTEPS 16     //number of microsteps
471
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
472
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
473
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
474
+	
475
+//	#define E0_IS_L6470
476
+	#define E0_MICROSTEPS 16     //number of microsteps
477
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
478
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
479
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
480
+	
481
+//	#define E1_IS_L6470
482
+	#define E1_MICROSTEPS 16     //number of microsteps	
483
+	#define E1_MICROSTEPS 16     //number of microsteps
484
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
485
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
486
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
487
+	
488
+//	#define E2_IS_L6470
489
+	#define E2_MICROSTEPS 16     //number of microsteps	
490
+	#define E2_MICROSTEPS 16     //number of microsteps
491
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
492
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
493
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
494
+	
495
+//	#define E3_IS_L6470
496
+	#define E3_MICROSTEPS 16     //number of microsteps		
497
+	#define E3_MICROSTEPS 16     //number of microsteps
498
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
499
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
500
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
501
+	
502
+#endif
503
+
347 504
 #include "Conditionals.h"
348 505
 #include "SanityCheck.h"
349 506
 

+ 81
- 46
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -137,7 +137,7 @@ Here are some standard links for getting your machine calibrated:
137 137
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
138 138
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
139 139
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
140
-// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
140
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
141 141
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
142 142
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
143 143
 //
@@ -151,7 +151,7 @@ Here are some standard links for getting your machine calibrated:
151 151
 // 1010 is Pt1000 with 1k pullup (non standard)
152 152
 // 147 is Pt100 with 4k7 pullup
153 153
 // 110 is Pt100 with 1k pullup (non standard)
154
-// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
154
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
155 155
 //     Use it for Testing or Development purposes. NEVER for production machine.
156 156
 //     #define DUMMY_THERMISTOR_998_VALUE 25
157 157
 //     #define DUMMY_THERMISTOR_999_VALUE 100
@@ -297,15 +297,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
297 297
 The system will turn the heater on forever, burning up the filament and anything
298 298
 else around.
299 299
 
300
-After the temperature reaches the target for the first time, this feature will 
301
-start measuring for how long the current temperature stays below the target 
300
+After the temperature reaches the target for the first time, this feature will
301
+start measuring for how long the current temperature stays below the target
302 302
 minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
303 303
 
304 304
 If it stays longer than _PERIOD, it means the thermistor temperature
305 305
 cannot catch up with the target, so something *may be* wrong. Then, to be on the
306 306
 safe side, the system will he halt.
307 307
 
308
-Bear in mind the count down will just start AFTER the first time the 
308
+Bear in mind the count down will just start AFTER the first time the
309 309
 thermistor temperature is over the target, so you will have no problem if
310 310
 your extruder heater takes 2 minutes to hit the target on heating.
311 311
 
@@ -348,7 +348,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
348 348
   // #define ENDSTOPPULLUP_ZMIN
349 349
 #endif
350 350
 
351
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
351
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
352 352
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
353 353
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
354 354
 const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -371,19 +371,18 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
371 371
 #define DISABLE_E false // For all extruders
372 372
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
373 373
 
374
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
374 375
 #define INVERT_X_DIR false // DELTA does not invert
375 376
 #define INVERT_Y_DIR false
376 377
 #define INVERT_Z_DIR false
377
-
378
-#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
379
-#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
380
-#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
381
-#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
378
+#define INVERT_E0_DIR false
379
+#define INVERT_E1_DIR false
380
+#define INVERT_E2_DIR false
381
+#define INVERT_E3_DIR false
382 382
 
383 383
 // ENDSTOP SETTINGS:
384 384
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
385
-// deltas always home to max
386
-#define X_HOME_DIR 1
385
+#define X_HOME_DIR 1 // deltas always home to max
387 386
 #define Y_HOME_DIR 1
388 387
 #define Z_HOME_DIR 1
389 388
 
@@ -391,12 +390,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
391 390
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
392 391
 
393 392
 // Travel limits after homing (units are in mm)
394
-#define X_MAX_POS DELTA_PRINTABLE_RADIUS
395 393
 #define X_MIN_POS -DELTA_PRINTABLE_RADIUS
396
-#define Y_MAX_POS DELTA_PRINTABLE_RADIUS
397 394
 #define Y_MIN_POS -DELTA_PRINTABLE_RADIUS
398
-#define Z_MAX_POS MANUAL_Z_HOME_POS
399 395
 #define Z_MIN_POS 0
396
+#define X_MAX_POS DELTA_PRINTABLE_RADIUS
397
+#define Y_MAX_POS DELTA_PRINTABLE_RADIUS
398
+#define Z_MAX_POS MANUAL_Z_HOME_POS
400 399
 
401 400
 //===========================================================================
402 401
 //============================= Filament Runout Sensor ======================
@@ -430,31 +429,59 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
430 429
 //===========================================================================
431 430
 
432 431
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
433
-// Z-Probe Repeatability test is not supported in Deltas yet.
432
+//#define Z_PROBE_REPEATABILITY_TEST // Z-Probe Repeatability test is not supported in Deltas yet.
434 433
 
435 434
 #ifdef ENABLE_AUTO_BED_LEVELING
436 435
 
437
-  // Deltas only support grid mode
438
-  #define AUTO_BED_LEVELING_GRID
436
+  // There are 2 different ways to specify probing locations
437
+  //
438
+  // - "grid" mode
439
+  //   Probe several points in a rectangular grid.
440
+  //   You specify the rectangle and the density of sample points.
441
+  //   This mode is preferred because there are more measurements.
442
+  //
443
+  // - "3-point" mode
444
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
445
+  //   You specify the XY coordinates of all 3 points.
446
+
447
+  // Enable this to sample the bed in a grid (least squares solution)
448
+  // Note: this feature generates 10KB extra code size
449
+  #define AUTO_BED_LEVELING_GRID  // Deltas only support grid mode
450
+
451
+  #ifdef AUTO_BED_LEVELING_GRID
452
+
453
+    #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
454
+
455
+    #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
456
+    #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
457
+    #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
458
+    #define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
459
+    
460
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
461
+
462
+    // Non-linear bed leveling will be used.
463
+    // Compensate by interpolating between the nearest four Z probe values for each point.
464
+    // Useful for deltas where the print surface may appear like a bowl or dome shape.
465
+    // Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher.
466
+    #define AUTO_BED_LEVELING_GRID_POINTS 9
439 467
 
440
-  #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
441
-  #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
442
-  #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
443
-  #define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
444
-  #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS  
468
+  #else  // !AUTO_BED_LEVELING_GRID
445 469
 
446
-  #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this      
470
+      // Arbitrary points to probe. A simple cross-product
471
+      // is used to estimate the plane of the bed.
472
+      #define ABL_PROBE_PT_1_X 15
473
+      #define ABL_PROBE_PT_1_Y 180
474
+      #define ABL_PROBE_PT_2_X 15
475
+      #define ABL_PROBE_PT_2_Y 20
476
+      #define ABL_PROBE_PT_3_X 170
477
+      #define ABL_PROBE_PT_3_Y 20
447 478
 
448
-  // Non-linear bed leveling will be used.
449
-  // Compensate by interpolating between the nearest four Z probe values for each point.
450
-  // Useful for deltas where the print surface may appear like a bowl or dome shape.
451
-  // Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher.
452
-  #define AUTO_BED_LEVELING_GRID_POINTS 9
479
+  #endif // AUTO_BED_LEVELING_GRID
453 480
 
454 481
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
455 482
   // X and Y offsets must be integers
456
-  #define X_PROBE_OFFSET_FROM_EXTRUDER 0     // -left  +right
457
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -10   // -front +behind
483
+  #define X_PROBE_OFFSET_FROM_EXTRUDER 0     // Probe on: -left  +right
484
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -10   // Probe on: -front +behind
458 485
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5  // -below (always!)
459 486
 
460 487
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
@@ -465,7 +492,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
465 492
   #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
466 493
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
467 494
   #define Z_RAISE_AFTER_PROBING 50    //How much the extruder will be raised after the last probing point.
468
-  
495
+
496
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
497
+                                                                            //Useful to retract a deployable probe.
498
+                                                                           
499
+  //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
500
+  //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
501
+
469 502
   // Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
470 503
   // Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN.
471 504
   //#define Z_PROBE_ALLEN_KEY
@@ -507,16 +540,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
507 540
 #endif // ENABLE_AUTO_BED_LEVELING
508 541
 
509 542
 
510
-
511 543
 // The position of the homing switches
512 544
 #define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
513 545
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
514 546
 
515
-//Manual homing switch locations:
547
+// Manual homing switch locations:
516 548
 // For deltabots this means top and center of the Cartesian print volume.
517
-#define MANUAL_X_HOME_POS 0
518
-#define MANUAL_Y_HOME_POS 0
519
-#define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
549
+#ifdef MANUAL_HOME_POSITIONS
550
+  #define MANUAL_X_HOME_POS 0
551
+  #define MANUAL_Y_HOME_POS 0
552
+  #define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
553
+#endif
520 554
 
521 555
 //// MOVEMENT SETTINGS
522 556
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -555,8 +589,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
555 589
 #ifdef CUSTOM_M_CODES
556 590
   #ifdef ENABLE_AUTO_BED_LEVELING
557 591
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
558
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
559
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
592
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
593
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
560 594
   #endif
561 595
 #endif
562 596
 
@@ -588,7 +622,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
588 622
 // See also language.h
589 623
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
590 624
 
591
-// Chose ONE of the next three charsets. This has to match your hardware. In case of a full graphic display this information is not important.
625
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
592 626
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
593 627
 // See also documentation/LCDLanguageFont.md
594 628
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
@@ -606,6 +640,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
606 640
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
607 641
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
608 642
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
643
+                                               // 0 to disable buzzer feedback  
609 644
 
610 645
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
611 646
 // http://reprap.org/wiki/PanelOne
@@ -667,7 +702,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
667 702
 // Shift register panels
668 703
 // ---------------------
669 704
 // 2 wire Non-latching LCD SR from:
670
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
705
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
671 706
 
672 707
 //#define SAV_3DLCD
673 708
 
@@ -675,7 +710,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
675 710
 //#define FAST_PWM_FAN
676 711
 
677 712
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
678
-// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
713
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
679 714
 // is too low, you should also increment SOFT_PWM_SCALE.
680 715
 //#define FAN_SOFT_PWM
681 716
 
@@ -729,9 +764,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
729 764
  * Support for a filament diameter sensor
730 765
  * Also allows adjustment of diameter at print time (vs  at slicing)
731 766
  * Single extruder only at this point (extruder 0)
732
- * 
767
+ *
733 768
  * Motherboards
734
- * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
769
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
735 770
  * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
736 771
  * 301 - Rambo  - uses Analog input 3
737 772
  * Note may require analog pins to be defined for different motherboards
@@ -748,7 +783,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
748 783
 #define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
749 784
 
750 785
 //defines used in the code
751
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
786
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
752 787
 
753 788
 //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
754 789
 //#define FILAMENT_LCD_DISPLAY

+ 257
- 99
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -13,30 +13,30 @@
13 13
 #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
14 14
 
15 15
 //// Heating sanity check:
16
-// This waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
17
-// If the temperature has not increased at the end of that period, the target temperature is set to zero. 
16
+// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature
17
+// If the temperature has not increased at the end of that period, the target temperature is set to zero.
18 18
 // It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
19 19
 //  differ by at least 2x WATCH_TEMP_INCREASE
20 20
 //#define WATCH_TEMP_PERIOD 40000 //40 seconds
21 21
 //#define WATCH_TEMP_INCREASE 10  //Heat up at least 10 degree in 20 seconds
22 22
 
23 23
 #ifdef PIDTEMP
24
-  // this adds an experimental additional term to the heatingpower, proportional to the extrusion speed.
25
-  // if Kc is choosen well, the additional required power due to increased melting should be compensated.
26
-  #define PID_ADD_EXTRUSION_RATE  
24
+  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
25
+  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
26
+  #define PID_ADD_EXTRUSION_RATE
27 27
   #ifdef PID_ADD_EXTRUSION_RATE
28
-    #define  DEFAULT_Kc (1) //heatingpower=Kc*(e_speed)
28
+    #define  DEFAULT_Kc (1) //heating power=Kc*(e_speed)
29 29
   #endif
30 30
 #endif
31 31
 
32 32
 
33 33
 //automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
34 34
 //The maximum buffered steps/sec of the extruder motor are called "se".
35
-//You enter the autotemp mode by a M109 S<mintemp> T<maxtemp> F<factor>
35
+//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
36 36
 // the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
37 37
 // you exit the value by any M109 without F*
38 38
 // Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
39
-// on an ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
39
+// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
40 40
 #define AUTOTEMP
41 41
 #ifdef AUTOTEMP
42 42
   #define AUTOTEMP_OLDWEIGHT 0.98
@@ -46,10 +46,10 @@
46 46
 //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
47 47
 //#define SHOW_TEMP_ADC_VALUES
48 48
 
49
-//  extruder run-out prevention. 
49
+//  extruder run-out prevention.
50 50
 //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
51
-//#define EXTRUDER_RUNOUT_PREVENT  
52
-#define EXTRUDER_RUNOUT_MINTEMP 190  
51
+//#define EXTRUDER_RUNOUT_PREVENT
52
+#define EXTRUDER_RUNOUT_MINTEMP 190
53 53
 #define EXTRUDER_RUNOUT_SECONDS 30.
54 54
 #define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
55 55
 #define EXTRUDER_RUNOUT_SPEED 1500.  //extrusion speed
@@ -75,12 +75,12 @@
75 75
 // Extruder cooling fans
76 76
 // Configure fan pin outputs to automatically turn on/off when the associated
77 77
 // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
78
-// Multiple extruders can be assigned to the same pin in which case 
78
+// Multiple extruders can be assigned to the same pin in which case
79 79
 // the fan will turn on when any selected extruder is above the threshold.
80
-#define EXTRUDER_0_AUTO_FAN_PIN   -1
81
-#define EXTRUDER_1_AUTO_FAN_PIN   -1
82
-#define EXTRUDER_2_AUTO_FAN_PIN   -1
83
-#define EXTRUDER_3_AUTO_FAN_PIN   -1
80
+#define EXTRUDER_0_AUTO_FAN_PIN -1
81
+#define EXTRUDER_1_AUTO_FAN_PIN -1
82
+#define EXTRUDER_2_AUTO_FAN_PIN -1
83
+#define EXTRUDER_3_AUTO_FAN_PIN -1
84 84
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
85 85
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
86 86
 
@@ -100,68 +100,89 @@
100 100
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
101 101
 //#define Z_DUAL_STEPPER_DRIVERS
102 102
 
103
+#ifdef Z_DUAL_STEPPER_DRIVERS
104
+
105
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
108
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
+
114
+  #define Z_DUAL_ENDSTOPS
115
+
116
+  #ifdef Z_DUAL_ENDSTOPS
117
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
+    #define Z2_DIR_PIN E2_DIR_PIN
119
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
+  #endif
124
+
125
+#endif // Z_DUAL_STEPPER_DRIVERS
126
+
103 127
 // Same again but for Y Axis.
104 128
 //#define Y_DUAL_STEPPER_DRIVERS
105 129
 
106 130
 // Define if the two Y drives need to rotate in opposite directions
107 131
 #define INVERT_Y2_VS_Y_DIR true
108 132
 
109
-// Enable this for dual x-carriage printers. 
133
+// Enable this for dual x-carriage printers.
110 134
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
111 135
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
112 136
 // allowing faster printing speeds.
113 137
 //#define DUAL_X_CARRIAGE
114 138
 #ifdef DUAL_X_CARRIAGE
115
-// Configuration for second X-carriage
116
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
117
-// the second x-carriage always homes to the maximum endstop.
118
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
119
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed 
120
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
121
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position 
122
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software 
123
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
124
-    // without modifying the firmware (through the "M218 T1 X???" command).
125
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
126
-
127
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
128
-#define X2_ENABLE_PIN 29
129
-#define X2_STEP_PIN 25
130
-#define X2_DIR_PIN 23
131
-
132
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
133
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
134
-//                           as long as it supports dual x-carriages. (M605 S0)
135
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
136
-//                           that additional slicer support is not required. (M605 S1)
137
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all  
138
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
139
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
140
-
141
-// This is the default power-up mode which can be later using M605. 
142
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 
143
-
144
-// Default settings in "Auto-park Mode" 
145
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
146
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
147
-
148
-// Default x offset in duplication mode (typically set to half print bed width)
149
-#define DEFAULT_DUPLICATION_X_OFFSET 100
139
+  // Configuration for second X-carriage
140
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
141
+  // the second x-carriage always homes to the maximum endstop.
142
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
143
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
144
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
145
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
146
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
147
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
148
+      // without modifying the firmware (through the "M218 T1 X???" command).
149
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
150
+
151
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
152
+  #define X2_ENABLE_PIN 29
153
+  #define X2_STEP_PIN 25
154
+  #define X2_DIR_PIN 23
155
+
156
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
157
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
158
+  //                           as long as it supports dual x-carriages. (M605 S0)
159
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
160
+  //                           that additional slicer support is not required. (M605 S1)
161
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
162
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
163
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
164
+
165
+  // This is the default power-up mode which can be later using M605.
166
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
167
+
168
+  // Default settings in "Auto-park Mode"
169
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
170
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
171
+
172
+  // Default x offset in duplication mode (typically set to half print bed width)
173
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
150 174
 
151 175
 #endif //DUAL_X_CARRIAGE
152
-    
176
+
153 177
 //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
154
-#define X_HOME_RETRACT_MM 5 
155
-#define Y_HOME_RETRACT_MM 5 
178
+#define X_HOME_RETRACT_MM 5
179
+#define Y_HOME_RETRACT_MM 5
156 180
 #define Z_HOME_RETRACT_MM 5 // deltas need the same for all three axis
157 181
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
158
-
159 182
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
160 183
 
161 184
 #define AXIS_RELATIVE_MODES {false, false, false, false}
162 185
 
163
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
164
-
165 186
 //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
166 187
 #define INVERT_X_STEP_PIN false
167 188
 #define INVERT_Y_STEP_PIN false
@@ -174,9 +195,9 @@
174 195
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
175 196
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
176 197
 
177
-// Feedrates for manual moves along X, Y, Z, E from panel
178 198
 #ifdef ULTIPANEL
179 199
   #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
200
+  #define ULTIPANEL_FEEDMULTIPLY  // Comment to disable setting feedrate multiplier via encoder
180 201
 #endif
181 202
 
182 203
 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
@@ -214,36 +235,46 @@
214 235
 //===========================================================================
215 236
 
216 237
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
217
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
218
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
238
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
239
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
219 240
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
220 241
 
221 242
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
222 243
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
223 244
 
224
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
225
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
226
-
227
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the filesystem block order. 
228
-// if a file is deleted, it frees a block. hence, the order is not purely cronological. To still have auto0.g accessible, there is again the option to do that.
229
-// using:
230
-//#define MENU_ADDAUTOSTART
231
-
232
-// Show a progress bar on the LCD when printing from SD
233
-//#define LCD_PROGRESS_BAR
234
-
235
-#ifdef LCD_PROGRESS_BAR
236
-  // Amount of time (ms) to show the bar
237
-  #define PROGRESS_BAR_BAR_TIME 2000
238
-  // Amount of time (ms) to show the status message
239
-  #define PROGRESS_BAR_MSG_TIME 2000
240
-  // Amount of time (ms) to retain the status message (0=forever)
241
-  #define PROGRESS_MSG_EXPIRE   0
242
-  // Enable this to show messages for MSG_TIME then hide them
243
-  //#define PROGRESS_MSG_ONCE
244
-#endif
245
+#ifdef SDSUPPORT
246
+
247
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
248
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
249
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
250
+  // be commented out otherwise
251
+  #define SDCARDDETECTINVERTED
252
+
253
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
254
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
255
+
256
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
257
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
258
+  // using:
259
+  //#define MENU_ADDAUTOSTART
260
+
261
+  // Show a progress bar on HD44780 LCDs for SD printing
262
+  //#define LCD_PROGRESS_BAR
263
+
264
+  #ifdef LCD_PROGRESS_BAR
265
+    // Amount of time (ms) to show the bar
266
+    #define PROGRESS_BAR_BAR_TIME 2000
267
+    // Amount of time (ms) to show the status message
268
+    #define PROGRESS_BAR_MSG_TIME 3000
269
+    // Amount of time (ms) to retain the status message (0=forever)
270
+    #define PROGRESS_MSG_EXPIRE   0
271
+    // Enable this to show messages for MSG_TIME then hide them
272
+    //#define PROGRESS_MSG_ONCE
273
+  #endif
245 274
 
246
-// The hardware watchdog should reset the Microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
275
+#endif // SDSUPPORT
276
+
277
+// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
247 278
 //#define USE_WATCHDOG
248 279
 
249 280
 #ifdef USE_WATCHDOG
@@ -257,7 +288,7 @@
257 288
 //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
258 289
 
259 290
 // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
260
-// it can e.g. be used to change z-positions in the print startup phase in realtime
291
+// it can e.g. be used to change z-positions in the print startup phase in real-time
261 292
 // does not respect endstops!
262 293
 //#define BABYSTEPPING
263 294
 #ifdef BABYSTEPPING
@@ -270,7 +301,7 @@
270 301
 //
271 302
 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
272 303
 //
273
-// hooke's law says:		force = k * distance
304
+// Hooke's law says:		force = k * distance
274 305
 // Bernoulli's principle says:	v ^ 2 / 2 + g . h + pressure / density = constant
275 306
 // so: v ^ 2 is proportional to number of steps we advance the extruder
276 307
 //#define ADVANCE
@@ -279,7 +310,7 @@
279 310
   #define EXTRUDER_ADVANCE_K .0
280 311
   #define D_FILAMENT 2.85
281 312
   #define STEPS_MM_E 836
282
-#endif // ADVANCE
313
+#endif
283 314
 
284 315
 // Arc interpretation settings:
285 316
 #define MM_PER_ARC_SEGMENT 1
@@ -287,12 +318,6 @@
287 318
 
288 319
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
289 320
 
290
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
291
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT 
292
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
293
-// be commented out otherwise
294
-#define SDCARDDETECTINVERTED 
295
-
296 321
 // Control heater 0 and heater 1 in parallel.
297 322
 //#define HEATERS_PARALLEL
298 323
 
@@ -300,24 +325,24 @@ const unsigned int dropsegments=5; //everything with less than this number of st
300 325
 //=============================Buffers           ============================
301 326
 //===========================================================================
302 327
 
303
-// The number of linear motions that can be in the plan at any give time.  
304
-// 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.
305
-#if defined SDSUPPORT
328
+// The number of linear motions that can be in the plan at any give time.
329
+// 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 ring-buffering.
330
+#ifdef SDSUPPORT
306 331
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
307 332
 #else
308 333
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
309 334
 #endif
310 335
 
311 336
 
312
-//The ASCII buffer for recieving from the serial:
337
+//The ASCII buffer for receiving from the serial:
313 338
 #define MAX_CMD_SIZE 96
314 339
 #define BUFSIZE 4
315 340
 
316 341
 
317
-// Firmware based and LCD controled retract
318
-// M207 and M208 can be used to define parameters for the retraction. 
342
+// Firmware based and LCD controlled retract
343
+// M207 and M208 can be used to define parameters for the retraction.
319 344
 // The retraction can be called by the slicer using G10 and G11
320
-// until then, intended retractions can be detected by moves that only extrude and the direction. 
345
+// until then, intended retractions can be detected by moves that only extrude and the direction.
321 346
 // the moves are than replaced by the firmware controlled ones.
322 347
 
323 348
 // #define FWRETRACT  //ONLY PARTIALLY TESTED
@@ -344,6 +369,139 @@ const unsigned int dropsegments=5; //everything with less than this number of st
344 369
   #endif
345 370
 #endif
346 371
 
372
+/******************************************************************************\
373
+ * enable this section if you have TMC26X motor drivers. 
374
+ * you need to import the TMC26XStepper library into the arduino IDE for this
375
+ ******************************************************************************/
376
+
377
+//#define HAVE_TMCDRIVER
378
+#ifdef HAVE_TMCDRIVER
379
+
380
+//	#define X_IS_TMC
381
+	#define X_MAX_CURRENT 1000  //in mA
382
+	#define X_SENSE_RESISTOR 91 //in mOhms
383
+	#define X_MICROSTEPS 16     //number of microsteps
384
+	
385
+//	#define X2_IS_TMC
386
+	#define X2_MAX_CURRENT 1000  //in mA
387
+	#define X2_SENSE_RESISTOR 91 //in mOhms
388
+	#define X2_MICROSTEPS 16     //number of microsteps
389
+	
390
+//	#define Y_IS_TMC
391
+	#define Y_MAX_CURRENT 1000  //in mA
392
+	#define Y_SENSE_RESISTOR 91 //in mOhms
393
+	#define Y_MICROSTEPS 16     //number of microsteps
394
+	
395
+//	#define Y2_IS_TMC
396
+	#define Y2_MAX_CURRENT 1000  //in mA
397
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
398
+	#define Y2_MICROSTEPS 16     //number of microsteps	
399
+	
400
+//	#define Z_IS_TMC
401
+	#define Z_MAX_CURRENT 1000  //in mA
402
+	#define Z_SENSE_RESISTOR 91 //in mOhms
403
+	#define Z_MICROSTEPS 16     //number of microsteps
404
+	
405
+//	#define Z2_IS_TMC
406
+	#define Z2_MAX_CURRENT 1000  //in mA
407
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
408
+	#define Z2_MICROSTEPS 16     //number of microsteps
409
+	
410
+//	#define E0_IS_TMC
411
+	#define E0_MAX_CURRENT 1000  //in mA
412
+	#define E0_SENSE_RESISTOR 91 //in mOhms
413
+	#define E0_MICROSTEPS 16     //number of microsteps
414
+	
415
+//	#define E1_IS_TMC
416
+	#define E1_MAX_CURRENT 1000  //in mA
417
+	#define E1_SENSE_RESISTOR 91 //in mOhms
418
+	#define E1_MICROSTEPS 16     //number of microsteps	
419
+	
420
+//	#define E2_IS_TMC
421
+	#define E2_MAX_CURRENT 1000  //in mA
422
+	#define E2_SENSE_RESISTOR 91 //in mOhms
423
+	#define E2_MICROSTEPS 16     //number of microsteps	
424
+	
425
+//	#define E3_IS_TMC
426
+	#define E3_MAX_CURRENT 1000  //in mA
427
+	#define E3_SENSE_RESISTOR 91 //in mOhms
428
+	#define E3_MICROSTEPS 16     //number of microsteps		
429
+
430
+#endif
431
+
432
+/******************************************************************************\
433
+ * enable this section if you have L6470  motor drivers. 
434
+ * you need to import the L6470 library into the arduino IDE for this
435
+ ******************************************************************************/
436
+
437
+//#define HAVE_L6470DRIVER
438
+#ifdef HAVE_L6470DRIVER
439
+
440
+//	#define X_IS_L6470
441
+	#define X_MICROSTEPS 16     //number of microsteps
442
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
443
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
444
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
445
+	
446
+//	#define X2_IS_L6470
447
+	#define X2_MICROSTEPS 16     //number of microsteps
448
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
449
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
450
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
451
+	
452
+//	#define Y_IS_L6470
453
+	#define Y_MICROSTEPS 16     //number of microsteps
454
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
455
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
456
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
457
+	
458
+//	#define Y2_IS_L6470
459
+	#define Y2_MICROSTEPS 16     //number of microsteps	
460
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
461
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
462
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
463
+	
464
+//	#define Z_IS_L6470
465
+	#define Z_MICROSTEPS 16     //number of microsteps
466
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
467
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
468
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
469
+	
470
+//	#define Z2_IS_L6470
471
+	#define Z2_MICROSTEPS 16     //number of microsteps
472
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
473
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
474
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
475
+	
476
+//	#define E0_IS_L6470
477
+	#define E0_MICROSTEPS 16     //number of microsteps
478
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
479
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
480
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
481
+	
482
+//	#define E1_IS_L6470
483
+	#define E1_MICROSTEPS 16     //number of microsteps	
484
+	#define E1_MICROSTEPS 16     //number of microsteps
485
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
486
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
487
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
488
+	
489
+//	#define E2_IS_L6470
490
+	#define E2_MICROSTEPS 16     //number of microsteps	
491
+	#define E2_MICROSTEPS 16     //number of microsteps
492
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
493
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
494
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
495
+	
496
+//	#define E3_IS_L6470
497
+	#define E3_MICROSTEPS 16     //number of microsteps		
498
+	#define E3_MICROSTEPS 16     //number of microsteps
499
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
500
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
501
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
502
+	
503
+#endif
504
+
347 505
 #include "Conditionals.h"
348 506
 #include "SanityCheck.h"
349 507
 

+ 85
- 46
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -137,7 +137,7 @@ Here are some standard links for getting your machine calibrated:
137 137
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
138 138
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
139 139
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
140
-// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
140
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
141 141
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
142 142
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
143 143
 //
@@ -151,7 +151,7 @@ Here are some standard links for getting your machine calibrated:
151 151
 // 1010 is Pt1000 with 1k pullup (non standard)
152 152
 // 147 is Pt100 with 4k7 pullup
153 153
 // 110 is Pt100 with 1k pullup (non standard)
154
-// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
154
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
155 155
 //     Use it for Testing or Development purposes. NEVER for production machine.
156 156
 //     #define DUMMY_THERMISTOR_998_VALUE 25
157 157
 //     #define DUMMY_THERMISTOR_999_VALUE 100
@@ -297,15 +297,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
297 297
 The system will turn the heater on forever, burning up the filament and anything
298 298
 else around.
299 299
 
300
-After the temperature reaches the target for the first time, this feature will 
301
-start measuring for how long the current temperature stays below the target 
300
+After the temperature reaches the target for the first time, this feature will
301
+start measuring for how long the current temperature stays below the target
302 302
 minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
303 303
 
304 304
 If it stays longer than _PERIOD, it means the thermistor temperature
305 305
 cannot catch up with the target, so something *may be* wrong. Then, to be on the
306 306
 safe side, the system will he halt.
307 307
 
308
-Bear in mind the count down will just start AFTER the first time the 
308
+Bear in mind the count down will just start AFTER the first time the
309 309
 thermistor temperature is over the target, so you will have no problem if
310 310
 your extruder heater takes 2 minutes to hit the target on heating.
311 311
 
@@ -348,7 +348,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
348 348
   // #define ENDSTOPPULLUP_ZMIN
349 349
 #endif
350 350
 
351
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
351
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
352 352
 const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
353 353
 const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
354 354
 const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@@ -371,19 +371,18 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
371 371
 #define DISABLE_E false // For all extruders
372 372
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
373 373
 
374
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
374 375
 #define INVERT_X_DIR false // DELTA does not invert
375 376
 #define INVERT_Y_DIR false
376 377
 #define INVERT_Z_DIR false
377
-
378
-#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
379
-#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
380
-#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
381
-#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
378
+#define INVERT_E0_DIR false
379
+#define INVERT_E1_DIR false
380
+#define INVERT_E2_DIR false
381
+#define INVERT_E3_DIR false
382 382
 
383 383
 // ENDSTOP SETTINGS:
384 384
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
385
-// deltas always home to max
386
-#define X_HOME_DIR 1
385
+#define X_HOME_DIR 1  // deltas always home to max
387 386
 #define Y_HOME_DIR 1
388 387
 #define Z_HOME_DIR 1
389 388
 
@@ -391,12 +390,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
391 390
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
392 391
 
393 392
 // Travel limits after homing (units are in mm)
394
-#define X_MAX_POS DELTA_PRINTABLE_RADIUS
395 393
 #define X_MIN_POS -DELTA_PRINTABLE_RADIUS
396
-#define Y_MAX_POS DELTA_PRINTABLE_RADIUS
397 394
 #define Y_MIN_POS -DELTA_PRINTABLE_RADIUS
398
-#define Z_MAX_POS MANUAL_Z_HOME_POS
399 395
 #define Z_MIN_POS 0
396
+#define X_MAX_POS DELTA_PRINTABLE_RADIUS
397
+#define Y_MAX_POS DELTA_PRINTABLE_RADIUS
398
+#define Z_MAX_POS MANUAL_Z_HOME_POS
400 399
 
401 400
 //===========================================================================
402 401
 //============================= Filament Runout Sensor ======================
@@ -430,31 +429,59 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
430 429
 //===========================================================================
431 430
 
432 431
 #define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
433
-// Z-Probe Repeatability test is not supported in Deltas yet.
432
+// #define Z_PROBE_REPEATABILITY_TEST // Z-Probe Repeatability test is not supported in Deltas yet.
434 433
 
435 434
 #ifdef ENABLE_AUTO_BED_LEVELING
436 435
 
437
-  // Deltas only support grid mode
438
-  #define AUTO_BED_LEVELING_GRID
436
+  // There are 2 different ways to specify probing locations
437
+  //
438
+  // - "grid" mode
439
+  //   Probe several points in a rectangular grid.
440
+  //   You specify the rectangle and the density of sample points.
441
+  //   This mode is preferred because there are more measurements.
442
+  //
443
+  // - "3-point" mode
444
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
445
+  //   You specify the XY coordinates of all 3 points.
446
+
447
+  // Enable this to sample the bed in a grid (least squares solution)
448
+  // Note: this feature generates 10KB extra code size
449
+  #define AUTO_BED_LEVELING_GRID  // Deltas only support grid mode
450
+
451
+  #ifdef AUTO_BED_LEVELING_GRID
452
+
453
+    #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
454
+
455
+    #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
456
+    #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
457
+    #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS  
458
+    #define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
439 459
 
440
-  #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
441
-  #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
442
-  #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
443
-  #define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
444
-  #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS  
460
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this      
445 461
 
446
-  #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this      
462
+    // Non-linear bed leveling will be used.
463
+    // Compensate by interpolating between the nearest four Z probe values for each point.
464
+    // Useful for deltas where the print surface may appear like a bowl or dome shape.
465
+    // Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher.
466
+    #define AUTO_BED_LEVELING_GRID_POINTS 9
447 467
 
448
-  // Non-linear bed leveling will be used.
449
-  // Compensate by interpolating between the nearest four Z probe values for each point.
450
-  // Useful for deltas where the print surface may appear like a bowl or dome shape.
451
-  // Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher.
452
-  #define AUTO_BED_LEVELING_GRID_POINTS 9
468
+  #else  // !AUTO_BED_LEVELING_GRID
469
+
470
+      // Arbitrary points to probe. A simple cross-product
471
+      // is used to estimate the plane of the bed.
472
+      #define ABL_PROBE_PT_1_X 15
473
+      #define ABL_PROBE_PT_1_Y 180
474
+      #define ABL_PROBE_PT_2_X 15
475
+      #define ABL_PROBE_PT_2_Y 20
476
+      #define ABL_PROBE_PT_3_X 170
477
+      #define ABL_PROBE_PT_3_Y 20
478
+
479
+  #endif // AUTO_BED_LEVELING_GRID
453 480
 
454 481
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
455 482
   // X and Y offsets must be integers
456
-  #define X_PROBE_OFFSET_FROM_EXTRUDER 0     // -left  +right
457
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -10   // -front +behind
483
+  #define X_PROBE_OFFSET_FROM_EXTRUDER 0     // Probe on: -left  +right
484
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -10   // Probe on: -front +behind
458 485
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5  // -below (always!)
459 486
 
460 487
   #define Z_RAISE_BEFORE_HOMING 15      // (in mm) Raise Z before homing (G28) for Probe Clearance.
@@ -465,7 +492,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
465 492
   #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
466 493
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
467 494
   #define Z_RAISE_AFTER_PROBING 50    //How much the extruder will be raised after the last probing point.
468
-  
495
+
496
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
497
+                                                                            //Useful to retract a deployable probe.
498
+                                                                           
499
+  //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
500
+  //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
501
+
502
+  //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
503
+  //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
504
+  // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
505
+
469 506
   // Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
470 507
   // Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN.
471 508
   #define Z_PROBE_ALLEN_KEY
@@ -507,16 +544,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
507 544
 #endif // ENABLE_AUTO_BED_LEVELING
508 545
 
509 546
 
510
-
511 547
 // The position of the homing switches
512 548
 #define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
513 549
 #define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
514 550
 
515
-//Manual homing switch locations:
551
+// Manual homing switch locations:
516 552
 // For deltabots this means top and center of the Cartesian print volume.
517
-#define MANUAL_X_HOME_POS 0
518
-#define MANUAL_Y_HOME_POS 0
519
-#define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
553
+#ifdef MANUAL_HOME_POSITIONS
554
+  #define MANUAL_X_HOME_POS 0
555
+  #define MANUAL_Y_HOME_POS 0
556
+  #define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
557
+#endif
520 558
 
521 559
 //// MOVEMENT SETTINGS
522 560
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -555,8 +593,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
555 593
 #ifdef CUSTOM_M_CODES
556 594
   #ifdef ENABLE_AUTO_BED_LEVELING
557 595
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
558
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
559
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
596
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
597
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
560 598
   #endif
561 599
 #endif
562 600
 
@@ -588,7 +626,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
588 626
 // See also language.h
589 627
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
590 628
 
591
-// Chose ONE of the next three charsets. This has to match your hardware. In case of a full graphic display this information is not important.
629
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
592 630
 // To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
593 631
 // See also documentation/LCDLanguageFont.md
594 632
   #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
@@ -606,6 +644,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
606 644
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
607 645
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
608 646
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
647
+                                               // 0 to disable buzzer feedback  
609 648
 
610 649
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
611 650
 // http://reprap.org/wiki/PanelOne
@@ -667,7 +706,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
667 706
 // Shift register panels
668 707
 // ---------------------
669 708
 // 2 wire Non-latching LCD SR from:
670
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
709
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
671 710
 
672 711
 //#define SAV_3DLCD
673 712
 
@@ -675,7 +714,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
675 714
 //#define FAST_PWM_FAN
676 715
 
677 716
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
678
-// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
717
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
679 718
 // is too low, you should also increment SOFT_PWM_SCALE.
680 719
 //#define FAN_SOFT_PWM
681 720
 
@@ -729,9 +768,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
729 768
  * Support for a filament diameter sensor
730 769
  * Also allows adjustment of diameter at print time (vs  at slicing)
731 770
  * Single extruder only at this point (extruder 0)
732
- * 
771
+ *
733 772
  * Motherboards
734
- * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
773
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
735 774
  * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
736 775
  * 301 - Rambo  - uses Analog input 3
737 776
  * Note may require analog pins to be defined for different motherboards
@@ -748,7 +787,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
748 787
 #define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
749 788
 
750 789
 //defines used in the code
751
-#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
790
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
752 791
 
753 792
 //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
754 793
 //#define FILAMENT_LCD_DISPLAY

+ 257
- 99
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -13,30 +13,30 @@
13 13
 #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
14 14
 
15 15
 //// Heating sanity check:
16
-// This waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
17
-// If the temperature has not increased at the end of that period, the target temperature is set to zero. 
16
+// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature
17
+// If the temperature has not increased at the end of that period, the target temperature is set to zero.
18 18
 // It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
19 19
 //  differ by at least 2x WATCH_TEMP_INCREASE
20 20
 //#define WATCH_TEMP_PERIOD 40000 //40 seconds
21 21
 //#define WATCH_TEMP_INCREASE 10  //Heat up at least 10 degree in 20 seconds
22 22
 
23 23
 #ifdef PIDTEMP
24
-  // this adds an experimental additional term to the heatingpower, proportional to the extrusion speed.
25
-  // if Kc is choosen well, the additional required power due to increased melting should be compensated.
26
-  #define PID_ADD_EXTRUSION_RATE  
24
+  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
25
+  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
26
+  #define PID_ADD_EXTRUSION_RATE
27 27
   #ifdef PID_ADD_EXTRUSION_RATE
28
-    #define  DEFAULT_Kc (1) //heatingpower=Kc*(e_speed)
28
+    #define  DEFAULT_Kc (1) //heating power=Kc*(e_speed)
29 29
   #endif
30 30
 #endif
31 31
 
32 32
 
33 33
 //automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
34 34
 //The maximum buffered steps/sec of the extruder motor are called "se".
35
-//You enter the autotemp mode by a M109 S<mintemp> T<maxtemp> F<factor>
35
+//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
36 36
 // the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
37 37
 // you exit the value by any M109 without F*
38 38
 // Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
39
-// on an ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
39
+// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
40 40
 #define AUTOTEMP
41 41
 #ifdef AUTOTEMP
42 42
   #define AUTOTEMP_OLDWEIGHT 0.98
@@ -46,10 +46,10 @@
46 46
 //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
47 47
 //#define SHOW_TEMP_ADC_VALUES
48 48
 
49
-//  extruder run-out prevention. 
49
+//  extruder run-out prevention.
50 50
 //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
51
-//#define EXTRUDER_RUNOUT_PREVENT  
52
-#define EXTRUDER_RUNOUT_MINTEMP 190  
51
+//#define EXTRUDER_RUNOUT_PREVENT
52
+#define EXTRUDER_RUNOUT_MINTEMP 190
53 53
 #define EXTRUDER_RUNOUT_SECONDS 30.
54 54
 #define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
55 55
 #define EXTRUDER_RUNOUT_SPEED 1500.  //extrusion speed
@@ -75,12 +75,12 @@
75 75
 // Extruder cooling fans
76 76
 // Configure fan pin outputs to automatically turn on/off when the associated
77 77
 // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
78
-// Multiple extruders can be assigned to the same pin in which case 
78
+// Multiple extruders can be assigned to the same pin in which case
79 79
 // the fan will turn on when any selected extruder is above the threshold.
80
-#define EXTRUDER_0_AUTO_FAN_PIN   -1
81
-#define EXTRUDER_1_AUTO_FAN_PIN   -1
82
-#define EXTRUDER_2_AUTO_FAN_PIN   -1
83
-#define EXTRUDER_3_AUTO_FAN_PIN   -1
80
+#define EXTRUDER_0_AUTO_FAN_PIN -1
81
+#define EXTRUDER_1_AUTO_FAN_PIN -1
82
+#define EXTRUDER_2_AUTO_FAN_PIN -1
83
+#define EXTRUDER_3_AUTO_FAN_PIN -1
84 84
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
85 85
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
86 86
 
@@ -100,68 +100,89 @@
100 100
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
101 101
 //#define Z_DUAL_STEPPER_DRIVERS
102 102
 
103
+#ifdef Z_DUAL_STEPPER_DRIVERS
104
+
105
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
108
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
+
114
+  #define Z_DUAL_ENDSTOPS
115
+
116
+  #ifdef Z_DUAL_ENDSTOPS
117
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
+    #define Z2_DIR_PIN E2_DIR_PIN
119
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
+  #endif
124
+
125
+#endif // Z_DUAL_STEPPER_DRIVERS
126
+
103 127
 // Same again but for Y Axis.
104 128
 //#define Y_DUAL_STEPPER_DRIVERS
105 129
 
106 130
 // Define if the two Y drives need to rotate in opposite directions
107 131
 #define INVERT_Y2_VS_Y_DIR true
108 132
 
109
-// Enable this for dual x-carriage printers. 
133
+// Enable this for dual x-carriage printers.
110 134
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
111 135
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
112 136
 // allowing faster printing speeds.
113 137
 //#define DUAL_X_CARRIAGE
114 138
 #ifdef DUAL_X_CARRIAGE
115
-// Configuration for second X-carriage
116
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
117
-// the second x-carriage always homes to the maximum endstop.
118
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
119
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed 
120
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
121
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position 
122
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software 
123
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
124
-    // without modifying the firmware (through the "M218 T1 X???" command).
125
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
126
-
127
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
128
-#define X2_ENABLE_PIN 29
129
-#define X2_STEP_PIN 25
130
-#define X2_DIR_PIN 23
131
-
132
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
133
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
134
-//                           as long as it supports dual x-carriages. (M605 S0)
135
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
136
-//                           that additional slicer support is not required. (M605 S1)
137
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all  
138
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
139
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
140
-
141
-// This is the default power-up mode which can be later using M605. 
142
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0 
143
-
144
-// Default settings in "Auto-park Mode" 
145
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
146
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
147
-
148
-// Default x offset in duplication mode (typically set to half print bed width)
149
-#define DEFAULT_DUPLICATION_X_OFFSET 100
139
+  // Configuration for second X-carriage
140
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
141
+  // the second x-carriage always homes to the maximum endstop.
142
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
143
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
144
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
145
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
146
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
147
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
148
+      // without modifying the firmware (through the "M218 T1 X???" command).
149
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
150
+
151
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
152
+  #define X2_ENABLE_PIN 29
153
+  #define X2_STEP_PIN 25
154
+  #define X2_DIR_PIN 23
155
+
156
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
157
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
158
+  //                           as long as it supports dual x-carriages. (M605 S0)
159
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
160
+  //                           that additional slicer support is not required. (M605 S1)
161
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
162
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
163
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
164
+
165
+  // This is the default power-up mode which can be later using M605.
166
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
167
+
168
+  // Default settings in "Auto-park Mode"
169
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
170
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
171
+
172
+  // Default x offset in duplication mode (typically set to half print bed width)
173
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
150 174
 
151 175
 #endif //DUAL_X_CARRIAGE
152
-    
176
+
153 177
 //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
154
-#define X_HOME_RETRACT_MM 5 
155
-#define Y_HOME_RETRACT_MM 5 
178
+#define X_HOME_RETRACT_MM 5
179
+#define Y_HOME_RETRACT_MM 5
156 180
 #define Z_HOME_RETRACT_MM 5 // deltas need the same for all three axis
157 181
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
158
-
159 182
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
160 183
 
161 184
 #define AXIS_RELATIVE_MODES {false, false, false, false}
162 185
 
163
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
164
-
165 186
 //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
166 187
 #define INVERT_X_STEP_PIN false
167 188
 #define INVERT_Y_STEP_PIN false
@@ -174,9 +195,9 @@
174 195
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
175 196
 #define DEFAULT_MINTRAVELFEEDRATE     0.0
176 197
 
177
-// Feedrates for manual moves along X, Y, Z, E from panel
178 198
 #ifdef ULTIPANEL
179 199
   #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
200
+  #define ULTIPANEL_FEEDMULTIPLY  // Comment to disable setting feedrate multiplier via encoder
180 201
 #endif
181 202
 
182 203
 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
@@ -213,36 +234,46 @@
213 234
 //===========================================================================
214 235
 
215 236
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
216
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
217
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
237
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
238
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
218 239
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
219 240
 
220 241
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
221 242
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
222 243
 
223
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
224
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
225
-
226
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the filesystem block order. 
227
-// if a file is deleted, it frees a block. hence, the order is not purely cronological. To still have auto0.g accessible, there is again the option to do that.
228
-// using:
229
-//#define MENU_ADDAUTOSTART
230
-
231
-// Show a progress bar on the LCD when printing from SD
232
-//#define LCD_PROGRESS_BAR
233
-
234
-#ifdef LCD_PROGRESS_BAR
235
-  // Amount of time (ms) to show the bar
236
-  #define PROGRESS_BAR_BAR_TIME 2000
237
-  // Amount of time (ms) to show the status message
238
-  #define PROGRESS_BAR_MSG_TIME 2000
239
-  // Amount of time (ms) to retain the status message (0=forever)
240
-  #define PROGRESS_MSG_EXPIRE   0
241
-  // Enable this to show messages for MSG_TIME then hide them
242
-  //#define PROGRESS_MSG_ONCE
243
-#endif
244
+#ifdef SDSUPPORT
245
+
246
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
247
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
248
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
249
+  // be commented out otherwise
250
+  #define SDCARDDETECTINVERTED
251
+
252
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
253
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
254
+
255
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
256
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
257
+  // using:
258
+  //#define MENU_ADDAUTOSTART
259
+
260
+  // Show a progress bar on HD44780 LCDs for SD printing
261
+  //#define LCD_PROGRESS_BAR
262
+
263
+  #ifdef LCD_PROGRESS_BAR
264
+    // Amount of time (ms) to show the bar
265
+    #define PROGRESS_BAR_BAR_TIME 2000
266
+    // Amount of time (ms) to show the status message
267
+    #define PROGRESS_BAR_MSG_TIME 3000
268
+    // Amount of time (ms) to retain the status message (0=forever)
269
+    #define PROGRESS_MSG_EXPIRE   0
270
+    // Enable this to show messages for MSG_TIME then hide them
271
+    //#define PROGRESS_MSG_ONCE
272
+  #endif
244 273
 
245
-// The hardware watchdog should reset the Microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
274
+#endif // SDSUPPORT
275
+
276
+// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
246 277
 //#define USE_WATCHDOG
247 278
 
248 279
 #ifdef USE_WATCHDOG
@@ -256,7 +287,7 @@
256 287
 //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
257 288
 
258 289
 // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
259
-// it can e.g. be used to change z-positions in the print startup phase in realtime
290
+// it can e.g. be used to change z-positions in the print startup phase in real-time
260 291
 // does not respect endstops!
261 292
 //#define BABYSTEPPING
262 293
 #ifdef BABYSTEPPING
@@ -269,7 +300,7 @@
269 300
 //
270 301
 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
271 302
 //
272
-// hooke's law says:		force = k * distance
303
+// Hooke's law says:		force = k * distance
273 304
 // Bernoulli's principle says:	v ^ 2 / 2 + g . h + pressure / density = constant
274 305
 // so: v ^ 2 is proportional to number of steps we advance the extruder
275 306
 //#define ADVANCE
@@ -278,7 +309,7 @@
278 309
   #define EXTRUDER_ADVANCE_K .0
279 310
   #define D_FILAMENT 2.85
280 311
   #define STEPS_MM_E 836
281
-#endif // ADVANCE
312
+#endif
282 313
 
283 314
 // Arc interpretation settings:
284 315
 #define MM_PER_ARC_SEGMENT 1
@@ -286,12 +317,6 @@
286 317
 
287 318
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
288 319
 
289
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
290
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT 
291
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
292
-// be commented out otherwise
293
-#define SDCARDDETECTINVERTED 
294
-
295 320
 // Control heater 0 and heater 1 in parallel.
296 321
 //#define HEATERS_PARALLEL
297 322
 
@@ -299,24 +324,24 @@ const unsigned int dropsegments=5; //everything with less than this number of st
299 324
 //=============================Buffers           ============================
300 325
 //===========================================================================
301 326
 
302
-// The number of linear motions that can be in the plan at any give time.  
303
-// 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.
304
-#if defined SDSUPPORT
327
+// The number of linear motions that can be in the plan at any give time.
328
+// 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 ring-buffering.
329
+#ifdef SDSUPPORT
305 330
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
306 331
 #else
307 332
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
308 333
 #endif
309 334
 
310 335
 
311
-//The ASCII buffer for recieving from the serial:
336
+//The ASCII buffer for receiving from the serial:
312 337
 #define MAX_CMD_SIZE 96
313 338
 #define BUFSIZE 4
314 339
 
315 340
 
316
-// Firmware based and LCD controled retract
317
-// M207 and M208 can be used to define parameters for the retraction. 
341
+// Firmware based and LCD controlled retract
342
+// M207 and M208 can be used to define parameters for the retraction.
318 343
 // The retraction can be called by the slicer using G10 and G11
319
-// until then, intended retractions can be detected by moves that only extrude and the direction. 
344
+// until then, intended retractions can be detected by moves that only extrude and the direction.
320 345
 // the moves are than replaced by the firmware controlled ones.
321 346
 
322 347
 // #define FWRETRACT  //ONLY PARTIALLY TESTED
@@ -343,6 +368,139 @@ const unsigned int dropsegments=5; //everything with less than this number of st
343 368
   #endif
344 369
 #endif
345 370
 
371
+/******************************************************************************\
372
+ * enable this section if you have TMC26X motor drivers. 
373
+ * you need to import the TMC26XStepper library into the arduino IDE for this
374
+ ******************************************************************************/
375
+
376
+//#define HAVE_TMCDRIVER
377
+#ifdef HAVE_TMCDRIVER
378
+
379
+//	#define X_IS_TMC
380
+	#define X_MAX_CURRENT 1000  //in mA
381
+	#define X_SENSE_RESISTOR 91 //in mOhms
382
+	#define X_MICROSTEPS 16     //number of microsteps
383
+	
384
+//	#define X2_IS_TMC
385
+	#define X2_MAX_CURRENT 1000  //in mA
386
+	#define X2_SENSE_RESISTOR 91 //in mOhms
387
+	#define X2_MICROSTEPS 16     //number of microsteps
388
+	
389
+//	#define Y_IS_TMC
390
+	#define Y_MAX_CURRENT 1000  //in mA
391
+	#define Y_SENSE_RESISTOR 91 //in mOhms
392
+	#define Y_MICROSTEPS 16     //number of microsteps
393
+	
394
+//	#define Y2_IS_TMC
395
+	#define Y2_MAX_CURRENT 1000  //in mA
396
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
397
+	#define Y2_MICROSTEPS 16     //number of microsteps	
398
+	
399
+//	#define Z_IS_TMC
400
+	#define Z_MAX_CURRENT 1000  //in mA
401
+	#define Z_SENSE_RESISTOR 91 //in mOhms
402
+	#define Z_MICROSTEPS 16     //number of microsteps
403
+	
404
+//	#define Z2_IS_TMC
405
+	#define Z2_MAX_CURRENT 1000  //in mA
406
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
407
+	#define Z2_MICROSTEPS 16     //number of microsteps
408
+	
409
+//	#define E0_IS_TMC
410
+	#define E0_MAX_CURRENT 1000  //in mA
411
+	#define E0_SENSE_RESISTOR 91 //in mOhms
412
+	#define E0_MICROSTEPS 16     //number of microsteps
413
+	
414
+//	#define E1_IS_TMC
415
+	#define E1_MAX_CURRENT 1000  //in mA
416
+	#define E1_SENSE_RESISTOR 91 //in mOhms
417
+	#define E1_MICROSTEPS 16     //number of microsteps	
418
+	
419
+//	#define E2_IS_TMC
420
+	#define E2_MAX_CURRENT 1000  //in mA
421
+	#define E2_SENSE_RESISTOR 91 //in mOhms
422
+	#define E2_MICROSTEPS 16     //number of microsteps	
423
+	
424
+//	#define E3_IS_TMC
425
+	#define E3_MAX_CURRENT 1000  //in mA
426
+	#define E3_SENSE_RESISTOR 91 //in mOhms
427
+	#define E3_MICROSTEPS 16     //number of microsteps		
428
+
429
+#endif
430
+
431
+/******************************************************************************\
432
+ * enable this section if you have L6470  motor drivers. 
433
+ * you need to import the L6470 library into the arduino IDE for this
434
+ ******************************************************************************/
435
+
436
+//#define HAVE_L6470DRIVER
437
+#ifdef HAVE_L6470DRIVER
438
+
439
+//	#define X_IS_L6470
440
+	#define X_MICROSTEPS 16     //number of microsteps
441
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
442
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
443
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
444
+	
445
+//	#define X2_IS_L6470
446
+	#define X2_MICROSTEPS 16     //number of microsteps
447
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
448
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
449
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
450
+	
451
+//	#define Y_IS_L6470
452
+	#define Y_MICROSTEPS 16     //number of microsteps
453
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
454
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
455
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
456
+	
457
+//	#define Y2_IS_L6470
458
+	#define Y2_MICROSTEPS 16     //number of microsteps	
459
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
460
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
461
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
462
+	
463
+//	#define Z_IS_L6470
464
+	#define Z_MICROSTEPS 16     //number of microsteps
465
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
466
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
467
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
468
+	
469
+//	#define Z2_IS_L6470
470
+	#define Z2_MICROSTEPS 16     //number of microsteps
471
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
472
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
473
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
474
+	
475
+//	#define E0_IS_L6470
476
+	#define E0_MICROSTEPS 16     //number of microsteps
477
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
478
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
479
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
480
+	
481
+//	#define E1_IS_L6470
482
+	#define E1_MICROSTEPS 16     //number of microsteps	
483
+	#define E1_MICROSTEPS 16     //number of microsteps
484
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
485
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
486
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
487
+	
488
+//	#define E2_IS_L6470
489
+	#define E2_MICROSTEPS 16     //number of microsteps	
490
+	#define E2_MICROSTEPS 16     //number of microsteps
491
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
492
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
493
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
494
+	
495
+//	#define E3_IS_L6470
496
+	#define E3_MICROSTEPS 16     //number of microsteps		
497
+	#define E3_MICROSTEPS 16     //number of microsteps
498
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
499
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
500
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
501
+	
502
+#endif
503
+
346 504
 #include "Conditionals.h"
347 505
 #include "SanityCheck.h"
348 506
 

+ 46
- 38
Marlin/example_configurations/makibox/Configuration.h View File

@@ -104,7 +104,7 @@ Here are some standard links for getting your machine calibrated:
104 104
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
105 105
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
106 106
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
107
-// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
107
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
108 108
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
109 109
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
110 110
 //
@@ -118,7 +118,7 @@ Here are some standard links for getting your machine calibrated:
118 118
 // 1010 is Pt1000 with 1k pullup (non standard)
119 119
 // 147 is Pt100 with 4k7 pullup
120 120
 // 110 is Pt100 with 1k pullup (non standard)
121
-// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
122 122
 //     Use it for Testing or Development purposes. NEVER for production machine.
123 123
 //     #define DUMMY_THERMISTOR_998_VALUE 25
124 124
 //     #define DUMMY_THERMISTOR_999_VALUE 100
@@ -267,15 +267,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
267 267
 The system will turn the heater on forever, burning up the filament and anything
268 268
 else around.
269 269
 
270
-After the temperature reaches the target for the first time, this feature will 
271
-start measuring for how long the current temperature stays below the target 
270
+After the temperature reaches the target for the first time, this feature will
271
+start measuring for how long the current temperature stays below the target
272 272
 minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
273 273
 
274 274
 If it stays longer than _PERIOD, it means the thermistor temperature
275 275
 cannot catch up with the target, so something *may be* wrong. Then, to be on the
276 276
 safe side, the system will he halt.
277 277
 
278
-Bear in mind the count down will just start AFTER the first time the 
278
+Bear in mind the count down will just start AFTER the first time the
279 279
 thermistor temperature is over the target, so you will have no problem if
280 280
 your extruder heater takes 2 minutes to hit the target on heating.
281 281
 
@@ -318,7 +318,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
318 318
   // #define ENDSTOPPULLUP_ZMIN
319 319
 #endif
320 320
 
321
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
321
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
322 322
 const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
323 323
 const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
324 324
 const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@@ -341,13 +341,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
341 341
 #define DISABLE_E false // For all extruders
342 342
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
343 343
 
344
-#define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
345
-#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
346
-#define INVERT_Z_DIR false    // for Mendel set to false, for Orca set to true
347
-#define INVERT_E0_DIR true    // for direct drive extruder v9 set to true, for geared extruder set to false
348
-#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
349
-#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
350
-#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
344
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
345
+#define INVERT_X_DIR false
346
+#define INVERT_Y_DIR false
347
+#define INVERT_Z_DIR false
348
+#define INVERT_E0_DIR true
349
+#define INVERT_E1_DIR false
350
+#define INVERT_E2_DIR false
351
+#define INVERT_E3_DIR false
351 352
 
352 353
 // ENDSTOP SETTINGS:
353 354
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -359,12 +360,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
359 360
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
360 361
 
361 362
 // Travel limits after homing (units are in mm)
362
-#define X_MAX_POS 110
363 363
 #define X_MIN_POS 0
364
-#define Y_MAX_POS 150
365 364
 #define Y_MIN_POS 0
366
-#define Z_MAX_POS 86
367 365
 #define Z_MIN_POS 0
366
+#define X_MAX_POS 110
367
+#define Y_MAX_POS 150
368
+#define Z_MAX_POS 86
368 369
 
369 370
 //===========================================================================
370 371
 //============================= Filament Runout Sensor ======================
@@ -424,13 +425,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
424 425
     #define FRONT_PROBE_BED_POSITION 20
425 426
     #define BACK_PROBE_BED_POSITION 170
426 427
 
427
-    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this    
428
-    
428
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
429
+
429 430
     // Set the number of grid points per dimension
430 431
     // You probably don't need more than 3 (squared=9)
431 432
     #define AUTO_BED_LEVELING_GRID_POINTS 2
432 433
 
433
-
434 434
   #else  // !AUTO_BED_LEVELING_GRID
435 435
 
436 436
       // Arbitrary points to probe. A simple cross-product
@@ -444,11 +444,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
444 444
 
445 445
   #endif // AUTO_BED_LEVELING_GRID
446 446
 
447
-
448 447
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
449 448
   // X and Y offsets must be integers
450
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
451
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
449
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
450
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Probe on: -front +behind
452 451
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
453 452
 
454 453
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
@@ -456,10 +455,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
456 455
 
457 456
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
458 457
 
459
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
458
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
460 459
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
461 460
   #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
462 461
 
462
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
463
+                                                                            //Useful to retract a deployable probe.
464
+                                                                           
463 465
   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
464 466
   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
465 467
 
@@ -494,12 +496,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
494 496
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
495 497
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
496 498
 
497
-//Manual homing switch locations:
499
+// Manual homing switch locations:
498 500
 // For deltabots this means top and center of the Cartesian print volume.
499
-#define MANUAL_X_HOME_POS 0
500
-#define MANUAL_Y_HOME_POS 0
501
-#define MANUAL_Z_HOME_POS 0
502
-//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
501
+#ifdef MANUAL_HOME_POSITIONS
502
+  #define MANUAL_X_HOME_POS 0
503
+  #define MANUAL_Y_HOME_POS 0
504
+  #define MANUAL_Z_HOME_POS 0
505
+  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
506
+#endif
503 507
 
504 508
 //// MOVEMENT SETTINGS
505 509
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -536,8 +540,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
536 540
 #ifdef CUSTOM_M_CODES
537 541
   #ifdef ENABLE_AUTO_BED_LEVELING
538 542
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
539
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
540
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
543
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
544
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
541 545
   #endif
542 546
 #endif
543 547
 
@@ -565,13 +569,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
565 569
 //==============================LCD and SD support=============================
566 570
 
567 571
 // Define your display language below. Replace (en) with your language code and uncomment.
568
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
572
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
569 573
 // See also language.h
570 574
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
571 575
 
572
-// Character based displays can have different extended charsets.
573
-#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
574
-//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
576
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
577
+// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
578
+// See also documentation/LCDLanguageFont.md
579
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
580
+  //#define DISPLAY_CHARSET_HD44780_WESTERN
581
+  //#define DISPLAY_CHARSET_HD44780_CYRILLIC
575 582
 
576 583
 //#define ULTRA_LCD  //general LCD support, also 16x2
577 584
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@@ -584,6 +591,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
584 591
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
585 592
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
586 593
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
594
+                                               // 0 to disable buzzer feedback  
587 595
 
588 596
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
589 597
 // http://reprap.org/wiki/PanelOne
@@ -638,7 +646,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
638 646
 // Shift register panels
639 647
 // ---------------------
640 648
 // 2 wire Non-latching LCD SR from:
641
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
649
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
642 650
 
643 651
 //#define SAV_3DLCD
644 652
 
@@ -646,7 +654,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
646 654
 //#define FAST_PWM_FAN
647 655
 
648 656
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
649
-// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
657
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
650 658
 // is too low, you should also increment SOFT_PWM_SCALE.
651 659
 //#define FAN_SOFT_PWM
652 660
 
@@ -700,9 +708,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
700 708
  * Support for a filament diameter sensor
701 709
  * Also allows adjustment of diameter at print time (vs  at slicing)
702 710
  * Single extruder only at this point (extruder 0)
703
- * 
711
+ *
704 712
  * Motherboards
705
- * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
713
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
706 714
  * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
707 715
  * 301 - Rambo  - uses Analog input 3
708 716
  * Note may require analog pins to be defined for different motherboards

+ 234
- 74
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -32,7 +32,7 @@
32 32
 
33 33
 //automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
34 34
 //The maximum buffered steps/sec of the extruder motor are called "se".
35
-//You enter the autotemp mode by a M109 S<mintemp> T<maxtemp> F<factor>
35
+//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
36 36
 // the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
37 37
 // you exit the value by any M109 without F*
38 38
 // Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
@@ -77,10 +77,10 @@
77 77
 // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
78 78
 // Multiple extruders can be assigned to the same pin in which case
79 79
 // the fan will turn on when any selected extruder is above the threshold.
80
-#define EXTRUDER_0_AUTO_FAN_PIN   -1
81
-#define EXTRUDER_1_AUTO_FAN_PIN   -1
82
-#define EXTRUDER_2_AUTO_FAN_PIN   -1
83
-#define EXTRUDER_3_AUTO_FAN_PIN   -1
80
+#define EXTRUDER_0_AUTO_FAN_PIN -1
81
+#define EXTRUDER_1_AUTO_FAN_PIN -1
82
+#define EXTRUDER_2_AUTO_FAN_PIN -1
83
+#define EXTRUDER_3_AUTO_FAN_PIN -1
84 84
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
85 85
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
86 86
 
@@ -100,6 +100,30 @@
100 100
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
101 101
 //#define Z_DUAL_STEPPER_DRIVERS
102 102
 
103
+#ifdef Z_DUAL_STEPPER_DRIVERS
104
+
105
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
108
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
+
114
+  #define Z_DUAL_ENDSTOPS
115
+
116
+  #ifdef Z_DUAL_ENDSTOPS
117
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
+    #define Z2_DIR_PIN E2_DIR_PIN
119
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
+  #endif
124
+
125
+#endif // Z_DUAL_STEPPER_DRIVERS
126
+
103 127
 // Same again but for Y Axis.
104 128
 //#define Y_DUAL_STEPPER_DRIVERS
105 129
 
@@ -112,41 +136,41 @@
112 136
 // allowing faster printing speeds.
113 137
 //#define DUAL_X_CARRIAGE
114 138
 #ifdef DUAL_X_CARRIAGE
115
-// Configuration for second X-carriage
116
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
117
-// the second x-carriage always homes to the maximum endstop.
118
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
119
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
120
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
121
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
122
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
123
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
124
-    // without modifying the firmware (through the "M218 T1 X???" command).
125
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
126
-
127
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
128
-#define X2_ENABLE_PIN 29
129
-#define X2_STEP_PIN 25
130
-#define X2_DIR_PIN 23
131
-
132
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
133
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
134
-//                           as long as it supports dual x-carriages. (M605 S0)
135
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
136
-//                           that additional slicer support is not required. (M605 S1)
137
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
138
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
139
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
140
-
141
-// This is the default power-up mode which can be later using M605.
142
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
143
-
144
-// Default settings in "Auto-park Mode"
145
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
146
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
147
-
148
-// Default x offset in duplication mode (typically set to half print bed width)
149
-#define DEFAULT_DUPLICATION_X_OFFSET 100
139
+  // Configuration for second X-carriage
140
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
141
+  // the second x-carriage always homes to the maximum endstop.
142
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
143
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
144
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
145
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
146
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
147
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
148
+      // without modifying the firmware (through the "M218 T1 X???" command).
149
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
150
+
151
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
152
+  #define X2_ENABLE_PIN 29
153
+  #define X2_STEP_PIN 25
154
+  #define X2_DIR_PIN 23
155
+
156
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
157
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
158
+  //                           as long as it supports dual x-carriages. (M605 S0)
159
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
160
+  //                           that additional slicer support is not required. (M605 S1)
161
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
162
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
163
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
164
+
165
+  // This is the default power-up mode which can be later using M605.
166
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
167
+
168
+  // Default settings in "Auto-park Mode"
169
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
170
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
171
+
172
+  // Default x offset in duplication mode (typically set to half print bed width)
173
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
150 174
 
151 175
 #endif //DUAL_X_CARRIAGE
152 176
 
@@ -159,8 +183,6 @@
159 183
 
160 184
 #define AXIS_RELATIVE_MODES {false, false, false, false}
161 185
 
162
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
163
-
164 186
 //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
165 187
 #define INVERT_X_STEP_PIN false
166 188
 #define INVERT_Y_STEP_PIN false
@@ -205,7 +227,6 @@
205 227
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
206 228
 #define DIGIPOT_I2C_NUM_CHANNELS 4
207 229
 // actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
208
-//#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
209 230
 #define DIGIPOT_I2C_MOTOR_CURRENTS {1.7, 1.7, 1.7, 1.7}
210 231
 
211 232
 //===========================================================================
@@ -213,34 +234,44 @@
213 234
 //===========================================================================
214 235
 
215 236
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
216
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
217
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
237
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
238
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
218 239
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
219 240
 
220 241
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
221 242
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
222 243
 
223
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
224
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
225
-
226
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
227
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
228
-// using:
229
-//#define MENU_ADDAUTOSTART
230
-
231
-// Show a progress bar on the LCD when printing from SD
232
-//#define LCD_PROGRESS_BAR
233
-
234
-#ifdef LCD_PROGRESS_BAR
235
-  // Amount of time (ms) to show the bar
236
-  #define PROGRESS_BAR_BAR_TIME 2000
237
-  // Amount of time (ms) to show the status message
238
-  #define PROGRESS_BAR_MSG_TIME 2000
239
-  // Amount of time (ms) to retain the status message (0=forever)
240
-  #define PROGRESS_MSG_EXPIRE   0
241
-  // Enable this to show messages for MSG_TIME then hide them
242
-  //#define PROGRESS_MSG_ONCE
243
-#endif
244
+#ifdef SDSUPPORT
245
+
246
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
247
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
248
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
249
+  // be commented out otherwise
250
+  //#define SDCARDDETECTINVERTED
251
+
252
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
253
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
254
+
255
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
256
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
257
+  // using:
258
+  //#define MENU_ADDAUTOSTART
259
+
260
+  // Show a progress bar on HD44780 LCDs for SD printing
261
+  //#define LCD_PROGRESS_BAR
262
+
263
+  #ifdef LCD_PROGRESS_BAR
264
+    // Amount of time (ms) to show the bar
265
+    #define PROGRESS_BAR_BAR_TIME 2000
266
+    // Amount of time (ms) to show the status message
267
+    #define PROGRESS_BAR_MSG_TIME 3000
268
+    // Amount of time (ms) to retain the status message (0=forever)
269
+    #define PROGRESS_MSG_EXPIRE   0
270
+    // Enable this to show messages for MSG_TIME then hide them
271
+    //#define PROGRESS_MSG_ONCE
272
+  #endif
273
+
274
+#endif // SDSUPPORT
244 275
 
245 276
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
246 277
 //#define USE_WATCHDOG
@@ -278,7 +309,7 @@
278 309
   #define EXTRUDER_ADVANCE_K .0
279 310
   #define D_FILAMENT 2.85
280 311
   #define STEPS_MM_E 836
281
-#endif // ADVANCE
312
+#endif
282 313
 
283 314
 // Arc interpretation settings:
284 315
 #define MM_PER_ARC_SEGMENT 1
@@ -286,12 +317,6 @@
286 317
 
287 318
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
288 319
 
289
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
290
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
291
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
292
-// be commented out otherwise
293
-//#define SDCARDDETECTINVERTED
294
-
295 320
 // Control heater 0 and heater 1 in parallel.
296 321
 //#define HEATERS_PARALLEL
297 322
 
@@ -301,7 +326,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
301 326
 
302 327
 // The number of linear motions that can be in the plan at any give time.
303 328
 // 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 ring-buffering.
304
-#if defined SDSUPPORT
329
+#ifdef SDSUPPORT
305 330
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
306 331
 #else
307 332
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
@@ -323,9 +348,11 @@ const unsigned int dropsegments=5; //everything with less than this number of st
323 348
 #ifdef FWRETRACT
324 349
   #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
325 350
   #define RETRACT_LENGTH 3               //default retract length (positive mm)
351
+  #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
326 352
   #define RETRACT_FEEDRATE 45            //default feedrate for retracting (mm/s)
327 353
   #define RETRACT_ZLIFT 0                //default retract Z-lift
328 354
   #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
355
+  #define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
329 356
   #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
330 357
 #endif
331 358
 
@@ -341,6 +368,139 @@ const unsigned int dropsegments=5; //everything with less than this number of st
341 368
   #endif
342 369
 #endif
343 370
 
371
+/******************************************************************************\
372
+ * enable this section if you have TMC26X motor drivers. 
373
+ * you need to import the TMC26XStepper library into the arduino IDE for this
374
+ ******************************************************************************/
375
+
376
+//#define HAVE_TMCDRIVER
377
+#ifdef HAVE_TMCDRIVER
378
+
379
+//	#define X_IS_TMC
380
+	#define X_MAX_CURRENT 1000  //in mA
381
+	#define X_SENSE_RESISTOR 91 //in mOhms
382
+	#define X_MICROSTEPS 16     //number of microsteps
383
+	
384
+//	#define X2_IS_TMC
385
+	#define X2_MAX_CURRENT 1000  //in mA
386
+	#define X2_SENSE_RESISTOR 91 //in mOhms
387
+	#define X2_MICROSTEPS 16     //number of microsteps
388
+	
389
+//	#define Y_IS_TMC
390
+	#define Y_MAX_CURRENT 1000  //in mA
391
+	#define Y_SENSE_RESISTOR 91 //in mOhms
392
+	#define Y_MICROSTEPS 16     //number of microsteps
393
+	
394
+//	#define Y2_IS_TMC
395
+	#define Y2_MAX_CURRENT 1000  //in mA
396
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
397
+	#define Y2_MICROSTEPS 16     //number of microsteps	
398
+	
399
+//	#define Z_IS_TMC
400
+	#define Z_MAX_CURRENT 1000  //in mA
401
+	#define Z_SENSE_RESISTOR 91 //in mOhms
402
+	#define Z_MICROSTEPS 16     //number of microsteps
403
+	
404
+//	#define Z2_IS_TMC
405
+	#define Z2_MAX_CURRENT 1000  //in mA
406
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
407
+	#define Z2_MICROSTEPS 16     //number of microsteps
408
+	
409
+//	#define E0_IS_TMC
410
+	#define E0_MAX_CURRENT 1000  //in mA
411
+	#define E0_SENSE_RESISTOR 91 //in mOhms
412
+	#define E0_MICROSTEPS 16     //number of microsteps
413
+	
414
+//	#define E1_IS_TMC
415
+	#define E1_MAX_CURRENT 1000  //in mA
416
+	#define E1_SENSE_RESISTOR 91 //in mOhms
417
+	#define E1_MICROSTEPS 16     //number of microsteps	
418
+	
419
+//	#define E2_IS_TMC
420
+	#define E2_MAX_CURRENT 1000  //in mA
421
+	#define E2_SENSE_RESISTOR 91 //in mOhms
422
+	#define E2_MICROSTEPS 16     //number of microsteps	
423
+	
424
+//	#define E3_IS_TMC
425
+	#define E3_MAX_CURRENT 1000  //in mA
426
+	#define E3_SENSE_RESISTOR 91 //in mOhms
427
+	#define E3_MICROSTEPS 16     //number of microsteps		
428
+
429
+#endif
430
+
431
+/******************************************************************************\
432
+ * enable this section if you have L6470  motor drivers. 
433
+ * you need to import the L6470 library into the arduino IDE for this
434
+ ******************************************************************************/
435
+
436
+//#define HAVE_L6470DRIVER
437
+#ifdef HAVE_L6470DRIVER
438
+
439
+//	#define X_IS_L6470
440
+	#define X_MICROSTEPS 16     //number of microsteps
441
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
442
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
443
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
444
+	
445
+//	#define X2_IS_L6470
446
+	#define X2_MICROSTEPS 16     //number of microsteps
447
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
448
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
449
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
450
+	
451
+//	#define Y_IS_L6470
452
+	#define Y_MICROSTEPS 16     //number of microsteps
453
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
454
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
455
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
456
+	
457
+//	#define Y2_IS_L6470
458
+	#define Y2_MICROSTEPS 16     //number of microsteps	
459
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
460
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
461
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
462
+	
463
+//	#define Z_IS_L6470
464
+	#define Z_MICROSTEPS 16     //number of microsteps
465
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
466
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
467
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
468
+	
469
+//	#define Z2_IS_L6470
470
+	#define Z2_MICROSTEPS 16     //number of microsteps
471
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
472
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
473
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
474
+	
475
+//	#define E0_IS_L6470
476
+	#define E0_MICROSTEPS 16     //number of microsteps
477
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
478
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
479
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
480
+	
481
+//	#define E1_IS_L6470
482
+	#define E1_MICROSTEPS 16     //number of microsteps	
483
+	#define E1_MICROSTEPS 16     //number of microsteps
484
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
485
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
486
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
487
+	
488
+//	#define E2_IS_L6470
489
+	#define E2_MICROSTEPS 16     //number of microsteps	
490
+	#define E2_MICROSTEPS 16     //number of microsteps
491
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
492
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
493
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
494
+	
495
+//	#define E3_IS_L6470
496
+	#define E3_MICROSTEPS 16     //number of microsteps		
497
+	#define E3_MICROSTEPS 16     //number of microsteps
498
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
499
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
500
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
501
+	
502
+#endif
503
+
344 504
 #include "Conditionals.h"
345 505
 #include "SanityCheck.h"
346 506
 

+ 48
- 41
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -104,7 +104,7 @@ Here are some standard links for getting your machine calibrated:
104 104
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
105 105
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
106 106
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
107
-// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
107
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
108 108
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
109 109
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
110 110
 //
@@ -118,7 +118,7 @@ Here are some standard links for getting your machine calibrated:
118 118
 // 1010 is Pt1000 with 1k pullup (non standard)
119 119
 // 147 is Pt100 with 4k7 pullup
120 120
 // 110 is Pt100 with 1k pullup (non standard)
121
-// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
122 122
 //     Use it for Testing or Development purposes. NEVER for production machine.
123 123
 //     #define DUMMY_THERMISTOR_998_VALUE 25
124 124
 //     #define DUMMY_THERMISTOR_999_VALUE 100
@@ -193,8 +193,8 @@ Here are some standard links for getting your machine calibrated:
193 193
 
194 194
 // Ultimaker
195 195
 //    #define  DEFAULT_Kp 22.2
196
-//    #define  DEFAULT_Ki 1.08  
197
-//    #define  DEFAULT_Kd 114  
196
+//    #define  DEFAULT_Ki 1.08
197
+//    #define  DEFAULT_Kd 114
198 198
 
199 199
 // MakerGear
200 200
 //    #define  DEFAULT_Kp 7.0
@@ -269,15 +269,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
269 269
 The system will turn the heater on forever, burning up the filament and anything
270 270
 else around.
271 271
 
272
-After the temperature reaches the target for the first time, this feature will 
273
-start measuring for how long the current temperature stays below the target 
272
+After the temperature reaches the target for the first time, this feature will
273
+start measuring for how long the current temperature stays below the target
274 274
 minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
275 275
 
276 276
 If it stays longer than _PERIOD, it means the thermistor temperature
277 277
 cannot catch up with the target, so something *may be* wrong. Then, to be on the
278 278
 safe side, the system will he halt.
279 279
 
280
-Bear in mind the count down will just start AFTER the first time the 
280
+Bear in mind the count down will just start AFTER the first time the
281 281
 thermistor temperature is over the target, so you will have no problem if
282 282
 your extruder heater takes 2 minutes to hit the target on heating.
283 283
 
@@ -320,7 +320,7 @@ your extruder heater takes 2 minutes to hit the target on heating.
320 320
   // #define ENDSTOPPULLUP_ZMIN
321 321
 #endif
322 322
 
323
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
323
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
324 324
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
325 325
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
326 326
 const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -343,13 +343,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
343 343
 #define DISABLE_E false // For all extruders
344 344
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
345 345
 
346
-#define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
347
-#define INVERT_Y_DIR true     // for Mendel set to true, for Orca set to false
348
-#define INVERT_Z_DIR false    // for Mendel set to false, for Orca set to true
349
-#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
350
-#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
351
-#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
352
-#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
346
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
347
+#define INVERT_X_DIR false
348
+#define INVERT_Y_DIR false
349
+#define INVERT_Z_DIR true
350
+#define INVERT_E0_DIR false
351
+#define INVERT_E1_DIR false
352
+#define INVERT_E2_DIR false
353
+#define INVERT_E3_DIR false
353 354
 
354 355
 // ENDSTOP SETTINGS:
355 356
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -361,12 +362,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
361 362
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
362 363
 
363 364
 // Travel limits after homing (units are in mm)
364
-#define X_MAX_POS 205
365 365
 #define X_MIN_POS 0
366
-#define Y_MAX_POS 205
367 366
 #define Y_MIN_POS 0
368
-#define Z_MAX_POS 120
369 367
 #define Z_MIN_POS 0
368
+#define X_MAX_POS 205
369
+#define Y_MAX_POS 205
370
+#define Z_MAX_POS 120
370 371
 
371 372
 //===========================================================================
372 373
 //============================= Filament Runout Sensor ======================
@@ -425,14 +426,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
425 426
     #define RIGHT_PROBE_BED_POSITION 170
426 427
     #define FRONT_PROBE_BED_POSITION 20
427 428
     #define BACK_PROBE_BED_POSITION 170
428
-    
429
-    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this    
429
+
430
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
430 431
 
431 432
     // Set the number of grid points per dimension
432 433
     // You probably don't need more than 3 (squared=9)
433 434
     #define AUTO_BED_LEVELING_GRID_POINTS 2
434 435
 
435
-
436 436
   #else  // !AUTO_BED_LEVELING_GRID
437 437
 
438 438
       // Arbitrary points to probe. A simple cross-product
@@ -446,11 +446,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
446 446
 
447 447
   #endif // AUTO_BED_LEVELING_GRID
448 448
 
449
-
450 449
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
451 450
   // X and Y offsets must be integers
452
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
453
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
451
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
452
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Probe on: -front +behind
454 453
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
455 454
 
456 455
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
@@ -458,10 +457,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
458 457
 
459 458
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
460 459
 
461
-  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
460
+  #define Z_RAISE_BEFORE_PROBING 15   //How much the extruder will be raised before traveling to the first probing point.
462 461
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
463 462
   #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
464 463
 
464
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
465
+                                                                            //Useful to retract a deployable probe.
466
+                                                                           
465 467
   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
466 468
   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
467 469
 
@@ -496,12 +498,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
496 498
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
497 499
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
498 500
 
499
-//Manual homing switch locations:
501
+// Manual homing switch locations:
500 502
 // For deltabots this means top and center of the Cartesian print volume.
501
-#define MANUAL_X_HOME_POS 0
502
-#define MANUAL_Y_HOME_POS 0
503
-#define MANUAL_Z_HOME_POS 0
504
-//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
503
+#ifdef MANUAL_HOME_POSITIONS
504
+  #define MANUAL_X_HOME_POS 0
505
+  #define MANUAL_Y_HOME_POS 0
506
+  #define MANUAL_Z_HOME_POS 0
507
+  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
508
+#endif
505 509
 
506 510
 //// MOVEMENT SETTINGS
507 511
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -521,7 +525,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
521 525
 #define DEFAULT_RETRACT_ACCELERATION  3000   // E acceleration in mm/s^2 for retracts
522 526
 #define DEFAULT_TRAVEL_ACCELERATION   500    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
523 527
 
524
-
525 528
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
526 529
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
527 530
 // For the other hotends it is their distance from the extruder 0 hotend.
@@ -543,8 +546,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
543 546
 #ifdef CUSTOM_M_CODES
544 547
   #ifdef ENABLE_AUTO_BED_LEVELING
545 548
     #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
546
-    #define Z_PROBE_OFFSET_RANGE_MIN -15
547
-    #define Z_PROBE_OFFSET_RANGE_MAX -5
549
+    #define Z_PROBE_OFFSET_RANGE_MIN -20
550
+    #define Z_PROBE_OFFSET_RANGE_MAX 20
548 551
   #endif
549 552
 #endif
550 553
 
@@ -572,13 +575,16 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
572 575
 //==============================LCD and SD support=============================
573 576
 
574 577
 // Define your display language below. Replace (en) with your language code and uncomment.
575
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
578
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
576 579
 // See also language.h
577 580
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
578 581
 
579
-// Character based displays can have different extended charsets.
580
-#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
581
-//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
582
+// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
583
+// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
584
+// See also documentation/LCDLanguageFont.md
585
+  #define DISPLAY_CHARSET_HD44780_JAPAN        // this is the most common hardware
586
+  //#define DISPLAY_CHARSET_HD44780_WESTERN
587
+  //#define DISPLAY_CHARSET_HD44780_CYRILLIC
582 588
 
583 589
 //#define ULTRA_LCD  //general LCD support, also 16x2
584 590
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
@@ -591,6 +597,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
591 597
 //#define ULTIPANEL  //the UltiPanel as on Thingiverse
592 598
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
593 599
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
600
+                                               // 0 to disable buzzer feedback  
594 601
 
595 602
 // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
596 603
 // http://reprap.org/wiki/PanelOne
@@ -645,7 +652,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
645 652
 // Shift register panels
646 653
 // ---------------------
647 654
 // 2 wire Non-latching LCD SR from:
648
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
655
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
649 656
 
650 657
 //#define SAV_3DLCD
651 658
 
@@ -653,7 +660,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
653 660
 //#define FAST_PWM_FAN
654 661
 
655 662
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
656
-// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
663
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
657 664
 // is too low, you should also increment SOFT_PWM_SCALE.
658 665
 //#define FAN_SOFT_PWM
659 666
 
@@ -707,9 +714,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
707 714
  * Support for a filament diameter sensor
708 715
  * Also allows adjustment of diameter at print time (vs  at slicing)
709 716
  * Single extruder only at this point (extruder 0)
710
- * 
717
+ *
711 718
  * Motherboards
712
- * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
719
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
713 720
  * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
714 721
  * 301 - Rambo  - uses Analog input 3
715 722
  * Note may require analog pins to be defined for different motherboards

+ 232
- 79
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -77,10 +77,10 @@
77 77
 // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
78 78
 // Multiple extruders can be assigned to the same pin in which case
79 79
 // the fan will turn on when any selected extruder is above the threshold.
80
-#define EXTRUDER_0_AUTO_FAN_PIN   -1
81
-#define EXTRUDER_1_AUTO_FAN_PIN   -1
82
-#define EXTRUDER_2_AUTO_FAN_PIN   -1
83
-#define EXTRUDER_3_AUTO_FAN_PIN   -1
80
+#define EXTRUDER_0_AUTO_FAN_PIN -1
81
+#define EXTRUDER_1_AUTO_FAN_PIN -1
82
+#define EXTRUDER_2_AUTO_FAN_PIN -1
83
+#define EXTRUDER_3_AUTO_FAN_PIN -1
84 84
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
85 85
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
86 86
 
@@ -100,6 +100,30 @@
100 100
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
101 101
 //#define Z_DUAL_STEPPER_DRIVERS
102 102
 
103
+#ifdef Z_DUAL_STEPPER_DRIVERS
104
+
105
+  // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
106
+  // That way the machine is capable to align the bed during home, since both Z steppers are homed. 
107
+  // There is also an implementation of M666 (software endstops adjustment) to this feature.
108
+  // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
109
+  // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
110
+  // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
111
+  // Play a little bit with small adjustments (0.5mm) and check the behaviour.
112
+  // The M119 (endstops report) will start reporting the Z2 Endstop as well.
113
+
114
+  #define Z_DUAL_ENDSTOPS
115
+
116
+  #ifdef Z_DUAL_ENDSTOPS
117
+    #define Z2_STEP_PIN E2_STEP_PIN           // Stepper to be used to Z2 axis.
118
+    #define Z2_DIR_PIN E2_DIR_PIN
119
+    #define Z2_ENABLE_PIN E2_ENABLE_PIN
120
+    #define Z2_MAX_PIN 36                     //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
121
+    const bool Z2_MAX_ENDSTOP_INVERTING = false;
122
+    #define DISABLE_XMAX_ENDSTOP              //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
123
+  #endif
124
+
125
+#endif // Z_DUAL_STEPPER_DRIVERS
126
+
103 127
 // Same again but for Y Axis.
104 128
 //#define Y_DUAL_STEPPER_DRIVERS
105 129
 
@@ -112,41 +136,41 @@
112 136
 // allowing faster printing speeds.
113 137
 //#define DUAL_X_CARRIAGE
114 138
 #ifdef DUAL_X_CARRIAGE
115
-// Configuration for second X-carriage
116
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
117
-// the second x-carriage always homes to the maximum endstop.
118
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
119
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
120
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
121
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
122
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
123
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
124
-    // without modifying the firmware (through the "M218 T1 X???" command).
125
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
126
-
127
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
128
-#define X2_ENABLE_PIN 29
129
-#define X2_STEP_PIN 25
130
-#define X2_DIR_PIN 23
131
-
132
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
133
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
134
-//                           as long as it supports dual x-carriages. (M605 S0)
135
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
136
-//                           that additional slicer support is not required. (M605 S1)
137
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
138
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
139
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
140
-
141
-// This is the default power-up mode which can be later using M605.
142
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
143
-
144
-// Default settings in "Auto-park Mode"
145
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
146
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
147
-
148
-// Default x offset in duplication mode (typically set to half print bed width)
149
-#define DEFAULT_DUPLICATION_X_OFFSET 100
139
+  // Configuration for second X-carriage
140
+  // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
141
+  // the second x-carriage always homes to the maximum endstop.
142
+  #define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
143
+  #define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
144
+  #define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
145
+  #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
146
+      // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
147
+      // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
148
+      // without modifying the firmware (through the "M218 T1 X???" command).
149
+      // Remember: you should set the second extruder x-offset to 0 in your slicer.
150
+
151
+  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
152
+  #define X2_ENABLE_PIN 29
153
+  #define X2_STEP_PIN 25
154
+  #define X2_DIR_PIN 23
155
+
156
+  // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
157
+  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
158
+  //                           as long as it supports dual x-carriages. (M605 S0)
159
+  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
160
+  //                           that additional slicer support is not required. (M605 S1)
161
+  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
162
+  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
163
+  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
164
+
165
+  // This is the default power-up mode which can be later using M605.
166
+  #define DEFAULT_DUAL_X_CARRIAGE_MODE 0
167
+
168
+  // Default settings in "Auto-park Mode"
169
+  #define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
170
+  #define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
171
+
172
+  // Default x offset in duplication mode (typically set to half print bed width)
173
+  #define DEFAULT_DUPLICATION_X_OFFSET 100
150 174
 
151 175
 #endif //DUAL_X_CARRIAGE
152 176
 
@@ -158,11 +182,7 @@
158 182
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
159 183
 
160 184
 #define AXIS_RELATIVE_MODES {false, false, false, false}
161
-#ifdef CONFIG_STEPPERS_TOSHIBA
162
-#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
163
-#else
164
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
165
-#endif
185
+
166 186
 //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
167 187
 #define INVERT_X_STEP_PIN false
168 188
 #define INVERT_Y_STEP_PIN false
@@ -214,34 +234,44 @@
214 234
 //===========================================================================
215 235
 
216 236
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
217
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
218
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
237
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
238
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
219 239
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
220 240
 
221 241
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
222 242
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
223 243
 
224
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
225
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
226
-
227
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
228
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
229
-// using:
230
-//#define MENU_ADDAUTOSTART
231
-
232
-// Show a progress bar on the LCD when printing from SD?
233
-//#define LCD_PROGRESS_BAR
234
-
235
-#ifdef LCD_PROGRESS_BAR
236
-  // Amount of time (ms) to show the bar
237
-  #define PROGRESS_BAR_BAR_TIME 2000
238
-  // Amount of time (ms) to show the status message
239
-  #define PROGRESS_BAR_MSG_TIME 3000
240
-  // Amount of time (ms) to retain the status message (0=forever)
241
-  #define PROGRESS_MSG_EXPIRE   0
242
-  // Enable this to show messages for MSG_TIME then hide them
243
-  //#define PROGRESS_MSG_ONCE
244
-#endif
244
+#ifdef SDSUPPORT
245
+
246
+  // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
247
+  // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
248
+  // in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
249
+  // be commented out otherwise
250
+  #define SDCARDDETECTINVERTED
251
+
252
+  #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
253
+  #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
254
+
255
+  #define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
256
+  // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
257
+  // using:
258
+  //#define MENU_ADDAUTOSTART
259
+
260
+  // Show a progress bar on HD44780 LCDs for SD printing
261
+  //#define LCD_PROGRESS_BAR
262
+
263
+  #ifdef LCD_PROGRESS_BAR
264
+    // Amount of time (ms) to show the bar
265
+    #define PROGRESS_BAR_BAR_TIME 2000
266
+    // Amount of time (ms) to show the status message
267
+    #define PROGRESS_BAR_MSG_TIME 3000
268
+    // Amount of time (ms) to retain the status message (0=forever)
269
+    #define PROGRESS_MSG_EXPIRE   0
270
+    // Enable this to show messages for MSG_TIME then hide them
271
+    //#define PROGRESS_MSG_ONCE
272
+  #endif
273
+
274
+#endif // SDSUPPORT
245 275
 
246 276
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
247 277
 //#define USE_WATCHDOG
@@ -277,13 +307,9 @@
277 307
 
278 308
 #ifdef ADVANCE
279 309
   #define EXTRUDER_ADVANCE_K .0
280
-
281 310
   #define D_FILAMENT 2.85
282 311
   #define STEPS_MM_E 836
283
-  #define EXTRUTION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
284
-  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUTION_AREA)
285
-
286
-#endif // ADVANCE
312
+#endif
287 313
 
288 314
 // Arc interpretation settings:
289 315
 #define MM_PER_ARC_SEGMENT 1
@@ -291,12 +317,6 @@
291 317
 
292 318
 const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
293 319
 
294
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
295
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
296
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
297
-// be commented out otherwise
298
-#define SDCARDDETECTINVERTED
299
-
300 320
 // Control heater 0 and heater 1 in parallel.
301 321
 //#define HEATERS_PARALLEL
302 322
 
@@ -306,7 +326,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
306 326
 
307 327
 // The number of linear motions that can be in the plan at any give time.
308 328
 // 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 ring-buffering.
309
-#if defined SDSUPPORT
329
+#ifdef SDSUPPORT
310 330
   #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
311 331
 #else
312 332
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
@@ -348,6 +368,139 @@ const unsigned int dropsegments=5; //everything with less than this number of st
348 368
   #endif
349 369
 #endif
350 370
 
371
+/******************************************************************************\
372
+ * enable this section if you have TMC26X motor drivers. 
373
+ * you need to import the TMC26XStepper library into the arduino IDE for this
374
+ ******************************************************************************/
375
+
376
+//#define HAVE_TMCDRIVER
377
+#ifdef HAVE_TMCDRIVER
378
+
379
+//	#define X_IS_TMC
380
+	#define X_MAX_CURRENT 1000  //in mA
381
+	#define X_SENSE_RESISTOR 91 //in mOhms
382
+	#define X_MICROSTEPS 16     //number of microsteps
383
+	
384
+//	#define X2_IS_TMC
385
+	#define X2_MAX_CURRENT 1000  //in mA
386
+	#define X2_SENSE_RESISTOR 91 //in mOhms
387
+	#define X2_MICROSTEPS 16     //number of microsteps
388
+	
389
+//	#define Y_IS_TMC
390
+	#define Y_MAX_CURRENT 1000  //in mA
391
+	#define Y_SENSE_RESISTOR 91 //in mOhms
392
+	#define Y_MICROSTEPS 16     //number of microsteps
393
+	
394
+//	#define Y2_IS_TMC
395
+	#define Y2_MAX_CURRENT 1000  //in mA
396
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
397
+	#define Y2_MICROSTEPS 16     //number of microsteps	
398
+	
399
+//	#define Z_IS_TMC
400
+	#define Z_MAX_CURRENT 1000  //in mA
401
+	#define Z_SENSE_RESISTOR 91 //in mOhms
402
+	#define Z_MICROSTEPS 16     //number of microsteps
403
+	
404
+//	#define Z2_IS_TMC
405
+	#define Z2_MAX_CURRENT 1000  //in mA
406
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
407
+	#define Z2_MICROSTEPS 16     //number of microsteps
408
+	
409
+//	#define E0_IS_TMC
410
+	#define E0_MAX_CURRENT 1000  //in mA
411
+	#define E0_SENSE_RESISTOR 91 //in mOhms
412
+	#define E0_MICROSTEPS 16     //number of microsteps
413
+	
414
+//	#define E1_IS_TMC
415
+	#define E1_MAX_CURRENT 1000  //in mA
416
+	#define E1_SENSE_RESISTOR 91 //in mOhms
417
+	#define E1_MICROSTEPS 16     //number of microsteps	
418
+	
419
+//	#define E2_IS_TMC
420
+	#define E2_MAX_CURRENT 1000  //in mA
421
+	#define E2_SENSE_RESISTOR 91 //in mOhms
422
+	#define E2_MICROSTEPS 16     //number of microsteps	
423
+	
424
+//	#define E3_IS_TMC
425
+	#define E3_MAX_CURRENT 1000  //in mA
426
+	#define E3_SENSE_RESISTOR 91 //in mOhms
427
+	#define E3_MICROSTEPS 16     //number of microsteps		
428
+
429
+#endif
430
+
431
+/******************************************************************************\
432
+ * enable this section if you have L6470  motor drivers. 
433
+ * you need to import the L6470 library into the arduino IDE for this
434
+ ******************************************************************************/
435
+
436
+//#define HAVE_L6470DRIVER
437
+#ifdef HAVE_L6470DRIVER
438
+
439
+//	#define X_IS_L6470
440
+	#define X_MICROSTEPS 16     //number of microsteps
441
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
442
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
443
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
444
+	
445
+//	#define X2_IS_L6470
446
+	#define X2_MICROSTEPS 16     //number of microsteps
447
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
448
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
449
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
450
+	
451
+//	#define Y_IS_L6470
452
+	#define Y_MICROSTEPS 16     //number of microsteps
453
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
454
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
455
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
456
+	
457
+//	#define Y2_IS_L6470
458
+	#define Y2_MICROSTEPS 16     //number of microsteps	
459
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
460
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
461
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
462
+	
463
+//	#define Z_IS_L6470
464
+	#define Z_MICROSTEPS 16     //number of microsteps
465
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
466
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
467
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
468
+	
469
+//	#define Z2_IS_L6470
470
+	#define Z2_MICROSTEPS 16     //number of microsteps
471
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
472
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
473
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
474
+	
475
+//	#define E0_IS_L6470
476
+	#define E0_MICROSTEPS 16     //number of microsteps
477
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
478
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
479
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
480
+	
481
+//	#define E1_IS_L6470
482
+	#define E1_MICROSTEPS 16     //number of microsteps	
483
+	#define E1_MICROSTEPS 16     //number of microsteps
484
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
485
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
486
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
487
+	
488
+//	#define E2_IS_L6470
489
+	#define E2_MICROSTEPS 16     //number of microsteps	
490
+	#define E2_MICROSTEPS 16     //number of microsteps
491
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
492
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
493
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
494
+	
495
+//	#define E3_IS_L6470
496
+	#define E3_MICROSTEPS 16     //number of microsteps		
497
+	#define E3_MICROSTEPS 16     //number of microsteps
498
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
499
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
500
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
501
+	
502
+#endif
503
+
351 504
 #include "Conditionals.h"
352 505
 #include "SanityCheck.h"
353 506
 

+ 3
- 1
Marlin/stepper.cpp View File

@@ -388,7 +388,9 @@ ISR(TIMER1_COMPA_vect) {
388 388
   {
389 389
     current_block = NULL;
390 390
     plan_discard_current_block();
391
-    if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
391
+    #ifdef SD_FINISHED_RELEASECOMMAND
392
+      if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
393
+    #endif
392 394
     cleaning_buffer_counter--;
393 395
     OCR1A = 200;
394 396
     return;

Loading…
Cancel
Save