Advertisement
Guest User

Untitled

a guest
Dec 26th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.28 KB | None | 0 0
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22.  
  23. /**
  24. * Configuration_adv.h
  25. *
  26. * Advanced settings.
  27. * Only change these if you know exactly what you're doing.
  28. * Some of these settings can damage your printer if improperly set!
  29. *
  30. * Basic settings can be found in Configuration.h
  31. *
  32. */
  33. #ifndef CONFIGURATION_ADV_H
  34. #define CONFIGURATION_ADV_H
  35.  
  36. /**
  37. *
  38. * ***********************************
  39. * ** ATTENTION TO ALL DEVELOPERS **
  40. * ***********************************
  41. *
  42. * You must increment this version number for every significant change such as,
  43. * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option.
  44. *
  45. * Note: Update also Version.h !
  46. */
  47. #define CONFIGURATION_ADV_H_VERSION 010100
  48.  
  49. // @section temperature
  50.  
  51. //===========================================================================
  52. //=============================Thermal Settings ============================
  53. //===========================================================================
  54.  
  55. #if DISABLED(PIDTEMPBED)
  56. #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
  57. #if ENABLED(BED_LIMIT_SWITCHING)
  58. #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
  59. #endif
  60. #endif
  61.  
  62. /**
  63. * Thermal Protection protects your printer from damage and fire if a
  64. * thermistor falls out or temperature sensors fail in any way.
  65. *
  66. * The issue: If a thermistor falls out or a temperature sensor fails,
  67. * Marlin can no longer sense the actual temperature. Since a disconnected
  68. * thermistor reads as a low temperature, the firmware will keep the heater on.
  69. *
  70. * The solution: Once the temperature reaches the target, start observing.
  71. * If the temperature stays too far below the target (hysteresis) for too long (period),
  72. * the firmware will halt the machine as a safety precaution.
  73. *
  74. * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
  75. */
  76. #if ENABLED(THERMAL_PROTECTION_HOTENDS)
  77. #define THERMAL_PROTECTION_PERIOD 40 // Seconds
  78. #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
  79.  
  80. /**
  81. * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
  82. * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
  83. * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
  84. * but only if the current temperature is far enough below the target for a reliable test.
  85. *
  86. * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE
  87. * WATCH_TEMP_INCREASE should not be below 2.
  88. */
  89. #define WATCH_TEMP_PERIOD 20 // Seconds
  90. #define WATCH_TEMP_INCREASE 2 // Degrees Celsius
  91. #endif
  92.  
  93. /**
  94. * Thermal Protection parameters for the bed are just as above for hotends.
  95. */
  96. #if ENABLED(THERMAL_PROTECTION_BED)
  97. #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
  98. #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
  99.  
  100. /**
  101. * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
  102. * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
  103. * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
  104. * but only if the current temperature is far enough below the target for a reliable test.
  105. *
  106. * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
  107. * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
  108. */
  109. #define WATCH_BED_TEMP_PERIOD 60 // Seconds
  110. #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
  111. #endif
  112.  
  113. #if ENABLED(PIDTEMP)
  114. // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
  115. // if Kc is chosen well, the additional required power due to increased melting should be compensated.
  116. //#define PID_EXTRUSION_SCALING
  117. #if ENABLED(PID_EXTRUSION_SCALING)
  118. #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
  119. #define LPQ_MAX_LEN 50
  120. #endif
  121. #endif
  122.  
  123. /**
  124. * Automatic Temperature:
  125. * The hotend target temperature is calculated by all the buffered lines of gcode.
  126. * The maximum buffered steps/sec of the extruder motor is called "se".
  127. * Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
  128. * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
  129. * mintemp and maxtemp. Turn this off by executing M109 without F*
  130. * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
  131. * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
  132. */
  133. #define AUTOTEMP
  134. #if ENABLED(AUTOTEMP)
  135. #define AUTOTEMP_OLDWEIGHT 0.98
  136. #endif
  137.  
  138. //Show Temperature ADC value
  139. //The M105 command return, besides traditional information, the ADC value read from temperature sensors.
  140. //#define SHOW_TEMP_ADC_VALUES
  141.  
  142. /**
  143. * High Temperature Thermistor Support
  144. *
  145. * Thermistors able to support high temperature tend to have a hard time getting
  146. * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
  147. * will probably be caught when the heating element first turns on during the
  148. * preheating process, which will trigger a min_temp_error as a safety measure
  149. * and force stop everything.
  150. * To circumvent this limitation, we allow for a preheat time (during which,
  151. * min_temp_error won't be triggered) and add a min_temp buffer to handle
  152. * aberrant readings.
  153. *
  154. * If you want to enable this feature for your hotend thermistor(s)
  155. * uncomment and set values > 0 in the constants below
  156. */
  157.  
  158. // The number of consecutive low temperature errors that can occur
  159. // before a min_temp_error is triggered. (Shouldn't be more than 10.)
  160. //#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
  161.  
  162. // The number of milliseconds a hotend will preheat before starting to check
  163. // the temperature. This value should NOT be set to the time it takes the
  164. // hot end to reach the target temperature, but the time it takes to reach
  165. // the minimum temperature your thermistor can read. The lower the better/safer.
  166. // This shouldn't need to be more than 30 seconds (30000)
  167. //#define MILLISECONDS_PREHEAT_TIME 0
  168.  
  169. // @section extruder
  170.  
  171. // Extruder runout prevention.
  172. // If the machine is idle and the temperature over MINTEMP
  173. // then extrude some filament every couple of SECONDS.
  174. //#define EXTRUDER_RUNOUT_PREVENT
  175. #if ENABLED(EXTRUDER_RUNOUT_PREVENT)
  176. #define EXTRUDER_RUNOUT_MINTEMP 190
  177. #define EXTRUDER_RUNOUT_SECONDS 30
  178. #define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
  179. #define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
  180. #endif
  181.  
  182. // @section temperature
  183.  
  184. //These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
  185. //The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
  186. #define TEMP_SENSOR_AD595_OFFSET 0.0
  187. #define TEMP_SENSOR_AD595_GAIN 1.0
  188.  
  189. //This is for controlling a fan to cool down the stepper drivers
  190. //it will turn on when any driver is enabled
  191. //and turn off after the set amount of seconds from last driver being disabled again
  192. #define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
  193. #define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
  194. #define CONTROLLERFAN_SPEED 255 // == full speed
  195.  
  196. // When first starting the main fan, run it at full speed for the
  197. // given number of milliseconds. This gets the fan spinning reliably
  198. // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
  199. //#define FAN_KICKSTART_TIME 100
  200.  
  201. // This defines the minimal speed for the main fan, run in PWM mode
  202. // to enable uncomment and set minimal PWM speed for reliable running (1-255)
  203. // if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
  204. //#define FAN_MIN_PWM 50
  205.  
  206. // @section extruder
  207.  
  208. /**
  209. * Extruder cooling fans
  210. *
  211. * Extruder auto fans automatically turn on when their extruders'
  212. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
  213. *
  214. * Your board's pins file specifies the recommended pins. Override those here
  215. * or set to -1 to disable completely.
  216. *
  217. * Multiple extruders can be assigned to the same pin in which case
  218. * the fan will turn on when any selected extruder is above the threshold.
  219. */
  220. #define E0_AUTO_FAN_PIN -1
  221. #define E1_AUTO_FAN_PIN -1
  222. #define E2_AUTO_FAN_PIN -1
  223. #define E3_AUTO_FAN_PIN -1
  224. #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
  225. #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
  226.  
  227. // Define a pin to turn case light on/off
  228. //#define CASE_LIGHT_PIN 4
  229. #if PIN_EXISTS(CASE_LIGHT)
  230. #define INVERT_CASE_LIGHT false // Set to true if HIGH is the OFF state (active low)
  231. //#define CASE_LIGHT_DEFAULT_ON // Uncomment to set default state to on
  232. //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light On / Off entry in main menu
  233. #endif
  234.  
  235. //===========================================================================
  236. //============================ Mechanical Settings ==========================
  237. //===========================================================================
  238.  
  239. // @section homing
  240.  
  241. // If you want endstops to stay on (by default) even when not homing
  242. // enable this option. Override at any time with M120, M121.
  243. //#define ENDSTOPS_ALWAYS_ON_DEFAULT
  244.  
  245. // @section extras
  246.  
  247. //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
  248.  
  249. // Dual X Steppers
  250. // Uncomment this option to drive two X axis motors.
  251. // The next unused E driver will be assigned to the second X stepper.
  252. //#define X_DUAL_STEPPER_DRIVERS
  253. #if ENABLED(X_DUAL_STEPPER_DRIVERS)
  254. // Set true if the two X motors need to rotate in opposite directions
  255. #define INVERT_X2_VS_X_DIR true
  256. #endif
  257.  
  258.  
  259. // Dual Y Steppers
  260. // Uncomment this option to drive two Y axis motors.
  261. // The next unused E driver will be assigned to the second Y stepper.
  262. //#define Y_DUAL_STEPPER_DRIVERS
  263. #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
  264. // Set true if the two Y motors need to rotate in opposite directions
  265. #define INVERT_Y2_VS_Y_DIR true
  266. #endif
  267.  
  268. // A single Z stepper driver is usually used to drive 2 stepper motors.
  269. // Uncomment this option to use a separate stepper driver for each Z axis motor.
  270. // The next unused E driver will be assigned to the second Z stepper.
  271. //#define Z_DUAL_STEPPER_DRIVERS
  272.  
  273. #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
  274.  
  275. // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
  276. // That way the machine is capable to align the bed during home, since both Z steppers are homed.
  277. // There is also an implementation of M666 (software endstops adjustment) to this feature.
  278. // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
  279. // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
  280. // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
  281. // Play a little bit with small adjustments (0.5mm) and check the behaviour.
  282. // The M119 (endstops report) will start reporting the Z2 Endstop as well.
  283.  
  284. //#define Z_DUAL_ENDSTOPS
  285.  
  286. #if ENABLED(Z_DUAL_ENDSTOPS)
  287. #define Z2_USE_ENDSTOP _XMAX_
  288. #endif
  289.  
  290. #endif // Z_DUAL_STEPPER_DRIVERS
  291.  
  292. // Enable this for dual x-carriage printers.
  293. // A dual x-carriage design has the advantage that the inactive extruder can be parked which
  294. // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
  295. // allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
  296. //#define DUAL_X_CARRIAGE
  297. #if ENABLED(DUAL_X_CARRIAGE)
  298. // Configuration for second X-carriage
  299. // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
  300. // the second x-carriage always homes to the maximum endstop.
  301. #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
  302. #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
  303. #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
  304. #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
  305. // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
  306. // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
  307. // without modifying the firmware (through the "M218 T1 X???" command).
  308. // Remember: you should set the second extruder x-offset to 0 in your slicer.
  309.  
  310. // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
  311. // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
  312. // as long as it supports dual x-carriages. (M605 S0)
  313. // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
  314. // that additional slicer support is not required. (M605 S1)
  315. // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
  316. // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
  317. // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
  318.  
  319. // This is the default power-up mode which can be later using M605.
  320. #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
  321.  
  322. // Default settings in "Auto-park Mode"
  323. #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
  324. #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
  325.  
  326. // Default x offset in duplication mode (typically set to half print bed width)
  327. #define DEFAULT_DUPLICATION_X_OFFSET 100
  328.  
  329. #endif //DUAL_X_CARRIAGE
  330.  
  331. // @section homing
  332.  
  333. //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
  334. #define X_HOME_BUMP_MM 5
  335. #define Y_HOME_BUMP_MM 5
  336. #define Z_HOME_BUMP_MM 2
  337. #define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
  338. //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
  339.  
  340. // When G28 is called, this option will make Y home before X
  341. //#define HOME_Y_BEFORE_X
  342.  
  343. // @section machine
  344.  
  345. #define AXIS_RELATIVE_MODES {false, false, false, false}
  346.  
  347. // Allow duplication mode with a basic dual-nozzle extruder
  348. //#define DUAL_NOZZLE_DUPLICATION_MODE
  349.  
  350. // By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
  351. #define INVERT_X_STEP_PIN false
  352. #define INVERT_Y_STEP_PIN false
  353. #define INVERT_Z_STEP_PIN false
  354. #define INVERT_E_STEP_PIN false
  355.  
  356. // Default stepper release if idle. Set to 0 to deactivate.
  357. // Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
  358. // Time can be set by M18 and M84.
  359. #define DEFAULT_STEPPER_DEACTIVE_TIME 120
  360. #define DISABLE_INACTIVE_X true
  361. #define DISABLE_INACTIVE_Y true
  362. #define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
  363. #define DISABLE_INACTIVE_E true
  364.  
  365. #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
  366. #define DEFAULT_MINTRAVELFEEDRATE 0.0
  367.  
  368. // @section lcd
  369.  
  370. #if ENABLED(ULTIPANEL)
  371. #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
  372. #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
  373. #endif
  374.  
  375. // @section extras
  376.  
  377. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
  378. #define DEFAULT_MINSEGMENTTIME 20000
  379.  
  380. // If defined the movements slow down when the look ahead buffer is only half full
  381. #define SLOWDOWN
  382.  
  383. // Frequency limit
  384. // See nophead's blog for more info
  385. // Not working O
  386. //#define XY_FREQUENCY_LIMIT 15
  387.  
  388. // Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
  389. // of the buffer and all stops. This should not be much greater than zero and should only be changed
  390. // if unwanted behavior is observed on a user's machine when running at very slow speeds.
  391. #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
  392.  
  393. // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
  394. #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
  395.  
  396. // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
  397. #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
  398.  
  399. // Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
  400. //#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
  401.  
  402. // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
  403. //#define DIGIPOT_I2C
  404. // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
  405. #define DIGIPOT_I2C_NUM_CHANNELS 8
  406. // actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
  407. #define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
  408.  
  409. //===========================================================================
  410. //=============================Additional Features===========================
  411. //===========================================================================
  412.  
  413. #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
  414. #define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
  415. #define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
  416.  
  417. //#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
  418. #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
  419.  
  420. // @section lcd
  421.  
  422. // Include a page of printer information in the LCD Main Menu
  423. //#define LCD_INFO_MENU
  424.  
  425. // On the Info Screen, display XY with one decimal place when possible
  426. //#define LCD_DECIMAL_SMALL_XY
  427.  
  428. #if ENABLED(SDSUPPORT)
  429.  
  430. // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
  431. // around this by connecting a push button or single throw switch to the pin defined
  432. // as SD_DETECT_PIN in your board's pins definitions.
  433. // This setting should be disabled unless you are using a push button, pulling the pin to ground.
  434. // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
  435. #define SD_DETECT_INVERTED
  436.  
  437. #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
  438. #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
  439.  
  440. #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
  441. // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
  442. // using:
  443. //#define MENU_ADDAUTOSTART
  444.  
  445. // Show a progress bar on HD44780 LCDs for SD printing
  446. //#define LCD_PROGRESS_BAR
  447.  
  448. #if ENABLED(LCD_PROGRESS_BAR)
  449. // Amount of time (ms) to show the bar
  450. #define PROGRESS_BAR_BAR_TIME 2000
  451. // Amount of time (ms) to show the status message
  452. #define PROGRESS_BAR_MSG_TIME 3000
  453. // Amount of time (ms) to retain the status message (0=forever)
  454. #define PROGRESS_MSG_EXPIRE 0
  455. // Enable this to show messages for MSG_TIME then hide them
  456. //#define PROGRESS_MSG_ONCE
  457. #endif
  458.  
  459. // This allows hosts to request long names for files and folders with M33
  460. //#define LONG_FILENAME_HOST_SUPPORT
  461.  
  462. // This option allows you to abort SD printing when any endstop is triggered.
  463. // This feature must be enabled with "M540 S1" or from the LCD menu.
  464. // To have any effect, endstops must be enabled during SD printing.
  465. //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
  466.  
  467. #endif // SDSUPPORT
  468.  
  469. // Some additional options are available for graphical displays:
  470. #if ENABLED(DOGLCD)
  471. // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
  472. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
  473. //#define USE_BIG_EDIT_FONT
  474.  
  475. // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
  476. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
  477. //#define USE_SMALL_INFOFONT
  478.  
  479. // Enable this option and reduce the value to optimize screen updates.
  480. // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
  481. //#define DOGM_SPI_DELAY_US 5
  482. #endif // DOGLCD
  483.  
  484. // @section safety
  485.  
  486. // The hardware watchdog should reset the microcontroller disabling all outputs,
  487. // in case the firmware gets stuck and doesn't do temperature regulation.
  488. #define USE_WATCHDOG
  489.  
  490. #if ENABLED(USE_WATCHDOG)
  491. // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
  492. // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
  493. // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
  494. //#define WATCHDOG_RESET_MANUAL
  495. #endif
  496.  
  497. // @section lcd
  498.  
  499. // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
  500. // it can e.g. be used to change z-positions in the print startup phase in real-time
  501. // does not respect endstops!
  502. //#define BABYSTEPPING
  503. #if ENABLED(BABYSTEPPING)
  504. #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions
  505. //not implemented for deltabots!
  506. #define BABYSTEP_INVERT_Z false //true for inverse movements in Z
  507. #define BABYSTEP_MULTIPLICATOR 1 //faster movements
  508. #endif
  509.  
  510. //
  511. // Ensure Smooth Moves
  512. //
  513. // Enable this option to prevent the machine from stuttering when printing multiple short segments.
  514. // This feature uses two strategies to eliminate stuttering:
  515. //
  516. // 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
  517. // completely drained. When this happens pauses are introduced between short segments, and print moves
  518. // will become jerky until a longer segment provides enough time for the buffer to be filled again.
  519. // This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
  520. // by pausing the LCD until there's enough time to safely update.
  521. //
  522. // NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
  523. // Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
  524. //
  525. // 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
  526. // loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
  527. // interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
  528. // draining.
  529. //
  530. //#define ENSURE_SMOOTH_MOVES
  531. #if ENABLED(ENSURE_SMOOTH_MOVES)
  532. //#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
  533. // WARNING: Menu navigation during short moves may cause stuttering!
  534. #define LCD_UPDATE_THRESHOLD 135 // (ms) Minimum duration for the current segment to allow an LCD update.
  535. // Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
  536. // You may try to lower this value until you printer starts stuttering again as if ENSURE_SMOOTH_MOVES is disabled.
  537. #define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
  538. #endif
  539.  
  540. // @section extruder
  541.  
  542. // extruder advance constant (s2/mm3)
  543. //
  544. // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
  545. //
  546. // Hooke's law says: force = k * distance
  547. // Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
  548. // so: v ^ 2 is proportional to number of steps we advance the extruder
  549. //#define ADVANCE
  550.  
  551. #if ENABLED(ADVANCE)
  552. #define EXTRUDER_ADVANCE_K .0
  553. #define D_FILAMENT 2.85
  554. #endif
  555.  
  556. /**
  557. * Implementation of linear pressure control
  558. *
  559. * Assumption: advance = k * (delta velocity)
  560. * K=0 means advance disabled.
  561. * To get a rough start value for calibration, measure your "free filament length"
  562. * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
  563. * your setup, where L is the "free filament length":
  564. *
  565. * Filament diameter | 1.75mm | 3.0mm |
  566. * ----------------------------|-----------|------------|
  567. * Stiff filament (PLA) | K=47*L/10 | K=139*L/10 |
  568. * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
  569. */
  570. //#define LIN_ADVANCE
  571.  
  572. #if ENABLED(LIN_ADVANCE)
  573. #define LIN_ADVANCE_K 75
  574. #endif
  575.  
  576. // @section leveling
  577.  
  578. // Default mesh area is an area with an inset margin on the print area.
  579. // Below are the macros that are used to define the borders for the mesh area,
  580. // made available here for specialized needs, ie dual extruder setup.
  581. #if ENABLED(MESH_BED_LEVELING)
  582. #define MESH_MIN_X (X_MIN_POS + MESH_INSET)
  583. #define MESH_MAX_X (X_MAX_POS - (MESH_INSET))
  584. #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET)
  585. #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET))
  586. #endif
  587.  
  588. // @section extras
  589.  
  590. // Arc interpretation settings:
  591. #define ARC_SUPPORT // Disabling this saves ~2738 bytes
  592. #define MM_PER_ARC_SEGMENT 1
  593. #define N_ARC_CORRECTION 25
  594.  
  595. // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
  596. //#define BEZIER_CURVE_SUPPORT
  597.  
  598. // G38.2 and G38.3 Probe Target
  599. //#define G38_PROBE_TARGET
  600. #if ENABLED(G38_PROBE_TARGET)
  601. #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
  602. #endif
  603.  
  604. // Moves (or segments) with fewer steps than this will be joined with the next move
  605. #define MIN_STEPS_PER_SEGMENT 6
  606.  
  607. // The minimum pulse width (in µs) for stepping a stepper.
  608. // Set this if you find stepping unreliable, or if using a very fast CPU.
  609. #define MINIMUM_STEPPER_PULSE 0 // (µs) The smallest stepper pulse allowed
  610.  
  611. // @section temperature
  612.  
  613. // Control heater 0 and heater 1 in parallel.
  614. //#define HEATERS_PARALLEL
  615.  
  616. //===========================================================================
  617. //================================= Buffers =================================
  618. //===========================================================================
  619.  
  620. // @section hidden
  621.  
  622. // The number of linear motions that can be in the plan at any give time.
  623. // 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 ring-buffering.
  624. #if ENABLED(SDSUPPORT)
  625. #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
  626. #else
  627. #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
  628. #endif
  629.  
  630. // @section serial
  631.  
  632. // The ASCII buffer for serial input
  633. #define MAX_CMD_SIZE 96
  634. #define BUFSIZE 4
  635.  
  636. // Transfer Buffer Size
  637. // To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
  638. // To buffer a simple "ok" you need 4 bytes.
  639. // For ADVANCED_OK (M105) you need 32 bytes.
  640. // For debug-echo: 128 bytes for the optimal speed.
  641. // Other output doesn't need to be that speedy.
  642. // :[0, 2, 4, 8, 16, 32, 64, 128, 256]
  643. #define TX_BUFFER_SIZE 0
  644.  
  645. // Enable an emergency-command parser to intercept certain commands as they
  646. // enter the serial receive buffer, so they cannot be blocked.
  647. // Currently handles M108, M112, M410
  648. // Does not work on boards using AT90USB (USBCON) processors!
  649. //#define EMERGENCY_PARSER
  650.  
  651. // Bad Serial-connections can miss a received command by sending an 'ok'
  652. // Therefore some clients abort after 30 seconds in a timeout.
  653. // Some other clients start sending commands while receiving a 'wait'.
  654. // This "wait" is only sent when the buffer is empty. 1 second is a good value here.
  655. //#define NO_TIMEOUTS 1000 // Milliseconds
  656.  
  657. // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
  658. //#define ADVANCED_OK
  659.  
  660. // @section fwretract
  661.  
  662. // Firmware based and LCD controlled retract
  663. // M207 and M208 can be used to define parameters for the retraction.
  664. // The retraction can be called by the slicer using G10 and G11
  665. // until then, intended retractions can be detected by moves that only extrude and the direction.
  666. // the moves are than replaced by the firmware controlled ones.
  667.  
  668. //#define FWRETRACT //ONLY PARTIALLY TESTED
  669. #if ENABLED(FWRETRACT)
  670. #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt
  671. #define RETRACT_LENGTH 3 //default retract length (positive mm)
  672. #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change
  673. #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s)
  674. #define RETRACT_ZLIFT 0 //default retract Z-lift
  675. #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering)
  676. #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change)
  677. #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s)
  678. #endif
  679.  
  680. // Add support for experimental filament exchange support M600; requires display
  681. #if ENABLED(ULTIPANEL)
  682. // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too)
  683. #if ENABLED(FILAMENT_CHANGE_FEATURE)
  684. #define FILAMENT_CHANGE_X_POS 3 // X position of hotend
  685. #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend
  686. #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift)
  687. #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
  688. #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
  689. #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm
  690. // It is a short retract used immediately after print interrupt before move to filament exchange position
  691. #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
  692. #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
  693. // Longer length for bowden printers to unload filament from whole bowden tube,
  694. // shorter lenght for printers without bowden to unload filament from extruder only,
  695. // 0 to disable unloading for manual unloading
  696. #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
  697. #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
  698. // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
  699. // Short or zero length for printers without bowden where loading is not used
  700. #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast
  701. #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend,
  702. // 0 to disable for manual extrusion
  703. // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
  704. // or until outcoming filament color is not clear for filament color change
  705. #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
  706. #endif
  707. #endif
  708.  
  709. /******************************************************************************\
  710. * enable this section if you have TMC26X motor drivers.
  711. * you need to import the TMC26XStepper library into the Arduino IDE for this
  712. ******************************************************************************/
  713.  
  714. // @section tmc
  715.  
  716. //#define HAVE_TMCDRIVER
  717. #if ENABLED(HAVE_TMCDRIVER)
  718.  
  719. //#define X_IS_TMC
  720. //#define X2_IS_TMC
  721. //#define Y_IS_TMC
  722. //#define Y2_IS_TMC
  723. //#define Z_IS_TMC
  724. //#define Z2_IS_TMC
  725. //#define E0_IS_TMC
  726. //#define E1_IS_TMC
  727. //#define E2_IS_TMC
  728. //#define E3_IS_TMC
  729.  
  730. #define X_MAX_CURRENT 1000 // in mA
  731. #define X_SENSE_RESISTOR 91 // in mOhms
  732. #define X_MICROSTEPS 16 // number of microsteps
  733.  
  734. #define X2_MAX_CURRENT 1000
  735. #define X2_SENSE_RESISTOR 91
  736. #define X2_MICROSTEPS 16
  737.  
  738. #define Y_MAX_CURRENT 1000
  739. #define Y_SENSE_RESISTOR 91
  740. #define Y_MICROSTEPS 16
  741.  
  742. #define Y2_MAX_CURRENT 1000
  743. #define Y2_SENSE_RESISTOR 91
  744. #define Y2_MICROSTEPS 16
  745.  
  746. #define Z_MAX_CURRENT 1000
  747. #define Z_SENSE_RESISTOR 91
  748. #define Z_MICROSTEPS 16
  749.  
  750. #define Z2_MAX_CURRENT 1000
  751. #define Z2_SENSE_RESISTOR 91
  752. #define Z2_MICROSTEPS 16
  753.  
  754. #define E0_MAX_CURRENT 1000
  755. #define E0_SENSE_RESISTOR 91
  756. #define E0_MICROSTEPS 16
  757.  
  758. #define E1_MAX_CURRENT 1000
  759. #define E1_SENSE_RESISTOR 91
  760. #define E1_MICROSTEPS 16
  761.  
  762. #define E2_MAX_CURRENT 1000
  763. #define E2_SENSE_RESISTOR 91
  764. #define E2_MICROSTEPS 16
  765.  
  766. #define E3_MAX_CURRENT 1000
  767. #define E3_SENSE_RESISTOR 91
  768. #define E3_MICROSTEPS 16
  769.  
  770. #endif
  771.  
  772. // @section TMC2130
  773.  
  774.  
  775. /**
  776. * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
  777. *
  778. * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
  779. * (https://github.com/makertum/Trinamic_TMC2130).
  780. *
  781. * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
  782. * the hardware SPI interface on your board and define the required CS pins
  783. * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
  784. */
  785.  
  786. //#define HAVE_TMC2130DRIVER
  787.  
  788. #if ENABLED(HAVE_TMC2130DRIVER)
  789.  
  790. //#define TMC2130_ADVANCED_CONFIGURATION
  791.  
  792. // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
  793. //#define X_IS_TMC2130
  794. //#define X2_IS_TMC2130
  795. //#define Y_IS_TMC2130
  796. //#define Y2_IS_TMC2130
  797. //#define Z_IS_TMC2130
  798. //#define Z2_IS_TMC2130
  799. //#define E0_IS_TMC2130
  800. //#define E1_IS_TMC2130
  801. //#define E2_IS_TMC2130
  802. //#define E3_IS_TMC2130
  803.  
  804. #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
  805.  
  806. // If you've enabled TMC2130_ADVANCED_CONFIGURATION, define global settings below.
  807. // Enabled settings will be automatically applied to all axes specified above.
  808. //
  809. // Please read the TMC2130 datasheet:
  810. // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
  811. // All settings here have the same (sometimes cryptic) names as in the datasheet.
  812. //
  813. // The following, uncommented settings are only suggestion.
  814.  
  815. /* GENERAL CONFIGURATION */
  816.  
  817. //#define GLOBAL_EN_PWM_MODE 0
  818. #define GLOBAL_I_SCALE_ANALOG 1 // [0,1] 0: Normal, 1: AIN
  819. //#define GLOBAL_INTERNAL_RSENSE 0 // [0,1] 0: Normal, 1: Internal
  820. #define GLOBAL_EN_PWM_MODE 0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
  821. //#define GLOBAL_ENC_COMMUTATION 0 // [0,1]
  822. #define GLOBAL_SHAFT 0 // [0,1] 0: normal, 1: invert
  823. //#define GLOBAL_DIAG0_ERROR 0 // [0,1]
  824. //#define GLOBAL_DIAG0_OTPW 0 // [0,1]
  825. //#define GLOBAL_DIAG0_STALL 0 // [0,1]
  826. //#define GLOBAL_DIAG1_STALL 0 // [0,1]
  827. //#define GLOBAL_DIAG1_INDEX 0 // [0,1]
  828. //#define GLOBAL_DIAG1_ONSTATE 0 // [0,1]
  829. //#define GLOBAL_DIAG1_ONSTATE 0 // [0,1]
  830. //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
  831. //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
  832. //#define GLOBAL_SMALL_HYSTERESIS 0 // [0,1]
  833. //#define GLOBAL_STOP_ENABLE 0 // [0,1]
  834. //#define GLOBAL_DIRECT_MODE 0 // [0,1]
  835.  
  836. /* VELOCITY-DEPENDENT DRIVE FEATURES */
  837.  
  838. #define GLOBAL_IHOLD 22 // [0-31] 0: min, 31: max
  839. #define GLOBAL_IRUN 31 // [0-31] 0: min, 31: max
  840. #define GLOBAL_IHOLDDELAY 15 // [0-15] 0: min, 15: about 4 seconds
  841. //#define GLOBAL_TPOWERDOWN 0 // [0-255] 0: min, 255: about 4 seconds
  842. //#define GLOBAL_TPWMTHRS 0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
  843. //#define GLOBAL_TCOOLTHRS 0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
  844. #define GLOBAL_THIGH 10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
  845.  
  846. /* SPI MODE CONFIGURATION */
  847.  
  848. //#define GLOBAL_XDIRECT 0
  849.  
  850. /* DCSTEP MINIMUM VELOCITY */
  851.  
  852. //#define GLOBAL_VDCMIN 0
  853.  
  854. /* MOTOR DRIVER CONFIGURATION*/
  855.  
  856. //#define GLOBAL_DEDGE 0
  857. //#define GLOBAL_DISS2G 0
  858. #define GLOBAL_INTPOL 1 // 0: off 1: 256 microstep interpolation
  859. #define GLOBAL_MRES 16 // number of microsteps
  860. #define GLOBAL_SYNC 1 // [0-15]
  861. #define GLOBAL_VHIGHCHM 1 // [0,1] 0: normal, 1: high velocity stepper mode
  862. #define GLOBAL_VHIGHFS 0 // [0,1] 0: normal, 1: switch to full steps for high velocities
  863. // #define GLOBAL_VSENSE 0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
  864. #define GLOBAL_TBL 1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
  865. #define GLOBAL_CHM 0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
  866. //#define GLOBAL_RNDTF 0
  867. //#define GLOBAL_DISFDCC 0
  868. //#define GLOBAL_FD 0
  869. //#define GLOBAL_HEND 0
  870. //#define GLOBAL_HSTRT 0
  871. #define GLOBAL_TOFF 10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
  872.  
  873. //#define GLOBAL_SFILT 0
  874. //#define GLOBAL_SGT 0
  875. //#define GLOBAL_SEIMIN 0
  876. //#define GLOBAL_SEDN 0
  877. //#define GLOBAL_SEMAX 0
  878. //#define GLOBAL_SEUP 0
  879. //#define GLOBAL_SEMIN 0
  880.  
  881. //#define GLOBAL_DC_TIME 0
  882. //#define GLOBAL_DC_SG 0
  883.  
  884. //#define GLOBAL_FREEWHEEL 0
  885. //#define GLOBAL_PWM_SYMMETRIC 0
  886. //#define GLOBAL_PWM_AUTOSCALE 0
  887. //#define GLOBAL_PWM_FREQ 0
  888. //#define GLOBAL_PWM_GRAD 0
  889. //#define GLOBAL_PWM_AMPL 0
  890.  
  891. //#define GLOBAL_ENCM_CTRL 0
  892.  
  893. #else
  894.  
  895. #define X_IHOLD 31 // [0-31] 0: min, 31: max
  896. #define X_IRUN 31 // [0-31] 0: min, 31: max
  897. #define X_IHOLDDELAY 15 // [0-15] 0: min, 15: about 4 seconds
  898. #define X_I_SCALE_ANALOG 1 // 0: Normal, 1: AIN
  899. #define X_MRES 16 // number of microsteps
  900. #define X_TBL 1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
  901. #define X_TOFF 8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
  902.  
  903. #define X2_IHOLD 31
  904. #define X2_IRUN 31
  905. #define X2_IHOLDDELAY 15
  906. #define X2_I_SCALE_ANALOG 1
  907. #define X2_MRES 16
  908. #define X2_TBL 1
  909. #define X2_TOFF 8
  910.  
  911. #define Y_IHOLD 31
  912. #define Y_IRUN 31
  913. #define Y_IHOLDDELAY 15
  914. #define Y_I_SCALE_ANALOG 1
  915. #define Y_MRES 16
  916. #define Y_TBL 1
  917. #define Y_TOFF 8
  918.  
  919. #define Y2_IHOLD 31
  920. #define Y2_IRUN 31
  921. #define Y2_IHOLDDELAY 15
  922. #define Y2_I_SCALE_ANALOG 1
  923. #define Y2_MRES 16
  924. #define Y2_TBL 1
  925. #define Y2_TOFF 8
  926.  
  927. #define Z_IHOLD 31
  928. #define Z_IRUN 31
  929. #define Z_IHOLDDELAY 15
  930. #define Z_I_SCALE_ANALOG 1
  931. #define Z_MRES 16
  932. #define Z_TBL 1
  933. #define Z_TOFF 8
  934.  
  935. #define Z2_IHOLD 31
  936. #define Z2_IRUN 31
  937. #define Z2_IHOLDDELAY 15
  938. #define Z2_I_SCALE_ANALOG 1
  939. #define Z2_MRES 16
  940. #define Z2_TBL 1
  941. #define Z2_TOFF 8
  942.  
  943. #define E0_IHOLD 31
  944. #define E0_IRUN 31
  945. #define E0_IHOLDDELAY 15
  946. #define E0_I_SCALE_ANALOG 1
  947. #define E0_MRES 16
  948. #define E0_TBL 1
  949. #define E0_TOFF 8
  950.  
  951. #define E1_IHOLD 31
  952. #define E1_IRUN 31
  953. #define E1_IHOLDDELAY 15
  954. #define E1_I_SCALE_ANALOG 1
  955. #define E1_MRES 16
  956. #define E1_TBL 1
  957. #define E1_TOFF 8
  958.  
  959. #define E2_IHOLD 31
  960. #define E2_IRUN 31
  961. #define E2_IHOLDDELAY 15
  962. #define E2_I_SCALE_ANALOG 1
  963. #define E2_MRES 16
  964. #define E2_TBL 1
  965. #define E2_TOFF 8
  966.  
  967. #define E3_IHOLD 31
  968. #define E3_IRUN 31
  969. #define E3_IHOLDDELAY 15
  970. #define E3_I_SCALE_ANALOG 1
  971. #define E3_MRES 16
  972. #define E3_TBL 1
  973. #define E3_TOFF 8
  974.  
  975. #endif // TMC2130_ADVANCED_CONFIGURATION
  976.  
  977. #endif // HAVE_TMC2130DRIVER
  978.  
  979. // @section L6470
  980.  
  981. /**
  982. * Enable this section if you have L6470 motor drivers.
  983. * You need to import the L6470 library into the Arduino IDE for this.
  984. * (https://github.com/ameyer/Arduino-L6470)
  985. */
  986.  
  987. //#define HAVE_L6470DRIVER
  988. #if ENABLED(HAVE_L6470DRIVER)
  989.  
  990. //#define X_IS_L6470
  991. //#define X2_IS_L6470
  992. //#define Y_IS_L6470
  993. //#define Y2_IS_L6470
  994. //#define Z_IS_L6470
  995. //#define Z2_IS_L6470
  996. //#define E0_IS_L6470
  997. //#define E1_IS_L6470
  998. //#define E2_IS_L6470
  999. //#define E3_IS_L6470
  1000.  
  1001. #define X_MICROSTEPS 16 // number of microsteps
  1002. #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high
  1003. #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
  1004. #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
  1005.  
  1006. #define X2_MICROSTEPS 16
  1007. #define X2_K_VAL 50
  1008. #define X2_OVERCURRENT 2000
  1009. #define X2_STALLCURRENT 1500
  1010.  
  1011. #define Y_MICROSTEPS 16
  1012. #define Y_K_VAL 50
  1013. #define Y_OVERCURRENT 2000
  1014. #define Y_STALLCURRENT 1500
  1015.  
  1016. #define Y2_MICROSTEPS 16
  1017. #define Y2_K_VAL 50
  1018. #define Y2_OVERCURRENT 2000
  1019. #define Y2_STALLCURRENT 1500
  1020.  
  1021. #define Z_MICROSTEPS 16
  1022. #define Z_K_VAL 50
  1023. #define Z_OVERCURRENT 2000
  1024. #define Z_STALLCURRENT 1500
  1025.  
  1026. #define Z2_MICROSTEPS 16
  1027. #define Z2_K_VAL 50
  1028. #define Z2_OVERCURRENT 2000
  1029. #define Z2_STALLCURRENT 1500
  1030.  
  1031. #define E0_MICROSTEPS 16
  1032. #define E0_K_VAL 50
  1033. #define E0_OVERCURRENT 2000
  1034. #define E0_STALLCURRENT 1500
  1035.  
  1036. #define E1_MICROSTEPS 16
  1037. #define E1_K_VAL 50
  1038. #define E1_OVERCURRENT 2000
  1039. #define E1_STALLCURRENT 1500
  1040.  
  1041. #define E2_MICROSTEPS 16
  1042. #define E2_K_VAL 50
  1043. #define E2_OVERCURRENT 2000
  1044. #define E2_STALLCURRENT 1500
  1045.  
  1046. #define E3_MICROSTEPS 16
  1047. #define E3_K_VAL 50
  1048. #define E3_OVERCURRENT 2000
  1049. #define E3_STALLCURRENT 1500
  1050.  
  1051. #endif
  1052.  
  1053. /**
  1054. * TWI/I2C BUS
  1055. *
  1056. * This feature is an EXPERIMENTAL feature so it shall not be used on production
  1057. * machines. Enabling this will allow you to send and receive I2C data from slave
  1058. * devices on the bus.
  1059. *
  1060. * ; Example #1
  1061. * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
  1062. * ; It uses multiple M260 commands with one B<base 10> arg
  1063. * M260 A99 ; Target slave address
  1064. * M260 B77 ; M
  1065. * M260 B97 ; a
  1066. * M260 B114 ; r
  1067. * M260 B108 ; l
  1068. * M260 B105 ; i
  1069. * M260 B110 ; n
  1070. * M260 S1 ; Send the current buffer
  1071. *
  1072. * ; Example #2
  1073. * ; Request 6 bytes from slave device with address 0x63 (99)
  1074. * M261 A99 B5
  1075. *
  1076. * ; Example #3
  1077. * ; Example serial output of a M261 request
  1078. * echo:i2c-reply: from:99 bytes:5 data:hello
  1079. */
  1080.  
  1081. // @section i2cbus
  1082.  
  1083. //#define EXPERIMENTAL_I2CBUS
  1084. #define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
  1085.  
  1086. /**
  1087. * Add M43 command for pins info and testing
  1088. */
  1089. //#define PINS_DEBUGGING
  1090.  
  1091. /**
  1092. * Auto-report temperatures with M155 S<seconds>
  1093. */
  1094. //#define AUTO_REPORT_TEMPERATURES
  1095.  
  1096. /**
  1097. * Include capabilities in M115 output
  1098. */
  1099. //#define EXTENDED_CAPABILITIES_REPORT
  1100.  
  1101. #endif // CONFIGURATION_ADV_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement