From a39fadf87627cfdaa41a9e6fb32bfbcb2b9fb2b0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 27 Aug 2015 18:09:03 -0700 Subject: [PATCH] Update kossel-pro example config (again?) --- .../delta/kossel_pro/Configuration_adv.h | 296 +++++++----------- 1 file changed, 119 insertions(+), 177 deletions(-) diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index a4250d36f..935eaca6a 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -40,15 +40,6 @@ #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius #endif -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - #define PID_ADD_EXTRUSION_RATE - #if ENABLED(PID_ADD_EXTRUSION_RATE) - #define DEFAULT_Kc (1) //heating power=Kc*(e_speed) - #endif -#endif - /** * Automatic Temperature: * The hotend target temperature is calculated by all the buffered lines of gcode. @@ -59,6 +50,23 @@ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode */ +#if ENABLED(PIDTEMP) + // this adds an experimental additional term to the heating power, proportional to the extrusion speed. + // if Kc is chosen well, the additional required power due to increased melting should be compensated. + #define PID_ADD_EXTRUSION_RATE + #if ENABLED(PID_ADD_EXTRUSION_RATE) + #define DEFAULT_Kc (1) //heating power=Kc*(e_speed) + #endif +#endif + + +//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode. +//The maximum buffered steps/sec of the extruder motor are called "se". +//You enter the autotemp mode by a M109 S B F +// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp +// you exit the value by any M109 without F* +// Also, if the temperature is set to a value Z2 (yes, it is.. think about it) and the Z adjust would be positive. + // Play a little bit with small adjustments (0.5mm) and check the behaviour. + // The M119 (endstops report) will start reporting the Z2 Endstop as well. + + // #define Z_DUAL_ENDSTOPS + + #if ENABLED(Z_DUAL_ENDSTOPS) + #define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36) + const bool Z2_MAX_ENDSTOP_INVERTING = false; + #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. + #endif + +#endif // Z_DUAL_STEPPER_DRIVERS // Same again but for Y Axis. //#define Y_DUAL_STEPPER_DRIVERS -// Define if the two Y drives need to rotate in opposite directions -#define INVERT_Y2_VS_Y_DIR true - #if ENABLED(Y_DUAL_STEPPER_DRIVERS) - #undef EXTRUDERS - #define EXTRUDERS 1 -#endif - -#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS) - #error "You cannot have dual drivers for both Y and Z" + // Define if the two Y drives need to rotate in opposite directions + #define INVERT_Y2_VS_Y_DIR true #endif // Enable this for dual x-carriage printers. @@ -266,11 +236,6 @@ // @section machine -#if ENABLED(CONFIG_STEPPERS_TOSHIBA) -#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers -#else -#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step) -#endif //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false @@ -296,7 +261,6 @@ #define DEFAULT_MINSEGMENTTIME 20000 // If defined the movements slow down when the look ahead buffer is only half full -// (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) //#define SLOWDOWN // Frequency limit @@ -309,13 +273,6 @@ // if unwanted behavior is observed on a user's machine when running at very slow speeds. #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) -// MS1 MS2 Stepper Driver Microstepping mode table -#define MICROSTEP1 LOW,LOW -#define MICROSTEP2 HIGH,LOW -#define MICROSTEP4 LOW,HIGH -#define MICROSTEP8 HIGH,HIGH -#define MICROSTEP16 HIGH,HIGH - // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] @@ -333,6 +290,10 @@ //=============================Additional Features=========================== //=========================================================================== +#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly +#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 +#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 + //#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/ #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again @@ -391,6 +352,7 @@ //#define USE_SMALL_INFOFONT #endif // DOGLCD + // @section more // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. @@ -413,18 +375,9 @@ #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions #define BABYSTEP_INVERT_Z false //true for inverse movements in Z #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements +#endif // @section extruder - #if ENABLED(COREXY) - #error BABYSTEPPING not implemented for COREXY yet. - #endif - - #if ENABLED(DELTA) - #if ENABLED(BABYSTEP_XY) - #error BABYSTEPPING only implemented for Z axis on deltabots. - #endif - #endif -#endif // extruder advance constant (s2/mm3) // @@ -437,14 +390,11 @@ #if ENABLED(ADVANCE) #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 #define STEPS_MM_E 836 - #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159) - #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA) +#endif // @section extras -#endif // ADVANCE // Arc interpretation settings: #define MM_PER_ARC_SEGMENT 1 @@ -452,25 +402,7 @@ const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement -#if ENABLED(ULTIPANEL) - #undef SD_DETECT_INVERTED -#endif - -// Power Signal Control Definitions -// By default use ATX definition -#ifndef POWER_SUPPLY - #define POWER_SUPPLY 1 -#endif -// 1 = ATX -#if (POWER_SUPPLY == 1) - #define PS_ON_AWAKE LOW - #define PS_ON_ASLEEP HIGH -#endif -// 2 = X-Box 360 203W -#if (POWER_SUPPLY == 2) - #define PS_ON_AWAKE HIGH - #define PS_ON_ASLEEP LOW -#endif +// @section temperature // Control heater 0 and heater 1 in parallel. //#define HEATERS_PARALLEL @@ -483,10 +415,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st // The number of linear motions that can be in the plan at any give time. // 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. -#if defined SDSUPPORT +#if ENABLED(SDSUPPORT) #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #else - #define BLOCK_BUFFER_SIZE 64 // maximize block buffer + #define BLOCK_BUFFER_SIZE 16 // maximize block buffer #endif // @section more @@ -526,7 +458,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st // Add support for experimental filament exchange support M600; requires display #if ENABLED(ULTIPANEL) - #define FILAMENTCHANGEENABLE + //#define FILAMENTCHANGEENABLE #if ENABLED(FILAMENTCHANGEENABLE) #define FILAMENTCHANGE_XPOS 3 #define FILAMENTCHANGE_YPOS 3 @@ -598,69 +530,79 @@ const unsigned int dropsegments=5; //everything with less than this number of st #endif -#if ENABLED(FILAMENTCHANGEENABLE) - #if ENABLED(EXTRUDER_RUNOUT_PREVENT) - #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE - #endif -#endif +/******************************************************************************\ + * enable this section if you have L6470 motor drivers. + * you need to import the L6470 library into the arduino IDE for this + ******************************************************************************/ -//=========================================================================== -//============================= Define Defines ============================ -//=========================================================================== -#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT - #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1" -#endif +// @section l6470 -#if EXTRUDERS > 1 && defined HEATERS_PARALLEL - #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1" -#endif +//#define HAVE_L6470DRIVER +#if ENABLED(HAVE_L6470DRIVER) -#if TEMP_SENSOR_0 > 0 - #define THERMISTORHEATER_0 TEMP_SENSOR_0 - #define HEATER_0_USES_THERMISTOR -#endif -#if TEMP_SENSOR_1 > 0 - #define THERMISTORHEATER_1 TEMP_SENSOR_1 - #define HEATER_1_USES_THERMISTOR -#endif -#if TEMP_SENSOR_2 > 0 - #define THERMISTORHEATER_2 TEMP_SENSOR_2 - #define HEATER_2_USES_THERMISTOR -#endif -#if TEMP_SENSOR_BED > 0 - #define THERMISTORBED TEMP_SENSOR_BED - #define BED_USES_THERMISTOR -#endif -#if TEMP_SENSOR_0 == -1 - #define HEATER_0_USES_AD595 -#endif -#if TEMP_SENSOR_1 == -1 - #define HEATER_1_USES_AD595 -#endif -#if TEMP_SENSOR_2 == -1 - #define HEATER_2_USES_AD595 -#endif -#if TEMP_SENSOR_BED == -1 - #define BED_USES_AD595 -#endif -#if TEMP_SENSOR_0 == -2 - #define HEATER_0_USES_MAX6675 -#endif -#if TEMP_SENSOR_0 == 0 - #undef HEATER_0_MINTEMP - #undef HEATER_0_MAXTEMP -#endif -#if TEMP_SENSOR_1 == 0 - #undef HEATER_1_MINTEMP - #undef HEATER_1_MAXTEMP -#endif -#if TEMP_SENSOR_2 == 0 - #undef HEATER_2_MINTEMP - #undef HEATER_2_MAXTEMP -#endif -#if TEMP_SENSOR_BED == 0 - #undef BED_MINTEMP - #undef BED_MAXTEMP +// #define X_IS_L6470 + #define X_MICROSTEPS 16 //number of microsteps + #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define X2_IS_L6470 + #define X2_MICROSTEPS 16 //number of microsteps + #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define Y_IS_L6470 + #define Y_MICROSTEPS 16 //number of microsteps + #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define Y2_IS_L6470 + #define Y2_MICROSTEPS 16 //number of microsteps + #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define Z_IS_L6470 + #define Z_MICROSTEPS 16 //number of microsteps + #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define Z2_IS_L6470 + #define Z2_MICROSTEPS 16 //number of microsteps + #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define E0_IS_L6470 + #define E0_MICROSTEPS 16 //number of microsteps + #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define E1_IS_L6470 + #define E1_MICROSTEPS 16 //number of microsteps + #define E1_MICROSTEPS 16 //number of microsteps + #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define E2_IS_L6470 + #define E2_MICROSTEPS 16 //number of microsteps + #define E2_MICROSTEPS 16 //number of microsteps + #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define E3_IS_L6470 + #define E3_MICROSTEPS 16 //number of microsteps + #define E3_MICROSTEPS 16 //number of microsteps + #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall + #endif #include "Conditionals.h"