Advertisement
psavva

Configuration_adv.h

Feb 14th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.99 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 10 // 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 90 // Seconds
  90. #define WATCH_TEMP_INCREASE 1 // 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 90 // Seconds
  98. #define THERMAL_PROTECTION_BED_HYSTERESIS 1 // 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 (DXC_FULL_CONTROL_MODE): 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 (DXC_AUTO_PARK_MODE) : 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 (DXC_DUPLICATION_MODE) : 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. // Add a menu item to test the progress bar:
  458. //#define LCD_PROGRESS_BAR_TEST
  459. #endif
  460.  
  461. // This allows hosts to request long names for files and folders with M33
  462. //#define LONG_FILENAME_HOST_SUPPORT
  463.  
  464. // This option allows you to abort SD printing when any endstop is triggered.
  465. // This feature must be enabled with "M540 S1" or from the LCD menu.
  466. // To have any effect, endstops must be enabled during SD printing.
  467. //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
  468.  
  469. #endif // SDSUPPORT
  470.  
  471. /**
  472. * Additional options for Graphical Displays
  473. *
  474. * Use the optimizations here to improve printing performance,
  475. * which can be adversely affected by graphical display drawing,
  476. * especially when doing several short moves, and when printing
  477. * on DELTA and SCARA machines.
  478. *
  479. * Some of these options may result in the display lagging behind
  480. * controller events, as there is a trade-off between reliable
  481. * printing performance versus fast display updates.
  482. */
  483. #if ENABLED(DOGLCD)
  484. // Enable to save many cycles by drawing a hollow frame on the Info Screen
  485. #define XYZ_HOLLOW_FRAME
  486.  
  487. // Enable to save many cycles by drawing a hollow frame on Menu Screens
  488. #define MENU_HOLLOW_FRAME
  489.  
  490. // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
  491. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
  492. //#define USE_BIG_EDIT_FONT
  493.  
  494. // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
  495. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
  496. //#define USE_SMALL_INFOFONT
  497.  
  498. // Enable this option and reduce the value to optimize screen updates.
  499. // The normal delay is 10ยตs. Use the lowest value that still gives a reliable display.
  500. //#define DOGM_SPI_DELAY_US 5
  501. #endif // DOGLCD
  502.  
  503. // @section safety
  504.  
  505. // The hardware watchdog should reset the microcontroller disabling all outputs,
  506. // in case the firmware gets stuck and doesn't do temperature regulation.
  507. #define USE_WATCHDOG
  508.  
  509. #if ENABLED(USE_WATCHDOG)
  510. // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
  511. // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
  512. // 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.
  513. //#define WATCHDOG_RESET_MANUAL
  514. #endif
  515.  
  516. // @section lcd
  517.  
  518. // Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
  519. // it can e.g. be used to change z-positions in the print startup phase in real-time
  520. // does not respect endstops!
  521. //#define BABYSTEPPING
  522. #if ENABLED(BABYSTEPPING)
  523. #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions
  524. //not implemented for deltabots!
  525. #define BABYSTEP_INVERT_Z false //true for inverse movements in Z
  526. #define BABYSTEP_MULTIPLICATOR 1 //faster movements
  527. #endif
  528.  
  529. // @section extruder
  530.  
  531. // extruder advance constant (s2/mm3)
  532. //
  533. // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
  534. //
  535. // Hooke's law says: force = k * distance
  536. // Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
  537. // so: v ^ 2 is proportional to number of steps we advance the extruder
  538. //#define ADVANCE
  539.  
  540. #if ENABLED(ADVANCE)
  541. #define EXTRUDER_ADVANCE_K .0
  542. #define D_FILAMENT 2.85
  543. #endif
  544.  
  545. /**
  546. * Implementation of linear pressure control
  547. *
  548. * Assumption: advance = k * (delta velocity)
  549. * K=0 means advance disabled.
  550. * See Marlin documentation for calibration instructions.
  551. */
  552. #define LIN_ADVANCE
  553.  
  554. #if ENABLED(LIN_ADVANCE)
  555. #define LIN_ADVANCE_K 400
  556. #endif
  557.  
  558. // @section leveling
  559.  
  560. // Default mesh area is an area with an inset margin on the print area.
  561. // Below are the macros that are used to define the borders for the mesh area,
  562. // made available here for specialized needs, ie dual extruder setup.
  563. #if ENABLED(MESH_BED_LEVELING)
  564. #define MESH_MIN_X (X_MIN_POS + MESH_INSET)
  565. #define MESH_MAX_X (X_MAX_POS - (MESH_INSET))
  566. #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET)
  567. #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET))
  568. #endif
  569.  
  570. // @section extras
  571.  
  572. // Arc interpretation settings:
  573. #define ARC_SUPPORT // Disabling this saves ~2738 bytes
  574. #define MM_PER_ARC_SEGMENT 1
  575. #define N_ARC_CORRECTION 25
  576.  
  577. // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
  578. //#define BEZIER_CURVE_SUPPORT
  579.  
  580. // G38.2 and G38.3 Probe Target
  581. //#define G38_PROBE_TARGET
  582. #if ENABLED(G38_PROBE_TARGET)
  583. #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
  584. #endif
  585.  
  586. // Moves (or segments) with fewer steps than this will be joined with the next move
  587. #define MIN_STEPS_PER_SEGMENT 6
  588.  
  589. // The minimum pulse width (in ยตs) for stepping a stepper.
  590. // Set this if you find stepping unreliable, or if using a very fast CPU.
  591. #define MINIMUM_STEPPER_PULSE 0 // (ยตs) The smallest stepper pulse allowed
  592.  
  593. // @section temperature
  594.  
  595. // Control heater 0 and heater 1 in parallel.
  596. //#define HEATERS_PARALLEL
  597.  
  598. //===========================================================================
  599. //================================= Buffers =================================
  600. //===========================================================================
  601.  
  602. // @section hidden
  603.  
  604. // The number of linear motions that can be in the plan at any give time.
  605. // 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.
  606. #if ENABLED(SDSUPPORT)
  607. #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
  608. #else
  609. #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
  610. #endif
  611.  
  612. // @section serial
  613.  
  614. // The ASCII buffer for serial input
  615. #define MAX_CMD_SIZE 96
  616. #define BUFSIZE 4
  617.  
  618. // Transfer Buffer Size
  619. // To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
  620. // To buffer a simple "ok" you need 4 bytes.
  621. // For ADVANCED_OK (M105) you need 32 bytes.
  622. // For debug-echo: 128 bytes for the optimal speed.
  623. // Other output doesn't need to be that speedy.
  624. // :[0, 2, 4, 8, 16, 32, 64, 128, 256]
  625. #define TX_BUFFER_SIZE 0
  626.  
  627. // Enable an emergency-command parser to intercept certain commands as they
  628. // enter the serial receive buffer, so they cannot be blocked.
  629. // Currently handles M108, M112, M410
  630. // Does not work on boards using AT90USB (USBCON) processors!
  631. //#define EMERGENCY_PARSER
  632.  
  633. // Bad Serial-connections can miss a received command by sending an 'ok'
  634. // Therefore some clients abort after 30 seconds in a timeout.
  635. // Some other clients start sending commands while receiving a 'wait'.
  636. // This "wait" is only sent when the buffer is empty. 1 second is a good value here.
  637. //#define NO_TIMEOUTS 1000 // Milliseconds
  638.  
  639. // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
  640. //#define ADVANCED_OK
  641.  
  642. // @section fwretract
  643.  
  644. // Firmware based and LCD controlled retract
  645. // M207 and M208 can be used to define parameters for the retraction.
  646. // The retraction can be called by the slicer using G10 and G11
  647. // until then, intended retractions can be detected by moves that only extrude and the direction.
  648. // the moves are than replaced by the firmware controlled ones.
  649.  
  650. //#define FWRETRACT //ONLY PARTIALLY TESTED
  651. #if ENABLED(FWRETRACT)
  652. #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt
  653. #define RETRACT_LENGTH 3 //default retract length (positive mm)
  654. #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change
  655. #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s)
  656. #define RETRACT_ZLIFT 0 //default retract Z-lift
  657. #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering)
  658. #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change)
  659. #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s)
  660. #endif
  661.  
  662. /**
  663. * Filament Change
  664. * Experimental filament change support.
  665. * Adds the GCode M600 for initiating filament change.
  666. *
  667. * Requires an LCD display.
  668. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
  669. */
  670. //#define FILAMENT_CHANGE_FEATURE
  671. #if ENABLED(FILAMENT_CHANGE_FEATURE)
  672. #define FILAMENT_CHANGE_X_POS 3 // X position of hotend
  673. #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend
  674. #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift)
  675. #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
  676. #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
  677. #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm
  678. // It is a short retract used immediately after print interrupt before move to filament exchange position
  679. #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
  680. #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
  681. // Longer length for bowden printers to unload filament from whole bowden tube,
  682. // shorter lenght for printers without bowden to unload filament from extruder only,
  683. // 0 to disable unloading for manual unloading
  684. #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
  685. #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
  686. // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
  687. // Short or zero length for printers without bowden where loading is not used
  688. #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast
  689. #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend,
  690. // 0 to disable for manual extrusion
  691. // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
  692. // or until outcoming filament color is not clear for filament color change
  693. #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
  694. #endif
  695.  
  696. /******************************************************************************\
  697. * enable this section if you have TMC26X motor drivers.
  698. * you need to import the TMC26XStepper library into the Arduino IDE for this
  699. ******************************************************************************/
  700.  
  701. // @section tmc
  702.  
  703. //#define HAVE_TMCDRIVER
  704. #if ENABLED(HAVE_TMCDRIVER)
  705.  
  706. //#define X_IS_TMC
  707. //#define X2_IS_TMC
  708. //#define Y_IS_TMC
  709. //#define Y2_IS_TMC
  710. //#define Z_IS_TMC
  711. //#define Z2_IS_TMC
  712. //#define E0_IS_TMC
  713. //#define E1_IS_TMC
  714. //#define E2_IS_TMC
  715. //#define E3_IS_TMC
  716.  
  717. #define X_MAX_CURRENT 1000 // in mA
  718. #define X_SENSE_RESISTOR 91 // in mOhms
  719. #define X_MICROSTEPS 16 // number of microsteps
  720.  
  721. #define X2_MAX_CURRENT 1000
  722. #define X2_SENSE_RESISTOR 91
  723. #define X2_MICROSTEPS 16
  724.  
  725. #define Y_MAX_CURRENT 1000
  726. #define Y_SENSE_RESISTOR 91
  727. #define Y_MICROSTEPS 16
  728.  
  729. #define Y2_MAX_CURRENT 1000
  730. #define Y2_SENSE_RESISTOR 91
  731. #define Y2_MICROSTEPS 16
  732.  
  733. #define Z_MAX_CURRENT 1000
  734. #define Z_SENSE_RESISTOR 91
  735. #define Z_MICROSTEPS 16
  736.  
  737. #define Z2_MAX_CURRENT 1000
  738. #define Z2_SENSE_RESISTOR 91
  739. #define Z2_MICROSTEPS 16
  740.  
  741. #define E0_MAX_CURRENT 1000
  742. #define E0_SENSE_RESISTOR 91
  743. #define E0_MICROSTEPS 16
  744.  
  745. #define E1_MAX_CURRENT 1000
  746. #define E1_SENSE_RESISTOR 91
  747. #define E1_MICROSTEPS 16
  748.  
  749. #define E2_MAX_CURRENT 1000
  750. #define E2_SENSE_RESISTOR 91
  751. #define E2_MICROSTEPS 16
  752.  
  753. #define E3_MAX_CURRENT 1000
  754. #define E3_SENSE_RESISTOR 91
  755. #define E3_MICROSTEPS 16
  756.  
  757. #endif
  758.  
  759. // @section TMC2130
  760.  
  761.  
  762. /**
  763. * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
  764. *
  765. * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
  766. * (https://github.com/makertum/Trinamic_TMC2130).
  767. *
  768. * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
  769. * the hardware SPI interface on your board and define the required CS pins
  770. * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
  771. */
  772.  
  773. //#define HAVE_TMC2130DRIVER
  774.  
  775. #if ENABLED(HAVE_TMC2130DRIVER)
  776.  
  777. //#define TMC2130_ADVANCED_CONFIGURATION
  778.  
  779. // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
  780. //#define X_IS_TMC2130
  781. //#define X2_IS_TMC2130
  782. //#define Y_IS_TMC2130
  783. //#define Y2_IS_TMC2130
  784. //#define Z_IS_TMC2130
  785. //#define Z2_IS_TMC2130
  786. //#define E0_IS_TMC2130
  787. //#define E1_IS_TMC2130
  788. //#define E2_IS_TMC2130
  789. //#define E3_IS_TMC2130
  790.  
  791. #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
  792.  
  793. // If you've enabled TMC2130_ADVANCED_CONFIGURATION, define global settings below.
  794. // Enabled settings will be automatically applied to all axes specified above.
  795. //
  796. // Please read the TMC2130 datasheet:
  797. // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
  798. // All settings here have the same (sometimes cryptic) names as in the datasheet.
  799. //
  800. // The following, uncommented settings are only suggestion.
  801.  
  802. /* GENERAL CONFIGURATION */
  803.  
  804. //#define GLOBAL_EN_PWM_MODE 0
  805. #define GLOBAL_I_SCALE_ANALOG 1 // [0,1] 0: Normal, 1: AIN
  806. //#define GLOBAL_INTERNAL_RSENSE 0 // [0,1] 0: Normal, 1: Internal
  807. #define GLOBAL_EN_PWM_MODE 0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
  808. //#define GLOBAL_ENC_COMMUTATION 0 // [0,1]
  809. #define GLOBAL_SHAFT 0 // [0,1] 0: normal, 1: invert
  810. //#define GLOBAL_DIAG0_ERROR 0 // [0,1]
  811. //#define GLOBAL_DIAG0_OTPW 0 // [0,1]
  812. //#define GLOBAL_DIAG0_STALL 0 // [0,1]
  813. //#define GLOBAL_DIAG1_STALL 0 // [0,1]
  814. //#define GLOBAL_DIAG1_INDEX 0 // [0,1]
  815. //#define GLOBAL_DIAG1_ONSTATE 0 // [0,1]
  816. //#define GLOBAL_DIAG1_ONSTATE 0 // [0,1]
  817. //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
  818. //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
  819. //#define GLOBAL_SMALL_HYSTERESIS 0 // [0,1]
  820. //#define GLOBAL_STOP_ENABLE 0 // [0,1]
  821. //#define GLOBAL_DIRECT_MODE 0 // [0,1]
  822.  
  823. /* VELOCITY-DEPENDENT DRIVE FEATURES */
  824.  
  825. #define GLOBAL_IHOLD 22 // [0-31] 0: min, 31: max
  826. #define GLOBAL_IRUN 31 // [0-31] 0: min, 31: max
  827. #define GLOBAL_IHOLDDELAY 15 // [0-15] 0: min, 15: about 4 seconds
  828. //#define GLOBAL_TPOWERDOWN 0 // [0-255] 0: min, 255: about 4 seconds
  829. //#define GLOBAL_TPWMTHRS 0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
  830. //#define GLOBAL_TCOOLTHRS 0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
  831. #define GLOBAL_THIGH 10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
  832.  
  833. /* SPI MODE CONFIGURATION */
  834.  
  835. //#define GLOBAL_XDIRECT 0
  836.  
  837. /* DCSTEP MINIMUM VELOCITY */
  838.  
  839. //#define GLOBAL_VDCMIN 0
  840.  
  841. /* MOTOR DRIVER CONFIGURATION*/
  842.  
  843. //#define GLOBAL_DEDGE 0
  844. //#define GLOBAL_DISS2G 0
  845. #define GLOBAL_INTPOL 1 // 0: off 1: 256 microstep interpolation
  846. #define GLOBAL_MRES 16 // number of microsteps
  847. #define GLOBAL_SYNC 1 // [0-15]
  848. #define GLOBAL_VHIGHCHM 1 // [0,1] 0: normal, 1: high velocity stepper mode
  849. #define GLOBAL_VHIGHFS 0 // [0,1] 0: normal, 1: switch to full steps for high velocities
  850. // #define GLOBAL_VSENSE 0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
  851. #define GLOBAL_TBL 1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
  852. #define GLOBAL_CHM 0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
  853. //#define GLOBAL_RNDTF 0
  854. //#define GLOBAL_DISFDCC 0
  855. //#define GLOBAL_FD 0
  856. //#define GLOBAL_HEND 0
  857. //#define GLOBAL_HSTRT 0
  858. #define GLOBAL_TOFF 10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
  859.  
  860. //#define GLOBAL_SFILT 0
  861. //#define GLOBAL_SGT 0
  862. //#define GLOBAL_SEIMIN 0
  863. //#define GLOBAL_SEDN 0
  864. //#define GLOBAL_SEMAX 0
  865. //#define GLOBAL_SEUP 0
  866. //#define GLOBAL_SEMIN 0
  867.  
  868. //#define GLOBAL_DC_TIME 0
  869. //#define GLOBAL_DC_SG 0
  870.  
  871. //#define GLOBAL_FREEWHEEL 0
  872. //#define GLOBAL_PWM_SYMMETRIC 0
  873. //#define GLOBAL_PWM_AUTOSCALE 0
  874. //#define GLOBAL_PWM_FREQ 0
  875. //#define GLOBAL_PWM_GRAD 0
  876. //#define GLOBAL_PWM_AMPL 0
  877.  
  878. //#define GLOBAL_ENCM_CTRL 0
  879.  
  880. #else
  881.  
  882. #define X_IHOLD 31 // [0-31] 0: min, 31: max
  883. #define X_IRUN 31 // [0-31] 0: min, 31: max
  884. #define X_IHOLDDELAY 15 // [0-15] 0: min, 15: about 4 seconds
  885. #define X_I_SCALE_ANALOG 1 // 0: Normal, 1: AIN
  886. #define X_MRES 16 // number of microsteps
  887. #define X_TBL 1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
  888. #define X_TOFF 8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
  889.  
  890. #define X2_IHOLD 31
  891. #define X2_IRUN 31
  892. #define X2_IHOLDDELAY 15
  893. #define X2_I_SCALE_ANALOG 1
  894. #define X2_MRES 16
  895. #define X2_TBL 1
  896. #define X2_TOFF 8
  897.  
  898. #define Y_IHOLD 31
  899. #define Y_IRUN 31
  900. #define Y_IHOLDDELAY 15
  901. #define Y_I_SCALE_ANALOG 1
  902. #define Y_MRES 16
  903. #define Y_TBL 1
  904. #define Y_TOFF 8
  905.  
  906. #define Y2_IHOLD 31
  907. #define Y2_IRUN 31
  908. #define Y2_IHOLDDELAY 15
  909. #define Y2_I_SCALE_ANALOG 1
  910. #define Y2_MRES 16
  911. #define Y2_TBL 1
  912. #define Y2_TOFF 8
  913.  
  914. #define Z_IHOLD 31
  915. #define Z_IRUN 31
  916. #define Z_IHOLDDELAY 15
  917. #define Z_I_SCALE_ANALOG 1
  918. #define Z_MRES 16
  919. #define Z_TBL 1
  920. #define Z_TOFF 8
  921.  
  922. #define Z2_IHOLD 31
  923. #define Z2_IRUN 31
  924. #define Z2_IHOLDDELAY 15
  925. #define Z2_I_SCALE_ANALOG 1
  926. #define Z2_MRES 16
  927. #define Z2_TBL 1
  928. #define Z2_TOFF 8
  929.  
  930. #define E0_IHOLD 31
  931. #define E0_IRUN 31
  932. #define E0_IHOLDDELAY 15
  933. #define E0_I_SCALE_ANALOG 1
  934. #define E0_MRES 16
  935. #define E0_TBL 1
  936. #define E0_TOFF 8
  937.  
  938. #define E1_IHOLD 31
  939. #define E1_IRUN 31
  940. #define E1_IHOLDDELAY 15
  941. #define E1_I_SCALE_ANALOG 1
  942. #define E1_MRES 16
  943. #define E1_TBL 1
  944. #define E1_TOFF 8
  945.  
  946. #define E2_IHOLD 31
  947. #define E2_IRUN 31
  948. #define E2_IHOLDDELAY 15
  949. #define E2_I_SCALE_ANALOG 1
  950. #define E2_MRES 16
  951. #define E2_TBL 1
  952. #define E2_TOFF 8
  953.  
  954. #define E3_IHOLD 31
  955. #define E3_IRUN 31
  956. #define E3_IHOLDDELAY 15
  957. #define E3_I_SCALE_ANALOG 1
  958. #define E3_MRES 16
  959. #define E3_TBL 1
  960. #define E3_TOFF 8
  961.  
  962. #endif // TMC2130_ADVANCED_CONFIGURATION
  963.  
  964. #endif // HAVE_TMC2130DRIVER
  965.  
  966. // @section L6470
  967.  
  968. /**
  969. * Enable this section if you have L6470 motor drivers.
  970. * You need to import the L6470 library into the Arduino IDE for this.
  971. * (https://github.com/ameyer/Arduino-L6470)
  972. */
  973.  
  974. //#define HAVE_L6470DRIVER
  975. #if ENABLED(HAVE_L6470DRIVER)
  976.  
  977. //#define X_IS_L6470
  978. //#define X2_IS_L6470
  979. //#define Y_IS_L6470
  980. //#define Y2_IS_L6470
  981. //#define Z_IS_L6470
  982. //#define Z2_IS_L6470
  983. //#define E0_IS_L6470
  984. //#define E1_IS_L6470
  985. //#define E2_IS_L6470
  986. //#define E3_IS_L6470
  987.  
  988. #define X_MICROSTEPS 16 // number of microsteps
  989. #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high
  990. #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
  991. #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
  992.  
  993. #define X2_MICROSTEPS 16
  994. #define X2_K_VAL 50
  995. #define X2_OVERCURRENT 2000
  996. #define X2_STALLCURRENT 1500
  997.  
  998. #define Y_MICROSTEPS 16
  999. #define Y_K_VAL 50
  1000. #define Y_OVERCURRENT 2000
  1001. #define Y_STALLCURRENT 1500
  1002.  
  1003. #define Y2_MICROSTEPS 16
  1004. #define Y2_K_VAL 50
  1005. #define Y2_OVERCURRENT 2000
  1006. #define Y2_STALLCURRENT 1500
  1007.  
  1008. #define Z_MICROSTEPS 16
  1009. #define Z_K_VAL 50
  1010. #define Z_OVERCURRENT 2000
  1011. #define Z_STALLCURRENT 1500
  1012.  
  1013. #define Z2_MICROSTEPS 16
  1014. #define Z2_K_VAL 50
  1015. #define Z2_OVERCURRENT 2000
  1016. #define Z2_STALLCURRENT 1500
  1017.  
  1018. #define E0_MICROSTEPS 16
  1019. #define E0_K_VAL 50
  1020. #define E0_OVERCURRENT 2000
  1021. #define E0_STALLCURRENT 1500
  1022.  
  1023. #define E1_MICROSTEPS 16
  1024. #define E1_K_VAL 50
  1025. #define E1_OVERCURRENT 2000
  1026. #define E1_STALLCURRENT 1500
  1027.  
  1028. #define E2_MICROSTEPS 16
  1029. #define E2_K_VAL 50
  1030. #define E2_OVERCURRENT 2000
  1031. #define E2_STALLCURRENT 1500
  1032.  
  1033. #define E3_MICROSTEPS 16
  1034. #define E3_K_VAL 50
  1035. #define E3_OVERCURRENT 2000
  1036. #define E3_STALLCURRENT 1500
  1037.  
  1038. #endif
  1039.  
  1040. /**
  1041. * TWI/I2C BUS
  1042. *
  1043. * This feature is an EXPERIMENTAL feature so it shall not be used on production
  1044. * machines. Enabling this will allow you to send and receive I2C data from slave
  1045. * devices on the bus.
  1046. *
  1047. * ; Example #1
  1048. * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
  1049. * ; It uses multiple M260 commands with one B<base 10> arg
  1050. * M260 A99 ; Target slave address
  1051. * M260 B77 ; M
  1052. * M260 B97 ; a
  1053. * M260 B114 ; r
  1054. * M260 B108 ; l
  1055. * M260 B105 ; i
  1056. * M260 B110 ; n
  1057. * M260 S1 ; Send the current buffer
  1058. *
  1059. * ; Example #2
  1060. * ; Request 6 bytes from slave device with address 0x63 (99)
  1061. * M261 A99 B5
  1062. *
  1063. * ; Example #3
  1064. * ; Example serial output of a M261 request
  1065. * echo:i2c-reply: from:99 bytes:5 data:hello
  1066. */
  1067.  
  1068. // @section i2cbus
  1069.  
  1070. //#define EXPERIMENTAL_I2CBUS
  1071. #define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
  1072.  
  1073. /**
  1074. * Add M43 command for pins info and testing
  1075. */
  1076. //#define PINS_DEBUGGING
  1077.  
  1078. /**
  1079. * Auto-report temperatures with M155 S<seconds>
  1080. */
  1081. //#define AUTO_REPORT_TEMPERATURES
  1082.  
  1083. /**
  1084. * Include capabilities in M115 output
  1085. */
  1086. //#define EXTENDED_CAPABILITIES_REPORT
  1087.  
  1088.  
  1089. /**
  1090. * Volumetric extrusion default state
  1091. * Activate to make volumetric extrusion the default method,
  1092. * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
  1093. *
  1094. * M200 D0 to disable, M200 Dn to set a new diameter.
  1095. */
  1096. //#define VOLUMETRIC_DEFAULT_ON
  1097.  
  1098. #endif // CONFIGURATION_ADV_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement