My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

Configuration.h.GEN7 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  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. #define EXTRUDERS 1
  8. // Frequency limit
  9. // See nophead's blog for more info
  10. // Not working O
  11. //#define XY_FREQUENCY_LIMIT 15
  12. // Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
  13. // of the buffer and all stops. This should not be much greater than zero and should only be changed
  14. // if unwanted behavior is observed on a user's machine when running at very slow speeds.
  15. #define MINIMUM_PLANNER_SPEED 2.0 // (mm/sec)
  16. // BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
  17. //// The following define selects which electronics board you have. Please choose the one that matches your setup
  18. // MEGA/RAMPS up to 1.2 = 3,
  19. // RAMPS 1.3 = 33
  20. // Gen6 = 5,
  21. // Sanguinololu 1.2 and above = 62
  22. // Gen7 = 77,
  23. // Ultimaker = 7,
  24. // Teensylu = 8
  25. #define MOTHERBOARD 77
  26. //===========================================================================
  27. //=============================Thermal Settings ============================
  28. //===========================================================================
  29. //// Thermistor settings:
  30. // 1 is 100k thermistor
  31. // 2 is 200k thermistor
  32. // 3 is mendel-parts thermistor
  33. // 4 is 10k thermistor
  34. // 5 is ParCan supplied 104GT-2 100K
  35. // 6 is EPCOS 100k
  36. // 7 is 100k Honeywell thermistor 135-104LAG-J01
  37. #define THERMISTORHEATER_0 1
  38. //#define THERMISTORHEATER_1 1
  39. //#define THERMISTORHEATER_2 1
  40. #define HEATER_0_USES_THERMISTOR
  41. //#define HEATER_1_USES_THERMISTOR
  42. //#define HEATER_2_USES_THERMISTOR
  43. //#define HEATER_0_USES_AD595
  44. //#define HEATER_1_USES_AD595
  45. //#define HEATER_2_USES_AD595
  46. // Select one of these only to define how the bed temp is read.
  47. #define THERMISTORBED 1
  48. #define BED_USES_THERMISTOR
  49. //#define BED_LIMIT_SWITCHING
  50. #ifdef BED_LIMIT_SWITCHING
  51. #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
  52. #endif
  53. //#define BED_USES_AD595
  54. #define BED_CHECK_INTERVAL 5000 //ms
  55. //// Heating sanity check:
  56. // This waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
  57. // If the temperature has not increased at the end of that period, the target temperature is set to zero.
  58. // It can be reset with another M104/M109
  59. //#define WATCHPERIOD 20000 //20 seconds
  60. // Actual temperature must be close to target for this long before M109 returns success
  61. #define TEMP_RESIDENCY_TIME 30 // (seconds)
  62. #define TEMP_HYSTERESIS 3 // (C°) range of +/- temperatures considered "close" to the target one
  63. //// The minimal temperature defines the temperature below which the heater will not be enabled
  64. //#define HEATER_0_MINTEMP 5
  65. //#define HEATER_1_MINTEMP 5
  66. //#define HEATER_2_MINTEMP 5
  67. //#define BED_MINTEMP 5
  68. // When temperature exceeds max temp, your heater will be switched off.
  69. // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
  70. // You should use MINTEMP for thermistor short/failure protection.
  71. #define HEATER_0_MAXTEMP 275
  72. //#define HEATER_1_MAXTEMP 275
  73. //#define HEATER_2_MAXTEMP 275
  74. //#define BED_MAXTEMP 150
  75. // Wait for Cooldown
  76. // This defines if the M109 call should not block if it is cooling down.
  77. // example: From a current temp of 220, you set M109 S200.
  78. // if CooldownNoWait is defined M109 will not wait for the cooldown to finish
  79. #define CooldownNoWait true
  80. // Heating is finished if a temperature close to this degree shift is reached
  81. #define HEATING_EARLY_FINISH_DEG_OFFSET 1 //Degree
  82. // PID settings:
  83. // Uncomment the following line to enable PID support.
  84. #define PIDTEMP
  85. #define PID_MAX 255 // limits current to nozzle; 255=full current
  86. #ifdef PIDTEMP
  87. //#define PID_DEBUG // Sends debug data to the serial port.
  88. //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
  89. #define PID_INTEGRAL_DRIVE_MAX 255 //limit for the integral term
  90. #define K1 0.95 //smoothing factor withing the PID
  91. #define PID_dT 0.128 //sampling period of the PID
  92. //To develop some PID settings for your machine, you can initiall follow
  93. // the Ziegler-Nichols method.
  94. // set Ki and Kd to zero.
  95. // heat with a defined Kp and see if the temperature stabilizes
  96. // ideally you do this graphically with repg.
  97. // the PID_CRITIAL_GAIN should be the Kp at which temperature oscillatins are not dampned out/decreas in amplitutde
  98. // PID_SWING_AT_CRITIAL is the time for a full period of the oscillations at the critical Gain
  99. // usually further manual tunine is necessary.
  100. #define PID_CRITIAL_GAIN 50
  101. #define PID_SWING_AT_CRITIAL 47 //seconds
  102. //#define PID_PI //no differentail term
  103. #define PID_PID //normal PID
  104. #ifdef PID_PID
  105. //PID according to Ziegler-Nichols method
  106. // #define DEFAULT_Kp (0.6*PID_CRITIAL_GAIN)
  107. // #define DEFAULT_Ki (2*Kp/PID_SWING_AT_CRITIAL*PID_dT)
  108. // #define DEFAULT_Kd (PID_SWING_AT_CRITIAL/8./PID_dT)
  109. // Ultitmaker
  110. #define DEFAULT_Kp 22.2
  111. #define DEFAULT_Ki (1.25*PID_dT)
  112. #define DEFAULT_Kd (99/PID_dT)
  113. // Makergear
  114. // #define DEFAULT_Kp 7.0
  115. // #define DEFAULT_Ki 0.1
  116. // #define DEFAULT_Kd 12
  117. // Mendel Parts V9 on 12V
  118. // #define DEFAULT_Kp 63.0
  119. // #define DEFAULT_Ki (2.25*PID_dT)
  120. // #define DEFAULT_Kd (440/PID_dT)
  121. #endif
  122. #ifdef PID_PI
  123. //PI according to Ziegler-Nichols method
  124. #define DEFAULT_Kp (PID_CRITIAL_GAIN/2.2)
  125. #define DEFAULT_Ki (1.2*Kp/PID_SWING_AT_CRITIAL*PID_dT)
  126. #define DEFAULT_Kd (0)
  127. #endif
  128. // this adds an experimental additional term to the heatingpower, proportional to the extrusion speed.
  129. // if Kc is choosen well, the additional required power due to increased melting should be compensated.
  130. #define PID_ADD_EXTRUSION_RATE
  131. #ifdef PID_ADD_EXTRUSION_RATE
  132. #define DEFAULT_Kc (1) //heatingpower=Kc*(e_speed)
  133. #endif
  134. #endif // PIDTEMP
  135. // extruder run-out prevention.
  136. //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
  137. //#define EXTRUDER_RUNOUT_PREVENT
  138. #define EXTRUDER_RUNOUT_MINTEMP 190
  139. #define EXTRUDER_RUNOUT_SECONDS 30.
  140. #define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
  141. #define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
  142. #define EXTRUDER_RUNOUT_EXTRUDE 100
  143. //===========================================================================
  144. //=============================Mechanical Settings===========================
  145. //===========================================================================
  146. // Endstop Settings
  147. #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
  148. // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
  149. const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
  150. const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
  151. const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
  152. // For optos H21LOB set to true, for Mendel-Parts newer optos TCST2103 set to false
  153. #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
  154. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  155. #define X_ENABLE_ON 0
  156. #define Y_ENABLE_ON 0
  157. #define Z_ENABLE_ON 0
  158. #define E_ENABLE_ON 0 // For all extruders
  159. // Disables axis when it's not being used.
  160. #define DISABLE_X false
  161. #define DISABLE_Y false
  162. #define DISABLE_Z false
  163. #define DISABLE_E false // For all extruders
  164. // Inverting axis direction
  165. //#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
  166. //#define INVERT_Y_DIR true // for Mendel set to true, for Orca set to false
  167. //#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
  168. //#define INVERT_E*_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false, used for all extruders
  169. #define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
  170. #define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
  171. #define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
  172. #define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
  173. #define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
  174. #define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
  175. //// ENDSTOP SETTINGS:
  176. // Sets direction of endstops when homing; 1=MAX, -1=MIN
  177. #define X_HOME_DIR -1
  178. #define Y_HOME_DIR -1
  179. #define Z_HOME_DIR -1
  180. #define min_software_endstops true //If true, axis won't move to coordinates less than zero.
  181. #define max_software_endstops true //If true, axis won't move to coordinates greater than the defined lengths below.
  182. #define X_MAX_LENGTH 205
  183. #define Y_MAX_LENGTH 205
  184. #define Z_MAX_LENGTH 200
  185. //// MOVEMENT SETTINGS
  186. #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
  187. #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
  188. //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
  189. #define X_HOME_RETRACT_MM 5
  190. #define Y_HOME_RETRACT_MM 5
  191. #define Z_HOME_RETRACT_MM 1
  192. #define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
  193. #define AXIS_RELATIVE_MODES {false, false, false, false}
  194. #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
  195. // default settings
  196. #define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402,78.7402,200*8/3,760*1.1} // default steps per unit for ultimaker
  197. //#define DEFAULT_AXIS_STEPS_PER_UNIT {40, 40, 3333.92, 360} //sells mendel with v9 extruder
  198. //#define DEFAULT_AXIS_STEPS_PER_UNIT {80.3232, 80.8900, 2284.7651, 757.2218} // SAE Prusa w/ Wade extruder
  199. #define DEFAULT_MAX_FEEDRATE {500, 500, 5, 45} // (mm/sec)
  200. #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.
  201. #define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
  202. #define DEFAULT_RETRACT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
  203. #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
  204. #define DEFAULT_MINTRAVELFEEDRATE 0.0
  205. // minimum time in microseconds that a movement needs to take if the buffer is emptied. Increase this number if you see blobs while
  206. //printing high speed & high detail. It will slowdown on the detailed stuff.
  207. #define DEFAULT_MINSEGMENTTIME 20000 // Obsolete delete this
  208. #define DEFAULT_XYJERK 20.0 // (mm/sec)
  209. #define DEFAULT_ZJERK 0.4 // (mm/sec)
  210. // If defined the movements slow down when the look ahead buffer is only half full
  211. #define SLOWDOWN
  212. //default stepper release if idle
  213. #define DEFAULT_STEPPER_DEACTIVE_TIME 60
  214. #define DEFAULT_STEPPER_DEACTIVE_COMMAND "M84 X Y E" //z stays powered
  215. //===========================================================================
  216. //=============================Additional Features===========================
  217. //===========================================================================
  218. // EEPROM
  219. // the microcontroller can store settings in the EEPROM, e.g. max velocity...
  220. // M500 - stores paramters in EEPROM
  221. // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
  222. // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
  223. //define this to enable eeprom support
  224. #define EEPROM_SETTINGS
  225. //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
  226. // please keep turned on if you can.
  227. #define EEPROM_CHITCHAT
  228. // The hardware watchdog should halt the Microcontroller, in case the firmware gets stuck somewhere. However:
  229. // the Watchdog is not working well, so please only enable this for testing
  230. // this enables the watchdog interrupt.
  231. //#define USE_WATCHDOG
  232. //#ifdef USE_WATCHDOG
  233. // you cannot reboot on a mega2560 due to a bug in he bootloader. Hence, you have to reset manually, and this is done hereby:
  234. //#define RESET_MANUAL
  235. //#define WATCHDOG_TIMEOUT 4 //seconds
  236. //#endif
  237. // extruder advance constant (s2/mm3)
  238. //
  239. // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTUDER_ADVANCE_K * cubic mm per second ^ 2
  240. //
  241. // hooke's law says: force = k * distance
  242. // bernoulli's priniciple says: v ^ 2 / 2 + g . h + pressure / density = constant
  243. // so: v ^ 2 is proportional to number of steps we advance the extruder
  244. //#define ADVANCE
  245. #ifdef ADVANCE
  246. #define EXTRUDER_ADVANCE_K .0
  247. #define D_FILAMENT 2.85
  248. #define STEPS_MM_E 836
  249. #define EXTRUTION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
  250. #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUTION_AREA)
  251. #endif // ADVANCE
  252. //LCD and SD support
  253. //#define ULTRA_LCD //general lcd support, also 16x2
  254. //#define SDSUPPORT // Enable SD Card Support in Hardware Console
  255. #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
  256. #define SD_FINISHED_RELEASECOMMAND "M84 X Y E" // no z because of layer shift.
  257. #define ULTIPANEL
  258. #ifdef ULTIPANEL
  259. #define NEWPANEL //enable this if you have a click-encoder panel
  260. #define SDSUPPORT
  261. #define ULTRA_LCD
  262. #define LCD_WIDTH 20
  263. #define LCD_HEIGHT 4
  264. #else //no panel but just lcd
  265. #ifdef ULTRA_LCD
  266. #define LCD_WIDTH 16
  267. #define LCD_HEIGHT 2
  268. #endif
  269. #endif
  270. // A debugging feature to compare calculated vs performed steps, to see if steps are lost by the software.
  271. //#define DEBUG_STEPS
  272. // Arc interpretation settings:
  273. #define MM_PER_ARC_SEGMENT 1
  274. #define N_ARC_CORRECTION 25
  275. //automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
  276. //The maximum buffered steps/sec of the extruder motor are called "se".
  277. //You enter the autotemp mode by a M109 S<mintemp> T<maxtemp> F<factor>
  278. // the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
  279. // you exit the value by any M109 without F*
  280. // Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
  281. // on an ultimaker, some initial testing worked with M109 S215 T260 F0.1 in the start.gcode
  282. //#define AUTOTEMP
  283. #ifdef AUTOTEMP
  284. #define AUTOTEMP_OLDWEIGHT 0.98
  285. #endif
  286. //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
  287. //can be software-disabled for whatever purposes by
  288. #define PREVENT_DANGEROUS_EXTRUDE
  289. #define EXTRUDE_MINTEMP 0
  290. #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
  291. const int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
  292. // M240 Triggers a camera by emulating a Canon RC-1 Remote
  293. // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
  294. // #define PHOTOGRAPH_PIN 23
  295. //===========================================================================
  296. //=============================Buffers ============================
  297. //===========================================================================
  298. // The number of linear motions that can be in the plan at any give time.
  299. // 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.
  300. #if defined SDSUPPORT
  301. #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
  302. #else
  303. #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
  304. #endif
  305. //The ASCII buffer for recieving from the serial:
  306. #define MAX_CMD_SIZE 96
  307. #define BUFSIZE 4
  308. #include "thermistortables.h"
  309. #endif //__CONFIGURATION_H