Advertisement
Guest User

Whole config

a guest
Jun 14th, 2016
611
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 47.53 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. /**************** READ FIRST ************************
  23.  
  24.    This configuration file was created with the configuration tool. For that
  25.    reason, it does not contain the same informations as the original Configuration.h file.
  26.    It misses the comments and unused parts. Open this file file in the config tool
  27.    to see and change the data. You can also upload it to newer/older versions. The system
  28.    will silently add new options, so compilation continues to work.
  29.  
  30.    This file is optimized for version 0.92
  31.    generator: http://www.repetier.com/firmware/v092/
  32.  
  33.    If you are in doubt which named functions use which pins on your board, please check the
  34.    pins.h for the used name->pin assignments and your board documentation to verify it is
  35.    as you expect.
  36.  
  37. */
  38.  
  39. #define NUM_EXTRUDER 1
  40. #define MOTHERBOARD 33
  41. #include "pins.h"
  42.  
  43. // ################## EDIT THESE SETTINGS MANUALLY ################
  44. // ################ END MANUAL SETTINGS ##########################
  45.  
  46. #undef FAN_BOARD_PIN
  47. #define FAN_BOARD_PIN -1
  48. #define BOARD_FAN_SPEED 255
  49. #define FAN_THERMO_PIN -1
  50. #define FAN_THERMO_MIN_PWM 128
  51. #define FAN_THERMO_MAX_PWM 255
  52. #define FAN_THERMO_MIN_TEMP 45
  53. #define FAN_THERMO_MAX_TEMP 60
  54. #define FAN_THERMO_THERMISTOR_PIN -1
  55. #define FAN_THERMO_THERMISTOR_TYPE 1
  56.  
  57. //#define EXTERNALSERIAL  use Arduino serial library instead of build in. Requires more ram, has only 63 byte input buffer.
  58. // Uncomment the following line if you are using Arduino compatible firmware made for Arduino version earlier then 1.0
  59. // If it is incompatible you will get compiler errors about write functions not being compatible!
  60. //#define COMPAT_PRE1
  61. #define BLUETOOTH_SERIAL  -1
  62. #define BLUETOOTH_BAUD  115200
  63. #define MIXING_EXTRUDER 0
  64.  
  65.  
  66. #define DRIVE_SYSTEM 3
  67. /** 0 - belts and pulleys, 1 - filament drive */
  68. #define DELTA_DRIVE_TYPE 0
  69. #if DELTA_DRIVE_TYPE == 0
  70.   #define BELT_PITCH 2 //mm
  71.   #define PULLEY_TEETH 20
  72.   #define PULLEY_CIRCUMFERENCE (BELT_PITCH * PULLEY_TEETH)
  73. #elif DELTA_DRIVE_TYPE == 1
  74.   #define PULLEY_DIAMETER 12 // 12.732395447
  75.   #define PULLEY_CIRCUMFERENCE (PULLEY_DIAMETER * 3.1415927)
  76. #endif
  77. #define STEPS_PER_ROTATION 200
  78. #define MICRO_STEPS 16
  79. // Calculations
  80. #define AXIS_STEPS_PER_MM ((float)(MICRO_STEPS * STEPS_PER_ROTATION) / PULLEY_CIRCUMFERENCE)
  81. #define XAXIS_STEPS_PER_MM 80 // AXIS_STEPS_PER_MM //(84.88263)
  82. #define YAXIS_STEPS_PER_MM 80 // AXIS_STEPS_PER_MM //(84.88263)
  83. #define ZAXIS_STEPS_PER_MM 80 // AXIS_STEPS_PER_MM //(84.88263)
  84.  
  85.  
  86. // for each extruder, fan will stay on until extruder temperature is below this value
  87. #define EXTRUDER_FAN_COOL_TEMP 50
  88. // You can use either PWM (pulse width modulation) or PDM (pulse density modulation) for
  89. // extruders or coolers. PDM will give more signal changes per second, so on average it gives
  90. // the cleaner signal. The only advantage of PWM is giving signals at a fixed rate and never more
  91. // then PWM.
  92. #define PDM_FOR_EXTRUDER 0
  93. #define PDM_FOR_COOLER 0
  94. // The firmware checks if the heater and sensor got decoupled, which is dangerous. Since it will never reach target
  95. // temperature, the heater will stay on for every which can burn your printer or house.
  96. // As an additional barrier to your smoke detectors (I hope you have one above your printer) we now
  97. // do some more checks to detect if something got wrong.
  98. // If the temp. is on hold target, it may not sway more then this degrees celsius, or we mark
  99. // sensor as defect.
  100. #define DECOUPLING_TEST_MAX_HOLD_VARIANCE 20
  101. // Minimum temp. rise we expect after the set duration of full heating is over.
  102. // Always keep a good safety margin to get no false positives. If your period is e.g. 10 seconds
  103. // because at startup you already need 7 seconds until heater starts to rise temp. for sensor
  104. // then you have 3 seconds of increased heating to reach 1°C.
  105. #define DECOUPLING_TEST_MIN_TEMP_RISE 1
  106. // Set to 1 if you want firmware to kill print on decouple
  107. #define KILL_IF_SENSOR_DEFECT 0
  108. // Retraction for sd pause over lcd
  109. #define RETRACT_ON_PAUSE 2
  110. // These commands get executed after storing position and going to park position.
  111. #define PAUSE_START_COMMANDS ""
  112. // These commands get executed before we go to stored position.
  113. #define PAUSE_END_COMMANDS ""
  114. /* Set to 1 if all extruders use the same heater block. Temp. control is then always
  115. controlled by settings in extruder 0 definition. */
  116. #define SHARED_EXTRUDER_HEATER 0
  117. // Extruder offsets in steps not mm!
  118. #define EXT0_X_OFFSET 0
  119. #define EXT0_Y_OFFSET 0
  120. #define EXT0_Z_OFFSET 0
  121.  
  122. #define EXT0_STEPS_PER_MM 97 //200
  123. #define EXT0_TEMPSENSOR_TYPE 1
  124. // Analog input pin for reading temperatures or pin enabling SS for MAX6675
  125. #define EXT0_TEMPSENSOR_PIN TEMP_0_PIN
  126. // Which pin enables the heater
  127. #define EXT0_HEATER_PIN HEATER_0_PIN
  128. #define EXT0_STEP_PIN ORIG_E0_STEP_PIN
  129. #define EXT0_DIR_PIN ORIG_E0_DIR_PIN
  130. // set to false/true for normal / inverse direction
  131. #define EXT0_INVERSE 0
  132. #define EXT0_ENABLE_PIN ORIG_E0_ENABLE_PIN
  133. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  134. #define EXT0_ENABLE_ON 0
  135. /* Set to 1 to mirror motor. Pins for mirrored motor are below */
  136. #define EXT0_MIRROR_STEPPER 0
  137. #define EXT0_STEP2_PIN ORIG_E0_STEP_PIN
  138. #define EXT0_DIR2_PIN ORIG_E0_DIR_PIN
  139. #define EXT0_INVERSE2 0
  140. #define EXT0_ENABLE2_PIN ORIG_E0_ENABLE_PIN
  141. // The following speed settings are for skeinforge 40+ where e is the
  142. // length of filament pulled inside the heater. For repsnap or older
  143. // skeinforge use higher values.
  144. //  Overridden if EEPROM activated.
  145. #define EXT0_MAX_FEEDRATE 50
  146. #define EXT0_MAX_START_FEEDRATE 20
  147. // Acceleration in mm/s^2
  148. //  Overridden if EEPROM activated.
  149. #define EXT0_MAX_ACCELERATION 10000
  150. /** Type of heat manager for this extruder.
  151. - 0 = Simply switch on/off if temperature is reached. Works always.
  152. - 1 = PID Temperature control. Is better but needs good PID values. Defaults are a good start for most extruder.
  153. - 3 = Dead-time control. PID_P becomes dead-time in seconds.
  154.  Overridden if EEPROM activated.
  155. */
  156. #define EXT0_HEAT_MANAGER 1
  157. /** Wait x seconds, after reaching target temperature. Only used for M109.  Overridden if EEPROM activated. */
  158. #define EXT0_WATCHPERIOD 1
  159.  
  160. /** \brief The maximum value, I-gain can contribute to the output.
  161.  
  162. A good value is slightly higher then the output needed for your temperature.
  163. Values for starts:
  164. 130 => PLA for temperatures from 170-180 deg C
  165. 180 => ABS for temperatures around 240 deg C
  166.  
  167. The precise values may differ for different nozzle/resistor combination.
  168.  Overridden if EEPROM activated.
  169. */
  170. #define EXT0_PID_INTEGRAL_DRIVE_MAX 180
  171. /** \brief lower value for integral part
  172.  
  173. The I state should converge to the exact heater output needed for the target temperature.
  174. To prevent a long deviation from the target zone, this value limits the lower value.
  175. A good start is 30 lower then the optimal value. You need to leave room for cooling.
  176.  Overridden if EEPROM activated.
  177. */
  178. #define EXT0_PID_INTEGRAL_DRIVE_MIN 40
  179. #define EXT0_PID_PGAIN_OR_DEAD_TIME 7
  180. #define EXT0_PID_I 2
  181. #define EXT0_PID_D 40
  182. // maximum time the heater is can be switched on. Max = 255.  Overridden if EEPROM activated.
  183. #define EXT0_PID_MAX 255
  184. /** \brief Faktor for the advance algorithm. 0 disables the algorithm.  Overridden if EEPROM activated.
  185. K is the factor for the quadratic term, which is normally disabled in newer versions. If you want to use
  186. the quadratic factor make sure ENABLE_QUADRATIC_ADVANCE is defined.
  187. L is the linear factor and seems to be working better then the quadratic dependency.
  188. */
  189. #define EXT0_ADVANCE_K 0
  190. #define EXT0_ADVANCE_L 0
  191. /* Motor steps to remove backlash for advance algorithm. These are the steps
  192. needed to move the motor cog in reverse direction until it hits the driving
  193. cog. Direct drive extruder need 0. */
  194. #define EXT0_ADVANCE_BACKLASH_STEPS 0
  195. /** \brief Temperature to retract filament when extruder is heating up. Overridden if EEPROM activated.
  196. */
  197. #define EXT0_WAIT_RETRACT_TEMP 150
  198. /** \brief Units (mm/inches) to retract filament when extruder is heating up. Overridden if EEPROM activated. Set
  199. to 0 to disable.
  200. */
  201. #define EXT0_WAIT_RETRACT_UNITS 0
  202. /** You can run any GCODE command on extruder deselect/select. Separate multiple commands with a new line \n.
  203. That way you can execute some mechanical components needed for extruder selection or retract filament or whatever you need.
  204. The codes are only executed for multiple extruder when changing the extruder. */
  205. #define EXT0_SELECT_COMMANDS ""
  206. #define EXT0_DESELECT_COMMANDS ""
  207. #define EXT0_EXTRUDER_COOLER_PIN -1
  208. /** PWM speed for the cooler fan. 0=off 255=full speed */
  209. #define EXT0_EXTRUDER_COOLER_SPEED 255
  210. /** Time in ms between a heater action and test of success. Must be more then time between turning heater on and first temp. rise!
  211.  * 0 will disable decoupling test */
  212. #define EXT0_DECOUPLE_TEST_PERIOD 12000
  213. /** Pin which toggles regularly during extrusion allowing jam control. -1 = disabled */
  214. #define EXT0_JAM_PIN -1
  215. /** Pull-up resistor for jam pin? */
  216. #define EXT0_JAM_PULLUP 0
  217.  
  218.  
  219. /** If enabled you can select the distance your filament gets retracted during a
  220. M140 command, after a given temperature is reached. */
  221. #define RETRACT_DURING_HEATUP true
  222.  
  223.  
  224. /** Allow retraction with G10/G11 removing requirement for retraction setting in slicer. Also allows filament change if lcd is configured. */
  225. #define FEATURE_RETRACTION 1
  226. /** auto-retract converts pure extrusion moves into retractions. Beware that
  227.  simple extrusion e.g. over Repetier-Host will then not work! */
  228. #define AUTORETRACT_ENABLED 0
  229. #define RETRACTION_LENGTH 3
  230. #define RETRACTION_LONG_LENGTH 13
  231. #define RETRACTION_SPEED 40
  232. #define RETRACTION_Z_LIFT 0
  233. #define RETRACTION_UNDO_EXTRA_LENGTH 0
  234. #define RETRACTION_UNDO_EXTRA_LONG_LENGTH 0
  235. #define RETRACTION_UNDO_SPEED 20
  236.  
  237. /**
  238. If you have a lcd display, you can do a filament switch with M600.
  239. It will change the current extruders filament and temperature must already be high enough.
  240. */
  241. #define FILAMENTCHANGE_X_POS 0
  242. #define FILAMENTCHANGE_Y_POS 0
  243. #define FILAMENTCHANGE_Z_ADD  1
  244.  
  245. /** Does a homing procedure after a filament change. This is good in case
  246. you moved the extruder while changing filament during print.
  247. 0 = no homing, 1 = xy homing, 2 = xyz homing
  248. */
  249. #define FILAMENTCHANGE_REHOME 1
  250.  
  251. /** Will first retract short distance, go to change position and then retract longretract.
  252. Retractions speeds are taken from RETRACTION_SPEED and RETRACTION_UNDO_SPEED
  253. */
  254. #define FILAMENTCHANGE_SHORTRETRACT 5
  255. #define FILAMENTCHANGE_LONGRETRACT 50
  256.  
  257. /* Define how we detect jam/out of filament
  258.    1 = Distance between signal changes increase
  259.    2 = signal gets high
  260.    3 = signal gets low
  261.  
  262.    2 and 3 are not jam detections, but only out of filament detection by a switch
  263.    that changes the signal!
  264. */
  265. //#define JAM_METHOD 1
  266. // Steps normally needed for a full signal cycle.
  267. #define JAM_STEPS 220
  268. // Steps for reducing speed. Must be higher then JAM_STEPS
  269. #define JAM_SLOWDOWN_STEPS 380
  270. // New speed multiplier which gets set when slowdown is reached.
  271. #define JAM_SLOWDOWN_TO 70
  272. // Last fallback. If we slip this much, we want to pause.
  273. #define JAM_ERROR_STEPS 430
  274. /** To prevent signal bouncing, only consider changes if we are this much steps
  275.  away from last signal change. */
  276. #define JAM_MIN_STEPS 10
  277.  
  278. /** PID control only works target temperature +/- PID_CONTROL_RANGE.
  279. If you get much overshoot at the first temperature set, because the heater is going full power too long, you
  280. need to increase this value. For one 6.8 Ohm heater 10 is ok. With two 6.8 Ohm heater use 15.
  281. */
  282. #define PID_CONTROL_RANGE 20
  283. /** Prevent extrusions longer then x mm for one command. This is especially important if you abort a print. Then the
  284. extrusion position might be at any value like 23344. If you then have an G1 E-2 it will roll back 23 meter! */
  285. #define EXTRUDE_MAXLENGTH 100
  286. /** Skip wait, if the extruder temperature is already within x degrees. Only fixed numbers, 0 = off */
  287. #define SKIP_M109_IF_WITHIN 2
  288. /** \brief Set PID scaling
  289.  
  290. PID values assume a usable range from 0-255. This can be further limited to EXT0_PID_MAX by to methods.
  291. Set the value to 0: Normal computation, just clip output to EXT0_PID_MAX if computed value is too high.
  292. Set value to 1: Scale PID by EXT0_PID_MAX/256 and then clip to EXT0_PID_MAX.
  293. If your EXT0_PID_MAX is low, you should prefer the second method.
  294. */
  295. #define SCALE_PID_TO_MAX 0
  296. /** Temperature range for target temperature to hold in M109 command. 5 means +/-5 degC
  297.  
  298. Uncomment define to force the temperature into the range for given watch period.
  299. */
  300. //#define TEMP_HYSTERESIS 5
  301.  
  302. /** Userdefined thermistor table
  303.  
  304. There are many different thermistors, which can be combined with different resistors. This result
  305. in unpredictable number of tables. As a resolution, the user can define one table here, that can
  306. be used as type 5 for thermistor type in extruder/heated bed definition. Make sure, the number of entries
  307. matches the value in NUM_TEMPS_USERTHERMISTOR0. If you span definition over multiple lines, make sure to end
  308. each line, except the last, with a backslash. The table format is {{adc1,temp1},{adc2,temp2}...} with
  309. increasing adc values. For more informations, read
  310. http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html
  311.  
  312. If you have a sprinter temperature table, you have to multiply the first value with 4 and the second with 8.
  313. This firmware works with increased precision, so the value reads go from 0 to 4095 and the temperature is
  314. temperature*8.
  315.  
  316. 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!
  317. */
  318. /** Number of entries in the user thermistor table 0. Set to 0 to disable it. */
  319. #define NUM_TEMPS_USERTHERMISTOR0 0
  320. #define USER_THERMISTORTABLE0  {\
  321.   {1*4,864*8},{21*4,300*8},{25*4,290*8},{29*4,280*8},{33*4,270*8},{39*4,260*8},{46*4,250*8},{54*4,240*8},{64*4,230*8},{75*4,220*8},\
  322.   {90*4,210*8},{107*4,200*8},{128*4,190*8},{154*4,180*8},{184*4,170*8},{221*4,160*8},{265*4,150*8},{316*4,140*8},{375*4,130*8},\
  323.   {441*4,120*8},{513*4,110*8},{588*4,100*8},{734*4,80*8},{856*4,60*8},{938*4,40*8},{986*4,20*8},{1008*4,0*8},{1018*4,-20*8} }
  324. /** Number of entries in the user thermistor table 1. Set to 0 to disable it. */
  325. #define NUM_TEMPS_USERTHERMISTOR1 0
  326. #define USER_THERMISTORTABLE1  {}
  327. /** Number of entries in the user thermistor table 2. Set to 0 to disable it. */
  328. #define NUM_TEMPS_USERTHERMISTOR2 0
  329. #define USER_THERMISTORTABLE2  {}
  330. /** Supply voltage to ADC, can be changed by setting ANALOG_REF below to different value. */
  331. #define GENERIC_THERM_VREF 5
  332. /** Number of entries in generated table. One entry takes 4 bytes. Higher number of entries increase computation time too.
  333. Value is used for all generic tables created. */
  334. #define GENERIC_THERM_NUM_ENTRIES 33
  335. #define HEATER_PWM_SPEED 0 // How fast ist pwm signal 0 = 15.25Hz, 1 = 30.51Hz, 2 = 61.03Hz, 3 = 122.06Hz
  336.  
  337. // ############# Heated bed configuration ########################
  338.  
  339. #define HAVE_HEATED_BED 1
  340. #define HEATED_BED_MAX_TEMP 120
  341. /** Skip M190 wait, if heated bed is already within x degrees. Fixed numbers only, 0 = off. */
  342. #define SKIP_M190_IF_WITHIN 3
  343. // Select type of your heated bed. It's the same as for EXT0_TEMPSENSOR_TYPE
  344. // set to 0 if you don't have a heated bed
  345. #define HEATED_BED_SENSOR_TYPE 1
  346. /** Analog pin of analog sensor to read temperature of heated bed.  */
  347. #define HEATED_BED_SENSOR_PIN TEMP_1_PIN
  348. /** \brief Pin to enable heater for bed. */
  349. #define HEATED_BED_HEATER_PIN HEATER_1_PIN
  350. // How often the temperature of the heated bed is set (msec)
  351. #define HEATED_BED_SET_INTERVAL 5000
  352.  
  353. /**
  354. Heat manager for heated bed:
  355. 0 = Bang Bang, fast update
  356. 1 = PID controlled
  357. 2 = Bang Bang, limited check every HEATED_BED_SET_INTERVAL. Use this with relay-driven beds to save life time
  358. 3 = dead time control
  359. */
  360. #define HEATED_BED_HEAT_MANAGER 1
  361. /** \brief The maximum value, I-gain can contribute to the output.
  362. The precise values may differ for different nozzle/resistor combination.
  363.  Overridden if EEPROM activated.
  364. */
  365. #define HEATED_BED_PID_INTEGRAL_DRIVE_MAX 255
  366. /** \brief lower value for integral part
  367.  
  368. The I state should converge to the exact heater output needed for the target temperature.
  369. To prevent a long deviation from the target zone, this value limits the lower value.
  370. A good start is 30 lower then the optimal value. You need to leave room for cooling.
  371.  Overridden if EEPROM activated.
  372. */
  373. #define HEATED_BED_PID_INTEGRAL_DRIVE_MIN 80
  374. /** P-gain.  Overridden if EEPROM activated. */
  375. #define HEATED_BED_PID_PGAIN_OR_DEAD_TIME   196
  376. /** I-gain  Overridden if EEPROM activated.*/
  377. #define HEATED_BED_PID_IGAIN   33.02
  378. /** Dgain.  Overridden if EEPROM activated.*/
  379. #define HEATED_BED_PID_DGAIN 290
  380. // maximum time the heater can be switched on. Max = 255.  Overridden if EEPROM activated.
  381. #define HEATED_BED_PID_MAX 255
  382. // Time to see a temp. change when fully heating. Consider that beds at higher temp. need longer to rise and cold
  383. // beds need some time to get the temp. to the sensor. Time is in milliseconds! Set 0 to disable
  384. #define HEATED_BED_DECOUPLE_TEST_PERIOD 300000
  385.  
  386. #define MIN_EXTRUDER_TEMP 150
  387. // When temperature exceeds max temp, your heater will be switched off.
  388. // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
  389. #define MAXTEMP 275
  390. #define MIN_DEFECT_TEMPERATURE -10
  391. #define MAX_DEFECT_TEMPERATURE 300
  392.  
  393. /* Select the default mode when the printer gets enables. Possible values are
  394. PRINTER_MODE_FFF 0
  395. PRINTER_MODE_LASER 1
  396. PRINTER_MODE_CNC 2
  397. */
  398. #define DEFAULT_PRINTER_MODE 0
  399.  
  400. // ################ Endstop configuration #####################
  401.  
  402. /* By default all endstops are pulled up to HIGH. You need a pull-up if you
  403. use a mechanical endstop connected with GND. Set value to false for no pull-up
  404. on this endstop.
  405. */
  406. #define ENDSTOP_PULLUP_X_MIN true
  407. #define ENDSTOP_PULLUP_Y_MIN true
  408. #define ENDSTOP_PULLUP_Z_MIN true
  409. #define ENDSTOP_PULLUP_X_MAX true
  410. #define ENDSTOP_PULLUP_Y_MAX true
  411. #define ENDSTOP_PULLUP_Z_MAX true
  412.  
  413. //set to true to invert the logic of the endstops
  414. #define ENDSTOP_X_MIN_INVERTING true
  415. #define ENDSTOP_Y_MIN_INVERTING true
  416. #define ENDSTOP_Z_MIN_INVERTING true
  417. #define ENDSTOP_X_MAX_INVERTING true
  418. #define ENDSTOP_Y_MAX_INVERTING true
  419. #define ENDSTOP_Z_MAX_INVERTING true
  420.  
  421. // Set the values true where you have a hardware endstop. The Pin number is taken from pins.h.
  422. #define MIN_HARDWARE_ENDSTOP_X false
  423. #define MIN_HARDWARE_ENDSTOP_Y false
  424. #define MIN_HARDWARE_ENDSTOP_Z true
  425. #define MAX_HARDWARE_ENDSTOP_X true
  426. #define MAX_HARDWARE_ENDSTOP_Y true
  427. #define MAX_HARDWARE_ENDSTOP_Z true
  428.  
  429. //If your axes are only moving in one direction, make sure the endstops are connected properly.
  430. //If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here
  431.  
  432.  
  433. // Delta robot radius endstop
  434. #define max_software_endstop_r true
  435.  
  436. //If true, axis won't move to coordinates less than zero.
  437. #define min_software_endstop_x false
  438. #define min_software_endstop_y false
  439. #define min_software_endstop_z false
  440.  
  441. //If true, axis won't move to coordinates greater than the defined lengths below.
  442. #define max_software_endstop_x false
  443. #define max_software_endstop_y false
  444. #define max_software_endstop_z false
  445.  
  446. // If during homing the endstop is reached, ho many mm should the printer move back for the second try
  447. #define ENDSTOP_X_BACK_MOVE 10
  448. #define ENDSTOP_Y_BACK_MOVE 10
  449. #define ENDSTOP_Z_BACK_MOVE 10
  450.  
  451. // For higher precision you can reduce the speed for the second test on the endstop
  452. // during homing operation. The homing speed is divided by the value. 1 = same speed, 2 = half speed
  453. #define ENDSTOP_X_RETEST_REDUCTION_FACTOR 2
  454. #define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 2
  455. #define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 2
  456.  
  457. // When you have several endstops in one circuit you need to disable it after homing by moving a
  458. // small amount back. This is also the case with H-belt systems.
  459. #define ENDSTOP_X_BACK_ON_HOME 1
  460. #define ENDSTOP_Y_BACK_ON_HOME 1
  461. #define ENDSTOP_Z_BACK_ON_HOME 1
  462.  
  463. // You can disable endstop checking for print moves. This is needed, if you get sometimes
  464. // false signals from your endstops. If your endstops don't give false signals, you
  465. // can set it on for safety.
  466. #define ALWAYS_CHECK_ENDSTOPS 0
  467.  
  468. // ################# XYZ movements ###################
  469.  
  470. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  471. #define X_ENABLE_ON 0
  472. #define Y_ENABLE_ON 0
  473. #define Z_ENABLE_ON 0
  474.  
  475. // Disables axis when it's not being used.
  476. #define DISABLE_X 0
  477. #define DISABLE_Y 0
  478. #define DISABLE_Z 0
  479. #define DISABLE_E 0
  480.  
  481. // Inverting motor direction. Only in case of pure cartesian printers, this
  482. // is also the axis you invert!
  483. #define INVERT_X_DIR false
  484. #define INVERT_Y_DIR true
  485. #define INVERT_Z_DIR false
  486.  
  487. //// ENDSTOP SETTINGS:
  488. // Sets direction of endstops when homing; 1=MAX, -1=MIN
  489. #define X_HOME_DIR 1
  490. #define Y_HOME_DIR 1
  491. #define Z_HOME_DIR 1
  492.  
  493. // maximum positions in mm - only fixed numbers!
  494. // For delta robot Z_MAX_LENGTH is the maximum travel of the towers and should be set to the distance between the hotend
  495. // and the platform when the printer is at its home position.
  496. // If EEPROM is enabled these values will be overridden with the values in the EEPROM
  497. #define X_MAX_LENGTH 95
  498. #define Y_MAX_LENGTH 95
  499. #define Z_MAX_LENGTH 577.212//574.600//580.000//564.581
  500.  
  501. // 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
  502. // of the bed. Maximum coordinate is given by adding the above X_MAX_LENGTH values.
  503. #define X_MIN_POS -95
  504. #define Y_MIN_POS -95
  505. #define Z_MIN_POS 0
  506.  
  507.  
  508.  
  509. // ##########################################################################################
  510. // ##                           Movement settings                                          ##
  511. // ##########################################################################################
  512.  
  513. // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. Currently only works for RAMBO boards
  514. #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
  515.  
  516. #define FEATURE_BABYSTEPPING 1
  517. #define BABYSTEP_MULTIPLICATOR 1
  518.  
  519. /** \brief Number of segments to generate for delta conversions per second of move
  520. */
  521. #define DELTA_SEGMENTS_PER_SECOND_PRINT 180 // Move accurate setting for print moves
  522. #define DELTA_SEGMENTS_PER_SECOND_MOVE 70 // Less accurate setting for other moves
  523.  
  524. /** 1 for more precise delta moves. 0 for faster computation.
  525. Needs a bit more computation time. */
  526. #define EXACT_DELTA_MOVES 1
  527.  
  528. /** \brief Delta rod length (mm)
  529. */
  530. #define DELTA_DIAGONAL_ROD 304 // mm
  531.  
  532. /*  =========== Parameter essential for delta calibration ===================
  533.  
  534.             C, Y-Axis
  535.             |                        |___| CARRIAGE_HORIZONTAL_OFFSET (recommend set it to 0)
  536.             |                        |   \------------------------------------------
  537.             |_________ X-axis        |    \                                        |
  538.            / \                       |     \  DELTA_DIAGONAL_ROD (length)    Each move this Rod Height
  539.           /   \                             \                                 is calculated
  540.          /     \                             \    Carriage is at printer center!   |
  541.          A      B                             \_____/--------------------------------
  542.                                               |--| END_EFFECTOR_HORIZONTAL_OFFSET (recommend set it to 0)
  543.                                          |----| ROD_RADIUS (Horizontal rod pivot to pivot measure)
  544.                                      |-----------| PRINTER_RADIUS (recommend set it to ROD_RADIUS)
  545.  
  546.     Column angles are measured from X-axis counterclockwise
  547.     "Standard" positions: alpha_A = 210, alpha_B = 330, alpha_C = 90
  548. */
  549.  
  550. /** \brief column positions - change only to correct build imperfections! */
  551. #define DELTA_ALPHA_A 210
  552. #define DELTA_ALPHA_B 330
  553. #define DELTA_ALPHA_C 90
  554.  
  555. /** Correct radius by this value for each column. Perfect builds have 0 everywhere. */
  556. #define DELTA_RADIUS_CORRECTION_A 0
  557. #define DELTA_RADIUS_CORRECTION_B 0
  558. #define DELTA_RADIUS_CORRECTION_C 0
  559.  
  560. /** Correction of the default diagonal size. Value gets added.*/
  561. #define DELTA_DIAGONAL_CORRECTION_A 0
  562. #define DELTA_DIAGONAL_CORRECTION_B 0
  563. #define DELTA_DIAGONAL_CORRECTION_C 0
  564.  
  565. /** \brief Horizontal offset of the universal joints on the end effector (moving platform).
  566. */
  567. #define END_EFFECTOR_HORIZONTAL_OFFSET 35
  568.  
  569. /** \brief Horizontal offset of the universal joints on the vertical carriages.
  570. */
  571. #define CARRIAGE_HORIZONTAL_OFFSET 32
  572.  
  573. /** Max. radius (mm) the printer should be able to reach. */
  574. #define DELTA_MAX_RADIUS 95
  575.  
  576. //Horizontal rod pivot to pivot measure
  577. #define ROD_RADIUS 180
  578.  
  579. /** \brief Printer radius in mm,
  580.   measured from the center of the print area to the vertical smooth tower.
  581.   Alternately set this to the pivot to pivot horizontal rod distance, when head is at (0,0)
  582. */
  583. #define PRINTER_RADIUS 180
  584.  
  585.  
  586. /** When true the delta will home to z max when reset/powered over cord. That way you start with well defined coordinates.
  587. If you don't do it, make sure to home first before your first move.
  588. */
  589. #define DELTA_HOME_ON_POWER 0
  590. #define STEP_COUNTER
  591.  
  592. /** To allow software correction of misaligned endstops, you can set the correction in steps here. If you have EEPROM enabled
  593. you can also change the values online and autoleveling will store the results here. */
  594. #define DELTA_X_ENDSTOP_OFFSET_STEPS 0
  595. #define DELTA_Y_ENDSTOP_OFFSET_STEPS 0
  596. #define DELTA_Z_ENDSTOP_OFFSET_STEPS 0
  597.  
  598. // Margin (mm) to avoid above tower minimum (xMin xMinsteps)
  599. // If your printer can put its carriage low enough the rod is horizontal without hitting the floor
  600. // set this to zero. Otherwise, measure how high the carriage is from horizontal rod
  601. // Also, movement speeds are 10x to 20x cartesian speeds at tower bottom.
  602. // You may need to leave a few mm for safety.
  603. // Hitting floor at high speed can damage your printer (motors, drives, etc)
  604. // THIS MAY NEED UPDATING IF THE HOT END HEIGHT CHANGES!
  605. #define DELTA_FLOOR_SAFETY_MARGIN_MM 15
  606. //#define SOFTWARE_LEVELING
  607.  
  608.  
  609. /** \brief Number of delta moves in each line. Moves that exceed this figure will be split into multiple lines.
  610. Increasing this figure can use a lot of memory since 7 bytes * size of line buffer * MAX_SELTA_SEGMENTS_PER_LINE
  611. will be allocated for the delta buffer.
  612. PrintLine PrintLine::lines[PRINTLINE_CACHE_SIZE (default 16?)];
  613. Printline is about 200 bytes + 7 * DELTASEGMENTS_PER_PRINTLINE
  614. or 16 * (200 + (7*22=154) = 354) = 5664 bytes! !1
  615. min is 5 * (200 + (7*10=70) =270) = 1350
  616.  This leaves ~1K free RAM on an Arduino which has only 8k
  617. Mega. Used only for nonlinear systems like delta or tuga. */
  618. #define DELTASEGMENTS_PER_PRINTLINE 22
  619.  
  620. /** After x seconds of inactivity, the stepper motors are disabled.
  621.     Set to 0 to leave them enabled.
  622.     This helps cooling the Stepper motors between two print jobs.
  623.     Overridden if EEPROM activated.
  624. */
  625. #define STEPPER_INACTIVE_TIME 360
  626.  
  627. /** After x seconds of inactivity, the system will go down as far it can.
  628.     It will at least disable all stepper motors and heaters. If the board has
  629.     a power pin, it will be disabled, too.
  630.     Set value to 0 for disabled.
  631.     Overridden if EEPROM activated.
  632. */
  633. #define MAX_INACTIVE_TIME 0L
  634.  
  635. /** Maximum feedrate, the system allows. Higher feedrates are reduced to these values.
  636.     The axis order in all axis related arrays is X, Y, Z
  637.      Overridden if EEPROM activated.
  638.     */
  639. #define MAX_FEEDRATE_X 200//500
  640. #define MAX_FEEDRATE_Y 200//500
  641. #define MAX_FEEDRATE_Z 200//500
  642.  
  643. /** Home position speed in mm/s. Overridden if EEPROM activated. */
  644. #define HOMING_FEEDRATE_X 50 //200
  645. #define HOMING_FEEDRATE_Y 50 //200
  646. #define HOMING_FEEDRATE_Z 50  //200
  647.  
  648. /** Set order of axis homing. Use HOME_ORDER_XYZ and replace XYZ with your order.
  649.  * If you measure Z with your extruder tip you need a hot extruder to get right measurement. In this
  650.  * case set HOME_ORDER_ZXYTZ and also define ZHOME_HEAT_HEIGHT and ZHOME_MIN_TEMPERATURE. It will do
  651.  * first a z home to get some reference, then raise to ZHOME_HEAT_HEIGHT do xy homing and then after
  652.  * heating to minimum ZHOME_MIN_TEMPERATURE will z home again for correct height.
  653.  * */
  654. #define HOMING_ORDER HOME_ORDER_ZXY
  655. // Used for homing order HOME_ORDER_ZXYTZ
  656. #define ZHOME_MIN_TEMPERATURE 0
  657. // needs to heat all extruders (1) or only current extruder (0)
  658. #define ZHOME_HEAT_ALL 1
  659. // Z-height for heating extruder during homing
  660. #define ZHOME_HEAT_HEIGHT 20
  661.  
  662. #define ZHOME_X_POS 0
  663. #define ZHOME_Y_POS 0
  664.  
  665. /* 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
  666. own weight, so this is nearly never needed. */
  667. #define ENABLE_BACKLASH_COMPENSATION 0
  668. #define X_BACKLASH 0
  669. #define Y_BACKLASH 0
  670. #define Z_BACKLASH 0
  671.  
  672. /** Comment this to disable ramp acceleration */
  673. #define RAMP_ACCELERATION 1
  674.  
  675. /** If your stepper needs a longer high signal then given, you can add a delay here.
  676. The delay is realized as a simple loop wasting time, which is not available for other
  677. computations. So make it as low as possible. For the most common drivers no delay is needed, as the
  678. included delay is already enough.
  679. */
  680. #define STEPPER_HIGH_DELAY 2
  681.  
  682. /** If your driver needs some additional delay between setting direction and first step signal,
  683.  you can set this here. There are some commands between direction and signal, but some drivers
  684.  might be even slower or you are using a fast Arduino board with slow driver. Normally 0 works.
  685.  If you get skewed print, you might try 1 microsecond here.
  686.  */
  687. #define DIRECTION_DELAY 0
  688.  
  689. /** The firmware can only handle 16000Hz interrupt frequency cleanly. If you need higher speeds
  690. a faster solution is needed, and this is to double/quadruple the steps in one interrupt call.
  691. This is like reducing your 1/16th microstepping to 1/8 or 1/4. It is much cheaper then 1 or 3
  692. additional stepper interrupts with all it's overhead. As a result you can go as high as
  693. 40000Hz.
  694. */
  695. #define STEP_DOUBLER_FREQUENCY 12000
  696.  
  697. /** If you need frequencies off more then 30000 you definitely need to enable this. If you have only 1/8 stepping
  698. enabling this may cause to stall your moves when 20000Hz is reached.
  699. */
  700. #define ALLOW_QUADSTEPPING 0
  701.  
  702. /** If you reach STEP_DOUBLER_FREQUENCY the firmware will do 2 or 4 steps with nearly no delay. That can be too fast
  703. for some printers causing an early stall.
  704. */
  705. #define DOUBLE_STEP_DELAY 1 // time in microseconds
  706.  
  707. /** \brief X, Y, Z max acceleration in mm/s^2 for printing moves or retracts. Make sure your printer can go that high!
  708.  Overridden if EEPROM activated.
  709. */
  710. #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 2000
  711. #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 2000
  712. #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
  713.  
  714. /** \brief X, Y, Z max acceleration in mm/s^2 for travel moves.  Overridden if EEPROM activated.*/
  715. #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 3000
  716. #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 3000
  717. #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
  718.  
  719. /** If you print on a moving bed, it can become more shaky the higher and bigger
  720.  your print gets. Therefore it might be helpfull to reduce acceleration with
  721.  increasing print height. You can define here how acceleration should change.
  722.  You set ACCELERATION_FACTOR_TOP to the factor in percent for the top position
  723.  of your printer. Acceleration will then be modified linear over height.
  724.  INTERPOLATE_ACCELERATION_WITH_Z sets, which accelerations get changed:
  725.  0 = do not interpolate at all
  726.  1 = interpolate x and y acceleration
  727.  2 = interpolate z acceleration
  728.  3 = interpolate x,y and z acceleration
  729.   */
  730. #define INTERPOLATE_ACCELERATION_WITH_Z 0
  731. #define ACCELERATION_FACTOR_TOP 100
  732.  
  733. /** \brief Maximum allowable jerk.
  734.  
  735. Caution: This is no real jerk in a physical meaning.
  736.  
  737. The jerk determines your start speed and the maximum speed at the join of two segments.
  738. Its unit is mm/s. If the printer is standing still, the start speed is jerk/2. At the
  739. join of two segments, the speed difference is limited to the jerk value.
  740.  
  741. Examples:
  742. For all examples jerk is assumed as 40.
  743.  
  744. Segment 1: vx = 50, vy = 0
  745. Segment 2: vx = 0, vy = 50
  746. v_diff = sqrt((50-0)^2+(0-50)^2) = 70.71
  747. v_diff > jerk => vx_1 = vy_2 = jerk/v_diff*vx_1 = 40/70.71*50 = 28.3 mm/s at the join
  748.  
  749. Segment 1: vx = 50, vy = 0
  750. Segment 2: vx = 35.36, vy = 35.36
  751. v_diff = sqrt((50-35.36)^2+(0-35.36)^2) = 38.27 < jerk
  752. Corner can be printed with full speed of 50 mm/s
  753.  
  754. Overridden if EEPROM activated.
  755. */
  756. #define MAX_JERK 20
  757. #define MAX_ZJERK 0.3
  758.  
  759. /** \brief Number of moves we can cache in advance.
  760. This number of moves can be cached in advance. If you wan't to cache more, increase this. Especially on
  761. many very short moves the cache may go empty. The minimum value is 5.
  762. */
  763. #define PRINTLINE_CACHE_SIZE 12
  764.  
  765. /** \brief Low filled cache size.
  766.  
  767. If the cache contains less then MOVE_CACHE_LOW segments, the time per segment is limited to LOW_TICKS_PER_MOVE clock cycles.
  768. If a move would be shorter, the feedrate will be reduced. This should prevent buffer underflows. Set this to 0 if you
  769. don't care about empty buffers during print.
  770. */
  771. #define MOVE_CACHE_LOW 10
  772.  
  773. /** \brief Cycles per move, if move cache is low.
  774.  
  775. 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
  776. if you are printing many very short segments at high speed. Higher delays here allow higher values in PATH_PLANNER_CHECK_SEGMENTS.
  777. */
  778. #define LOW_TICKS_PER_MOVE 250000
  779.  
  780. #define EXTRUDER_SWITCH_XY_SPEED 100
  781. #define DUAL_X_AXIS 0
  782. #define FEATURE_TWO_XSTEPPER 0
  783. #define X2_STEP_PIN   ORIG_E1_STEP_PIN
  784. #define X2_DIR_PIN    ORIG_E1_DIR_PIN
  785. #define X2_ENABLE_PIN ORIG_E1_ENABLE_PIN
  786. #define FEATURE_TWO_YSTEPPER 0
  787. #define Y2_STEP_PIN   ORIG_E1_STEP_PIN
  788. #define Y2_DIR_PIN    ORIG_E1_DIR_PIN
  789. #define Y2_ENABLE_PIN ORIG_E1_ENABLE_PIN
  790. #define FEATURE_TWO_ZSTEPPER 0
  791. #define Z2_STEP_PIN   ORIG_E1_STEP_PIN
  792. #define Z2_DIR_PIN    ORIG_E1_DIR_PIN
  793. #define Z2_ENABLE_PIN ORIG_E1_ENABLE_PIN
  794. #define FEATURE_THREE_ZSTEPPER 0
  795. #define Z3_STEP_PIN   ORIG_E2_STEP_PIN
  796. #define Z3_DIR_PIN    ORIG_E2_DIR_PIN
  797. #define Z3_ENABLE_PIN ORIG_E2_ENABLE_PIN
  798. #define FEATURE_DITTO_PRINTING 0
  799. #define USE_ADVANCE 0
  800. #define ENABLE_QUADRATIC_ADVANCE 0
  801.  
  802.  
  803. // ################# Misc. settings ##################
  804.  
  805. #define BAUDRATE 250000
  806. #define ENABLE_POWER_ON_STARTUP 1
  807. /**
  808. If you use an ATX power supply you need the power pin to work non inverting. For some special
  809. boards you might need to make it inverting.
  810. */
  811. #define POWER_INVERTING 0
  812. #define KILL_METHOD 1
  813. #define ACK_WITH_LINENUMBER 1
  814. #define WAITING_IDENTIFIER "wait"
  815. #define ECHO_ON_EXECUTE 1
  816.  
  817. /** \brief EEPROM storage mode
  818.  
  819. Set the EEPROM_MODE to 0 if you always want to use the settings in this configuration file. If not,
  820. set it to a value not stored in the first EEPROM-byte used. If you later want to overwrite your current
  821. EEPROM settings with configuration defaults, just select an other value. On the first call to epr_init()
  822. it will detect a mismatch of the first byte and copy default values into EEPROM. If the first byte
  823. matches, the stored values are used to overwrite the settings.
  824.  
  825. IMPORTANT: With mode <>0 some changes in Configuration.h are not set any more, as they are
  826.            taken from the EEPROM.
  827. */
  828. #define EEPROM_MODE 1
  829. #undef PS_ON_PIN
  830. #define PS_ON_PIN ORIG_PS_ON_PIN
  831. #define JSON_OUTPUT 0
  832.  
  833. /* ======== Servos =======
  834. Control the servos with
  835. M340 P<servoId> S<pulseInUS>   / ServoID = 0..3  pulseInUs = 500..2500
  836. Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
  837. WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!
  838. */
  839. #define FEATURE_SERVO 0
  840. #define SERVO0_PIN 11
  841. #define SERVO1_PIN -1
  842. #define SERVO2_PIN -1
  843. #define SERVO3_PIN -1
  844. #define SERVO0_NEUTRAL_POS  -1
  845. #define SERVO1_NEUTRAL_POS  -1
  846. #define SERVO2_NEUTRAL_POS  -1
  847. #define SERVO3_NEUTRAL_POS  -1
  848. #define UI_SERVO_CONTROL 0
  849. #define FAN_KICKSTART_TIME  200
  850.  
  851.         #define FEATURE_WATCHDOG 0
  852.  
  853. // #################### Z-Probing #####################
  854.  
  855. /* After homing the z position is corrected to compensate
  856. for a bed coating. Since you can change coatings the value is stored in
  857. EEPROM if enabled, so you can switch between different coatings without needing
  858. to recalibrate z.
  859. */
  860. #define Z_PROBE_Z_OFFSET 0 // offset to coating form real bed level
  861.  
  862. /* How is z min measured
  863.  0 = trigger is height of real bed neglecting coating
  864.  1 = trigger is current coating
  865.  
  866.  For mode 1 the current coating thickness is added to measured z probe distances.
  867.  That way the real bed is always the reference height. For inductive sensors
  868.  or z min endstops the coating has no effect on the result, so you should use mode 0.
  869. */
  870. #define Z_PROBE_Z_OFFSET_MODE 0
  871.  
  872. #define UI_BED_COATING 1
  873.  
  874. #define FEATURE_Z_PROBE 1
  875. #define Z_PROBE_BED_DISTANCE 11.800//5 // Higher than max bed level distance error in mm
  876. #define Z_PROBE_PIN ORIG_Z_MIN_PIN
  877. #define Z_PROBE_PULLUP 1 // NC = 1, NO = 0
  878. #define Z_PROBE_ON_HIGH 1 // Untriggered H = 1, Untriggered L = 0
  879. #define Z_PROBE_X_OFFSET -24
  880. #define Z_PROBE_Y_OFFSET -16
  881.  
  882. // Waits for a signal to start. Valid signals are probe hit and ok button.
  883. // This is needful if you have the probe trigger by hand.
  884. #define Z_PROBE_WAIT_BEFORE_TEST 0
  885.  
  886. /** Speed of z-axis in mm/s when probing */
  887. #define Z_PROBE_SPEED 3
  888. #define Z_PROBE_XY_SPEED 40
  889. #define Z_PROBE_SWITCHING_DISTANCE 1.5 // Distance to safely switch off probe after it was activated
  890. #define Z_PROBE_REPETITIONS 3 // Repetitions for probing at one point.
  891.  
  892. /** Distance between nozzle and bed when probe triggers. */
  893. #define Z_PROBE_HEIGHT 11.800//32.50
  894.  
  895. /** These scripts are run before resp. after the z-probe is done. Add here code to activate/deactivate probe if needed. */
  896. #define Z_PROBE_START_SCRIPT ""
  897. #define Z_PROBE_FINISHED_SCRIPT ""
  898.  
  899. /** Set 1 if you need a hot extruder for good probe results. Normally only required if nozzle is probe. */
  900. #define Z_PROBE_REQUIRES_HEATING 0
  901. /** Minimum extruder temperature for probing. If it is lower, it will be increased to that value. */
  902. #define Z_PROBE_MIN_TEMPERATURE 150
  903.  
  904.  
  905. /*
  906. Define how we measure the bed rotation.
  907. All methods need at least 3 points to define the bed rotation correctly. The quality we get comes
  908. from the selection of the right points and method.
  909.  
  910. BED_LEVELING_METHOD 0
  911. This method measures at the 3 probe points and creates a plane through these points. If you have
  912. a really planar bed this gives the optimum result. The 3 points must not be in one line and have
  913. a long distance to increase numerical stability.
  914.  
  915. BED_LEVELING_METHOD 1
  916. This measures a grid. Probe point 1 is the origin and points 2 and 3 span a grid. We measure
  917. BED_LEVELING_GRID_SIZE points in each direction and compute a regression plane through all
  918. points. This gives a good overall plane if you have small bumps measuring inaccuracies.
  919.  
  920. BED_LEVELING_METHOD 2
  921. Bending correcting 4 point measurement. This is for cantilevered beds that have the rotation axis
  922. not at the side but inside the bed. Here we can assume no bending on the axis and a symmetric
  923. bending to both sides of the axis. So probe points 2 and 3 build the symmetric axis and
  924. point 1 is mirrored to 1m across the axis. Using the symmetry we then remove the bending
  925. from 1 and use that as plane.
  926. */
  927. #define BED_LEVELING_METHOD 0
  928.  
  929. /* How to correct rotation.
  930. 0 = software side
  931. 1 = motorized modification of 2 from 3 fixture points.
  932. */
  933. #define BED_CORRECTION_METHOD 0
  934. // Grid size for grid based plane measurement
  935. #define BED_LEVELING_GRID_SIZE 5
  936. // Repetitions for motorized bed leveling
  937. #define BED_LEVELING_REPETITIONS 5
  938.  
  939. /* These are the motor positions relative to bed origin. Only needed for
  940. motorized bed leveling */
  941. #define BED_MOTOR_1_X 0
  942. #define BED_MOTOR_1_Y 0
  943. #define BED_MOTOR_2_X 200
  944. #define BED_MOTOR_2_Y 0
  945. #define BED_MOTOR_3_X 100
  946. #define BED_MOTOR_3_Y 200
  947.  
  948. /* Autoleveling allows it to z-probe 3 points to compute the inclination and compensates the error for the print.
  949.    This feature requires a working z-probe and you should have z-endstop at the top not at the bottom.
  950.    The same 3 points are used for the G29 command.
  951. */
  952. #define FEATURE_AUTOLEVEL 1
  953. #define Z_PROBE_X1 -15.81
  954. #define Z_PROBE_Y1 -45.00
  955. #define Z_PROBE_X2 -49.80
  956. #define Z_PROBE_Y2 22.00
  957. #define Z_PROBE_X3 11.45
  958. #define Z_PROBE_Y3 3.84
  959.  
  960. /* Bending correction adds a value to a measured z-probe value. This may be
  961.   required when the z probe needs some force to trigger and this bends the
  962.   bed down. Currently the correction values A/B/C correspond to z probe
  963.   positions 1/2/3. In later versions a bending correction algorithm might be
  964.   introduced to give it other meanings.*/
  965. #define BENDING_CORRECTION_A 0
  966. #define BENDING_CORRECTION_B 0
  967. #define BENDING_CORRECTION_C 0
  968.  
  969. /* DISTORTION_CORRECTION compensates the distortion caused by mechanical imprecisions of nonlinear (i.e. DELTA) printers
  970.  * assumes that the floor is plain (i.e. glass plate)
  971.  *     and that it is perpendicular to the towers
  972.  *     and that the (0,0) is in center
  973.  * requires z-probe
  974.  * G29 measures the Z offset in matrix NxN points (due to nature of the delta printer, the corners are extrapolated instead of measured)
  975.  * and compensate the distortion
  976.  * more points means better compensation, but consumes more memory and takes more time
  977.  * DISTORTION_CORRECTION_R is the distance of last row or column from center
  978.  */
  979. #define DISTORTION_CORRECTION 1
  980. #define DISTORTION_CORRECTION_POINTS 3
  981. /* For delta printers you simply define the measured radius around origin */
  982. #define DISTORTION_CORRECTION_R 20
  983.  
  984. /* For all others you define the correction rectangle by setting the min/max coordinates. Make sure the the probe can reach all points! */
  985. #define DISTORTION_XMIN 10
  986. #define DISTORTION_YMIN 10
  987. #define DISTORTION_XMAX 190
  988. #define DISTORTION_YMAX 190
  989.  
  990. /** Uses EEPROM instead of ram. Allows bigger matrix (up to 22x22) without any ram cost.
  991.   Especially on arm based systems with cached EEPROM it is good, on AVR it has a small
  992.   performance penalty.
  993. */
  994. #define DISTORTION_PERMANENT 1
  995.  
  996. /** Correction computation is not a cheap operation and changes are only small. So it
  997. is not necessary to update it for every sub-line computed. For example lets take DELTA_SEGMENTS_PER_SECOND_PRINT = 150
  998. and fastest print speed 100 mm/s. So we have a maximum segment length of 100/150 = 0.66 mm.
  999. Now lats say our point field is 200 x 200 mm with 9 x 9 points. So between 2 points we have
  1000. 200 / (9-1) = 25 mm. So we need at least 25 / 0.66 = 37 lines to move to the next measuring
  1001. point. So updating correction every 15 calls gives us at least 2 updates between the
  1002. measured points.
  1003. NOTE: Explicit z changes will always trigger an update!
  1004. */
  1005. #define DISTORTION_UPDATE_FREQUENCY 15
  1006.  
  1007. /** z distortion degrades to 0 from this height on. You should start after the first layer to get
  1008. best bonding with surface. */
  1009. #define DISTORTION_START_DEGRADE 0.5
  1010.  
  1011. /** z distortion correction gets down to 0 at this height. */
  1012. #define DISTORTION_END_HEIGHT 1.5
  1013.  
  1014. /** If your corners measurement points are not measurable with given radius, you can
  1015. set this to 1. It then omits the outer measurement points allowing a larger correction area.*/
  1016. #define DISTORTION_EXTRAPOLATE_CORNERS 0
  1017.  
  1018. /* If your printer is not exactly square but is more like a parallelogram, you can
  1019. use this to compensate the effect of printing squares like parallelograms. Set the
  1020. parameter to then tangens of the deviation from 90° when you print a square object.
  1021. E.g. if you angle is 91° enter tan(1) = 0.017. If error doubles you have the wrong sign.
  1022. Always hard to say since the other angle is 89° in this case!
  1023. */
  1024. #define FEATURE_AXISCOMP 0
  1025. #define AXISCOMP_TANXY 0
  1026. #define AXISCOMP_TANYZ 0
  1027. #define AXISCOMP_TANXZ 0
  1028.  
  1029. #ifndef SDSUPPORT  // Some boards have sd support on board. These define the values already in pins.h
  1030. #define SDSUPPORT 1
  1031. #undef SDCARDDETECT
  1032. #define SDCARDDETECT -1
  1033. #define SDCARDDETECTINVERTED 0
  1034. #endif
  1035. #define SD_EXTENDED_DIR 0 /** Show extended directory including file length. Don't use this with Pronterface! */
  1036. #define SD_RUN_ON_STOP ""
  1037. #define SD_STOP_HEATER_AND_MOTORS_ON_STOP 1
  1038. #define ARC_SUPPORT 1
  1039. #define FEATURE_MEMORY_POSITION 1
  1040. #define FEATURE_CHECKSUM_FORCED 0
  1041. #define FEATURE_FAN_CONTROL 1
  1042. #define FEATURE_FAN2_CONTROL 0
  1043. #define FEATURE_CONTROLLER 2
  1044. #define ADC_KEYPAD_PIN -1
  1045. #define LANGUAGE_EN_ACTIVE 1
  1046. #define LANGUAGE_DE_ACTIVE 1
  1047. #define LANGUAGE_NL_ACTIVE 0
  1048. #define LANGUAGE_PT_ACTIVE 1
  1049. #define LANGUAGE_IT_ACTIVE 1
  1050. #define LANGUAGE_ES_ACTIVE 1
  1051. #define LANGUAGE_FI_ACTIVE 0
  1052. #define LANGUAGE_SE_ACTIVE 0
  1053. #define LANGUAGE_FR_ACTIVE 1
  1054. #define LANGUAGE_CZ_ACTIVE 0
  1055. #define LANGUAGE_PL_ACTIVE 1
  1056. #define LANGUAGE_TR_ACTIVE 1
  1057. #define UI_PRINTER_NAME "RepRap"
  1058. #define UI_PRINTER_COMPANY "Home made"
  1059. #define UI_PAGES_DURATION 4000
  1060. #define UI_ANIMATION 0
  1061.  
  1062. /* There are 2 ways to change positions. You can move by increments of 1/0.1 mm resulting in more menu entries
  1063. and requiring many turns on your encode. The alternative is to enable speed dependent positioning. It will change
  1064. the move distance depending on the speed you turn the encoder. That way you can move very fast and very slow in the
  1065. same setting.
  1066.  
  1067. */
  1068. #define UI_SPEEDDEPENDENT_POSITIONING 1
  1069. #define UI_DISABLE_AUTO_PAGESWITCH 1
  1070. #define UI_AUTORETURN_TO_MENU_AFTER 30000
  1071. #define FEATURE_UI_KEYS 0
  1072.  
  1073.  
  1074. /* Normally cou want a next/previous actions with every click of your encoder.
  1075. Unfortunately, the encoder have a different count of phase changes between clicks.
  1076. Select an encoder speed from 0 = fastest to 2 = slowest that results in one menu move per click.
  1077. */
  1078. #define UI_ENCODER_SPEED 2
  1079.  
  1080. // Set to 1 to reverse encoder direction
  1081. #define UI_REVERSE_ENCODER 1
  1082. #define UI_KEY_BOUNCETIME 10
  1083. #define UI_KEY_FIRST_REPEAT 500
  1084. #define UI_KEY_REDUCE_REPEAT 50
  1085. #define UI_KEY_MIN_REPEAT 50
  1086. #define FEATURE_BEEPER 0
  1087. #define CASE_LIGHTS_PIN -1
  1088. #define CASE_LIGHT_DEFAULT_ON 1
  1089. #define UI_START_SCREEN_DELAY 1000
  1090.  
  1091. /** If set to 1 faster turning the wheel makes larger jumps. Helps for faster navigation. */
  1092. #define UI_DYNAMIC_ENCODER_SPEED 1
  1093.         /**
  1094. Beeper sound definitions for short beeps during key actions
  1095. and longer beeps for important actions.
  1096. Parameter is delay in microseconds and the secons is the number of repetitions.
  1097. Values must be in range 1..255
  1098. */
  1099. #define BEEPER_SHORT_SEQUENCE 2,2
  1100. #define BEEPER_LONG_SEQUENCE 8,8
  1101. #define UI_SET_PRESET_HEATED_BED_TEMP_PLA 60
  1102. #define UI_SET_PRESET_EXTRUDER_TEMP_PLA   190
  1103. #define UI_SET_PRESET_HEATED_BED_TEMP_ABS 120
  1104. #define UI_SET_PRESET_EXTRUDER_TEMP_ABS   235
  1105. #define UI_SET_MIN_HEATED_BED_TEMP  30
  1106. #define UI_SET_MAX_HEATED_BED_TEMP 120
  1107. #define UI_SET_MIN_EXTRUDER_TEMP   150
  1108. #define UI_SET_MAX_EXTRUDER_TEMP   275
  1109. #define UI_SET_EXTRUDER_FEEDRATE 2
  1110. #define UI_SET_EXTRUDER_RETRACT_DISTANCE 3
  1111.  
  1112.  
  1113. #define NUM_MOTOR_DRIVERS 0
  1114.  
  1115.  
  1116.  
  1117. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement