My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Configuration.h 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. #ifndef __CONFIGURATION_H
  2. #define __CONFIGURATION_H
  3. // This determines the communication speed of the printer
  4. #define BAUDRATE 250000
  5. //#define BAUDRATE 115200
  6. //#define BAUDRATE 230400
  7. // Frequency limit
  8. // See nophead's blog for more info
  9. #define XY_FREQUENCY_LIMIT 15
  10. // Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
  11. // of the buffer and all stops. This should not be much greater than zero and should only be changed
  12. // if unwanted behavior is observed on a user's machine when running at very slow speeds.
  13. #define MINIMUM_PLANNER_SPEED 2.0 // (mm/sec)
  14. // BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
  15. //// The following define selects which electronics board you have. Please choose the one that matches your setup
  16. // MEGA/RAMPS up to 1.2 = 3,
  17. // RAMPS 1.3 = 33
  18. // Gen6 = 5,
  19. // Sanguinololu 1.2 and above = 62
  20. // Ultimaker = 7,
  21. // Teensylu = 8
  22. #define MOTHERBOARD 7
  23. //===========================================================================
  24. //=============================Thermal Settings ============================
  25. //===========================================================================
  26. //// Thermistor settings:
  27. // 1 is 100k thermistor
  28. // 2 is 200k thermistor
  29. // 3 is mendel-parts thermistor
  30. // 4 is 10k thermistor
  31. // 5 is ParCan supplied 104GT-2 100K
  32. // 6 is EPCOS 100k
  33. // 7 is 100k Honeywell thermistor 135-104LAG-J01
  34. #define THERMISTORHEATER_0 3
  35. #define THERMISTORHEATER_1 3
  36. #define THERMISTORBED 3
  37. //#define HEATER_0_USES_THERMISTOR
  38. //#define HEATER_1_USES_THERMISTOR
  39. #define HEATER_0_USES_AD595
  40. //#define HEATER_1_USES_AD595
  41. // Select one of these only to define how the bed temp is read.
  42. //#define BED_USES_THERMISTOR
  43. //#define BED_USES_AD595
  44. #define HEATER_CHECK_INTERVAL 50 //ms
  45. #define BED_CHECK_INTERVAL 5000 //ms
  46. //// Experimental watchdog and minimal temp
  47. // The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
  48. // 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
  49. /// CURRENTLY NOT IMPLEMENTED AND UNUSEABLE
  50. //#define WATCHPERIOD 5000 //5 seconds
  51. // Actual temperature must be close to target for this long before M109 returns success
  52. //#define TEMP_RESIDENCY_TIME 20 // (seconds)
  53. //#define TEMP_HYSTERESIS 5 // (C°) range of +/- temperatures considered "close" to the target one
  54. //// The minimal temperature defines the temperature below which the heater will not be enabled
  55. #define HEATER_0_MINTEMP 5
  56. //#define HEATER_1_MINTEMP 5
  57. //#define BED_MINTEMP 5
  58. // When temperature exceeds max temp, your heater will be switched off.
  59. // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
  60. // You should use MINTEMP for thermistor short/failure protection.
  61. #define HEATER_0_MAXTEMP 275
  62. //#define_HEATER_1_MAXTEMP 275
  63. //#define BED_MAXTEMP 150
  64. // PID settings:
  65. // Uncomment the following line to enable PID support.
  66. #define PIDTEMP
  67. #ifdef PIDTEMP
  68. //#define PID_DEBUG // Sends debug data to the serial port.
  69. //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
  70. #define PID_MAX 255 // limits current to nozzle; 255=full current
  71. #define PID_INTEGRAL_DRIVE_MAX 255 //limit for the integral term
  72. #define K1 0.95 //smoothing factor withing the PID
  73. #define PID_dT 0.1 //sampling period of the PID
  74. //To develop some PID settings for your machine, you can initiall follow
  75. // the Ziegler-Nichols method.
  76. // set Ki and Kd to zero.
  77. // heat with a defined Kp and see if the temperature stabilizes
  78. // ideally you do this graphically with repg.
  79. // the PID_CRITIAL_GAIN should be the Kp at which temperature oscillatins are not dampned out/decreas in amplitutde
  80. // PID_SWING_AT_CRITIAL is the time for a full period of the oscillations at the critical Gain
  81. // usually further manual tunine is necessary.
  82. #define PID_CRITIAL_GAIN 50
  83. #define PID_SWING_AT_CRITIAL 47 //seconds
  84. //#define PID_PI //no differentail term
  85. #define PID_PID //normal PID
  86. #ifdef PID_PID
  87. //PID according to Ziegler-Nichols method
  88. #define DEFAULT_Kp (0.6*PID_CRITIAL_GAIN)
  89. #define DEFAULT_Ki (2*Kp/PID_SWING_AT_CRITIAL*PID_dT)
  90. #define DEFAULT_Kd (PID_SWING_AT_CRITIAL/8./PID_dT)
  91. #endif
  92. #ifdef PID_PI
  93. //PI according to Ziegler-Nichols method
  94. #define DEFAULT_Kp (PID_CRITIAL_GAIN/2.2)
  95. #define DEFAULT_Ki (1.2*Kp/PID_SWING_AT_CRITIAL*PID_dT)
  96. #define DEFAULT_Kd (0)
  97. #endif
  98. // this adds an experimental additional term to the heatingpower, proportional to the extrusion speed.
  99. // if Kc is choosen well, the additional required power due to increased melting should be compensated.
  100. #define PID_ADD_EXTRUSION_RATE
  101. #ifdef PID_ADD_EXTRUSION_RATE
  102. #define DEFAULT_Kc (3) //heatingpower=Kc*(e_speed)
  103. #endif
  104. #endif // PIDTEMP
  105. //===========================================================================
  106. //=============================Mechanical Settings===========================
  107. //===========================================================================
  108. // Endstop Settings
  109. #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
  110. // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
  111. const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
  112. // For optos H21LOB set to true, for Mendel-Parts newer optos TCST2103 set to false
  113. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  114. #define X_ENABLE_ON 0
  115. #define Y_ENABLE_ON 0
  116. #define Z_ENABLE_ON 0
  117. #define E_ENABLE_ON 0
  118. // Disables axis when it's not being used.
  119. #define DISABLE_X false
  120. #define DISABLE_Y false
  121. #define DISABLE_Z false
  122. #define DISABLE_E false
  123. // Inverting axis direction
  124. //#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
  125. //#define INVERT_Y_DIR true // for Mendel set to true, for Orca set to false
  126. //#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
  127. //#define INVERT_E_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false
  128. #define INVERT_X_DIR true // for Mendel set to false, for Orca set to true
  129. #define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
  130. #define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true
  131. #define INVERT_E_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
  132. //// ENDSTOP SETTINGS:
  133. // Sets direction of endstops when homing; 1=MAX, -1=MIN
  134. #define X_HOME_DIR -1
  135. #define Y_HOME_DIR -1
  136. #define Z_HOME_DIR -1
  137. #define min_software_endstops false //If true, axis won't move to coordinates less than zero.
  138. #define max_software_endstops false //If true, axis won't move to coordinates greater than the defined lengths below.
  139. #define X_MAX_LENGTH 210
  140. #define Y_MAX_LENGTH 210
  141. #define Z_MAX_LENGTH 210
  142. //// MOVEMENT SETTINGS
  143. #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
  144. //note: on bernhards ultimaker 200 200 12 are working well.
  145. #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
  146. #define AXIS_RELATIVE_MODES {false, false, false, false}
  147. #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
  148. // default settings
  149. #define DEFAULT_AXIS_STEPS_PER_UNIT {79.87220447,79.87220447,200*8/3,14} // default steps per unit for ultimaker
  150. //#define DEFAULT_AXIS_STEPS_PER_UNIT {40, 40, 3333.92, 67}
  151. #define DEFAULT_MAX_FEEDRATE {500, 500, 10, 500000} // (mm/min)
  152. #define DEFAULT_MAX_ACCELERATION {9000,9000,100,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.
  153. #define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
  154. #define DEFAULT_RETRACT_ACCELERATION 7000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
  155. #define DEFAULT_MINIMUMFEEDRATE 0 // minimum feedrate
  156. #define DEFAULT_MINTRAVELFEEDRATE 0
  157. // 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.
  158. #define DEFAULT_MINSEGMENTTIME 20000
  159. #define DEFAULT_XYJERK 30.0 // (mm/sec)
  160. #define DEFAULT_ZJERK 0.4 // (mm/sec)
  161. //===========================================================================
  162. //=============================Additional Features===========================
  163. //===========================================================================
  164. // EEPROM
  165. // the microcontroller can store settings in the EEPROM, e.g. max velocity...
  166. // M500 - stores paramters in EEPROM
  167. // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
  168. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
  169. //define this to enable eeprom support
  170. #define EEPROM_SETTINGS
  171. //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
  172. // please keep turned on if you can.
  173. #define EEPROM_CHITCHAT
  174. // The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
  175. // this enables the watchdog interrupt.
  176. #define USE_WATCHDOG
  177. // you cannot reboot on a mega2560 due to a bug in he bootloader. Hence, you have to reset manually, and this is done hereby:
  178. #define RESET_MANUAL
  179. #define WATCHDOG_TIMEOUT 4 //seconds
  180. // extruder advance constant (s2/mm3)
  181. //
  182. // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTUDER_ADVANCE_K * cubic mm per second ^ 2
  183. //
  184. // hooke's law says: force = k * distance
  185. // bernoulli's priniciple says: v ^ 2 / 2 + g . h + pressure / density = constant
  186. // so: v ^ 2 is proportional to number of steps we advance the extruder
  187. //#define ADVANCE
  188. #ifdef ADVANCE
  189. #define EXTRUDER_ADVANCE_K .3
  190. #define D_FILAMENT 1.7
  191. #define STEPS_MM_E 65
  192. #define EXTRUTION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
  193. #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUTION_AREA)
  194. #endif // ADVANCE
  195. //LCD and SD support
  196. //#define ULTRA_LCD //general lcd support, also 16x2
  197. //#define SDSUPPORT // Enable SD Card Support in Hardware Console
  198. #define ULTIPANEL
  199. #ifdef ULTIPANEL
  200. #define NEWPANEL //enable this if you have a click-encoder panel
  201. #define SDSUPPORT
  202. #define ULTRA_LCD
  203. #define LCD_WIDTH 20
  204. #define LCD_HEIGHT 4
  205. #else //no panel but just lcd
  206. #ifdef ULTRA_LCD
  207. #define LCD_WIDTH 16
  208. #define LCD_HEIGHT 2
  209. #endif
  210. #endif
  211. // A debugging feature to compare calculated vs performed steps, to see if steps are lost by the software.
  212. //#define DEBUG_STEPS
  213. // Arc interpretation settings:
  214. #define MM_PER_ARC_SEGMENT 1
  215. #define N_ARC_CORRECTION 25
  216. //automatic temperature: just for testing, this is very dangerous, keep disabled!
  217. // not working yet.
  218. //Erik: the settings currently depend dramatically on skeinforge39 or 41.
  219. //#define AUTOTEMP
  220. #define AUTOTEMP_MIN 190
  221. #define AUTOTEMP_MAX 260
  222. #define AUTOTEMP_FACTOR 1000. //current target temperature= min+largest buffered espeeds)*FACTOR
  223. const int dropsegments=0; //everything with less than this number of steps will be ignored as move and joined with the next movement
  224. //===========================================================================
  225. //=============================Buffers ============================
  226. //===========================================================================
  227. // The number of linear motions that can be in the plan at any give time.
  228. // 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.
  229. #if defined SDSUPPORT
  230. #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
  231. #else
  232. #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
  233. #endif
  234. //The ASCII buffer for recieving from the serial:
  235. #define MAX_CMD_SIZE 96
  236. #define BUFSIZE 4
  237. #include "thermistortables.h"
  238. #endif //__CONFIGURATION_H