Advertisement
BlueRav3n

Untitled

Feb 13th, 2017
789
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 82.12 KB | None | 0 0
  1. /*
  2. This file is part of Repetier-Firmware.
  3.  
  4. Repetier-Firmware is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8.  
  9. Repetier-Firmware is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13.  
  14. You should have received a copy of the GNU General Public License
  15. along with Repetier-Firmware. If not, see <http://www.gnu.org/licenses/>.
  16.  
  17. */
  18.  
  19. #ifndef CONFIGURATION_H
  20. #define CONFIGURATION_H
  21.  
  22. // ################## EDIT THESE SETTINGS MANUALLY ################
  23.  
  24. #define DAVINCI 1// "0" if not DAVINCI, "1" For DAVINCI 1.0, "2" For DAVINCI 2.0 with 1 FAN, "3" For DAVINCI 2.0 with 2 FAN, 4 for AiO (WITH NO SCANNER SUPPORT)
  25. #define MODEL 1//"0" for first generation (jumper JP1 to reset ) , "1" for new generation (jumper J37 to reset)
  26. #define REPURPOSE_FAN_TO_COOL_EXTRUSIONS 0 //Setting this to 1 will repurpose the main Extruder cooling fan to be controlled VIA M106/M107
  27. //Warning: for DaVinci 1.0 need to add a permanent fan with power supply to cool extruder
  28.  
  29. // ################ END MANUAL SETTINGS ##########################
  30.  
  31. //Version
  32. #define VERSION_MAJOR "1"
  33. #define VERSION_MINOR_YEAR "16"
  34. #define VERSION_MINOR_MONTH "08"
  35. #define VERSION_MINOR_DAY "29"
  36. #define VERSION_BUILD "1"
  37.  
  38. //Davinci screen is not standard reprap it is WINSTAR 16x4
  39. #if DAVINCI==0
  40. #define WINSTAR_SCREEN 0
  41. #else
  42. #define WINSTAR_SCREEN 1
  43. #endif
  44.  
  45. //Decouple Test feature, do not disable it unless you know what you are doing!!!
  46. //if you have decouple issue it means you have hardware issue or bad air flow management!!!
  47. //this feature is a safety feature, if you disable it is dangerous!!!
  48. #define FEATURE_DECOUPLE_TEST 1
  49. //this will hide on sd card no extension files and bin/hex/dat files to make navigation and selection easier
  50. #define HIDE_BINARY_ON_SD 1
  51. #define UI_AUTOLIGHTOFF_AFTER 1
  52. #define ENABLE_CLEAN_DRIPBOX 1
  53. #define ENABLE_CLEAN_NOZZLE 1
  54. #define FEATURE_ENCODER 0
  55. //ensure of some define if AiO
  56. #if DAVINCI==4
  57. //no drip box
  58. #undef ENABLE_CLEAN_DRIPBOX
  59. #define ENABLE_CLEAN_DRIPBOX 0
  60. //it must be model 1
  61. #undef MODEL
  62. #define MODEL 1
  63. #endif
  64. //to enable communication using wifi module set to 1
  65. #define ENABLE_WIFI 0
  66. //define the wifi serial output
  67. //on Davinci use Serial
  68. //on RADDS use Serial1
  69. #if ENABLE_WIFI
  70. #if DAVINCI == 0
  71. #define WIFI_SERIAL Serial1
  72. #else
  73. #define WIFI_SERIAL Serial
  74. #endif
  75. #endif
  76. //if wifi is enabled serial need to slow down a little, this is a delay in ms after a '\n' so normaly after a command or a message
  77. #define DELAY_BY_LINE 50
  78. #if ENABLE_CLEAN_NOZZLE
  79. #if DAVINCI==0
  80. #define CLEAN_X 20
  81. #define CLEAN_Y 20
  82. #endif
  83. #if DAVINCI==1 //cleaner of Davinci 1.0 is not in same position of 2.0 neither AiO
  84. #define CLEAN_X 20
  85. #define CLEAN_Y 20
  86. #endif
  87. #if DAVINCI==2 || DAVINCI==3
  88. #define CLEAN_X 0
  89. #define CLEAN_Y 30
  90. #endif
  91. #if DAVINCI==4
  92. #define CLEAN_X 35
  93. #define CLEAN_Y 55
  94. #endif
  95. #endif
  96. #define CASE_KEEP_LIGHT_DEFAULT_ON 1
  97. #define CASE_FILAMENT_SENSOR_DEFAULT_ON 1
  98. #define CASE_TOP_SENSOR_DEFAULT_ON 1
  99. #define CASE_SOUND_DEFAULT_ON 1
  100. #define CASE_WIFI_DEFAULT_ON 0
  101. //default mode is advanced
  102. #define CASE_DISPLAY_MODE_DEFAULT 1
  103.  
  104. //Laser and turntable
  105. #if DAVINCI == 4
  106. #define TURNTABLE_STEP_PER_MM 110
  107. //table perimeter in mm for angle rotation as not direct drive for turntable
  108. #define TURNTABLE_PERIMETER 616
  109. //P/360 => 616/360 = 1.711111
  110. #define TURNTABLE_MM_PER_DEG 1.7111111
  111. #define TURNTABLE_DEFAULT_SPEED 10
  112. #define TURNTABLE_MAX_SPEED 50
  113. #define TURNTABLE_HOME_SPEED 25
  114. #define TURNTABLE_INVERT_ENABLE 0
  115. #define TURNTABLE_INVERT_DIR 1
  116. #define TURNTABLE_STEP_PIN 22
  117. #define TURNTABLE_DIR_PIN 13
  118. #define TURNTABLE_ENABLE_PIN 26
  119. #define NUM_MOTOR_DRIVERS 1
  120. #define MOTOR_DRIVER_1(var) StepperDriver<TURNTABLE_STEP_PIN,TURNTABLE_DIR_PIN,TURNTABLE_ENABLE_PIN,TURNTABLE_INVERT_DIR,TURNTABLE_INVERT_ENABLE> var(TURNTABLE_STEP_PER_MM,TURNTABLE_DEFAULT_SPEED)
  121. #endif
  122.  
  123. /* Some words on units:
  124.  
  125. From 0.80 onwards the units used are unified for easier configuration, watch out when transferring from older configs!
  126.  
  127. Speed is in mm/s
  128. Acceleration in mm/s^2
  129. Temperature is in degrees celsius
  130.  
  131.  
  132. ##########################################################################################
  133. ## IMPORTANT ##
  134. ##########################################################################################
  135.  
  136. For easy configuration, the default settings enable parameter storage in EEPROM.
  137. This means, after the first upload many variables can only be changed using the special
  138. M commands as described in the documentation. Changing these values in the configuration.h
  139. file has no effect. Parameters overriden by EEPROM settings are calibration values, extruder
  140. values except thermistor tables and some other parameter likely to change during usage
  141. like advance steps or ops mode.
  142. To override EEPROM settings with config settings, set EEPROM_MODE 0
  143.  
  144. */
  145.  
  146.  
  147. // BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
  148.  
  149. /** Number of extruders. Maximum 6 extruders. */
  150. #if DAVINCI==0
  151. #define NUM_EXTRUDER 1
  152. #endif
  153. //1.0/1.0A/AiO have 1 extruder
  154. #if DAVINCI==1 || DAVINCI==4
  155. #define NUM_EXTRUDER 1
  156. #endif
  157. //2.0/2.0A have 2 extruders
  158. #if DAVINCI==2 || DAVINCI==3
  159. #define NUM_EXTRUDER 2
  160. #endif
  161.  
  162. /** Set to 1 if all extruder motors go to 1 nozzle that mixes your colors. */
  163. #define MIXING_EXTRUDER 0
  164.  
  165. //// The following define selects which electronics board you have. Please choose the one that matches your setup
  166. // Arduino Due with RADDS = 402
  167. // Arduino Due with RAMPS-FD = 403
  168. // Arduino Due with RAMPS-FD V2 = 404
  169. // Felix Printers for arm = 405
  170. // DAM&DICE DUE = 406
  171. // Smart RAMPS for Due = 408
  172. // Ultratronics Board = 409
  173. // DUE3DOM = 410
  174. // DUE3DOM MINI = 411
  175. // Alligator Board rev1 = 500
  176. // Alligator Board rev2 = 501
  177. //DaVinci = 999
  178.  
  179. #if DAVINCI==0
  180. #define MOTHERBOARD 402
  181. #else
  182. #define MOTHERBOARD 999
  183. #endif
  184.  
  185. #include "pins.h"
  186.  
  187. // Override pin definitions from pins.h
  188. //#define FAN_PIN 4 // Extruder 2 uses the default fan output, so move to an other pin
  189. //#define EXTERNALSERIAL use Arduino serial library instead of build in. Requires more ram, has only 63 byte input buffer.
  190.  
  191.  
  192. /*
  193. We can connect BlueTooth to serial converter module directly to boards with a free serial port. Of course could you also
  194. use it to connect a second device like Raspberry PI internal connection. Just make sure only one port of the 2 supported
  195. gets used, or you will get problems with checksums etc.
  196. - On RADDS board use the 4 extension pins new blue fuse with 1 = Serial1
  197. - 100 is programming port on due
  198. - 101 is native port on due. Us eit to support both ports at the same time!
  199. */
  200. #define BLUETOOTH_SERIAL -1 // Port number (1..3) - For RADDS use 1
  201. #define BLUETOOTH_BAUD 115200 // communication speed
  202.  
  203.  
  204. // Uncomment the following line if you are using Arduino compatible firmware made for Arduino version earlier then 1.0
  205. // If it is incompatible you will get compiler errors about write functions not being compatible!
  206. //#define COMPAT_PRE1
  207.  
  208. /* Define the type of axis movements needed for your printer. The typical case
  209. is a full cartesian system where x, y and z moves are handled by separate motors.
  210.  
  211. 0 = full cartesian system, xyz have separate motors.
  212. 1 = z axis + xy H-gantry (x_motor = x+y, y_motor = x-y)
  213. 2 = z axis + xy H-gantry (x_motor = x+y, y_motor = y-x)
  214. 3 = Delta printers (Rostock, Kossel, RostockMax, Cerberus, etc)
  215. 4 = Tuga printer (Scott-Russell mechanism)
  216. 5 = Bipod system (not implemented)
  217. 8 = y axis + xz H-gantry (x_motor = x+z, z_motor = x-z)
  218. 9 = y axis + xz H-gantry (x_motor = x+z, z_motor = z-x)
  219. Cases 1, 2, 8 and 9 cover all needed xy and xz H gantry systems. If you get results mirrored etc. you can swap motor connections for x and y.
  220. If a motor turns in the wrong direction change INVERT_X_DIR or INVERT_Y_DIR.
  221. */
  222. #define DRIVE_SYSTEM CARTESIAN
  223.  
  224. /* You can write some GCODE to be executed on startup. Use this e.g. to set some
  225. pins. Separate multiple GCODEs with \n
  226. */
  227. //#define STARTUP_GCODE ""
  228.  
  229.  
  230. /*Bed Coating menu
  231. */
  232. #define UI_BED_COATING 1
  233.  
  234. // ##########################################################################################
  235. // ## Calibration ##
  236. // ##########################################################################################
  237.  
  238. /** Drive settings for the Delta printers
  239. */
  240. #if DRIVE_SYSTEM == DELTA
  241. // ***************************************************
  242. // *** These parameter are only for Delta printers ***
  243. // ***************************************************
  244.  
  245. /** \brief Delta drive type: 0 - belts and pulleys, 1 - filament drive */
  246. #define DELTA_DRIVE_TYPE 0
  247.  
  248. #if DELTA_DRIVE_TYPE == 0
  249. /** \brief Pitch in mm of drive belt. GT2 = 2mm */
  250. #define BELT_PITCH 2
  251. /** \brief Number of teeth on X, Y and Z tower pulleys */
  252. #define PULLEY_TEETH 20
  253. #define PULLEY_CIRCUMFERENCE (BELT_PITCH * PULLEY_TEETH)
  254. #elif DELTA_DRIVE_TYPE == 1
  255. /** \brief Filament pulley diameter in millimeters */
  256. #define PULLEY_DIAMETER 10
  257. #define PULLEY_CIRCUMFERENCE (PULLEY_DIAMETER * 3.1415927)
  258. #endif
  259.  
  260. /** \brief Steps per rotation of stepper motor */
  261. #define STEPS_PER_ROTATION 200
  262.  
  263. /** \brief Micro stepping rate of X, Y and Y tower stepper drivers */
  264. #define MICRO_STEPS 16
  265.  
  266. // Calculations
  267. #define AXIS_STEPS_PER_MM ((float)(MICRO_STEPS * STEPS_PER_ROTATION) / PULLEY_CIRCUMFERENCE)
  268. #define XAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
  269. #define YAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
  270. #define ZAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
  271. #else
  272. // *******************************************************
  273. // *** These parameter are for all other printer types ***
  274. // *******************************************************
  275.  
  276. /** Drive settings for printers with cartesian drive systems */
  277. /** \brief Number of steps for a 1mm move in x direction.
  278. For xy gantry use 2*belt moved!
  279. Overridden if EEPROM activated. */
  280. #define XAXIS_STEPS_PER_MM 80
  281. /** \brief Number of steps for a 1mm move in y direction.
  282. For xy gantry use 2*belt moved!
  283. Overridden if EEPROM activated.*/
  284. #define YAXIS_STEPS_PER_MM 80
  285. /** \brief Number of steps for a 1mm move in z direction Overridden if EEPROM activated.*/
  286. #define ZAXIS_STEPS_PER_MM 2560
  287. #endif
  288.  
  289. // ##########################################################################################
  290. // ## Extruder configuration ##
  291. // ##########################################################################################
  292.  
  293. // You can use either PWM (pulse width modulation) or PDM (pulse density modulation) for
  294. // extruders or coolers. PDM will give more signal changes per second, so on average it gives
  295. // the cleaner signal. The only advantage of PWM is giving signals at a fixed rate and never more
  296. // then PWM.
  297. #define PDM_FOR_EXTRUDER 1
  298. #if REPURPOSE_FAN_TO_COOL_EXTRUSIONS
  299. #define PDM_FOR_COOLER 0
  300. #else
  301. #define PDM_FOR_COOLER 1
  302. #endif
  303.  
  304. // The firmware checks if the heater and sensor got decoupled, which is dangerous. Since it will never reach target
  305. // temperature, the heater will stay on for every which can burn your printer or house.
  306. // As an additional barrier to your smoke detectors (I hope you have one above your printer) we now
  307. // do some more checks to detect if something got wrong.
  308.  
  309. #if FEATURE_DECOUPLE_TEST
  310. // If the temp. is on hold target, it may not sway more then this degrees celsius, or we mark
  311. // sensor as defect.
  312. #define DECOUPLING_TEST_MAX_HOLD_VARIANCE 15
  313. // Minimum temp. rise we expect after the set duration of full heating is over.
  314. // Always keep a good safety margin to get no false positives. If your period is e.g. 10 seconds
  315. // because at startup you already need 7 seconds until heater starts to rise temp. for sensor
  316. // then you have 3 seconds of increased heating to reach 1°„C.
  317. #define DECOUPLING_TEST_MIN_TEMP_RISE 1
  318. // Set to 1 if you want firmware to kill print on decouple
  319. #define KILL_IF_SENSOR_DEFECT 1
  320.  
  321. #endif
  322. // for each extruder, fan will stay on until extruder temperature is below this value
  323. #define EXTRUDER_FAN_COOL_TEMP 50
  324. // Retraction for sd pause over lcd
  325. #define RETRACT_ON_PAUSE 2
  326. // These commands get executed after storing position and going to park position.
  327. #define PAUSE_START_COMMANDS "M117 SD Paused"
  328. // These commands get executed before we go to stored position.
  329. #define PAUSE_END_COMMANDS "M117 Printing ..."
  330. /* Set to 1 if all extruders use the same heater block. Temp. control is then always
  331. controlled by settings in extruder 0 definition. */
  332. #define SHARED_EXTRUDER_HEATER 0
  333. /* Speed in mm/s for extruder moves fom internal commands, e.g. switching extruder. */
  334. #define EXTRUDER_SWITCH_XY_SPEED 100
  335.  
  336. #define EXT0_X_OFFSET 0
  337. #define EXT0_Y_OFFSET 0
  338. #define EXT0_Z_OFFSET 0
  339. // for skeinforge 40 and later, steps to pull the plastic 1 mm inside the extruder, not out. Overridden if EEPROM activated.
  340. #define EXT0_STEPS_PER_MM 99 //425 // 825.698 //457
  341. // What type of sensor is used?
  342. // 1 is 100k thermistor (Epcos B57560G0107F000 - RepRap-Fab.org and many other)
  343. // 2 is 200k thermistor
  344. // 3 is mendel-parts thermistor (EPCOS G550)
  345. // 4 is 10k thermistor
  346. // 8 is ATC Semitec 104GT-2
  347. // 13 is PT100 for E3D/Ultimaker
  348. // 5 is userdefined thermistor table 0
  349. // 6 is userdefined thermistor table 1
  350. // 7 is userdefined thermistor table 2
  351. // 12 is 100k RS thermistor 198-961
  352. // 13 is PT100 for E3D/Ultimaker
  353. // 14 is 100K NTC 3950
  354. // 50 is userdefined thermistor table 0 for PTC thermistors
  355. // 51 is userdefined thermistor table 0 for PTC thermistors
  356. // 52 is userdefined thermistor table 0 for PTC thermistors
  357. // 60 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1/4 the price of AD595 but only MSOT_08 package)
  358. // 61 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1.25 Vref offset like Adafruit breakout)
  359. // 97 Generic thermistor table 1
  360. // 98 Generic thermistor table 2
  361. // 99 Generic thermistor table 3
  362. // 100 is AD595
  363. // 101 is MAX6675
  364. // 102 is MAX31855
  365. #define EXT0_TEMPSENSOR_TYPE 1
  366. // Analog input pin for reading temperatures or pin enabling SS for MAX6675
  367. #define EXT0_TEMPSENSOR_PIN TEMP_0_PIN
  368. // Which pin enables the heater
  369. #define EXT0_HEATER_PIN HEATER_0_PIN
  370. #define EXT0_STEP_PIN E0_STEP_PIN
  371. #define EXT0_DIR_PIN E0_DIR_PIN
  372. // set to false/true for normal / inverse direction
  373. #if DAVINCI==0
  374. #define EXT0_INVERSE false
  375. #endif
  376. #if DAVINCI==1 || DAVINCI==4
  377. #define EXT0_INVERSE false
  378. #endif
  379. #if DAVINCI==2 || DAVINCI==3
  380. #define EXT0_INVERSE true
  381. #endif
  382. #define EXT0_ENABLE_PIN E0_ENABLE_PIN
  383. /* Set to 1 to mirror motor. Pins for mirrored motor are below */
  384. #define EXT0_MIRROR_STEPPER 0
  385. #define EXT0_STEP2_PIN E0_STEP_PIN
  386. #define EXT0_DIR2_PIN E0_DIR_PIN
  387. #define EXT0_INVERSE2 false
  388. #define EXT0_ENABLE2_PIN E0_ENABLE_PIN
  389.  
  390. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  391. #define EXT0_ENABLE_ON 0
  392. // The following speed settings are for skeinforge 40+ where e is the
  393. // length of filament pulled inside the heater. For repsnap or older
  394. // skeinforge use higher values.
  395. // Overridden if EEPROM activated.
  396. #define EXT0_MAX_FEEDRATE 50
  397. // Feedrate from halted extruder in mm/s
  398. // Overridden if EEPROM activated.
  399. #define EXT0_MAX_START_FEEDRATE 20
  400. // Acceleration in mm/s^2
  401. // Overridden if EEPROM activated.
  402. #define EXT0_MAX_ACCELERATION 5000
  403. /** Type of heat manager for this extruder.
  404. - 0 = Simply switch on/off if temperature is reached. Works always.
  405. - 1 = PID Temperature control. Is better but needs good PID values. Defaults are a good start for most extruder.
  406. - 3 = Dead-time control. PID_P becomes dead-time in seconds.
  407. Overridden if EEPROM activated.
  408. */
  409. #define EXT0_HEAT_MANAGER 3
  410. /** Wait x seconds, after reaching target temperature. Only used for M109. Overridden if EEPROM activated. */
  411. #define EXT0_WATCHPERIOD 1
  412.  
  413. /** \brief The maximum value, I-gain can contribute to the output.
  414.  
  415. A good value is slightly higher then the output needed for your temperature.
  416. Values for starts:
  417. 130 => PLA for temperatures from 170-180 deg C
  418. 180 => ABS for temperatures around 240 deg C
  419.  
  420. The precise values may differ for different nozzle/resistor combination.
  421. Overridden if EEPROM activated.
  422. */
  423. #define EXT0_PID_INTEGRAL_DRIVE_MAX 230
  424. /** \brief lower value for integral part
  425.  
  426. The I state should converge to the exact heater output needed for the target temperature.
  427. To prevent a long deviation from the target zone, this value limits the lower value.
  428. A good start is 30 lower then the optimal value. You need to leave room for cooling.
  429. Overridden if EEPROM activated.
  430. */
  431. #define EXT0_PID_INTEGRAL_DRIVE_MIN 40
  432. /** P-gain. Overridden if EEPROM activated. */
  433. #define EXT0_PID_PGAIN_OR_DEAD_TIME 3
  434. /** I-gain. Overridden if EEPROM activated.
  435. */
  436. #define EXT0_PID_I 2
  437. /** Dgain. Overridden if EEPROM activated.*/
  438. #define EXT0_PID_D 40
  439. // maximum time the heater is can be switched on. Max = 255. Overridden if EEPROM activated.
  440. #define EXT0_PID_MAX 255
  441. /** \brief Faktor for the advance algorithm. 0 disables the algorithm. Overridden if EEPROM activated.
  442. K is the factor for the quadratic term, which is normally disabled in newer versions. If you want to use
  443. the quadratic factor make sure ENABLE_QUADRATIC_ADVANCE is defined.
  444. L is the linear factor and seems to be working better then the quadratic dependency.
  445. */
  446. #define EXT0_ADVANCE_K 0.0f
  447. #define EXT0_ADVANCE_L 0.0f
  448. /* Motor steps to remove backlash for advance algorithm. These are the steps
  449. needed to move the motor cog in reverse direction until it hits the driving
  450. cog. Direct drive extruder need 0. */
  451. #define EXT0_ADVANCE_BACKLASH_STEPS 0
  452. /** \brief Temperature to retract filament when extruder is heating up. Overridden if EEPROM activated.
  453. */
  454. #define EXT0_WAIT_RETRACT_TEMP 150
  455. /** \brief Units (mm/inches) to retract filament when extruder is heating up. Overridden if EEPROM activated. Set
  456. to 0 to disable.
  457. */
  458. #define EXT0_WAIT_RETRACT_UNITS 0
  459.  
  460. /** You can run any GCODE command on extruder deselect/select. Separate multiple commands with a new line \n.
  461. That way you can execute some mechanical components needed for extruder selection or retract filament or whatever you need.
  462. The codes are only executed for multiple extruder when changing the extruder. */
  463. #define EXT0_SELECT_COMMANDS "M117 Extruder 1"
  464. #define EXT0_DESELECT_COMMANDS ""
  465. /** The extruder cooler is a fan to cool the extruder when it is heating. If you turn the extruder on, the fan goes on. */
  466.  
  467. #if DAVINCI==3
  468. #define EXT0_EXTRUDER_COOLER_PIN ORIG_FAN2_PIN
  469. #else
  470. #define EXT0_EXTRUDER_COOLER_PIN ORIG_FAN_PIN
  471. #endif
  472. /** PWM speed for the cooler fan. 0=off 255=full speed */
  473. #define EXT0_EXTRUDER_COOLER_SPEED 255
  474. /** Time in ms between a heater action and test of success. Must be more then time between turning heater on and first temp. rise! */
  475. #define EXT0_DECOUPLE_TEST_PERIOD 30000
  476. /** Pin which toggles regualrly during extrusion allowing jam control. -1 = disabled */
  477. #define EXT0_JAM_PIN -1
  478. /** Pullup resistor for jam pin? */
  479. #define EXT0_JAM_PULLUP false
  480.  
  481. /** If enabled you can select the distance your filament gets retracted during a
  482. M140 command, after a given temperature is reached. */
  483. #define RETRACT_DURING_HEATUP true
  484.  
  485. /** Allow retraction with G10/G11 removing requirement for retraction setting in slicer. Also allows filament change if lcd is configured. */
  486. #define FEATURE_RETRACTION 1
  487. /** auto-retract converts pure extrusion moves into retractions. Beware that
  488. simple extrusion e.g. over Repetier-Host will then not work! */
  489. #define AUTORETRACT_ENABLED 0
  490. #define RETRACTION_LENGTH 3
  491. #define RETRACTION_LONG_LENGTH 13
  492. #define RETRACTION_SPEED 40
  493. #define RETRACTION_Z_LIFT 0
  494. #define RETRACTION_UNDO_EXTRA_LENGTH 0
  495. #define RETRACTION_UNDO_EXTRA_LONG_LENGTH 0
  496. #define RETRACTION_UNDO_SPEED 20
  497.  
  498. /**
  499. If you have a lcd display, you can do a filament switch with M600.
  500. It will change the current extruders filament and temperature must already be high enough.
  501. */
  502. #define FILAMENTCHANGE_X_POS 0
  503. #define FILAMENTCHANGE_Y_POS 0
  504. #define FILAMENTCHANGE_Z_ADD 1
  505. /** Does a homing procedure after a filament change. This is good in case
  506. you moved the extruder while changing filament during print.
  507. 0 = no homing, 1 = xy homing, 2 = xyz homing
  508. */
  509. #define FILAMENTCHANGE_REHOME 1
  510. /** Will first retract short distance, go to change position and then retract longretract.
  511. Retractions speeds are taken from RETRACTION_SPEED and RETRACTION_UNDO_SPEED
  512. */
  513. #define FILAMENTCHANGE_SHORTRETRACT 30
  514. #define FILAMENTCHANGE_LONGRETRACT 30
  515.  
  516. /* Define how we detect jam/out of filament
  517. 1 = Distance between signal changes increase
  518. 2 = signal gets high
  519. 3 = signal gets low
  520.  
  521. 2 and 3 are not jam detections, but only out of filament detection by a switch
  522. that changes the signal!
  523. */
  524. #define JAM_METHOD 1
  525. // Steps normally needed for a full signal cycle.
  526. #define JAM_STEPS 220
  527. // Steps for reducing speed. Must be higher then JAM_STEPS
  528. #define JAM_SLOWDOWN_STEPS 380
  529. // New speed multiplier which gets set when slowdown is reached.
  530. #define JAM_SLOWDOWN_TO 70
  531. // Last fallback. If we slip this much, we want to pause.
  532. #define JAM_ERROR_STEPS 430
  533. /** To prevent signal bouncing, only consider changes if we are this much steps
  534. away from last signal change. */
  535. #define JAM_MIN_STEPS 10
  536. /*
  537. Determine what should be done if a jam is detected
  538. 0 : Nothing, just mark extruder as jammed.
  539. 1 : Jam/out of filament dialog and block communication.
  540. 2 : Message to host/server otherwise continue and mark extruder jammed
  541. */
  542. #define JAM_ACTION 1
  543.  
  544. /** PID control only works target temperature +/- PID_CONTROL_RANGE.
  545. If you get much overshoot at the first temperature set, because the heater is going full power too long, you
  546. need to increase this value. For one 6.8 Ohm heater 10 is ok. With two 6.8 Ohm heater use 15.
  547. */
  548. #define PID_CONTROL_RANGE 20
  549.  
  550. /** Prevent extrusions longer then x mm for one command. This is especially important if you abort a print. Then the
  551. extrusion position might be at any value like 23344. If you then have an G1 E-2 it will roll back 23 meter! */
  552. #define EXTRUDE_MAXLENGTH 100
  553. /** Skip wait, if the extruder temperature is already within x degrees. Only fixed numbers, 0 = off */
  554. #define SKIP_M109_IF_WITHIN 2
  555.  
  556. /** \brief Set PID scaling
  557.  
  558. PID values assume a usable range from 0-255. This can be further limited to EXT0_PID_MAX by to methods.
  559. Set the value to 0: Normal computation, just clip output to EXT0_PID_MAX if computed value is too high.
  560. Set value to 1: Scale PID by EXT0_PID_MAX/256 and then clip to EXT0_PID_MAX.
  561. If your EXT0_PID_MAX is low, you should prefer the second method.
  562. */
  563. #define SCALE_PID_TO_MAX 0
  564.  
  565. #define HEATER_PWM_SPEED 1 // How fast ist pwm signal 0 = 15.25Hz, 1 = 30.51Hz, 2 = 61.03Hz, 3 = 122.06Hz
  566.  
  567. /** Temperature range for target temperature to hold in M109 command. 5 means +/-5 degC
  568.  
  569. Uncomment define to force the temperature into the range for given watch period.
  570. */
  571. //#define TEMP_HYSTERESIS 5
  572.  
  573. /** Userdefined thermistor table
  574.  
  575. There are many different thermistors, which can be combined with different resistors. This result
  576. in unpredictable number of tables. As a resolution, the user can define one table here, that can
  577. be used as type 5 for thermistor type in extruder/heated bed definition. Make sure, the number of entries
  578. matches the value in NUM_TEMPS_USERTHERMISTOR0. If you span definition over multiple lines, make sure to end
  579. each line, except the last, with a backslash. The table format is {{adc1,temp1},{adc2,temp2}...} with
  580. increasing adc values. For more informations, read
  581. http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html
  582.  
  583. If you have a sprinter temperature table, you have to multiply the first value with 4 and the second with 8.
  584. This firmware works with increased precision, so the value reads go from 0 to 4095 and the temperature is
  585. temperature*8.
  586.  
  587. If you have a PTC thermistor instead of a NTC thermistor, keep the adc values increasing and use thermistor types 50-52 instead of 5-7!
  588. */
  589. /** Number of entries in the user thermistor table 0. Set to 0 to disable it. */
  590. #if MODEL==0
  591. #define NUM_TEMPS_USERTHERMISTOR0 33
  592. #define USER_THERMISTORTABLE0 {{96,2400},{99,2320},{113,2240},{132,2160},{155,2080},{180,2000},{211,1920},{247,1840},{293,1760},{350,1680},{421,1600},{508,1520},{611,1440},{732,1360},{871,1280},{1024,1200},{1192,1120},{1369,1040},{1552,960},{1737,880},{1900,800},{2070,720},{2219,640},{2361,560},{2478,480},{2565,400},{2628,320},{2673,240},{2710,160},{2746,80},{2783,0},{2824,-80},{2864,-160}}
  593.  
  594. /** Number of entries in the user thermistor table 1. Set to 0 to disable it. */
  595. #define NUM_TEMPS_USERTHERMISTOR1 19
  596. #define USER_THERMISTORTABLE1 {{628,1280},{859,1200},{1113,1120},{1382,1040},{1660,960},{1938,880},{2211,800},{2473,720},{2718,640},{2945,560},{3148,480},{3328,400},{3482,320},{3613,240},{3722,160},{3815,80},{3895,0},{3972,-80},{4055,-160}}
  597.  
  598. /** Number of entries in the user thermistor table 2. Set to 0 to disable it. */
  599. #define NUM_TEMPS_USERTHERMISTOR2 0
  600. #define USER_THERMISTORTABLE2 {}
  601.  
  602. #else
  603. #define NUM_TEMPS_USERTHERMISTOR0 28
  604. #define USER_THERMISTORTABLE0 {{294, 2560},{375, 2400},{461, 2272},{526, 2184},{601, 2104},{674, 2048},{811, 1928},{925, 1848},{1071, 1768},{1219, 1696},{1445, 1584},{1673, 1496},{1902, 1416},{2187, 1312},{2454, 1224},{2672, 1152},{3000, 1048},{3196, 968},{3439, 864},{3583, 784},{3736, 680},{3899, 536},{3960, 448},{4024, 336},{4067, 192},{4079, 156},{4100, 0},{4120, -160}}
  605.  
  606. /** Number of entries in the user thermistor table 1. Set to 0 to disable it. */
  607. #define NUM_TEMPS_USERTHERMISTOR1 19
  608. #define USER_THERMISTORTABLE1 {{628,1280},{859,1200},{1113,1120},{1382,1040},{1660,960},{1938,880},{2211,800},{2473,720},{2718,640},{2945,560},{3148,480},{3328,400},{3482,320},{3613,240},{3722,160},{3815,80},{3895,0},{3972,-80},{4055,-160}}
  609.  
  610. /** Number of entries in the user thermistor table 2. Set to 0 to disable it. */
  611. #define NUM_TEMPS_USERTHERMISTOR2 0
  612. #endif
  613.  
  614. /** If defined, creates a thermistor table at startup.
  615.  
  616. If you don't feel like computing the table on your own, you can use this generic method. It is
  617. a simple approximation which may be not as accurate as a good table computed from the reference
  618. values in the datasheet. You can increase precision if you use a temperature/resistance for
  619. R0/T0, which is near your operating temperature. This will reduce precision for lower temperatures,
  620. which are not really important. The resistors must fit the following schematic:
  621. @code
  622. VREF ---- R2 ---+--- Termistor ---+-- GND
  623. | |
  624. +------ R1 -------+
  625. | |
  626. +---- Capacitor --+
  627. |
  628. V measured
  629. @endcode
  630.  
  631. If you don't have R1, set it to 0.
  632. The capacitor is for reducing noise from long thermistor cable. If you don't have one, it's OK.
  633.  
  634. If you need the generic table, uncomment the following define.
  635. */
  636. //#define USE_GENERIC_THERMISTORTABLE_1
  637.  
  638. /* Some examples for different thermistors:
  639.  
  640. EPCOS B57560G104+ : R0 = 100000 T0 = 25 Beta = 4036
  641. EPCOS 100K Thermistor (B57560G1104F) : R0 = 100000 T0 = 25 Beta = 4092
  642. ATC Semitec 104GT-2 : R0 = 100000 T0 = 25 Beta = 4267
  643. Honeywell 100K Thermistor (135-104LAG-J01) : R0 = 100000 T0 = 25 Beta = 3974
  644.  
  645. */
  646.  
  647. /** Reference Temperature */
  648. #define GENERIC_THERM1_T0 25
  649. /** Resistance at reference temperature */
  650. #define GENERIC_THERM1_R0 100000
  651. /** Beta value of thermistor
  652.  
  653. You can use the beta from the datasheet or compute it yourself.
  654. See http://reprap.org/wiki/MeasuringThermistorBeta for more details.
  655. */
  656. #define GENERIC_THERM1_BETA 4036
  657. /** Start temperature for generated thermistor table */
  658. #define GENERIC_THERM1_MIN_TEMP -20
  659. /** End Temperature for generated thermistor table */
  660. #define GENERIC_THERM1_MAX_TEMP 300
  661. #define GENERIC_THERM1_R1 0
  662. #define GENERIC_THERM1_R2 4700
  663.  
  664. // The same for table 2 and 3 if needed
  665.  
  666. // #define USE_GENERIC_THERMISTORTABLE_2
  667. #define GENERIC_THERM2_R0 100000
  668. #define GENERIC_THERM2_T0 25
  669. #define GENERIC_THERM2_BETA 3950
  670. #define GENERIC_THERM2_MIN_TEMP -20
  671. #define GENERIC_THERM2_MAX_TEMP 300
  672. #define GENERIC_THERM2_R1 0
  673. #define GENERIC_THERM2_R2 4700
  674.  
  675. //#define USE_GENERIC_THERMISTORTABLE_3
  676. #define GENERIC_THERM3_T0 170
  677. #define GENERIC_THERM3_R0 1042.7
  678. #define GENERIC_THERM3_BETA 4036
  679. #define GENERIC_THERM3_MIN_TEMP -20
  680. #define GENERIC_THERM3_MAX_TEMP 300
  681. #define GENERIC_THERM3_R1 0
  682. #define GENERIC_THERM3_R2 4700
  683.  
  684. /** Supply voltage to ADC, can be changed by setting ANALOG_REF below to different value. */
  685. #define GENERIC_THERM_VREF 5
  686. /** Number of entries in generated table. One entry takes 4 bytes. Higher number of entries increase computation time too.
  687. Value is used for all generic tables created. */
  688. #define GENERIC_THERM_NUM_ENTRIES 33
  689.  
  690. // uncomment the following line for MAX6675 support.
  691. //#define SUPPORT_MAX6675
  692. // uncomment the following line for MAX31855 support.
  693. //#define SUPPORT_MAX31855
  694.  
  695. // ############# Heated bed configuration ########################
  696.  
  697. /** \brief Set true if you have a heated bed conected to your board, false if not */
  698. #define HAVE_HEATED_BED true
  699.  
  700. #define HEATED_BED_MAX_TEMP 130
  701. /** Skip M190 wait, if heated bed is already within x degrees. Fixed numbers only, 0 = off. */
  702. #define SKIP_M190_IF_WITHIN 5
  703.  
  704. // Select type of your heated bed. It's the same as for EXT0_TEMPSENSOR_TYPE
  705. // set to 0 if you don't have a heated bed
  706. #define HEATED_BED_SENSOR_TYPE 6
  707. /** Analog pin of analog sensor to read temperature of heated bed. */
  708. #define HEATED_BED_SENSOR_PIN TEMP_1_PIN
  709. /** \brief Pin to enable heater for bed. */
  710. #define HEATED_BED_HEATER_PIN HEATER_1_PIN
  711. // How often the temperature of the heated bed is set (msec)
  712. #define HEATED_BED_SET_INTERVAL 5000
  713.  
  714. /**
  715. Heat manager for heated bed:
  716. 0 = Bang Bang, fast update
  717. 1 = PID controlled
  718. 2 = Bang Bang, limited check every HEATED_BED_SET_INTERVAL. Use this with relay-driven beds to save life time
  719. 3 = dead time control
  720. */
  721. #define HEATED_BED_HEAT_MANAGER 2
  722. /** \brief The maximum value, I-gain can contribute to the output.
  723. The precise values may differ for different nozzle/resistor combination.
  724. Overridden if EEPROM activated.
  725. */
  726. #define HEATED_BED_PID_INTEGRAL_DRIVE_MAX 255
  727. /** \brief lower value for integral part
  728.  
  729. The I state should converge to the exact heater output needed for the target temperature.
  730. To prevent a long deviation from the target zone, this value limits the lower value.
  731. A good start is 30 lower then the optimal value. You need to leave room for cooling.
  732. Overridden if EEPROM activated.
  733. */
  734. #define HEATED_BED_PID_INTEGRAL_DRIVE_MIN 80
  735. /** P-gain. Overridden if EEPROM activated. */
  736. #define HEATED_BED_PID_PGAIN_OR_DEAD_TIME 196
  737. /** I-gain Overridden if EEPROM activated.*/
  738. #define HEATED_BED_PID_IGAIN 33.0
  739. /** Dgain. Overridden if EEPROM activated.*/
  740. #define HEATED_BED_PID_DGAIN 290
  741. // maximum time the heater can be switched on. Max = 255. Overridden if EEPROM activated.
  742. #define HEATED_BED_PID_MAX 255
  743. // Time to see a temp. change when fully heating. Consider that beds at higher temp. need longer to rise and cold
  744. // beds need some time to get the temp. to the sensor. Time is in milliseconds!
  745. #define HEATED_BED_DECOUPLE_TEST_PERIOD 300000
  746.  
  747. // When temperature exceeds max temp, your heater will be switched off.
  748. // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
  749. #define MAXTEMP 270
  750.  
  751. /** Extreme values to detect defect thermistors. */
  752. #define MIN_DEFECT_TEMPERATURE -10
  753. #define MAX_DEFECT_TEMPERATURE 290
  754.  
  755. // ##########################################################################################
  756. // ## Laser configuration ##
  757. // ##########################################################################################
  758.  
  759. /*
  760. If the firmware is in laser mode, it can control a laser output to cut or engrave materials.
  761. Please use this feature only if you know about safety and required protection. Lasers are
  762. dangerous and can hurt or make you blind!!!
  763.  
  764. The default laser driver only supports laser on and off. Here you control the intensity with
  765. your feedrate. For exchangeable diode lasers this is normally enough. If you need more control
  766. you can set the intensity in a range 0-255 with a custom extension to the driver. See driver.h
  767. and comments on how to extend the functions non invasive with our event system.
  768.  
  769. If you have a laser - powder system you will like your E override. If moves contain a
  770. increasing extruder position it will laser that move. With this trick you can
  771. use existing FDM slicers to laser the output. Laser width is extrusion width.
  772.  
  773. Other tools may use M3 and M5 to enable/disable laser. Here G1/G2/G3 moves have laser enabled
  774. and G0 moves have it disables.
  775.  
  776. In any case, laser only enables while moving. At the end of a move it gets
  777. automatically disabled.
  778. */
  779.  
  780. #define SUPPORT_LASER 0 // set 1 to enable laser support
  781. #define LASER_PIN -1 // set to pin enabling laser
  782. #define LASER_ON_HIGH 1 // Set 0 if low signal enables laser
  783.  
  784. // ##########################################################################################
  785. // ## CNC configuration ##
  786. // ##########################################################################################
  787.  
  788. /*
  789. If the firmware is in CNC mode, it can control a mill with M3/M4/M5. It works
  790. similar to laser mode, but mill keeps enabled during G0 moves and it allows
  791. setting rpm (only with event extension that supports this) and milling direction.
  792. It also can add a delay to wait for spindle to run on full speed.
  793. */
  794.  
  795. #define SUPPORT_CNC 0 // Set 1 for CNC support
  796. #define CNC_WAIT_ON_ENABLE 300 // wait x milliseconds after enabling
  797. #define CNC_WAIT_ON_DISABLE 0 // delay in milliseconds after disabling spindle. May be required for direction changes.
  798. #define CNC_ENABLE_PIN -1 // Pin to enable mill
  799. #define CNC_ENABLE_WITH 1 // Set 0 if low enables spindle
  800. #define CNC_DIRECTION_PIN -1 // Set to pin if direction control is possible
  801. #define CNC_DIRECTION_CW 1 // Set signal required for clockwise rotation
  802.  
  803.  
  804. /* Select the default mode when the printer gets enables. Possible values are
  805. PRINTER_MODE_FFF 0
  806. PRINTER_MODE_LASER 1
  807. PRINTER_MODE_CNC 2
  808. */
  809. #define DEFAULT_PRINTER_MODE PRINTER_MODE_FFF
  810.  
  811. // ##########################################################################################
  812. // ## Endstop configuration ##
  813. // ##########################################################################################
  814.  
  815. /* By default all endstops are pulled up to HIGH. You need a pull-up if you
  816. use a mechanical endstop connected with GND. Set value to false for no pull-up
  817. on this endstop.
  818. */
  819. #define ENDSTOP_PULLUP_X_MIN false
  820. #define ENDSTOP_PULLUP_Y_MIN false
  821. #define ENDSTOP_PULLUP_Z_MIN false
  822. #define ENDSTOP_PULLUP_X_MAX true
  823. #define ENDSTOP_PULLUP_Y_MAX true
  824. #define ENDSTOP_PULLUP_Z_MAX true
  825.  
  826. // Set to true to invert the logic of the endstops
  827. #define ENDSTOP_X_MIN_INVERTING false
  828. #define ENDSTOP_Y_MIN_INVERTING false
  829. #define ENDSTOP_Z_MIN_INVERTING false
  830. #define ENDSTOP_X_MAX_INVERTING true
  831. #define ENDSTOP_Y_MAX_INVERTING true
  832. #define ENDSTOP_Z_MAX_INVERTING true
  833.  
  834. // Set the values true where you have a hardware endstop. The Pin number is taken from pins.h.
  835.  
  836. #define MIN_HARDWARE_ENDSTOP_X true
  837. #define MIN_HARDWARE_ENDSTOP_Y true
  838. #define MIN_HARDWARE_ENDSTOP_Z true
  839. #define MAX_HARDWARE_ENDSTOP_X false
  840. #define MAX_HARDWARE_ENDSTOP_Y false
  841. #define MAX_HARDWARE_ENDSTOP_Z false
  842.  
  843. //If your axes are only moving in one direction, make sure the endstops are connected properly.
  844. //If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here
  845.  
  846.  
  847.  
  848. //// ADVANCED SETTINGS - to tweak parameters
  849.  
  850. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  851. #define X_ENABLE_ON 0
  852. #define Y_ENABLE_ON 0
  853. #define Z_ENABLE_ON 0
  854.  
  855. // Disables axis when it's not being used.
  856. #define DISABLE_X false
  857. #define DISABLE_Y false
  858. #define DISABLE_Z false
  859. #define DISABLE_E false
  860. /* If you want to keep z motor running on stepper timeout, remove comments below.
  861. This may be useful if your z bed moves when motors are disabled. Will still
  862. turn z off when heaters get also disabled.
  863. */
  864. //#define PREVENT_Z_DISABLE_ON_STEPPER_TIMEOUT
  865.  
  866. // Inverting axis direction
  867. #define INVERT_X_DIR true
  868. #define INVERT_Y_DIR false
  869. #define INVERT_Z_DIR true
  870.  
  871. //// ENDSTOP SETTINGS:
  872. // Sets direction of endstops when homing; 1=MAX, -1=MIN
  873. #define X_HOME_DIR -1
  874. #define Y_HOME_DIR -1
  875. #define Z_HOME_DIR -1
  876.  
  877. // Delta robot radius endstop
  878. #define max_software_endstop_r true
  879.  
  880. //If true, axis won't move to coordinates less than zero.
  881. #define min_software_endstop_x false
  882. #define min_software_endstop_y false
  883. #define min_software_endstop_z false
  884.  
  885. //If true, axis won't move to coordinates greater than the defined lengths below.
  886. #define max_software_endstop_x true
  887. #define max_software_endstop_y true
  888. #define max_software_endstop_z true
  889.  
  890. // If during homing the endstop is reached, ho many mm should the printer move back for the second try
  891. #define ENDSTOP_X_BACK_MOVE 5
  892. #define ENDSTOP_Y_BACK_MOVE 5
  893. #define ENDSTOP_Z_BACK_MOVE 2
  894.  
  895. // For higher precision you can reduce the speed for the second test on the endstop
  896. // during homing operation. The homing speed is divided by the value. 1 = same speed, 2 = half speed
  897. #define ENDSTOP_X_RETEST_REDUCTION_FACTOR 3
  898. #define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 3
  899. //Davinci Specific, bad noise if set to 3
  900. #define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 4
  901.  
  902. // When you have several endstops in one circuit you need to disable it after homing by moving a
  903. // small amount back. This is also the case with H-belt systems.
  904.  
  905. #if DAVINCI==0
  906. #define ENDSTOP_X_BACK_ON_HOME 0
  907. #define ENDSTOP_Y_BACK_ON_HOME 0
  908. #define ENDSTOP_Z_BACK_ON_HOME 0
  909. #endif
  910.  
  911. #if DAVINCI==1 || DAVINCI==4
  912. #define ENDSTOP_X_BACK_ON_HOME 0
  913. #define ENDSTOP_Y_BACK_ON_HOME 0
  914. #define ENDSTOP_Z_BACK_ON_HOME 0
  915. #endif
  916.  
  917. #if DAVINCI==2 || DAVINCI==3
  918. #define ENDSTOP_X_BACK_ON_HOME 0
  919. //to avoid to hit plate when homing
  920. #define ENDSTOP_Y_BACK_ON_HOME 7
  921. #define ENDSTOP_Z_BACK_ON_HOME 0
  922. #endif
  923.  
  924.  
  925. // You can disable endstop checking for print moves. This is needed, if you get sometimes
  926. // false signals from your endstops. If your endstops don't give false signals, you
  927. // can set it on for safety.
  928. //Davinci, specific : Home sensors are easy to get noise an make print to lift, especially on 1.0A/2.0A, so disable it as no need to check home position all the time
  929. #define ALWAYS_CHECK_ENDSTOPS 0
  930.  
  931. // maximum positions in mm - only fixed numbers!
  932. // For delta robot Z_MAX_LENGTH is the maximum travel of the towers and should be set to the distance between the hotend
  933. // and the platform when the printer is at its home position.
  934. // If EEPROM is enabled these values will be overridden with the values in the EEPROM
  935. #if DAVINCI==0
  936. #define X_MAX_LENGTH 237 - ENDSTOP_X_BACK_ON_HOME
  937. #define Y_MAX_LENGTH 217 - ENDSTOP_Y_BACK_ON_HOME
  938. #define Z_MAX_LENGTH 190 - ENDSTOP_Z_BACK_ON_HOME
  939. #endif
  940.  
  941. #if DAVINCI==1
  942. #if MODEL==0
  943. #define Y_MAX_LENGTH 217 - ENDSTOP_Y_BACK_ON_HOME
  944. #else
  945. #define Y_MAX_LENGTH 215 - ENDSTOP_Y_BACK_ON_HOME
  946. #endif
  947. #define X_MAX_LENGTH 237 - ENDSTOP_X_BACK_ON_HOME
  948. #define Z_MAX_LENGTH 200 - ENDSTOP_Z_BACK_ON_HOME
  949. #endif
  950.  
  951. #if DAVINCI==2 || DAVINCI==3
  952. #define X_MAX_LENGTH 199 - ENDSTOP_X_BACK_ON_HOME
  953. #define Y_MAX_LENGTH 211 - ENDSTOP_Y_BACK_ON_HOME
  954. #define Z_MAX_LENGTH 200 - ENDSTOP_Z_BACK_ON_HOME
  955. #endif
  956.  
  957. #if DAVINCI==4
  958. #define X_MAX_LENGTH 223.60 - ENDSTOP_X_BACK_ON_HOME
  959. #define Y_MAX_LENGTH 220.60 - ENDSTOP_Y_BACK_ON_HOME
  960. #define Z_MAX_LENGTH 190 - ENDSTOP_Z_BACK_ON_HOME
  961. #endif
  962.  
  963. // Coordinates for the minimum axis. Can also be negative if you want to have the bed start at 0 and the printer can go to the left side
  964. // of the bed. Maximum coordinate is given by adding the above X_MAX_LENGTH values.
  965. #if DAVINCI==1
  966. #define X_MIN_POS -33
  967. #define Y_MIN_POS -12
  968. #define Z_MIN_POS 0
  969. #endif
  970.  
  971. #if DAVINCI==2 || DAVINCI==3
  972. #define X_MIN_POS 0
  973. #define Y_MIN_POS 0
  974. #define Z_MIN_POS 0
  975. #endif
  976.  
  977. #if DAVINCI==4
  978. #define X_MIN_POS -14.60
  979. #define Y_MIN_POS -12.60
  980. #define Z_MIN_POS 0
  981. #endif
  982.  
  983. #if DAVINCI==0
  984. #define X_MIN_POS 0
  985. #define Y_MIN_POS 0
  986. #define Z_MIN_POS 0
  987. #endif
  988.  
  989. // ##########################################################################################
  990. // ## Movement settings ##
  991. // ##########################################################################################
  992.  
  993. // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. Currently only works for RAMBO boards
  994. #define MICROSTEP_MODES {8,8,8,8,8} // [1,2,4,8,16]
  995.  
  996. // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
  997. #if MOTHERBOARD==301
  998. //#define MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
  999. #define MOTOR_CURRENT_PERCENT {53,53,53,53,53}
  1000. #elif MOTHERBOARD==12
  1001. //#define MOTOR_CURRENT {35713,35713,35713,35713,35713} // Values 0-65535 (3D Master 35713 = ~1A)
  1002. #define MOTOR_CURRENT_PERCENT {55,55,55,55,55}
  1003. #elif (MOTHERBOARD==500) || (MOTHERBOARD==501) // Alligator boards
  1004. //#define MOTOR_CURRENT {130,130,130,110,110,110,110} // expired method
  1005. #define MOTOR_CURRENT_PERCENT {51,51,51,44,44,44,44}
  1006. #endif
  1007.  
  1008. /** \brief Number of segments to generate for delta conversions per second of move
  1009. */
  1010. #define DELTA_SEGMENTS_PER_SECOND_PRINT 600 // Move accurate setting for print moves
  1011. #define DELTA_SEGMENTS_PER_SECOND_MOVE 600 // Less accurate setting for other moves
  1012.  
  1013. // Delta settings
  1014. #if DRIVE_SYSTEM == DELTA
  1015. /** \brief Delta rod length (mm)
  1016. */
  1017. #define DELTA_DIAGONAL_ROD 345 // mm
  1018.  
  1019.  
  1020. /* =========== Parameter essential for delta calibration ===================
  1021.  
  1022. C, Y-Axis
  1023. | |___| CARRIAGE_HORIZONTAL_OFFSET (recommend set it to 0)
  1024. | | \------------------------------------------
  1025. |_________ X-axis | \ |
  1026. / \ | \ DELTA_DIAGONAL_ROD (length) Each move this Rod Height
  1027. / \ \ is calculated
  1028. / \ \ Carriage is at printer center! |
  1029. A B \_____/--------------------------------
  1030. |--| END_EFFECTOR_HORIZONTAL_OFFSET (recommend set it to 0)
  1031. |----| ROD_RADIUS (Horizontal rod pivot to pivot measure)
  1032. |-----------| PRINTER_RADIUS (recommend set it to ROD_RADIUS)
  1033.  
  1034. Column angles are measured from X-axis counterclockwise
  1035. "Standard" positions: alpha_A = 210, alpha_B = 330, alpha_C = 90
  1036. */
  1037.  
  1038. /** \brief column positions - change only to correct build imperfections! */
  1039. #define DELTA_ALPHA_A 210
  1040. #define DELTA_ALPHA_B 330
  1041. #define DELTA_ALPHA_C 90
  1042.  
  1043. /** Correct radius by this value for each column. Perfect builds have 0 everywhere. */
  1044. #define DELTA_RADIUS_CORRECTION_A 0
  1045. #define DELTA_RADIUS_CORRECTION_B 0
  1046. #define DELTA_RADIUS_CORRECTION_C 0
  1047.  
  1048. /** Correction of the default diagonal size. Value gets added.*/
  1049. #define DELTA_DIAGONAL_CORRECTION_A 0
  1050. #define DELTA_DIAGONAL_CORRECTION_B 0
  1051. #define DELTA_DIAGONAL_CORRECTION_C 0
  1052.  
  1053. /** Max. radius (mm) the printer should be able to reach. */
  1054. #define DELTA_MAX_RADIUS 200
  1055.  
  1056. // Margin (mm) to avoid above tower minimum (xMin xMinsteps)
  1057. // If your printer can put its carriage low enough the rod is horizontal without hitting the floor
  1058. // set this to zero. Otherwise, measure how high the carriage is from horizontal rod
  1059. // Also, movement speeds are 10x to 20x cartesian speeds at tower bottom.
  1060. // You may need to leave a few mm for safety.
  1061. // Hitting floor at high speed can damage your printer (motors, drives, etc)
  1062. // THIS MAY NEED UPDATING IF THE HOT END HEIGHT CHANGES!
  1063. #define DELTA_FLOOR_SAFETY_MARGIN_MM 15
  1064.  
  1065. /** \brief Horizontal offset of the universal joints on the end effector (moving platform).
  1066. */
  1067. #define END_EFFECTOR_HORIZONTAL_OFFSET 0
  1068.  
  1069. /** \brief Horizontal offset of the universal joints on the vertical carriages.
  1070. */
  1071. #define CARRIAGE_HORIZONTAL_OFFSET 0
  1072.  
  1073. /** \brief Printer radius in mm,
  1074. measured from the center of the print area to the vertical smooth tower.
  1075. Alternately set this to the pivot to pivot horizontal rod distance, when head is at (0,0)
  1076. */
  1077. #define PRINTER_RADIUS 265.25
  1078.  
  1079. /* ========== END Delta calibration data ==============*/
  1080.  
  1081. /** When true the delta will home to z max when reset/powered over cord. That way you start with well defined coordinates.
  1082. If you don't do it, make sure to home first before your first move.
  1083. */
  1084. #define DELTA_HOME_ON_POWER 0
  1085.  
  1086. /** To allow software correction of misaligned endstops, you can set the correction in steps here. If you have EEPROM enabled
  1087. you can also change the values online and autoleveling will store the results here. */
  1088. #define DELTA_X_ENDSTOP_OFFSET_STEPS 0
  1089. #define DELTA_Y_ENDSTOP_OFFSET_STEPS 0
  1090. #define DELTA_Z_ENDSTOP_OFFSET_STEPS 0
  1091.  
  1092. #endif
  1093. // ========== Tuga special settings =============
  1094. #if DRIVE_SYSTEM==TUGA
  1095. /* Radius of the long arm in mm. */
  1096. #define DELTA_DIAGONAL_ROD 240
  1097. #endif
  1098.  
  1099. /** \brief Number of delta moves in each line. Moves that exceed this figure will be split into multiple lines.
  1100. Increasing this figure can use a lot of memory since 7 bytes * size of line buffer * MAX_SELTA_SEGMENTS_PER_LINE
  1101. will be allocated for the delta buffer.
  1102. PrintLine PrintLine::lines[PRINTLINE_CACHE_SIZE (default 16?)];
  1103. Printline is about 200 bytes + 7 * DELTASEGMENTS_PER_PRINTLINE
  1104. or 16 * (200 + (7*22=154) = 354) = 5664 bytes! !1
  1105. min is 5 * (200 + (7*10=70) =270) = 1350
  1106. This leaves ~1K free RAM on an Arduino which has only 8k
  1107. Mega. Used only for nonlinear systems like delta or tuga. */
  1108. #define DELTASEGMENTS_PER_PRINTLINE 22
  1109.  
  1110. /** After x seconds of inactivity, the stepper motors are disabled.
  1111. Set to 0 to leave them enabled.
  1112. This helps cooling the Stepper motors between two print jobs.
  1113. Overridden if EEPROM activated.
  1114. */
  1115. #define STEPPER_INACTIVE_TIME 360
  1116. /** After x seconds of inactivity, the system will go down as far it can.
  1117. It will at least disable all stepper motors and heaters. If the board has
  1118. a power pin, it will be disabled, too.
  1119. Set value to 0 for disabled.
  1120. Overridden if EEPROM activated.
  1121. */
  1122. #define MAX_INACTIVE_TIME 0L
  1123. /** Maximum feedrate, the system allows. Higher feedrates are reduced to these values.
  1124. The axis order in all axis related arrays is X, Y, Z
  1125. Overridden if EEPROM activated.
  1126. */
  1127. #define MAX_FEEDRATE_X 200
  1128. #define MAX_FEEDRATE_Y 200
  1129. #define MAX_FEEDRATE_Z 5
  1130.  
  1131. /** Home position speed in mm/s. Overridden if EEPROM activated. */
  1132. #define HOMING_FEEDRATE_X 40
  1133. #define HOMING_FEEDRATE_Y 40
  1134. #define HOMING_FEEDRATE_Z 4
  1135.  
  1136. /** Set order of axis homing. Use HOME_ORDER_XYZ and replace XYZ with your order.
  1137. * If you measure Z with your extruder tip you need a hot extruder to get right measurement. In this
  1138. * case set HOME_ORDER_ZXYTZ and also define ZHOME_HEAT_HEIGHT and ZHOME_MIN_TEMPERATURE. It will do
  1139. * first a z home to get some reference, then raise to ZHOME_HEAT_HEIGHT do xy homing and then after
  1140. * heating to minimum ZHOME_MIN_TEMPERATURE will z home again for correct height.
  1141. * */
  1142. #define HOMING_ORDER HOME_ORDER_XYZ
  1143. // Used for homing order HOME_ORDER_ZXYTZ
  1144. #define ZHOME_MIN_TEMPERATURE 0
  1145. // needs to heat all extruders (1) or only current extruder (0)
  1146. #define ZHOME_HEAT_ALL 1
  1147. // Z-height for heating extruder during homing
  1148. #define ZHOME_HEAT_HEIGHT 20
  1149. // If your bed might bend while probing, because your sensor is the extruder tip
  1150. // you can define a predefined x,y position so beding is always the same and
  1151. // can be compensated. Set coordinate to 999999 to ignore positions and just
  1152. // use the position you are at.
  1153. #define ZHOME_X_POS IGNORE_COORDINATE
  1154. #define ZHOME_Y_POS IGNORE_COORDINATE
  1155.  
  1156. /* If you have a backlash in both z-directions, you can use this. For most printer, the bed will be pushed down by it's
  1157. own weight, so this is nearly never needed. */
  1158. #define ENABLE_BACKLASH_COMPENSATION 0
  1159. #define Z_BACKLASH 0
  1160. #define X_BACKLASH 0
  1161. #define Y_BACKLASH 0
  1162.  
  1163. /** Comment this to disable ramp acceleration */
  1164. #define RAMP_ACCELERATION 1
  1165.  
  1166. /** If your stepper needs a longer high signal then given, you can add a delay here.
  1167. The delay is realized as a simple loop wasting time, which is not available for other
  1168. computations. So make it as low as possible. For the most common drivers no delay is needed, as the
  1169. included delay is already enough.
  1170. */
  1171. #define STEPPER_HIGH_DELAY 0
  1172.  
  1173. /** If your driver needs some additional delay between setting direction and first step signal,
  1174. you can set this here. There are some commands between direction and signal, but some drivers
  1175. might be even slower or you are using a fast Arduino board with slow driver. Normally 0 works.
  1176. If you get skewed print, you might try 1 microsecond here.
  1177. */
  1178. #define DIRECTION_DELAY 0
  1179.  
  1180. /** The firmware can only handle 16000Hz interrupt frequency cleanly. If you need higher speeds
  1181. a faster solution is needed, and this is to double/quadruple the steps in one interrupt call.
  1182. This is like reducing your 1/16th microstepping to 1/8 or 1/4. It is much cheaper then 1 or 3
  1183. additional stepper interrupts with all it's overhead. As a result you can go as high as
  1184. 40000Hz.
  1185. */
  1186. #define STEP_DOUBLER_FREQUENCY 80000
  1187. /** If you need frequencies off more then 30000 you definitely need to enable this. If you have only 1/8 stepping
  1188. enabling this may cause to stall your moves when 20000Hz is reached.
  1189. */
  1190. #define ALLOW_QUADSTEPPING 1
  1191. /** If you reach STEP_DOUBLER_FREQUENCY the firmware will do 2 or 4 steps with nearly no delay. That can be too fast
  1192. for some printers causing an early stall.
  1193.  
  1194. */
  1195. #define DOUBLE_STEP_DELAY 1 // time in microseconds
  1196.  
  1197. /** If the firmware is busy, it will send a busy signal to host signaling that
  1198. everything is fine and it only takes a bit longer to finish. That way the
  1199. host can keep timeout short so in case of communication errors the resulting
  1200. blobs are much smaller. Set to 0 to disable it. */
  1201. #define KEEP_ALIVE_INTERVAL 2000
  1202.  
  1203. //// Acceleration settings
  1204.  
  1205. /** \brief X, Y, Z max acceleration in mm/s^2 for printing moves or retracts. Make sure your printer can go that high!
  1206. Overridden if EEPROM activated.
  1207. */
  1208. #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 1000
  1209. #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1000
  1210. #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
  1211.  
  1212. /** \brief X, Y, Z max acceleration in mm/s^2 for travel moves. Overridden if EEPROM activated.*/
  1213. #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 1000
  1214. #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1000
  1215. #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 150
  1216.  
  1217. /** If you print on a moving bed, it can become more shaky the higher and bigger
  1218. your print gets. Therefore it might be helpfull to reduce acceleration with
  1219. increasing print height. You can define here how acceleration should change.
  1220. You set ACCELERATION_FACTOR_TOP to the factor in percent for the top position
  1221. of your printer. Acceleration will then be modified linear over height.
  1222. INTERPOLATE_ACCELERATION_WITH_Z sets, which accelerations get changed:
  1223. 0 = do not interpolate at all
  1224. 1 = interpolate x and y acceleration
  1225. 2 = interpolate z acceleration
  1226. 3 = interpolate x,y and z acceleration
  1227. */
  1228. #define INTERPOLATE_ACCELERATION_WITH_Z 0
  1229. #define ACCELERATION_FACTOR_TOP 100
  1230.  
  1231. /** \brief Maximum allowable jerk.
  1232.  
  1233. Caution: This is no real jerk in a physical meaning.
  1234.  
  1235. The jerk determines your start speed and the maximum speed at the join of two segments.
  1236. Its unit is mm/s. If the printer is standing still, the start speed is jerk/2. At the
  1237. join of two segments, the speed difference is limited to the jerk value.
  1238.  
  1239. Examples:
  1240. For all examples jerk is assumed as 40.
  1241.  
  1242. Segment 1: vx = 50, vy = 0
  1243. Segment 2: vx = 0, vy = 50
  1244. v_diff = sqrt((50-0)^2+(0-50)^2) = 70.71
  1245. v_diff > jerk => vx_1 = vy_2 = jerk/v_diff*vx_1 = 40/70.71*50 = 28.3 mm/s at the join
  1246.  
  1247. Segment 1: vx = 50, vy = 0
  1248. Segment 2: vx = 35.36, vy = 35.36
  1249. v_diff = sqrt((50-35.36)^2+(0-35.36)^2) = 38.27 < jerk
  1250. Corner can be printed with full speed of 50 mm/s
  1251.  
  1252. Overridden if EEPROM activated.
  1253. */
  1254. #define MAX_JERK 20.0
  1255. #define MAX_ZJERK 0.3
  1256.  
  1257. /** \brief Number of moves we can cache in advance.
  1258.  
  1259. This number of moves can be cached in advance. If you wan't to cache more, increase this. Especially on
  1260. many very short moves the cache may go empty. The minimum value is 5.
  1261. */
  1262. #define PRINTLINE_CACHE_SIZE 32
  1263.  
  1264. /** \brief Low filled cache size.
  1265.  
  1266. If the cache contains less then MOVE_CACHE_LOW segments, the time per segment is limited to LOW_TICKS_PER_MOVE clock cycles.
  1267. If a move would be shorter, the feedrate will be reduced. This should prevent buffer underflows. Set this to 0 if you
  1268. don't care about empty buffers during print.
  1269. */
  1270. #define MOVE_CACHE_LOW 14
  1271. /** \brief Cycles per move, if move cache is low.
  1272.  
  1273. This value must be high enough, that the buffer has time to fill up. The problem only occurs at the beginning of a print or
  1274. if you are printing many very short segments at high speed. Higher delays here allow higher values in PATH_PLANNER_CHECK_SEGMENTS.
  1275. */
  1276. #define LOW_TICKS_PER_MOVE 250000
  1277.  
  1278. // ##########################################################################################
  1279. // ## Extruder control ##
  1280. // ##########################################################################################
  1281.  
  1282.  
  1283. /* \brief Minimum temperature for extruder operation
  1284.  
  1285. This is a safety value. If your extruder temperature is below this temperature, no
  1286. extruder steps are executed. This is to prevent your extruder to move unless the filament
  1287. is at least molten. After having some complains that the extruder does not work, I leave
  1288. it 0 as default.
  1289. */
  1290.  
  1291. #define MIN_EXTRUDER_TEMP 170
  1292.  
  1293. /** \brief Enable advance algorithm.
  1294.  
  1295. Without a correct adjusted advance algorithm, you get blobs at points, where acceleration changes. The
  1296. effect increases with speed and acceleration difference. Using the advance method decreases this effect.
  1297. For more informations, read the wiki.
  1298. */
  1299. #define USE_ADVANCE 1
  1300.  
  1301. /** \brief enables quadratic component.
  1302.  
  1303. Set 1 to allow, 0 disallow a quadratic advance dependency. Linear is the dominant value, so no real need
  1304. to activate the quadratic term. Only adds lots of computations and storage usage. */
  1305. #define ENABLE_QUADRATIC_ADVANCE 0
  1306.  
  1307.  
  1308. // ##########################################################################################
  1309. // ## Communication configuration ##
  1310. // ##########################################################################################
  1311.  
  1312. //// AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!!
  1313.  
  1314. /** \brief Communication speed.
  1315.  
  1316. - 250000 : Fastes with errorrate of 0% with 16 or 32 MHz - update wiring_serial.c in your board files. See boards/readme.txt
  1317. - 115200 : Fast, but may produce communication errors on quite regular basis, Error rate -3,5%
  1318. - 76800 : Best setting for Arduino with 16 MHz, Error rate 0,2% page 198 AVR1284 Manual. Result: Faster communication then 115200
  1319. - 57600 : Should produce nearly no errors, on my gen 6 it's faster than 115200 because there are no errors slowing down the connection
  1320. - 38600
  1321.  
  1322. Overridden if EEPROM activated.
  1323. */
  1324. //#define BAUDRATE 76800
  1325. #define BAUDRATE 230400
  1326. //#define BAUDRATE 250000
  1327.  
  1328. /**
  1329. Some boards like Gen7 have a power on pin, to enable the ATX power supply. If this is defined,
  1330. the power will be turned on without the need to call M80 if initially started.
  1331. */
  1332. #define ENABLE_POWER_ON_STARTUP 1
  1333.  
  1334. /**
  1335. If you use an ATX power supply you need the power pin to work non inverting. For some special
  1336. boards you might need to make it inverting.
  1337. */
  1338. #define POWER_INVERTING 0
  1339. /** What shall the printer do, when it receives an M112 emergency stop signal?
  1340. 0 = Disable heaters/motors, wait forever until someone presses reset.
  1341. 1 = restart by resetting the AVR controller. The USB connection will not reset if managed by a different chip!
  1342. */
  1343. #define KILL_METHOD 1
  1344.  
  1345. /** Appends the line number after every ok send, to acknowledge the received command. Uncomment for plain ok ACK if your host has problems with this */
  1346. #define ACK_WITH_LINENUMBER 1
  1347. /** Communication errors can swallow part of the ok, which tells the host software to send
  1348. the next command. Not receiving it will cause your printer to stop. Sending this string every
  1349. second, if our queue is empty should prevent this. Comment it, if you don't wan't this feature. */
  1350. #define WAITING_IDENTIFIER "wait"
  1351. //Davinci Specific
  1352. #define RESET_IDENTIFIER "start"
  1353.  
  1354. /** \brief Sets time for echo debug
  1355.  
  1356. You can set M111 1 which enables ECHO of commands sent. This define specifies the position,
  1357. when it will be executed. In the original FiveD software, echo is done after receiving the
  1358. command. With checksum you know, how it looks from the sending string. With this define
  1359. uncommented, you will see the last command executed. To be more specific: It is written after
  1360. execution. This helps tracking errors, because there may be 8 or more commands in the queue
  1361. and it is elsewise difficult to know, what your reprap is currently doing.
  1362. */
  1363. #define ECHO_ON_EXECUTE 1
  1364.  
  1365. /** \brief EEPROM storage mode
  1366.  
  1367. Set the EEPROM_MODE to 0 if you always want to use the settings in this configuration file. If not,
  1368. set it to a value not stored in the first EEPROM-byte used. If you later want to overwrite your current
  1369. EEPROM settings with configuration defaults, just select an other value. On the first call to epr_init()
  1370. it will detect a mismatch of the first byte and copy default values into EEPROM. If the first byte
  1371. matches, the stored values are used to overwrite the settings.
  1372.  
  1373. IMPORTANT: With mode <>0 some changes in Configuration.h are not set any more, as they are
  1374. taken from the EEPROM.
  1375. */
  1376. #define EEPROM_MODE 1
  1377.  
  1378.  
  1379. /**************** duplicate motor driver ***************
  1380.  
  1381. If you have an unused extruder stepper free, you could use it to drive the second z motor
  1382. instead of driving both with a single stepper. The same works for the other axis if needed.
  1383. */
  1384.  
  1385. #define FEATURE_TWO_XSTEPPER 0
  1386. #define X2_STEP_PIN E1_STEP_PIN
  1387. #define X2_DIR_PIN E1_DIR_PIN
  1388. #define X2_ENABLE_PIN E1_ENABLE_PIN
  1389.  
  1390. #define FEATURE_TWO_YSTEPPER 0
  1391. #define Y2_STEP_PIN E1_STEP_PIN
  1392. #define Y2_DIR_PIN E1_DIR_PIN
  1393. #define Y2_ENABLE_PIN E1_ENABLE_PIN
  1394.  
  1395. #define FEATURE_TWO_ZSTEPPER 0
  1396. #define Z2_STEP_PIN E1_STEP_PIN
  1397. #define Z2_DIR_PIN E1_DIR_PIN
  1398. #define Z2_ENABLE_PIN E1_ENABLE_PIN
  1399.  
  1400. #define FEATURE_THREE_ZSTEPPER 0
  1401. #define Z3_STEP_PIN E2_STEP_PIN
  1402. #define Z3_DIR_PIN E2_DIR_PIN
  1403. #define Z3_ENABLE_PIN E2_ENABLE_PIN
  1404.  
  1405. /* Ditto printing allows 2 extruders to do the same action. This effectively allows
  1406. to print an object two times at the speed of one. Works only with dual extruder setup.
  1407. */
  1408. #define FEATURE_DITTO_PRINTING 0
  1409.  
  1410. /* Servos
  1411.  
  1412. If you need to control servos, enable this feature. You can control up to 4 servos.
  1413. Control the servos with
  1414. M340 P<servoId> S<pulseInUS>
  1415. servoID = 0..3
  1416. Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
  1417.  
  1418. WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!
  1419. */
  1420.  
  1421. #define FEATURE_SERVO 0
  1422. // Servo pins on a RAMPS board are 11,6,5,4
  1423. #define SERVO0_PIN 11
  1424. #define SERVO1_PIN 6
  1425. #define SERVO2_PIN 5
  1426. #define SERVO3_PIN 4
  1427. /* for set servo(s) at designed neutral position at power-up. Values < 500 mean no start position */
  1428. #define SERVO0_NEUTRAL_POS 1300
  1429. #define SERVO1_NEUTRAL_POS -1
  1430. #define SERVO2_NEUTRAL_POS -1
  1431. #define SERVO3_NEUTRAL_POS -1
  1432. /** Set to servo number +1 to control that servo in ui menu. 0 disables ui control. */
  1433. #define UI_SERVO_CONTROL 0
  1434. /** Some fans won't start for low values, but would run if started with higher power at the beginning.
  1435. This defines the full power duration before returning to set value. Time is in milliseconds */
  1436. #define FAN_KICKSTART_TIME 200
  1437.  
  1438.  
  1439.  
  1440. /* A watchdog resets the printer, if a signal is not send within predefined time limits. That way we can be sure that the board
  1441. is always running and is not hung up for some unknown reason.
  1442.  
  1443. IMPORTANT: The ARM processors need a special board definition to work properly.
  1444. See: AdditionalArduinoFiles: README.txt on how to install them.
  1445. */
  1446. #define FEATURE_WATCHDOG 1
  1447.  
  1448. /* Z-Probing */
  1449.  
  1450. /* After homing the z position is corrected to compensate
  1451. for a bed coating. Since you can change coatings the value is stored in
  1452. EEPROM if enabled, so you can switch between different coatings without needing
  1453. to recalibrate z.
  1454. */
  1455. #define Z_PROBE_Z_OFFSET 0 // offset to coating form real bed level
  1456. /* How is z min measured
  1457. 0 = trigger is height of real bed neglecting coating
  1458. 1 = trigger is current coating
  1459.  
  1460. For mode 1 the current coating thickness is added to measured z probe distances.
  1461. That way the real bed is always the reference height. For inductive sensors
  1462. or z min endstops the coating has no effect on the result, so you should use mode 0.
  1463. */
  1464. #define Z_PROBE_Z_OFFSET_MODE 0
  1465.  
  1466. #if DAVINCI > 0
  1467. #define FEATURE_Z_PROBE true
  1468. #define Z_PROBE_PIN 117
  1469. #else
  1470. #define FEATURE_Z_PROBE false
  1471. #define Z_PROBE_PIN -1
  1472. #endif
  1473. #define Z_PROBE_PULLUP 1
  1474. #define Z_PROBE_ON_HIGH 0
  1475. #define Z_PROBE_X_OFFSET 0
  1476. #define Z_PROBE_Y_OFFSET 0
  1477. #define Z_PROBE_BED_DISTANCE 5.0 // Higher than max bed level distance error in mm
  1478.  
  1479. // Waits for a signal to start. Valid signals are probe hit and ok button.
  1480. // This is needful if you have the probe trigger by hand.
  1481. #define Z_PROBE_WAIT_BEFORE_TEST 0
  1482. /** Speed of z-axis in mm/s when probing */
  1483. #define Z_PROBE_SPEED 1
  1484. #define Z_PROBE_XY_SPEED 30
  1485. #define Z_PROBE_SWITCHING_DISTANCE 5 // Distance to safely switch off probe after it was activated
  1486. #define Z_PROBE_REPETITIONS 1 // Repetitions for probing at one point.
  1487. /** The height is the difference between activated probe position and nozzle height. */
  1488. #if MODEL==0
  1489. #define Z_PROBE_HEIGHT 0.28
  1490. #else
  1491. #define Z_PROBE_HEIGHT 0.54
  1492. #endif
  1493. /** These scripts are run before resp. after the z-probe is done. Add here code to activate/deactivate probe if needed. */
  1494. #define Z_PROBE_START_SCRIPT ""
  1495. #define Z_PROBE_FINISHED_SCRIPT ""
  1496. /** Set 1 if you need a hot extruder for good probe results. Normally only required if nozzle is probe. */
  1497. #define Z_PROBE_REQUIRES_HEATING 0
  1498. /** Minimum extruder temperature for probing. If it is lower, it will be increased to that value. */
  1499. #define Z_PROBE_MIN_TEMPERATURE 150
  1500. /*
  1501. Define how we measure the bed rotation.
  1502. All methods need at least 3 points to define the bed rotation correctly. The quality we get comes
  1503. from the selection of the right points and method.
  1504.  
  1505. BED_LEVELING_METHOD 0
  1506. This method measures at the 3 probe points and creates a plane through these points. If you have
  1507. a really planar bed this gives the optimum result. The 3 points must not be in one line and have
  1508. a long distance to increase numerical stability.
  1509.  
  1510. BED_LEVELING_METHOD 1
  1511. This measures a grid. Probe point 1 is the origin and points 2 and 3 span a grid. We measure
  1512. BED_LEVELING_GRID_SIZE points in each direction and compute a regression plane through all
  1513. points. This gives a good overall plane if you have small bumps measuring inaccuracies.
  1514.  
  1515. BED_LEVELING_METHOD 2
  1516. Bending correcting 4 point measurement. This is for cantilevered beds that have the rotation axis
  1517. not at the side but inside the bed. Here we can assume no bending on the axis and a symmetric
  1518. bending to both sides of the axis. So probe points 2 and 3 build the symmetric axis and
  1519. point 1 is mirrored to 1m across the axis. Using the symmetry we then remove the bending
  1520. from 1 and use that as plane.
  1521. */
  1522. #define BED_LEVELING_METHOD 0
  1523. /* How to correct rotation.
  1524. 0 = software side
  1525. 1 = motorized modification of 2 from 3 fixture points.
  1526. */
  1527. #define BED_CORRECTION_METHOD 0
  1528. // Grid size for grid based plane measurement
  1529. #define BED_LEVELING_GRID_SIZE 4
  1530. // Repetitions for motorized bed leveling
  1531. #define BED_LEVELING_REPETITIONS 5
  1532. /* These are the motor positions relative to bed origin. Only needed for
  1533. motorized bed leveling */
  1534. #define BED_MOTOR_1_X 0
  1535. #define BED_MOTOR_1_Y 0
  1536. #define BED_MOTOR_2_X 200
  1537. #define BED_MOTOR_2_Y 0
  1538. #define BED_MOTOR_3_X 100
  1539. #define BED_MOTOR_3_Y 200
  1540.  
  1541. /* Autoleveling allows it to z-probe 3 points to compute the inclination and compensates the error for the print.
  1542. This feature requires a working z-probe and you should have z-endstop at the top not at the bottom.
  1543. The same 3 points are used for the G29 command.
  1544. */
  1545. #define FEATURE_AUTOLEVEL true
  1546. #if DAVINCI==1
  1547. #define Z_PROBE_X1 -7
  1548. #define Z_PROBE_Y1 -10
  1549. #define Z_PROBE_X2 -7
  1550. #define Z_PROBE_X3 179
  1551. #if MODEL==0
  1552. #define Z_PROBE_Y2 205
  1553. #define Z_PROBE_Y3 205
  1554. #else
  1555. #define Z_PROBE_Y2 203
  1556. #define Z_PROBE_Y3 203
  1557. #endif
  1558. //Manual bed leveling
  1559. #define MANUAL_LEVEL_X1 100
  1560. #define MANUAL_LEVEL_Y1 190
  1561. #define MANUAL_LEVEL_X2 100
  1562. #define MANUAL_LEVEL_Y2 10
  1563. #define MANUAL_LEVEL_X3 10
  1564. #define MANUAL_LEVEL_Y3 100
  1565. #define MANUAL_LEVEL_X4 190
  1566. #define MANUAL_LEVEL_Y4 100
  1567. #endif
  1568.  
  1569. #if DAVINCI==2 || DAVINCI==3
  1570. #define Z_PROBE_X1 36
  1571. #define Z_PROBE_Y1 -7
  1572. #define Z_PROBE_X2 36
  1573. #define Z_PROBE_Y2 203
  1574. #define Z_PROBE_X3 171
  1575. #define Z_PROBE_Y3 203
  1576. //Manual bed leveling
  1577. #define MANUAL_LEVEL_X1 100
  1578. #define MANUAL_LEVEL_Y1 180
  1579. #define MANUAL_LEVEL_X2 100
  1580. #define MANUAL_LEVEL_Y2 10
  1581. #define MANUAL_LEVEL_X3 50
  1582. #define MANUAL_LEVEL_Y3 95
  1583. #define MANUAL_LEVEL_X4 150
  1584. #define MANUAL_LEVEL_Y4 95
  1585. #endif
  1586.  
  1587. #if DAVINCI==4
  1588. #define Z_PROBE_X1 -3
  1589. #define Z_PROBE_Y1 -7
  1590. #define Z_PROBE_X2 -3
  1591. #define Z_PROBE_Y2 204
  1592. #define Z_PROBE_X3 184
  1593. #define Z_PROBE_Y3 204
  1594. //Manual bed leveling
  1595. #define MANUAL_LEVEL_X1 100
  1596. #define MANUAL_LEVEL_Y1 190
  1597. #define MANUAL_LEVEL_X2 100
  1598. #define MANUAL_LEVEL_Y2 10
  1599. #define MANUAL_LEVEL_X3 10
  1600. #define MANUAL_LEVEL_Y3 100
  1601. #define MANUAL_LEVEL_X4 190
  1602. #define MANUAL_LEVEL_Y4 100
  1603. #endif
  1604.  
  1605. #if DAVINCI==0
  1606. #define Z_PROBE_X1 36
  1607. #define Z_PROBE_Y1 -7
  1608. #define Z_PROBE_X2 36
  1609. #define Z_PROBE_Y2 203
  1610. #define Z_PROBE_X3 171
  1611. #define Z_PROBE_Y3 203
  1612. //Manual bed leveling
  1613. #define MANUAL_LEVEL_X1 100
  1614. #define MANUAL_LEVEL_Y1 180
  1615. #define MANUAL_LEVEL_X2 100
  1616. #define MANUAL_LEVEL_Y2 10
  1617. #define MANUAL_LEVEL_X3 50
  1618. #define MANUAL_LEVEL_Y3 95
  1619. #define MANUAL_LEVEL_X4 150
  1620. #define MANUAL_LEVEL_Y4 95
  1621. #endif
  1622. /* Bending correction adds a value to a measured z-probe value. This may be
  1623. required when the z probe needs some force to trigger and this bends the
  1624. bed down. Currently the correction values A/B/C correspond to z probe
  1625. positions 1/2/3. In later versions a bending correction algorithm might be
  1626. introduced to give it other meanings.*/
  1627. #define BENDING_CORRECTION_A 0
  1628. #define BENDING_CORRECTION_B 0
  1629. #define BENDING_CORRECTION_C 0
  1630.  
  1631. /* DISTORTION_CORRECTION compensates the distortion caused by mechanical imprecisions of nonlinear (i.e. DELTA) printers
  1632. * assumes that the floor is plain (i.e. glass plate)
  1633. * and that it is perpendicular to the towers
  1634. * and that the (0,0) is in center
  1635. * requires z-probe
  1636. * G29 measures the Z offset in matrix NxN points (due to nature of the delta printer, the corners are extrapolated instead of measured)
  1637. * and compensate the distortion
  1638. * more points means better compensation, but consumes more memory and takes more time
  1639. * DISTORTION_CORRECTION_R is the distance of last row or column from center
  1640. */
  1641.  
  1642. #define DISTORTION_CORRECTION 0
  1643. #define DISTORTION_CORRECTION_POINTS 5
  1644. /* For delta printers you simply define the measured radius around origin */
  1645. #define DISTORTION_CORRECTION_R 80
  1646. /* For all others you define the correction rectangle by setting the min/max coordinates. Make sure the the probe can reach all points! */
  1647. #define DISTORTION_XMIN 10
  1648. #define DISTORTION_YMIN 10
  1649. #define DISTORTION_XMAX 190
  1650. #define DISTORTION_YMAX 190
  1651.  
  1652. /** Uses EEPROM instead of ram. Allows bigger matrix (up to 22x22) without any ram cost.
  1653. Especially on arm based systems with cached EEPROM it is good, on AVR it has a small
  1654. performance penalty.
  1655. */
  1656. #define DISTORTION_PERMANENT 1
  1657. /** Correction computation is not a cheap operation and changes are only small. So it
  1658. is not necessary to update it for every sub-line computed. For example lets take DELTA_SEGMENTS_PER_SECOND_PRINT = 150
  1659. and fastest print speed 100 mm/s. So we have a maximum segment length of 100/150 = 0.66 mm.
  1660. Now lats say our point field is 200 x 200 mm with 9 x 9 points. So between 2 points we have
  1661. 200 / (9-1) = 25 mm. So we need at least 25 / 0.66 = 37 lines to move to the next measuring
  1662. point. So updating correction every 15 calls gives us at least 2 updates between the
  1663. measured points.
  1664. NOTE: Explicit z changes will always trigger an update!
  1665. */
  1666. #define DISTORTION_UPDATE_FREQUENCY 15
  1667. /** z distortion degrades to 0 from this height on. You should start after the first layer to get
  1668. best bonding with surface. */
  1669. #define DISTORTION_START_DEGRADE 0.5
  1670. /** z distortion correction gets down to 0 at this height. */
  1671. #define DISTORTION_END_HEIGHT 1.5
  1672.  
  1673. /* If your printer is not exactly square but is more like a parallelogram, you can
  1674. use this to compensate the effect of printing squares like parallelograms. Set the
  1675. parameter to then tangens of the deviation from 90° when you print a square object.
  1676. E.g. if you angle is 91° enter tan(1) = 0.017. If error doubles you have the wrong sign.
  1677. Always hard to say since the other angle is 89° in this case!
  1678. */
  1679. #define FEATURE_AXISCOMP 0
  1680. #define AXISCOMP_TANXY 0
  1681. #define AXISCOMP_TANYZ 0
  1682. #define AXISCOMP_TANXZ 0
  1683.  
  1684. /** \brief Experimental calibration utility for delta printers
  1685. * Change 1 to 0 to disable
  1686. */
  1687. #define FEATURE_SOFTWARE_LEVELING 0
  1688.  
  1689. /* Babystepping allows to change z height during print without changing official z height */
  1690. #define FEATURE_BABYSTEPPING 0
  1691. /* If you have a threaded rod, you want a higher multiplicator to see an effect. Limit value to 50 or you get easily overflows.*/
  1692. #define BABYSTEP_MULTIPLICATOR 1
  1693.  
  1694. /* Define a pin to turn light on/off */
  1695. #define CASE_LIGHTS_PIN LIGHT_PIN
  1696. #define CASE_LIGHT_DEFAULT_ON 1
  1697. #define CASE_BADGE_LIGHT_DEFAULT_ON 1
  1698.  
  1699. /** Set to false to disable SD support: */
  1700. #ifndef SDSUPPORT // Some boards have sd support on board. These define the values already in pins.h
  1701. #define SDSUPPORT 1
  1702. // Uncomment to enable or change card detection pin. With card detection the card is mounted on insertion.
  1703. #define SDCARDDETECT SDCARDDETECT
  1704. // Change to true if you get a inserted message on removal.
  1705. #define SDCARDDETECTINVERTED false
  1706. #endif
  1707. /** Show extended directory including file length. Don't use this with Pronterface! */
  1708. #define SD_EXTENDED_DIR 1
  1709. /** The GCODEs in this line get executed, when you stop a SD print before it was ended.
  1710. Separate commands by \n */
  1711. #define SD_RUN_ON_STOP "G28 XY\nM84"
  1712. /** Disable motors and heaters when print was stopped. */
  1713. #define SD_STOP_HEATER_AND_MOTORS_ON_STOP 1
  1714. // If you want support for G2/G3 arc commands set to true, otherwise false.
  1715. #define ARC_SUPPORT 1
  1716.  
  1717. /** You can store the current position with M401 and go back to it with M402.
  1718. This works only if feature is set to true. */
  1719. #define FEATURE_MEMORY_POSITION 1
  1720.  
  1721. /** If a checksum is sent, all future commands must also contain a checksum. Increases reliability especially for binary protocol. */
  1722. #define FEATURE_CHECKSUM_FORCED 0
  1723.  
  1724. /** Should support for fan control be compiled in. If you enable this make sure
  1725. the FAN pin is not the same as for your second extruder. RAMPS e.g. has FAN_PIN in 9 which
  1726. is also used for the heater if you have 2 extruders connected. */
  1727. #if REPURPOSE_FAN_TO_COOL_EXTRUSIONS == 1
  1728. #define FEATURE_FAN_CONTROL 1
  1729. #define FAN_PIN ORIG_FAN_PIN
  1730. #if DAVINCI == 2 || DAVINCI == 3
  1731. #undef EXT0_EXTRUDER_COOLER_PIN
  1732. #define EXT0_EXTRUDER_COOLER_PIN ORIG_FAN2_PIN
  1733. #define EXT1_EXTRUDER_COOLER_PIN ORIG_FAN2_PIN
  1734. #else //DaVinci 1.0
  1735. #undef EXT0_EXTRUDER_COOLER_PIN
  1736. #define EXT0_EXTRUDER_COOLER_PIN -1 //Warning need to add a permanent fan with power supply to cool extruder
  1737. #endif
  1738. #else
  1739. #undef FAN_PIN
  1740. #define FAN_PIN -1
  1741. #define FEATURE_FAN_CONTROL 0
  1742. #endif
  1743.  
  1744. /* You can have a second fan controlled by adding P1 to M106/M107 command. */
  1745. #define FEATURE_FAN2_CONTROL 0
  1746. //#define FAN2_PIN ORIG_FAN2_PIN
  1747.  
  1748. /* By setting FAN_BOARD_PIN to a pin number you get a board cooler. That fan
  1749. goes on as soon as moves occur. Mainly to prevent overheating of stepper drivers. */
  1750. //#undef FAN_BOARD_PIN
  1751. //#define FAN_BOARD_PIN ORIG_FAN_PIN
  1752. /** Speed of board fan when on. 0 = off, 255 = max */
  1753. #define BOARD_FAN_SPEED 255
  1754.  
  1755. /* You can have one additional fan controlled by a temperature. You can set
  1756. set at which temperature it should turn on and at which it should reach max. speed.
  1757. */
  1758. #define FAN_THERMO_PIN -1
  1759. #define FAN_THERMO_MIN_PWM 128
  1760. #define FAN_THERMO_MAX_PWM 255
  1761. #define FAN_THERMO_MIN_TEMP 45
  1762. #define FAN_THERMO_MAX_TEMP 60
  1763. // Analog pin number or channel for due boards
  1764. #define FAN_THERMO_THERMISTOR_PIN -1
  1765. #define FAN_THERMO_THERMISTOR_TYPE 1
  1766.  
  1767.  
  1768. /** Adds support for ESP8266 Duet web interface, PanelDue and probably some other things.
  1769. * This essentially adds command M36/M408 and extends M20.
  1770. * Since it requires some memory do not enable it unless you have such a display!
  1771. * */
  1772. #define FEATURE_JSON 0
  1773.  
  1774. /** For displays and keys there are too many permutations to handle them all in once.
  1775. For the most common available combinations you can set the controller type here, so
  1776. you don't need to configure uicong.h at all. Controller settings > 1 disable usage
  1777. of uiconfig.h
  1778.  
  1779. 0 or NO_CONTROLLER = no display
  1780. 1 or UICONFIG_CONTROLLER = Manual definition of display and keys parameter in uiconfig.h
  1781.  
  1782. The following settings override uiconfig.h!
  1783. 2 or CONTROLLER_SMARTRAMPS = Smartcontroller from reprapdiscount on a RAMPS or RUMBA board
  1784. 3 or CONTROLLER_ADAFRUIT = Adafruit RGB controller
  1785. 4 or CONTROLLER_FOLTYN = Foltyn 3DMaster with display attached
  1786. 5 or CONTROLLER_VIKI = ViKi LCD - Check pin configuration in ui.h for feature controller 5!!! sd card disabled by default!
  1787. 6 or CONTROLLER_MEGATRONIC = ReprapWorld Keypad / LCD, predefined pins for Megatronics v2.0 and RAMPS 1.4. Please check if you have used the defined pin layout in ui.h.
  1788. 7 or CONTROLLER_RADDS = RADDS Extension Port
  1789. 8 or CONTROLLER_PIBOT20X4 = PiBot Display/Controller extension with 20x4 character display
  1790. 9 or CONTROLLER_PIBOT16X2 = PiBot Display/Controller extension with 16x2 character display
  1791. 10 or CONTROLLER_GADGETS3D_SHIELD = Gadgets3D shield on RAMPS 1.4, see http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
  1792. 11 or CONTROLLER_REPRAPDISCOUNT_GLCD = RepRapDiscount Full Graphic Smart Controller
  1793. 12 or CONTROLLER_FELIX = FELIXPrinters Controller
  1794. 13 or CONTROLLER_RAMBO = SeeMeCNC Display on Rambo (ORION)
  1795. 14 or CONTROLLER_OPENHARDWARE_LCD2004 = OpenHardware.co.za LCD2004 V2014
  1796. 15 or CONTROLLER_SANGUINOLOLU_PANELOLU2 = Sanguinololu + Panelolu2
  1797. 17 or CONTROLLER_MIREGLI 17
  1798. 18 or CONTROLLER_GATE_3NOVATICA Gate Controller from 3Novatica
  1799. 19 or CONTROLLER_SPARKLCD Sparkcube LCD on RADDS
  1800. 20 or CONTROLLER_BAM_DICE_DUE DAM&DICE Due LCD Display
  1801. 21 or CONTROLLER_VIKI2 Panucatt Viki2 graphic lcd
  1802. 24 or CONTROLLER_ZONESTAR = Zonestar P802M with LCD 20x4 and 5 ADC button keypad
  1803. 405 or CONTROLLER_FELIX_DUE Felix LCD für due based board
  1804. */
  1805. #if DAVINCI==0
  1806. #define FEATURE_CONTROLLER CONTROLLER_RADDS
  1807. #else
  1808. #define FEATURE_CONTROLLER UICONFIG_CONTROLLER
  1809. #endif
  1810.  
  1811. /* You can have one keypad connected via single analog pin as seen on
  1812. some printers with Melzi V2.0 board, 20x4 LCD and 5 buttons keypad. This must be
  1813. the analog pin number! */
  1814. #define ADC_KEYPAD_PIN -1
  1815.  
  1816. /**
  1817. Select the languages to use. On first startup user can select
  1818. the language from a menu with activated languages. In Configuration->Language
  1819. the language can be switched any time. */
  1820. #define LANGUAGE_EN_ACTIVE 1 // English
  1821. #define LANGUAGE_DE_ACTIVE 1 // German
  1822. #define LANGUAGE_NL_ACTIVE 1 // Dutch
  1823. #define LANGUAGE_PT_ACTIVE 0 // Brazilian portuguese
  1824. #define LANGUAGE_IT_ACTIVE 1 // Italian
  1825. #define LANGUAGE_ES_ACTIVE 0 // Spanish
  1826. #define LANGUAGE_FI_ACTIVE 0 // Finnish
  1827. #define LANGUAGE_SE_ACTIVE 0 // Swedish
  1828. #define LANGUAGE_FR_ACTIVE 1 // French
  1829. #define LANGUAGE_CZ_ACTIVE 0 // Czech
  1830. #define LANGUAGE_PL_ACTIVE 0 // Polish
  1831. #define LANGUAGE_TR_ACTIVE 0 // Turkish
  1832.  
  1833. /* Some displays loose their settings from time to time. Try uncommenting the
  1834. auto-repair function if this is the case. It is not supported for all display
  1835. types. It creates a minimal flicker from time to time and also slows down
  1836. computations, so do not enable it if your display works stable!
  1837. */
  1838. //#define TRY_AUTOREPAIR_LCD_ERRORS
  1839.  
  1840. // This is line 2 of the status display at startup. Change to your like.
  1841. #if DAVINCI==0
  1842. #define UI_PRINTER_NAME " My Printer "
  1843. #define DAVINCI_TYPE "0"
  1844. #endif
  1845. #if DAVINCI==1
  1846. #define UI_PRINTER_NAME " Da Vinci 1.0"
  1847. #define DAVINCI_TYPE "1"
  1848. #endif
  1849. #if DAVINCI==2
  1850. #define UI_PRINTER_NAME " Da Vinci 2.0"
  1851. #define DAVINCI_TYPE "2"
  1852. #endif
  1853. #if DAVINCI==3
  1854. #define UI_PRINTER_NAME " Da Vinci 2.0"
  1855. #define DAVINCI_TYPE "3"
  1856. #endif
  1857. #if DAVINCI==4
  1858. #define UI_PRINTER_NAME " Da Vinci AiO"
  1859. #define DAVINCI_TYPE "4"
  1860. #endif
  1861.  
  1862. #define UI_PRINTER_COMPANY "By XYZ Printing"
  1863.  
  1864. #if MODEL == 0 || DAVINCI==0
  1865. #define MODEL_TYPE " "
  1866. #else
  1867. #define MODEL_TYPE "A"
  1868. #endif
  1869.  
  1870. /** Animate switches between menus etc. */
  1871. #define UI_ANIMATION 0
  1872.  
  1873. /** How many ms should a single page be shown, until it is switched to the next one.*/
  1874. #define UI_PAGES_DURATION 4000
  1875.  
  1876. /** Delay of start screen in milliseconds */
  1877. #define UI_START_SCREEN_DELAY 2000
  1878. /** Uncomment if you don't want automatic page switching. You can still switch the
  1879. info pages with next/previous button/click-encoder */
  1880. #define UI_DISABLE_AUTO_PAGESWITCH 1
  1881.  
  1882. /** Time to return to info menu if x milliseconds no key was pressed. Set to 0 to disable it. */
  1883. #define UI_AUTORETURN_TO_MENU_AFTER 30000
  1884.  
  1885. #define FEATURE_UI_KEYS 0
  1886.  
  1887. /* Normally cou want a next/previous actions with every click of your encoder.
  1888. Unfortunately, the encoder have a different count of phase changes between clicks.
  1889. Select an encoder speed from 0 = fastest to 2 = slowest that results in one menu move per click.
  1890. */
  1891. #define UI_ENCODER_SPEED 2
  1892.  
  1893. // Set to 1 to reverse encoder direction
  1894. #define UI_REVERSE_ENCODER 0
  1895.  
  1896. /* There are 2 ways to change positions. You can move by increments of 1/0.1 mm resulting in more menu entries
  1897. and requiring many turns on your encode. The alternative is to enable speed dependent positioning. It will change
  1898. the move distance depending on the speed you turn the encoder. That way you can move very fast and very slow in the
  1899. same setting.
  1900.  
  1901. */
  1902. #define UI_SPEEDDEPENDENT_POSITIONING 0
  1903.  
  1904. /** If set to 1 faster turning the wheel makes larger jumps. Helps for faster navigation. */
  1905. #define UI_DYNAMIC_ENCODER_SPEED 1 // enable dynamic rotary encoder speed
  1906.  
  1907. /** \brief bounce time of keys in milliseconds */
  1908. #define UI_KEY_BOUNCETIME 10
  1909.  
  1910. /** \brief First time in ms until repeat of action. */
  1911. #define UI_KEY_FIRST_REPEAT 500
  1912. /** \brief Reduction of repeat time until next execution. */
  1913. #define UI_KEY_REDUCE_REPEAT 50
  1914. /** \brief Lowest repeat time. */
  1915. #define UI_KEY_MIN_REPEAT 50
  1916.  
  1917. #define FEATURE_BEEPER 1
  1918. /**
  1919. Beeper sound definitions for short beeps during key actions
  1920. and longer beeps for important actions.
  1921. Parameter is delay in microseconds and the second is the number of repetitions.
  1922. Values must be in range 1..255
  1923. */
  1924. #define BEEPER_SHORT_SEQUENCE 2,2
  1925. #define BEEPER_LONG_SEQUENCE 8,8
  1926.  
  1927. // ###############################################################################
  1928. // ## Values for menu settings ##
  1929. // ###############################################################################
  1930.  
  1931. // Values used for preheat
  1932. #define UI_SET_PRESET_HEATED_BED_TEMP_PLA 60
  1933. #define UI_SET_PRESET_EXTRUDER_TEMP_PLA 180
  1934. #define UI_SET_PRESET_HEATED_BED_TEMP_ABS 90
  1935. #define UI_SET_PRESET_EXTRUDER_TEMP_ABS 230
  1936.  
  1937. //Davinci specific
  1938. // Loading / Unloading Filament value
  1939. #define UI_SET_PRESET_LOADING_FEEDRATE 2
  1940. #define UI_SET_PRESET_UNLOADING_FEEDRATE 4
  1941. #define UI_SET_PRESET_UNLOAD_LOAD_DISTANCE 60
  1942.  
  1943. // Extreme values
  1944. #define UI_SET_MIN_HEATED_BED_TEMP 30
  1945. #define UI_SET_MAX_HEATED_BED_TEMP 130
  1946. #define UI_SET_MIN_EXTRUDER_TEMP 160
  1947. #define UI_SET_MAX_EXTRUDER_TEMP 270
  1948. #define UI_SET_EXTRUDER_FEEDRATE 2 // mm/sec
  1949. #define UI_SET_EXTRUDER_RETRACT_DISTANCE 3 // mm
  1950.  
  1951. /*
  1952. #define USER_KEY1_PIN UI_DISPLAY_D5_PIN // D5 to display (not used for graphics controller), change to other pin if you use character LCD !
  1953. #define USER_KEY1_ACTION UI_ACTION_FAN_SUSPEND
  1954. #define USER_KEY2_PIN UI_DISPLAY_D6_PIN // D6 to display (not used for graphics controller)...
  1955. #define USER_KEY2_ACTION UI_ACTION_SD_PRI_PAU_CONT
  1956. #define USER_KEY3_PIN UI_DISPLAY_D7_PIN // D7 to display (not used for graphics controller)...
  1957. #define USER_KEY3_ACTION UI_ACTION_LIGHTS_ONOFF
  1958. #define USER_KEY4_PIN -1
  1959. #define USER_KEY4_ACTION UI_ACTION_DUMMY
  1960. */
  1961.  
  1962. // ####### Advanced stuff for very special function #########
  1963.  
  1964. //#define NUM_MOTOR_DRIVERS 0
  1965. // #define MOTOR_DRIVER_x StepperDriver<int stepPin, int dirPin, int enablePin,bool invertDir, bool invertEnable>(float stepsPerMM,float speed)
  1966. //#define MOTOR_DRIVER_1(var) StepperDriver<E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, false, false> var(100.0f,5.0f)
  1967.  
  1968. /*
  1969. You can expand firmware functionality with events and you own event handler.
  1970. Read Events.h for more informations. To activate, uncomment the following define.
  1971. */
  1972. //#define CUSTOM_EVENTS
  1973.  
  1974. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement