My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Configuration.h 14KB

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