/ Repetier / Configuration.h
Configuration.h
   1  /*
   2      This file is part of Repetier-Firmware.  It has been modified for use with the SeeMeCNC Rostock MAX 3D printers
   3      with good base settings.  
   4  
   5      Repetier-Firmware is free software: you can redistribute it and/or modify
   6      it under the terms of the GNU General Public License as published by
   7      the Free Software Foundation, either version 3 of the License, or
   8      (at your option) any later version.
   9  
  10      Repetier-Firmware is distributed in the hope that it will be useful,
  11      but WITHOUT ANY WARRANTY; without even the implied warranty of
  12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13      GNU General Public License for more details.
  14  
  15      You should have received a copy of the GNU General Public License
  16      along with Repetier-Firmware.  If not, see <http://www.gnu.org/licenses/>.
  17  
  18  */
  19  
  20  #ifndef CONFIGURATION_H
  21  #define CONFIGURATION_H
  22  
  23  /* Some words on units:
  24  
  25  From 0.80 onwards the units used are unified for easier configuration, watch out when transfering from older configs!
  26  
  27  Speed is in mm/s
  28  Acceleration in mm/s^2
  29  Temperature is in degrees celsius
  30  
  31  
  32  ##########################################################################################
  33  ##                                        IMPORTANT                                     ##
  34  ##########################################################################################
  35  
  36  For easy configuration, the default settings enable parameter storage in EEPROM.
  37  This means, after the first upload many variables can only be changed using the special
  38  M commands as described in the documentation, or if you are using Repetier Host, from 
  39  the Config>eeprom settings menu there. Changing some of these values in the configuration.h
  40  has no effect. Parameters overriden by EEPROM settings are calibartion values, extruder 
  41  values except thermistor tables and some other parameter likely to change during usage
  42  like advance steps or ops mode.
  43  To override EEPROM settings with config settings, set EEPROM_MODE 0
  44  
  45  */
  46  
  47  
  48  // BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
  49  
  50  //// The following define selects which electronics board you have. Please choose the one that matches your setup
  51  // MEGA/RAMPS up to 1.2       = 3
  52  // RAMPS 1.3/RAMPS 1.4        = 33
  53  // Gen6                       = 5 
  54  // Gen6 deluxe                = 51
  55  // Sanguinololu up to 1.1     = 6
  56  // Sanguinololu 1.2 and above = 62
  57  // Gen7 1.1 till 1.3.x        = 7
  58  // Gen7 1.4.1 and later       = 71
  59  // Teensylu (at90usb)         = 8 // requires Teensyduino
  60  // Printrboard (at90usb)      = 9 // requires Teensyduino
  61  // Foltyn 3D Master           = 12
  62  // MegaTronics                = 70
  63  // RUMBA                      = 80  // Get it from reprapdiscount
  64  // Rambo                      = 301
  65  // Arduino Due                = 401 // This is only experimental
  66  
  67  #define MOTHERBOARD 301  //RAMBo board
  68  #include "pins.h"
  69  
  70  // Uncomment the following line if you are using arduino compatible firmware made for Arduino version earlier then 1.0
  71  // If it is incompatible you will get compiler errors about write functions not beeing compatible!
  72  //#define COMPAT_PRE1
  73  
  74  /* Define the type of axis movements needed for your printer. The typical case
  75  is a full cartesian system where x, y and z moves are handled by seperate motors.
  76  
  77  0 = full cartesian system, xyz have seperate motors.
  78  1 = z axis + xy H-gantry (x_motor = x+y, y_motor = x-y)
  79  2 = z axis + xy H-gantry (x_motor = x+y, y_motor = y-x)
  80  3 = Delta printers (Rostock, Kossel, RostockMax, Cerberus, etc)
  81  Cases 1 and 2 cover all needed xy H gantry systems. If you get results mirrored etc. you can swap motor connections for x and y. If a motor turns in 
  82  the wrong direction change INVERT_X_DIR or INVERT_Y_DIR.
  83  */
  84  #define DRIVE_SYSTEM 3  //Delta Rostock MAX
  85  
  86  // ##########################################################################################
  87  // ##                               Calibration                                            ##
  88  // ##########################################################################################
  89  
  90  /** Drive settings for the Delta printers
  91  */
  92  #if DRIVE_SYSTEM==3
  93  
  94  //  Delta drive type: 0 - belts and pulleys Like Rostock/Rostock MAX, 1 - filament drive like Kossel/Cerebrus (using fishing line etc...)
  95  
  96  #define DELTA_DRIVE_TYPE 0
  97  
  98  #if DELTA_DRIVE_TYPE == 0
  99  #define BELT_PITCH 2  // Pitch in mm of drive belt. GT2 = 2mm  T2.5=2.5 etc...
 100  #define PULLEY_TEETH 20  // how many teeth on the timing pulley  MUST be correct for delta values to take effect
 101  #define PULLEY_CIRCUMFERENCE (BELT_PITCH * PULLEY_TEETH)
 102  
 103  
 104  
 105  #elif DELTA_DRIVE_TYPE == 1  //   This is for use with fishing line drive systems like on the Kossel, Tantillus etc...  Do not use this if you have timing belts
 106  
 107  #define PULLEY_DIAMETER 10  //    pulley diameter in milimeters on stepper motors - THIS IS FOR STRING DRIVEN SETUPS LIKE KOSSEL, CEREBRUS ETC....
 108  #define PULLEY_CIRCUMFERENCE (PULLEY_DIAMETER * 3.1415927)  
 109  #endif
 110  
 111  
 112  
 113  #define STEPS_PER_ROTATION 200  // 200 is common, which are 1.8 degree per step motors, .9 degree motors would be 400 steps per rotation
 114  #define MICRO_STEPS 16          // RAMBo 1.0 and earlier use 8 (1/8 stepping), 1.1 and on uses 16 (1/16 stepping) RAMPS and Pololu drivers are normally 16
 115  
 116  /*Number of delta moves in each line. Moves that exceed this figure will be split into multiple lines.
 117  Increasing this figure can use a lot of memory since 7 bytes * size of line buffer * MAX_SELTA_SEGMENTS_PER_LINE
 118  will be allocated for the delta buffer. With defaults 7 * 16 * 30 = 3360 bytes. This leaves ~1K free RAM on an Arduino
 119  Mega.
 120  */
 121  #define MAX_DELTA_SEGMENTS_PER_LINE 30
 122  
 123  // Calculations for steps per mm etc...
 124  #define AXIS_STEPS_PER_MM ((float)(MICRO_STEPS * STEPS_PER_ROTATION) / PULLEY_CIRCUMFERENCE)
 125  #define XAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
 126  #define YAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
 127  #define ZAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
 128  
 129  #else
 130  /** Drive settings for printers with cartesian drive systems */
 131  /** \brief Number of steps for a 1mm move in x direction. 
 132  For xy gantry use 2*belt moved!
 133  Overridden if EEPROM activated. */
 134  #define XAXIS_STEPS_PER_MM 80.00
 135  /** \brief Number of steps for a 1mm move in y direction.
 136  For xy gantry use 2*belt moved!
 137  Overridden if EEPROM activated.*/
 138  #define YAXIS_STEPS_PER_MM 80.00
 139  /** \brief Number of steps for a 1mm move in z direction  Overridden if EEPROM activated.*/
 140  #define ZAXIS_STEPS_PER_MM 80.00
 141  #endif
 142  
 143  // ##########################################################################################
 144  // ##                           Extruder configuration                                     ##
 145  // ##########################################################################################
 146  
 147  /** Number of extruders. Maximum 2 extruder. */
 148  #define NUM_EXTRUDER 1
 149  
 150  #define EXT0_X_OFFSET 0
 151  #define EXT0_Y_OFFSET 0
 152  // for skeinforge 40 and later, steps to pull the plasic 1 mm inside the extruder, not out.  Overridden if EEPROM activated.
 153  // ############################
 154  //  Set to 92.4 for EZStruder direct drive extruder with rambo 1.1 on boards that are 1/16 stepping, 584 for steves extruder with rambo 1.1 on, and cut values
 155  //  in half for 1/8 stepping on rambo 1.0 and earlier boards
 156  // ############################
 157  #define EXT0_STEPS_PER_MM  92.4  
 158  // What type of sensor is used?
 159  // 1 is 100k thermistor (Epcos B57560G0107F000 - RepRap-Fab.org and many other)
 160  // 2 is 200k thermistor
 161  // 3 is mendel-parts thermistor (EPCOS G550)
 162  // 4 is 10k thermistor
 163  // 5 is userdefined thermistor table 0
 164  // 6 is userdefined thermistor table 1
 165  // 7 is userdefined thermistor table 2
 166  // 50 is userdefined thermistor table 0 for PTC thermistors
 167  // 51 is userdefined thermistor table 0 for PTC thermistors
 168  // 52 is userdefined thermistor table 0 for PTC thermistors
 169  // 97 Generic thermistor table 1
 170  // 98 Generic thermistor table 2
 171  // 99 Generic thermistor table 3
 172  // 100 is AD595
 173  // 101 is MAX6675
 174  #define EXT0_TEMPSENSOR_TYPE 97
 175  // Analog input pin for reading temperatures or pin enabling SS for MAX6675
 176  #define EXT0_TEMPSENSOR_PIN TEMP_0_PIN
 177  // WHich pin enables the heater
 178  #define EXT0_HEATER_PIN HEATER_0_PIN
 179  #define EXT0_STEP_PIN E0_STEP_PIN
 180  #define EXT0_DIR_PIN E0_DIR_PIN
 181  
 182  // #################### set to false/true for normal / inverse direction ########################
 183  #define EXT0_INVERSE true  
 184  
 185  #define EXT0_ENABLE_PIN E0_ENABLE_PIN
 186  // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
 187  #define EXT0_ENABLE_ON false
 188  // The following speed settings are for skeinforge 40+ where e is the
 189  // length of filament pulled inside the heater. For repsnap or older
 190  // skeinforge use hiher values.
 191  //  Overridden if EEPROM activated.
 192  #define EXT0_MAX_FEEDRATE 80
 193  // Feedrate from halted extruder in mm/s
 194  //  Overridden if EEPROM activated.
 195  #define EXT0_MAX_START_FEEDRATE 45
 196  // Acceleration in mm/s^2
 197  //  Overridden if EEPROM activated.
 198  #define EXT0_MAX_ACCELERATION 6500
 199  /** Type of heat manager for this extruder. 
 200  - 0 = Simply switch on/off if temperature is reached. Works always.
 201  - 1 = PID Temperature control. Is better but needs good PID values. Defaults are a good start for most extruder.
 202   Overridden if EEPROM activated.
 203  */
 204  #define EXT0_HEAT_MANAGER 1
 205  /** Wait x seconds, after reaching target temperature. Only used for M109.  Overridden if EEPROM activated. */
 206  #define EXT0_WATCHPERIOD 1
 207  
 208  /** \brief The maximum value, I-gain can contribute to the output. 
 209  
 210  A good value is slightly higher then the output needed for your temperature.
 211  Values for starts:
 212  130 => PLA for temperatures from 170-180°C
 213  180 => ABS for temperatures around 240°C
 214  
 215  The precise values may differ for different nozzle/resistor combination. 
 216   Overridden if EEPROM activated.
 217  */
 218  #define EXT0_PID_INTEGRAL_DRIVE_MAX 205
 219  /** \brief lower value for integral part
 220  
 221  The I state should converge to the exact heater output needed for the target temperature.
 222  To prevent a long deviation from the target zone, this value limits the lower value.
 223  A good start is 30 lower then the optimal value. You need to leave room for cooling.
 224   Overridden if EEPROM activated.
 225  */
 226  #define EXT0_PID_INTEGRAL_DRIVE_MIN 60
 227  /** P-gain.  Overridden if EEPROM activated. */
 228  #define EXT0_PID_P   11.63
 229  /** I-gain. Overridden if EEPROM activated.
 230  */
 231  #define EXT0_PID_I   0.43
 232  /** Dgain.  Overridden if EEPROM activated.*/
 233  #define EXT0_PID_D 78.65
 234  // maximum time the heater is can be switched on. Max = 255.  Overridden if EEPROM activated.
 235  #define EXT0_PID_MAX 255
 236  /** \brief Faktor for the advance algorithm. 0 disables the algorithm.  Overridden if EEPROM activated.
 237  K is the factor for the quadratic term, which is normally disabled in newer versions. If you want to use
 238  the quadratic factor make sure ENABLE_QUADRATIC_ADVANCE is defined.
 239  L is the linear factor and seems to be working better then the quadratic dependency.
 240  */
 241  #define EXT0_ADVANCE_K 0.0f
 242  #define EXT0_ADVANCE_L 0.0f
 243  
 244  /** \brief Temperature to retract filament when extruder is heating up. Overridden if EEPROM activated.
 245  */
 246  #define EXT0_WAIT_RETRACT_TEMP 		150
 247  /** \brief Units (mm/inches) to retract filament when extruder is heating up. Overridden if EEPROM activated. Set
 248  to 0 to disable.
 249  */
 250  #define EXT0_WAIT_RETRACT_UNITS 	0
 251  
 252  /** You can run any gcode command son extruder deselect/select. Seperate multiple commands with a new line \n.
 253  That way you can execute some mechanical components needed for extruder selection or retract filament or whatever you need.
 254  The codes are only executed for multiple extruder when changing the extruder. */
 255  #define EXT0_SELECT_COMMANDS "M120 S5 P5\nM117 Extruder 1"
 256  #define EXT0_DESELECT_COMMANDS ""
 257  /** The extruder cooler is a fan to cool the extruder when it is heating. If you turn the etxruder on, the fan goes on.
 258  This is set to turn on HEAT_1 on the RAMBo board by default so you can still have a cooling fan on the part as well, plugged into FAN_0
 259  */
 260  #define EXT0_EXTRUDER_COOLER_PIN 7
 261  /** PWM speed for the cooler fan. 0=off 255=full speed */
 262  #define EXT0_EXTRUDER_COOLER_SPEED 255
 263  
 264  
 265  // =========================== Configuration for second extruder ========================
 266  #define EXT1_X_OFFSET 0
 267  #define EXT1_Y_OFFSET 0
 268  // for skeinforge 40 and later, steps to pull the plasic 1 mm inside the extruder, not out.  Overridden if EEPROM activated.
 269  #define EXT1_STEPS_PER_MM 373
 270  // What type of sensor is used?
 271  // 1 is 100k thermistor (Epcos B57560G0107F000 - RepRap-Fab.org and many other)
 272  // 2 is 200k thermistor
 273  // 3 is mendel-parts thermistor (EPCOS G550)
 274  // 4 is 10k thermistor
 275  // 5 is userdefined thermistor table 0
 276  // 6 is userdefined thermistor table 1
 277  // 7 is userdefined thermistor table 2
 278  // 50 is userdefined thermistor table 0 for PTC thermistors
 279  // 51 is userdefined thermistor table 0 for PTC thermistors
 280  // 52 is userdefined thermistor table 0 for PTC thermistors
 281  // 97 Generic thermistor table 1
 282  // 98 Generic thermistor table 2
 283  // 99 Generic thermistor table 3
 284  // 100 is AD595
 285  // 101 is MAX6675
 286  #define EXT1_TEMPSENSOR_TYPE 1
 287  // Analog input pin for reading temperatures or pin enabling SS for MAX6675
 288  #define EXT1_TEMPSENSOR_PIN TEMP_1_PIN 
 289  // WHich pin enables the heater
 290  #define EXT1_HEATER_PIN HEATER_1_PIN 
 291  #define EXT1_STEP_PIN E1_STEP_PIN
 292  #define EXT1_DIR_PIN E1_DIR_PIN
 293  // set to 0/1 for normal / inverse direction
 294  #define EXT1_INVERSE false
 295  #define EXT1_ENABLE_PIN E1_ENABLE_PIN
 296  // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
 297  #define EXT1_ENABLE_ON false
 298  // The following speed settings are for skeinforge 40+ where e is the
 299  // length of filament pulled inside the heater. For repsnap or older
 300  // skeinforge use eiher values.
 301  //  Overridden if EEPROM activated.
 302  #define EXT1_MAX_FEEDRATE 50
 303  // Feedrate from halted extruder in mm/s
 304  //  Overridden if EEPROM activated.
 305  #define EXT1_MAX_START_FEEDRATE 12
 306  // Acceleration in mm/s^2
 307  //  Overridden if EEPROM activated.
 308  #define EXT1_MAX_ACCELERATION 10000
 309  /** Type of heat manager for this extruder. 
 310  - 0 = Simply switch on/off if temperature is reached. Works always.
 311  - 1 = PID Temperature control. Is better but needs good PID values. Defaults are a good start for most extruder.
 312   Overridden if EEPROM activated.
 313  */
 314  #define EXT1_HEAT_MANAGER 1
 315  /** Wait x seconds, after reaching target temperature. Only used for M109.  Overridden if EEPROM activated. */
 316  #define EXT1_WATCHPERIOD 1
 317  
 318  /** \brief The maximum value, I-gain can contribute to the output. 
 319  
 320  A good value is slightly higher then the output needed for your temperature.
 321  Values for starts:
 322  130 => PLA for temperatures from 170-180°C
 323  180 => ABS for temperatures around 240°C
 324  
 325  The precise values may differ for different nozzle/resistor combination. 
 326   Overridden if EEPROM activated.
 327  */
 328  #define EXT1_PID_INTEGRAL_DRIVE_MAX 130
 329  /** \brief lower value for integral part
 330  
 331  The I state should converge to the exact heater output needed for the target temperature.
 332  To prevent a long deviation from the target zone, this value limits the lower value.
 333  A good start is 30 lower then the optimal value. You need to leave room for cooling.
 334   Overridden if EEPROM activated.
 335  */
 336  #define EXT1_PID_INTEGRAL_DRIVE_MIN 60
 337  /** P-gain.  Overridden if EEPROM activated. */
 338  #define EXT1_PID_P   24
 339  /** I-gain.  Overridden if EEPROM activated.
 340  */
 341  #define EXT1_PID_I   0.88
 342  /** Dgain.  Overridden if EEPROM activated.*/
 343  #define EXT1_PID_D 200
 344  // maximum time the heater is can be switched on. Max = 255.  Overridden if EEPROM activated.
 345  #define EXT1_PID_MAX 255
 346  /** \brief Faktor for the advance algorithm. 0 disables the algorithm.  Overridden if EEPROM activated.
 347  K is the factor for the quadratic term, which is normally disabled in newer versions. If you want to use
 348  the quadratic factor make sure ENABLE_QUADRATIC_ADVANCE is defined.
 349  L is the linear factor and seems to be working better then the quadratic dependency.
 350  */
 351  #define EXT1_ADVANCE_K 0.0f
 352  #define EXT1_ADVANCE_L 0.0f
 353  
 354  #define EXT1_WAIT_RETRACT_TEMP 	150
 355  #define EXT1_WAIT_RETRACT_UNITS	40
 356  #define EXT1_SELECT_COMMANDS "M120 S5 P15\nM117 Extruder 2"
 357  #define EXT1_DESELECT_COMMANDS ""
 358  /** The extruder cooler is a fan to cool the extruder when it is heating. If you turn the etxruder on, the fan goes on. */
 359  #define EXT1_EXTRUDER_COOLER_PIN -1
 360  /** PWM speed for the cooler fan. 0=off 255=full speed */
 361  #define EXT1_EXTRUDER_COOLER_SPEED 255
 362  
 363  /** If enabled you can select the distance your filament gets retracted during a
 364  M140 command, after a given temperature is reached. */
 365  #define RETRACT_DURING_HEATUP true
 366  
 367  /** PID control only works target temperature +/- PID_CONTROL_RANGE.
 368  If you get much overshoot at the first temperature set, because the heater is going full power to long, you
 369  need to increase this value. For one 6.8 Ohm heater 10 is ok. With two 6.8 Ohm heater use 15.
 370  */
 371  #define PID_CONTROL_RANGE 15
 372  
 373  /** Skip wait, if the extruder temperature is already within x degrees. Only fixed numbers, 0 = off */
 374  #define SKIP_M109_IF_WITHIN 2
 375  
 376  /** \brief Set PID scaling 
 377  
 378  PID values assume a usable range from 0-255. This can be further limited to EXT0_PID_MAX by to methods.
 379  Set the value to 0: Normal computation, just clip output to EXT0_PID_MAX if computed value is too high.
 380  Set value to 1: Scale PID by EXT0_PID_MAX/256 and then clip to EXT0_PID_MAX.
 381  If your EXT0_PID_MAX is low, you should prefer the second method.
 382  */
 383  #define SCALE_PID_TO_MAX 0
 384  
 385  /** Temperature range for target temperature to hold in M109 command. 5 means +/-5°C
 386  
 387  Uncomment define to use force the temperature into the range for given watchperiod. 
 388  */
 389  //#define TEMP_HYSTERESIS 5
 390  
 391  /** Userdefined thermistor table
 392  
 393  There are many different thermistors, which can be combined with different resistors. This result
 394  in unpredictable number of tables. As a resolution, the user can define one table here, that can
 395  be used as type 5 for thermister type in extruder/heated bed definition. Make sure, the number of entries
 396  matches the value in NUM_TEMPS_USERTHERMISTOR0. If you span definition over multiple lines, make sure to end
 397  each line, except the last, with a backslash. The table format is {{adc1,temp1},{adc2,temp2}...} with
 398  increasing adc values. For more informations, read 
 399  http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html
 400  
 401  If you have a sprinter temperature table, you have to multiply the first value with 4 and the second with 8.
 402  This firmware works with increased precision, so the value reads go from 0 to 4095 and the temperature is 
 403  temperature*8.
 404  
 405  If you have a PTC thermistor instead of a NTC thermistor, keep the adc values increasing and use themistor types 50-52 instead of 5-7! 
 406  */
 407  /** Number of entries in the user thermistortable 0. Set to 0 to disable it. */
 408  #define NUM_TEMPS_USERTHERMISTOR0 28
 409  #define USER_THERMISTORTABLE0  {\
 410    {1*4,864*8},{21*4,300*8},{25*4,290*8},{29*4,280*8},{33*4,270*8},{39*4,260*8},{46*4,250*8},{54*4,240*8},{64*4,230*8},{75*4,220*8},\
 411    {90*4,210*8},{107*4,200*8},{128*4,190*8},{154*4,180*8},{184*4,170*8},{221*4,160*8},{265*4,150*8},{316*4,140*8},{375*4,130*8},\
 412    {441*4,120*8},{513*4,110*8},{588*4,100*8},{734*4,80*8},{856*4,60*8},{938*4,40*8},{986*4,20*8},{1008*4,0*8},{1018*4,-20*8}	}
 413  
 414  /** Number of entries in the user thermistortable 1. Set to 0 to disable it. */
 415  #define NUM_TEMPS_USERTHERMISTOR1 0
 416  #define USER_THERMISTORTABLE1  {}  
 417  /** Number of entries in the user thermistortable 2. Set to 0 to disable it. */
 418  #define NUM_TEMPS_USERTHERMISTOR2 0
 419  #define USER_THERMISTORTABLE2  {}  
 420  
 421  /** If defined, creates a thermistortable at startup.
 422  
 423  If you dont feel like computing the table on your own, you can use this generic method. It is
 424  a simple approximation which may be not as accurate as a good table computed from the reference
 425  values in the datasheet. You can increase precision if you use a temperature/resistance for
 426  R0/T0, which is near your operating temperature. This will reduce precision for lower temperatures,
 427  which are not realy important. The resistors must fit the following schematic:
 428  @code
 429  VREF ---- R2 ---+--- Termistor ---+-- GND
 430                  |                 |
 431                  +------ R1 -------+
 432                  |                 |
 433                  +---- Capacitor --+
 434                  |
 435                  V measured
 436  @endcode                
 437                  
 438  If you don't have R1, set it to 0.
 439  The capacitor is for reducing noise from long thermistor cable. If you don't have have one, it's OK.
 440  
 441  If you don't need the generic table, uncomment the following define.
 442  */
 443  #define USE_GENERIC_THERMISTORTABLE_1
 444  
 445  /* Some examples for different thermistors:
 446  
 447  EPCOS B57560G104+ : R0 = 100000  T0 = 25  Beta = 4036
 448  EPCOS 100K Thermistor (B57560G1104F) :  R0 = 100000  T0 = 25  Beta = 4092
 449  ATC Semitec 104GT-2 : R0 = 100000  T0 = 25  Beta = 4267
 450  Honeywell 100K Thermistor (135-104LAG-J01)  : R0 = 100000  T0 = 25  Beta = 3974
 451  
 452  */
 453  
 454  /** Reference resistance */
 455  #define GENERIC_THERM1_R0 100000
 456  /** Temperature at reference resistance */
 457  #define GENERIC_THERM1_T0 25
 458  /** Beta value of thermistor
 459  
 460  You can use the beta from the datasheet or compute it yourself. See
 461  http://reprap.org/wiki/MeasuringThermistorBeta
 462  for more details.
 463  */
 464  #define GENERIC_THERM1_BETA 4450 //default was 4267 for Semitec 104GT2 thermistors in SeeMeCNC Hotends, but this value was found to be more accurate
 465  /** Start temperature for generated thermistor table */
 466  #define GENERIC_THERM1_MIN_TEMP -20
 467  /** End Temperature for generated thermistor table */
 468  #define GENERIC_THERM1_MAX_TEMP 300
 469  #define GENERIC_THERM1_R1 0
 470  #define GENERIC_THERM1_R2 4700
 471  
 472  // The same for table 2 and 3 if needed
 473  
 474  //#define USE_GENERIC_THERMISTORTABLE_2
 475  #define GENERIC_THERM2_R0 1042.7
 476  #define GENERIC_THERM2_T0 170
 477  #define GENERIC_THERM2_BETA 4036
 478  #define GENERIC_THERM2_MIN_TEMP -20
 479  #define GENERIC_THERM2_MAX_TEMP 300
 480  #define GENERIC_THERM2_R1 0
 481  #define GENERIC_THERM2_R2 4700
 482  
 483  //#define USE_GENERIC_THERMISTORTABLE_3
 484  #define GENERIC_THERM3_R0 1042.7
 485  #define GENERIC_THERM3_T0 170
 486  #define GENERIC_THERM3_BETA 4036
 487  #define GENERIC_THERM3_MIN_TEMP -20
 488  #define GENERIC_THERM3_MAX_TEMP 300
 489  #define GENERIC_THERM3_R1 0
 490  #define GENERIC_THERM3_R2 4700
 491  
 492  /** Supply voltage to ADC, can be changed be setting ANALOG_REF below to different value. */
 493  #define GENERIC_THERM_VREF 5
 494  /** Number of entries in generated table. One entry takes 4 bytes. Higher number of entries increase computation time too.
 495  Value is used for all generic tables created. */
 496  #define GENERIC_THERM_NUM_ENTRIES 33
 497  
 498  // uncomment the following line for MAX6675 support.
 499  //#define SUPPORT_MAX6675
 500  
 501  // ############# Heated bed configuration ########################
 502  
 503  /** \brief Set true if you have a heated bed conected to your board, false if not */
 504  #define HAVE_HEATED_BED true
 505  
 506  #define HEATED_BED_MAX_TEMP 125
 507  /** Skip M190 wait, if heated bed is already within x degrees. Fixed numbers only, 0 = off. */
 508  #define SKIP_M190_IF_WITHIN 5
 509  
 510  // Select type of your heated bed. It's the same as for EXT0_TEMPSENSOR_TYPE
 511  // set to 0 if you don't have a heated bed
 512  #define HEATED_BED_SENSOR_TYPE 97
 513  /** Analog pin of analog sensor to read temperature of heated bed.  */
 514  #define HEATED_BED_SENSOR_PIN TEMP_BED_PIN
 515  /** \brief Pin to enable heater for bed. */
 516  #define HEATED_BED_HEATER_PIN HEATER_BED_PIN
 517  // How often the temperature of the heated bed is set (msec)
 518  #define HEATED_BED_SET_INTERVAL 5000
 519  
 520  /**
 521  Heat manager for heated bed:
 522  0 = Bang Bang, fast update
 523  1 = PID controlled
 524  2 = Bang Bang, limited check every HEATED_BED_SET_INTERVAL. Use this with relais driven beds to save life
 525  */
 526  #define HEATED_BED_HEAT_MANAGER 1
 527  /** \brief The maximum value, I-gain can contribute to the output. 
 528  
 529  A good value is slightly higher then the output needed for your temperature.
 530  Values for starts:
 531  130 => PLA for temperatures from 170-180°C
 532  180 => ABS for temperatures around 240°C
 533  
 534  The precise values may differ for different nozzle/resistor combination. 
 535   Overridden if EEPROM activated.
 536  */
 537  #define HEATED_BED_PID_INTEGRAL_DRIVE_MAX 255
 538  /** \brief lower value for integral part
 539  
 540  The I state should converge to the exact heater output needed for the target temperature.
 541  To prevent a long deviation from the target zone, this value limits the lower value.
 542  A good start is 30 lower then the optimal value. You need to leave room for cooling.
 543   Overridden if EEPROM activated.
 544  */
 545  #define HEATED_BED_PID_INTEGRAL_DRIVE_MIN 80
 546  /** P-gain.  Overridden if EEPROM activated. */
 547  #define HEATED_BED_PID_PGAIN   15
 548  /** I-gain  Overridden if EEPROM activated.*/
 549  #define HEATED_BED_PID_IGAIN   0.9
 550  /** Dgain.  Overridden if EEPROM activated.*/
 551  #define HEATED_BED_PID_DGAIN 40
 552  // maximum time the heater is can be switched on. Max = 255.  Overridden if EEPROM activated.
 553  #define HEATED_BED_PID_MAX 255
 554  
 555  /** Include PID control for all heaters. */
 556  #define TEMP_PID true
 557  
 558  //// Experimental watchdog and minimal temp
 559  // The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
 560  // If the temperature has not increased at the end of that period, the target temperature is set to zero. It can be reset with another M104/M109
 561  //#define WATCHPERIOD 5000 //5 seconds
 562  
 563  //// The minimal temperature defines the temperature below which the heater will not be enabled
 564  #define MINTEMP 5
 565  
 566  //// Experimental max temp
 567  // When temperature exceeds max temp, your heater will be switched off.
 568  // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
 569  // You should use MINTEMP for thermistor short/failure protection.
 570  #define MAXTEMP 260
 571  
 572  /** \brief Used reference, normally ANALOG_REF_AVCC or ANALOG_REF_AREF for experts ANALOG_REF_INT_2_56 = 2.56V and ANALOG_REF_INT_1_1=1.1V inernaly generated */
 573  #define ANALOG_REF ANALOG_REF_AVCC
 574  
 575  
 576  // ##########################################################################################
 577  // ##                            Endstop configuration                                     ##
 578  // ##########################################################################################
 579  
 580  /* By default all endstops are pulled up to high. You need a pullup if you
 581  use a mechanical endstop connected with gnd. Set value to false for no pullup
 582  on this endstop.
 583  */
 584  #define ENDSTOP_PULLUP_X_MIN true
 585  #define ENDSTOP_PULLUP_Y_MIN true
 586  #define ENDSTOP_PULLUP_Z_MIN true
 587  #define ENDSTOP_PULLUP_X_MAX true
 588  #define ENDSTOP_PULLUP_Y_MAX true
 589  #define ENDSTOP_PULLUP_Z_MAX true
 590  
 591  //set to true to invert the logic of the endstops
 592  #define ENDSTOP_X_MIN_INVERTING true
 593  #define ENDSTOP_Y_MIN_INVERTING true
 594  #define ENDSTOP_Z_MIN_INVERTING true
 595  #define ENDSTOP_X_MAX_INVERTING false
 596  #define ENDSTOP_Y_MAX_INVERTING false
 597  #define ENDSTOP_Z_MAX_INVERTING false
 598  
 599  // Set the values true where you have a hardware endstop. The Pin numbe ris taken from pins.h.
 600  
 601  #define MIN_HARDWARE_ENDSTOP_X false
 602  #define MIN_HARDWARE_ENDSTOP_Y false
 603  #define MIN_HARDWARE_ENDSTOP_Z false
 604  #define MAX_HARDWARE_ENDSTOP_X true
 605  #define MAX_HARDWARE_ENDSTOP_Y true
 606  #define MAX_HARDWARE_ENDSTOP_Z true
 607  
 608  //If your axes are only moving in one direction, make sure the endstops are connected properly.
 609  //If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here
 610  
 611  
 612  
 613  //// ADVANCED SETTINGS - to tweak parameters
 614  
 615  // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
 616  #define X_ENABLE_ON 0
 617  #define Y_ENABLE_ON 0
 618  #define Z_ENABLE_ON 0
 619  
 620  // Disables axis when it's not being used.
 621  #define DISABLE_X false
 622  #define DISABLE_Y false
 623  #define DISABLE_Z false
 624  #define DISABLE_E false
 625  
 626  // Inverting axis directions are easy, if you find one axis is moving the wrong direction, change the false to true or true to false and re-upload your firmware.  For the extruder, go above to
 627  // extruder_inverse true/false line to reverse it's direction
 628  #define INVERT_X_DIR false
 629  #define INVERT_Y_DIR false
 630  #define INVERT_Z_DIR false
 631  
 632  //// ENDSTOP SETTINGS:
 633  // Sets direction of endstops when homing; 1=MAX, -1=MIN
 634  #define X_HOME_DIR 1
 635  #define Y_HOME_DIR 1
 636  #define Z_HOME_DIR 1
 637  
 638  // Delta robot radius endstop.  This will calculate a maximum position that the end effector can reach, and prevent moves outside it's reachable area.  It uses
 639  // the MAX_LENGTH defines below for each tower to convert into the maximum allowable movements.
 640  #define max_software_endstop_r true
 641  
 642  //If true, axis won't move to coordinates less than zero.
 643  #define min_software_endstop_x false
 644  #define min_software_endstop_y false
 645  #define min_software_endstop_z false
 646  
 647  //If true, axis won't move to coordinates greater than the defined lengths below.
 648  #define max_software_endstop_x true
 649  #define max_software_endstop_y true
 650  #define max_software_endstop_z true
 651  
 652  // If during homing the endstop is reached, ho many mm should the printer move back for the second try
 653  #define ENDSTOP_X_BACK_MOVE 10
 654  #define ENDSTOP_Y_BACK_MOVE 10
 655  #define ENDSTOP_Z_BACK_MOVE 10
 656  
 657  // For higher precision you can reduce the speed for the second test on the endstop
 658  // during homing operation. The homing speed is divided by the value. 1 = same speed, 2 = half speed
 659  #define ENDSTOP_X_RETEST_REDUCTION_FACTOR 4
 660  #define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 4
 661  #define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 4
 662  
 663  // When you have several endstops in one circuit you need to disable it after homing by moving a
 664  // small amount back. This is also the case with H-belt systems.
 665  #define ENDSTOP_X_BACK_ON_HOME 5.0
 666  #define ENDSTOP_Y_BACK_ON_HOME 5.0
 667  #define ENDSTOP_Z_BACK_ON_HOME 5.0
 668  
 669  // You can disable endstop checking for print moves. This is needed, if you get sometimes
 670  // false signals from your endstops. If your endstops don't give false signals, you
 671  // can set it on for safety.
 672  #define ALWAYS_CHECK_ENDSTOPS true
 673  
 674  // maximum positions in mm - only fixed numbers!
 675  // For delta robot Z_MAX_LENGTH is maximum travel of the towers and should be set to the distance between the hotend
 676  // and the platform when the printer is at its home position.
 677  // If EEPROM is enabled these values will be overidden with the values in the EEPROM
 678  #define X_MAX_LENGTH 365.0
 679  #define Y_MAX_LENGTH 365.0
 680  #define Z_MAX_LENGTH 365.0  // Set this to your appx maximum Z height from home position to table measred from the nozzle tip.  You can fine-tune this with either the endstop screws or eeprom settings in Repetier Host
 681  
 682  // Coordinates for the minimum axis. Can also be negative if you want to have the bed start at 0 and the printer can go to the left side
 683  // of the bed. Maximum coordinate is given by adding the above X_MAX_LENGTH values.
 684  #define X_MIN_POS 0
 685  #define Y_MIN_POS 0
 686  #define Z_MIN_POS 0
 687  
 688  // ##########################################################################################
 689  // ##                           Movement settings                                          ##
 690  // ##########################################################################################
 691  
 692  // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. Currently only works for RAMBO boards
 693  #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
 694  
 695  // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
 696  #define MOTOR_CURRENT {195,195,195,195,0} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
 697  //#define MOTOR_CURRENT {35713,35713,35713,35713,35713} // Values 0-65535 (3D Master 35713 = ~1A)
 698  
 699  // Delta settings
 700  #if DRIVE_SYSTEM==3
 701  /** \brief Delta rod length
 702  */
 703  #define DELTA_DIAGONAL_ROD 269.0 // mm
 704  
 705  /** \brief Number of segments to generate for delta conversions per second of move
 706  */
 707  #define DELTA_SEGMENTS_PER_SECOND_PRINT 200 // Move accurate setting for print moves
 708  #define DELTA_SEGMENTS_PER_SECOND_MOVE 200 // Less accurate setting for other moves
 709  
 710  /** \brief Horizontal offset of the universal joints on the end effector (moving platform).
 711  */
 712  #define END_EFFECTOR_HORIZONTAL_OFFSET 33
 713  
 714  /** \brief Horizontal offset of the universal joints on the vertical carriages.
 715  */
 716  #define CARRIAGE_HORIZONTAL_OFFSET 35
 717  
 718  /** \brief Printer radius in mm, measured from the center of the print area to the vertical smooth rod.
 719  */
 720  //##############  Delta Convex/Concave adjustments  ######################
 721  //Use this value to adjust your sweeping motion of the platform.  If your nozzle is raising in the center, raise this value by .5 at a time, if it's lowering in the center
 722  // lower it by .5 at a time until it sweeps across the table nice and flat
 723  #define PRINTER_RADIUS 198.25
 724  
 725  /**  \brief Horizontal distance bridged by the diagonal push rod when the end effector is in the center. It is pretty close to 50% of the push rod length (250 mm).
 726  */
 727  #define DELTA_RADIUS (PRINTER_RADIUS-END_EFFECTOR_HORIZONTAL_OFFSET-CARRIAGE_HORIZONTAL_OFFSET+0.0)
 728  
 729  /** \brief Enable counter to count steps for Z max calculations
 730  */
 731  #define STEP_COUNTER
 732  
 733  /** \brief Experimental calibration utility for delta printers
 734  */
 735  #define SOFTWARE_LEVELING
 736  
 737  #endif
 738  
 739  /** After x seconds of inactivity, the stepper motors are disabled.
 740      Set to 0 to leave them enabled.
 741      This helps cooling the Stepper motors between two print jobs. 
 742      Overridden if EEPROM activated.
 743  */
 744  #define STEPPER_INACTIVE_TIME 600
 745  /** After x seconds of inactivity, the system will go down as far it can.
 746      It will at least disable all stepper motors and heaters. If the board has
 747      a power pin, it will be disabled, too. 
 748      Set value to 0 for disabled.  
 749      Overridden if EEPROM activated. 
 750  */
 751  #define MAX_INACTIVE_TIME 900
 752  /** Maximum feedrate, the system allows. Higher feedrates are reduced to these values.
 753      The axis order in all axis related arrays is X, Y, Z
 754       Overridden if EEPROM activated.
 755      */
 756  #define MAX_FEEDRATE_X 150
 757  #define MAX_FEEDRATE_Y 150
 758  #define MAX_FEEDRATE_Z 150
 759  
 760  /** Speed in mm/min for finding the home position.  Overridden if EEPROM activated. */
 761  #define HOMING_FEEDRATE_X 60
 762  #define HOMING_FEEDRATE_Y 60
 763  #define HOMING_FEEDRATE_Z 60
 764  
 765  /* If you have a backlash in both z-directions, you can use this. For most printer, the bed will be pushed down by it's
 766  own weight, so this is nearly never needed. */
 767  #define ENABLE_BACKLASH_COMPENSATION false
 768  #define Z_BACKLASH 0
 769  #define X_BACKLASH 0
 770  #define Y_BACKLASH 0
 771  
 772  /** Comment this to disable ramp acceleration */
 773  #define RAMP_ACCELERATION 1
 774  
 775  /** If your stepper needs a longer high signal then given, you can add a delay here.
 776  The delay is realized as a simple loop wasting time, which is not available for other
 777  computations. So make it as low as possible. For the most common drivers no delay is needed, as the
 778  included delay is already enough.
 779  */
 780  #define STEPPER_HIGH_DELAY 0
 781  
 782  /** The firmware can only handle 16000Hz interrupt frequency cleanly. If you need higher speeds 
 783  a faster solution is needed, and this is to double/quadruple the steps in one interrupt call.
 784  This is like reducing your 1/16th microstepping to 1/8 or 1/4. It is much cheaper then 1 or 3
 785  additional stepper interrupts with all it's overhead. As a result you can go as high as
 786  40000Hz.
 787  */
 788  #define STEP_DOUBLER_FREQUENCY 12000
 789  /** If you need frequencies off more then 30000 you definitely need to enable this. If you have only 1/8 stepping 
 790  enabling this may cause to stall your moves when 20000Hz is reached.
 791  */
 792  #define ALLOW_QUADSTEPPING true
 793  /** If you reach STEP_DOUBLER_FREQUENCY the firmware will do 2 or 4 steps with nearly no delay. That can be too fast
 794  for some printers causing an early stall. 
 795  
 796  */
 797  #define DOUBLE_STEP_DELAY 1 // time in us
 798  
 799  /** The firmware supports trajectory smoothing. To acieve this, it divides the stepsize by 2, resulting in
 800  the double computation cost. For slow movements this is not an issue, but for really fast moves this is 
 801  too much. The value specified here is the number of clock cycles between a step on the driving axis.
 802  If the interval at full speed is below this value, smoothing is disabled for that line.*/
 803  #define MAX_HALFSTEP_INTERVAL 1999
 804  
 805  
 806  
 807  
 808  //######################################################################
 809  //##            Acceleration and Jerk settings                        ##
 810  //######################################################################
 811  
 812  // X, Y, Z max acceleration in mm/s^2 for printing moves or retracts. Overridden if EEPROM activated.
 813  
 814  #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 1200
 815  #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1200
 816  #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 1200
 817  
 818  // X, Y, Z max acceleration in mm/s^2 for travel (non-printing) moves.  Overridden if EEPROM activated.
 819  #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 1200
 820  #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1200
 821  #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 1200
 822  
 823  
 824  // Make the Jerk Settings identical for Delta printers
 825  #define MAX_JERK  6.8
 826  #define MAX_ZJERK 6.8
 827  
 828  
 829  
 830  
 831  /** \brief Number of moves we can cache in advance.
 832  
 833  This number of moves can be cached in advance. If you wan't to cache more, increase this. Especially on
 834  many very short moves the cache may go empty. The minimum value is 5.
 835  */
 836  #define MOVE_CACHE_SIZE 16
 837  
 838  /** \brief Low filled cache size. 
 839  
 840  If the cache contains less then MOVE_CACHE_LOW segments, the time per segment is limited to LOW_TICKS_PER_MOVE clock cycles.
 841  If a move would be shorter, the feedrate will be reduced. This should prevent buffer underflows. Set this to 0 if you
 842  don't care about empty buffers during print.
 843  */
 844  #define MOVE_CACHE_LOW 10
 845  /** \brief Cycles per move, if move cache is low. 
 846  
 847  This value must be high enough, that the buffer has time to fill up. The problem only occurs at the beginning of a print or
 848  if you are printing many very short segments at high speed. Higher delays here allow higher values in PATH_PLANNER_CHECK_SEGMENTS.
 849  */
 850  #define LOW_TICKS_PER_MOVE 250000
 851  
 852  
 853  
 854  
 855  
 856  // ##########################################################################################
 857  // ##                           Extruder control                                           ##
 858  // ##########################################################################################
 859  
 860  /** \brief Prescale factor, timer0 runs at.
 861  
 862  All known arduino boards use 64. This value is needed for the extruder timing. */
 863  #define TIMER0_PRESCALE 64
 864  
 865  /*  Minimum temperature for extruder operation
 866  
 867  This is a saftey value. If your extruder temperature is below this temperature, no
 868  extruder steps are executed. This is to prevent your extruder to move unless the fiament
 869  is at least molten. After having some complains that the extruder does not work, I leave
 870  it 0 as default.
 871  */
 872  
 873  #define MIN_EXTRUDER_TEMP 0
 874  
 875  
 876  /*   Activate ooze prevention system 
 877  
 878  The ooze prevention system tries to prevent ooze, by a fast retract of the filament every time
 879  printing stops. Most slicing software have already an option to do this. Using OPS_MODE=1 will
 880  in fact mimic this. This works good, but can increase printing time. To reduce the additional
 881  waiting time, the OPS has a fast mode, which performs the retraction during the travelling move.
 882  The only reason, your slicer doesn't do it, is because it can't tell. There is simple no
 883  G-Code command telling the firmware to do that.
 884  
 885  You can always compile including OPS. Then you can disable/enable it anytime you want. To disable it
 886  set USE_OPS 0
 887  
 888  Caution: Don't enable anti-ooze in your slicer if you are using this. 
 889  */
 890  #define USE_OPS 1
 891  
 892  /** \brief Sets the ops operation mode
 893  
 894  0: Off
 895  1: Classic mode. Stop head, retract move to target, push filament back.
 896  2: Fast mode. Retract during move, start pushing back the filament during move. For safty, we start
 897     at with a low speed and wait for the push back, before the pintmove starts. Normally there is some
 898     time needed to wait for the filament.
 899  
 900   Overridden if EEPROM activated.
 901  */
 902  #define OPS_MODE 0
 903  
 904  /** \brief Minimum distance for retraction.
 905  
 906  If a travel move is shorter than this distance, no retraction will occur. This is to prevent
 907  retraction with infill, where the angle to the perimeter needs a short stop. Unit is mm.
 908   Overridden if EEPROM activated.
 909  */
 910  #define OPS_MIN_DISTANCE 5.0
 911  
 912  /** \brief Move printhead only after x% of retract distance have been retracted.
 913  
 914   Overridden if EEPROM activated.*/
 915  #define OPS_MOVE_AFTER 50.0
 916  /** \brief Retraction distance in mm. If you want to enable OPS only sometimes, compile with
 917  OPS support and set retraction distance to 0. If you set it to e.g. 3 in your eeprom settings it is enabled.
 918   Overridden if EEPROM activated.*/
 919  #define OPS_RETRACT_DISTANCE 4.5
 920  
 921  /** \brief Backslash produced by extruder reversal
 922  
 923  If you are using a bowden extruder, you may need some extra distance to push the filament back into the 
 924  original place. This is the value you enter here. Unit is mm.
 925   Overridden if EEPROM activated.
 926  */
 927  #define OPS_RETRACT_BACKLASH 0.0
 928  
 929  /** \brief Enable advance algorithm.
 930  
 931  Without a correct adjusted advance algorithm, you get blobs at points, where acceleration changes. The
 932  effect increases with speed and acceleration difference. Using the advance method decreases this effect.
 933  For more informations, read the wiki.
 934  */
 935  #define USE_ADVANCE
 936  
 937  /** \brief enables quadratic component.
 938  
 939  Uncomment to allow a quadratic advance dependency. Linear is the dominant value, so no real need
 940  to activate the quadratic term. Only adds lots of computations and storage usage. */
 941  //#define ENABLE_QUADRATIC_ADVANCE
 942  
 943  
 944  // ##########################################################################################
 945  // ##                           Communication configuration                                ##
 946  // ##########################################################################################
 947  
 948  //   AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!!
 949  
 950  /** \brief Communication speed.
 951  
 952  - 250000 : Fastes with errorrate of 0% with 16 or 32 MHz - update wiring_serial.c in your board files. See boards/readme.txt
 953  - 115200 : Fast, but may produce communication errors on quite regular basis, Error rate -3,5%
 954  - 76800 : Best setting for Arduino with 16 MHz, Error rate 0,2% page 198 AVR1284 Manual. Result: Faster communication then 115200
 955  - 57600 : Should produce nearly no errors, on my gen 6 it's faster than 115200 because there are no errors slowing down the connection
 956  - 38600
 957  
 958   Overridden if EEPROM activated.
 959  */
 960  //#define BAUDRATE 76800
 961  //#define BAUDRATE 57600
 962  //#define BAUDRATE 115200 //uncomment this line for Linux and comment out the 250000 line
 963  #define BAUDRATE 250000
 964  
 965  /**
 966  Some boards like Gen7 have a power on pin, to enable the atx power supply. If this is defined,
 967  the power will be turned on without the need to call M80 if initially started.
 968  */
 969  #define ENABLE_POWER_ON_STARTUP
 970  
 971  /** What shall the printer do, when it receives an M112 emergency stop signal?
 972   0 = Disable heaters/motors, wait for ever until someone presses reset.
 973   1 = restart by resetting the AVR controller. The USB connection will not reset if managed by a different chip!
 974  */
 975  #define KILL_METHOD 1
 976  
 977  /** \brief Cache size for incoming commands.
 978  
 979  There should be no reason to increase this cache. Commands are nearly immediately send to
 980  execution.
 981  */
 982  #define GCODE_BUFFER_SIZE 2
 983  /** Appends the linenumber after ever ok send, to acknowledge the received command. Uncomment for plain ok ACK if your host has problems with this */
 984  #define ACK_WITH_LINENUMBER
 985  /** Communication errors can swollow part of the ok, which tells the host software to send
 986  the next command. Not receiving it will cause your printer to stop. Sending this string every
 987  second, if our queue is empty should prevent this. Uncomment if you don't wan't this feature. */
 988  #define WAITING_IDENTIFIER "wait"
 989  
 990  /** \brief Sets time for echo debug
 991  
 992  You can set M111 1 which enables ECHO of commands send. This define specifies the position,
 993  when it will be executed. In the original FiveD software, echo is done after receiving the
 994  command. With checksum you know, how it looks from the sending string. With this define
 995  uncommented, you will see the last command executed. To be more specific: It is written after
 996  execution. This helps tracking errors, because there may be 8 or more commands in the queue
 997  and it is elsewise difficult to know, what your reprap is currently doing.
 998  */
 999  #define ECHO_ON_EXECUTE
1000  
1001  
1002  
1003  /* ########################################################################################
1004     ##                               EEPROM and SD Card SETTINGS                          ##
1005     ########################################################################################  
1006  Set the EEPROM_MODE to 0 if you always wan't to use the settings in this configuration file. If not,
1007  set it to 1. If you later want to overwrite your current
1008  eeprom settings with configuration defaults, just change EEPROM_MODE to 0 and upload, then power cycle your board.
1009  
1010  IMPORTANT: With mode 1 some changes in configuration.h are not set any more, as they are 
1011             taken from the EEPROM.  If you have changed your firmware, and uploaded it, and the
1012             values havn't changed, it's prob. because you have eeprom mode 1 selected.
1013  */
1014  #define EEPROM_MODE 1
1015  
1016  
1017  //  SD Card Settings
1018  #define SDSUPPORT true   // Set to false to disable SD support
1019  #ifndef SDSUPPORT  // Some boards have sd support on board. These define the values already in pins.h
1020  #define SDSUPPORT false
1021  #define SD_ALLOW_LONG_NAMES true  // If set to false all files with longer names then 8.3 or having a title in the name will be hidden 
1022  #define SDCARDDETECT 81  // Uncomment to enable or changed card detection pin. With card detection the card is mounted on insertion 
1023  #define SDCARDDETECTINVERTED false  // Change to true if you get a inserted message on removal.
1024  #endif
1025  
1026  /** Show extended directory including file length. Don't use this with pronterface! */
1027  #define SD_EXTENDED_DIR
1028  // If you want support for G2/G3 arc commands set to true, otherwise false.
1029  #define ARC_SUPPORT false
1030  
1031  /** You can store the current position with M401 and go back to it with M402. 
1032     This works only if feature is set to true. */
1033  #define FEATURE_MEMORY_POSITION true
1034  
1035  /** Should support for fan control be compiled in. If you enable this make sure 
1036  the FAN pin is not the same as for your second extruder. RAMPS e.g. has FAN_PIN in 9 which
1037  is also used for the heater if you have 2 extruders connected. */
1038  #define FEATURE_FAN_CONTROL true
1039  
1040  /** For displays and keys there are too many permutations to handle them all in once.
1041  For the most common available combinations you can set the controller type here, so
1042  you don't need to configure uicong.h at all. Controller settings > 1 disable usage
1043  of uiconfig.h
1044  
1045  0 = no display
1046  1 = Manual definition of display and keys parameter in uiconfig.h
1047  
1048  The following settings override uiconfig.h!
1049  2 = Smartcontroller on a RAMPS from reprapdiscount
1050  3 = Adafruit RGB controller
1051  4 = Foltyn 3DMaster with display attached
1052  */
1053  #define FEATURE_CONTROLLER 1
1054  
1055  /**
1056  Select the language to use.
1057  0 = english
1058  1 = german
1059  2 = dutch
1060  */
1061  #define UI_LANGUAGE 0
1062  
1063  // This is line 2 of the status display at startup
1064  #define UI_VERSION_STRING2 "Rostock MAX"
1065  
1066  /** How many ms should a single page be shown, until it is switched to the next one.*/
1067  #define UI_PAGES_DURATION 4000
1068  
1069  /** Uncomment if you don't want automatic page switching. You can still switch the
1070  info pages with next/previous button/click-encoder */
1071  #define UI_DISABLE_AUTO_PAGESWITCH true
1072  
1073  /** Time to return to info menu if x millisconds no key was pressed. Set to 0 to disable it. */
1074  #define UI_AUTORETURN_TO_MENU_AFTER 30000
1075  
1076  #define FEATURE_UI_KEYS 0
1077  
1078  /* Normally cou want a next/previous actions with every click of your encoder.
1079  Unfotunately, the encoder have a different count of phase changes between clicks.
1080  Select an encoder speed from 0 = fastest to 2 = slowest that results in one menu move per click.
1081  */
1082  #define UI_ENCODER_SPEED 1
1083  /** \brief bounce time of keys in milliseconds */
1084  #define UI_KEY_BOUNCETIME 10
1085  
1086  /** \brief First time in ms until repeat of action. */
1087  #define UI_KEY_FIRST_REPEAT 500
1088  /** \brief Reduction of repeat time until next execution. */
1089  #define UI_KEY_REDUCE_REPEAT 50
1090  /** \brief Lowest repeat time. */
1091  #define UI_KEY_MIN_REPEAT 50
1092  
1093  #define FEATURE_BEEPER true
1094  /**
1095  Beeper sound definitions for short beeps during key actions
1096  and longer beeps for important actions.
1097  Parameter is is delay in microseconds and the secons is the number of repetitions.
1098  Values must be in range 1..255
1099  */
1100  #define BEEPER_SHORT_SEQUENCE 2,2
1101  #define BEEPER_LONG_SEQUENCE 8,8
1102  
1103  // ###############################################################################
1104  // ##                         Values for menu settings                          ##
1105  // ###############################################################################
1106  
1107  // Values used for preheat
1108  #define UI_SET_PRESET_HEATED_BED_TEMP_PLA 50                      
1109  #define UI_SET_PRESET_EXTRUDER_TEMP_PLA   160
1110  #define UI_SET_PRESET_HEATED_BED_TEMP_ABS 80
1111  #define UI_SET_PRESET_EXTRUDER_TEMP_ABS   200
1112  // Extreme values 
1113  #define UI_SET_MIN_HEATED_BED_TEMP  35
1114  #define UI_SET_MAX_HEATED_BED_TEMP 125
1115  #define UI_SET_MIN_EXTRUDER_TEMP   150
1116  #define UI_SET_MAX_EXTRUDER_TEMP   260
1117  #define UI_SET_EXTRUDER_FEEDRATE 3 // mm/sec
1118  #define UI_SET_EXTRUDER_RETRACT_DISTANCE 3 // mm
1119  
1120  #endif
1121