My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Configuration.h 8.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. #ifndef CONFIGURATION_H
  2. #define CONFIGURATION_H
  3. //#define DEBUG_STEPS
  4. #define MM_PER_ARC_SEGMENT 1
  5. #define N_ARC_CORRECTION 25
  6. // BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
  7. //// The following define selects which electronics board you have. Please choose the one that matches your setup
  8. // MEGA/RAMPS up to 1.2 = 3,
  9. // RAMPS 1.3 = 33
  10. // Gen6 = 5,
  11. // Sanguinololu 1.2 and above = 62
  12. // Ultimaker = 7,
  13. #define MOTHERBOARD 7
  14. //#define MOTHERBOARD 5
  15. //// Thermistor settings:
  16. // 1 is 100k thermistor
  17. // 2 is 200k thermistor
  18. // 3 is mendel-parts thermistor
  19. // 4 is 10k thermistor
  20. // 5 is ParCan supplied 104GT-2 100K
  21. // 6 is EPCOS 100k
  22. // 7 is 100k Honeywell thermistor 135-104LAG-J01
  23. #define THERMISTORHEATER_1 3
  24. #define THERMISTORHEATER_2 3
  25. #define THERMISTORBED 3
  26. //#define HEATER_0_USES_THERMISTOR
  27. //#define HEATER_1_USES_THERMISTOR
  28. #define HEATER_0_USES_AD595
  29. //#define HEATER_1_USES_AD595
  30. // Select one of these only to define how the bed temp is read.
  31. //#define BED_USES_THERMISTOR
  32. //#define BED_USES_AD595
  33. #define HEATER_CHECK_INTERVAL 50
  34. #define BED_CHECK_INTERVAL 5000
  35. //// Endstop Settings
  36. #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
  37. // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
  38. const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
  39. // For optos H21LOB set to true, for Mendel-Parts newer optos TCST2103 set to false
  40. // This determines the communication speed of the printer
  41. #define BAUDRATE 250000
  42. //#define BAUDRATE 115200
  43. //#define BAUDRATE 230400
  44. // Comment out (using // at the start of the line) to disable SD support:
  45. // #define ULTRA_LCD //any lcd
  46. #define ULTIPANEL
  47. #define ULTIPANEL
  48. #ifdef ULTIPANEL
  49. //#define NEWPANEL //enable this if you have a click-encoder panel
  50. #define SDSUPPORT
  51. #define ULTRA_LCD
  52. #define LCD_WIDTH 20
  53. #define LCD_HEIGHT 4
  54. #else //no panel but just lcd
  55. #ifdef ULTRA_LCD
  56. #define LCD_WIDTH 16
  57. #define LCD_HEIGHT 2
  58. #endif
  59. #endif
  60. //#define SDSUPPORT // Enable SD Card Support in Hardware Console
  61. const int dropsegments=5; //everything with this number of steps will be ignored as move
  62. //// ADVANCED SETTINGS - to tweak parameters
  63. #include "thermistortables.h"
  64. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  65. #define X_ENABLE_ON 0
  66. #define Y_ENABLE_ON 0
  67. #define Z_ENABLE_ON 0
  68. #define E_ENABLE_ON 0
  69. // Disables axis when it's not being used.
  70. #define DISABLE_X false
  71. #define DISABLE_Y false
  72. #define DISABLE_Z false
  73. #define DISABLE_E false
  74. // Inverting axis direction
  75. #define INVERT_X_DIR true // for Mendel set to false, for Orca set to true
  76. #define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
  77. #define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true
  78. #define INVERT_E_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
  79. //// ENDSTOP SETTINGS:
  80. // Sets direction of endstops when homing; 1=MAX, -1=MIN
  81. #define X_HOME_DIR -1
  82. #define Y_HOME_DIR -1
  83. #define Z_HOME_DIR -1
  84. #define min_software_endstops false //If true, axis won't move to coordinates less than zero.
  85. #define max_software_endstops false //If true, axis won't move to coordinates greater than the defined lengths below.
  86. #define X_MAX_LENGTH 210
  87. #define Y_MAX_LENGTH 210
  88. #define Z_MAX_LENGTH 210
  89. //// MOVEMENT SETTINGS
  90. #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
  91. //note: on bernhards ultimaker 200 200 12 are working well.
  92. #define HOMING_FEEDRATE {50*60, 50*60, 12*60, 0} // set the homing speeds
  93. //the followint checks if an extrusion is existent in the move. if _not_, the speed of the move is set to the maximum speed.
  94. //!!!!!!Use only if you know that your printer works at the maximum declared speeds.
  95. // works around the skeinforge cool-bug. There all moves are slowed to have a minimum layer time. However slow travel moves= ooze
  96. #define TRAVELING_AT_MAXSPEED
  97. #define AXIS_RELATIVE_MODES {false, false, false, false}
  98. #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
  99. // default settings
  100. #define DEFAULT_AXIS_STEPS_PER_UNIT {79.87220447,79.87220447,200*8/3,14} // default steps per unit for ultimaker
  101. #define DEFAULT_MAX_FEEDRATE {160*60, 160*60, 10*60, 500000}
  102. #define DEFAULT_MAX_ACCELERATION {9000,9000,150,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
  103. #define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
  104. #define DEFAULT_RETRACT_ACCELERATION 7000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
  105. #define DEFAULT_MINIMUMFEEDRATE 10 // minimum feedrate
  106. #define DEFAULT_MINTRAVELFEEDRATE 10
  107. // minimum time in microseconds that a movement needs to take if the buffer is emptied. Increase this number if you see blobs while printing high speed & high detail. It will slowdown on the detailed stuff.
  108. #define DEFAULT_MINSEGMENTTIME 20000
  109. #define DEFAULT_XYJERK 30.0*60
  110. #define DEFAULT_ZJERK 10.0*60
  111. // The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
  112. //this enables the watchdog interrupt.
  113. #define USE_WATCHDOG
  114. //you cannot reboot on a mega2560 due to a bug in he bootloader. Hence, you have to reset manually, and this is done hereby:
  115. #define RESET_MANUAL
  116. #define WATCHDOG_TIMEOUT 4
  117. //// Experimental watchdog and minimal temp
  118. // The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
  119. // 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
  120. /// CURRENTLY NOT IMPLEMENTED AND UNUSEABLE
  121. //#define WATCHPERIOD 5000 //5 seconds
  122. // Actual temperature must be close to target for this long before M109 returns success
  123. //#define TEMP_RESIDENCY_TIME 20 // (seconds)
  124. //#define TEMP_HYSTERESIS 5 // (C°) range of +/- temperatures considered "close" to the target one
  125. //// The minimal temperature defines the temperature below which the heater will not be enabled
  126. #define HEATER_0_MINTEMP 5
  127. //#define HEATER_1_MINTEMP 5
  128. //#define BED_MINTEMP 5
  129. // When temperature exceeds max temp, your heater will be switched off.
  130. // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
  131. // You should use MINTEMP for thermistor short/failure protection.
  132. #define HEATER_0_MAXTEMP 275
  133. //#define_HEATER_1_MAXTEMP 275
  134. //#define BED_MAXTEMP 150
  135. #define PIDTEMP
  136. #ifdef PIDTEMP
  137. /// PID settings:
  138. // Uncomment the following line to enable PID support.
  139. //#define SMOOTHING
  140. //#define SMOOTHFACTOR 5.0
  141. //float current_raw_average=0;
  142. #define K1 0.95 //smoothing of the PID
  143. //#define PID_DEBUG // Sends debug data to the serial port.
  144. //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
  145. #define PID_MAX 255 // limits current to nozzle
  146. #define PID_INTEGRAL_DRIVE_MAX 255
  147. #define PID_dT 0.1
  148. //machine with red silicon: 1950:45 second ; with fan fully blowin 3000:47
  149. #define PID_CRITIAL_GAIN 3000
  150. #define PID_SWING_AT_CRITIAL 45 //seconds
  151. #define PIDIADD 5
  152. /*
  153. //PID according to Ziegler-Nichols method
  154. float Kp = 0.6*PID_CRITIAL_GAIN;
  155. float Ki =PIDIADD+2*Kp/PID_SWING_AT_CRITIAL*PID_dT;
  156. float Kd = Kp*PID_SWING_AT_CRITIAL/8./PID_dT;
  157. */
  158. //PI according to Ziegler-Nichols method
  159. #define DEFAULT_Kp (PID_CRITIAL_GAIN/2.2)
  160. #define DEFAULT_Ki (1.2*Kp/PID_SWING_AT_CRITIAL*PID_dT)
  161. #define DEFAULT_Kd (0)
  162. #define PID_ADD_EXTRUSION_RATE
  163. #ifdef PID_ADD_EXTRUSION_RATE
  164. #define DEFAULT_Kc (5) //heatingpower=Kc*(e_speed)
  165. #endif
  166. #endif // PIDTEMP
  167. // extruder advance constant (s2/mm3)
  168. //
  169. // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTUDER_ADVANCE_K * cubic mm per second ^ 2
  170. //
  171. // hooke's law says: force = k * distance
  172. // bernoulli's priniciple says: v ^ 2 / 2 + g . h + pressure / density = constant
  173. // so: v ^ 2 is proportional to number of steps we advance the extruder
  174. //#define ADVANCE
  175. #ifdef ADVANCE
  176. #define EXTRUDER_ADVANCE_K .3
  177. #define D_FILAMENT 1.7
  178. #define STEPS_MM_E 65
  179. #define EXTRUTION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
  180. #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUTION_AREA)
  181. #endif // ADVANCE
  182. // THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, e.g. 8,16,32
  183. #if defined SDSUPPORT
  184. // The number of linear motions that can be in the plan at any give time.
  185. #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
  186. #else
  187. #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
  188. #endif
  189. #endif