Advertisement
Guest User

Repetier

a guest
Nov 1st, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 53.04 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. /* Some words on units:
  23.  
  24. From 0.80 onwards the units used are unified for easier configuration, watch out when transfering from older configs!
  25.  
  26. Speed is in mm/s
  27. Acceleration in mm/s^2
  28. Temperature is in degrees celsius
  29.  
  30.  
  31. ##########################################################################################
  32. ##                                        IMPORTANT                                     ##
  33. ##########################################################################################
  34.  
  35. For easy configuration, the default settings enable parameter storage in EEPROM.
  36. This means, after the first upload many variables can only be changed using the special
  37. M commands as described in the documentation. Changing these values in the configuration.h
  38. file has no effect. Parameters overriden by EEPROM settings are calibartion values, extruder
  39. values except thermistor tables and some other parameter likely to change during usage
  40. like advance steps or ops mode.
  41. To override EEPROM settings with config settings, set EEPROM_MODE 0
  42.  
  43. */
  44.  
  45.  
  46. // BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
  47.  
  48. /** Number of extruders. Maximum 6 extruders. */
  49. #define NUM_EXTRUDER 1
  50.  
  51. //// The following define selects which electronics board you have. Please choose the one that matches your setup
  52. // Gen3 PLUS for RepRap Motherboard V1.2 = 21
  53. // MEGA/RAMPS up to 1.2       = 3
  54. // RAMPS 1.3/RAMPS 1.4        = 33
  55. // Azteeg X3                  = 34
  56. // Gen6                       = 5
  57. // Gen6 deluxe                = 51
  58. // Sanguinololu up to 1.1     = 6
  59. // Sanguinololu 1.2 and above = 62
  60. // Melzi board                = 63  // Define REPRAPPRO_HUXLEY if you have one for correct HEATER_1_PIN assignment!
  61. // Gen7 1.1 till 1.3.x        = 7
  62. // Gen7 1.4.1 and later       = 71
  63. // Sethi 3D_1                 = 72
  64. // Teensylu (at90usb)         = 8 // requires Teensyduino
  65. // Printrboard (at90usb)      = 9 // requires Teensyduino
  66. // Foltyn 3D Master           = 12
  67. // MegaTronics 1.0            = 70
  68. // Megatronics 2.0            = 701
  69. // RUMBA                      = 80  // Get it from reprapdiscount
  70. // Rambo                      = 301
  71. // PiBot for Repetier V1.0-1.3= 314
  72. // PiBot for Repetier V1.4    = 315
  73. // Sanguish Beta              = 501
  74.  
  75. #define MOTHERBOARD 33
  76.  
  77. #include "pins.h"
  78.  
  79. // Override pin definions from pins.h
  80. //#define FAN_PIN   4  // Extruder 2 uses the default fan output, so move to an other pin
  81. //#define EXTERNALSERIAL  use Arduino serial library instead of build in. Requires more ram, has only 63 byte input buffer.
  82.  
  83. // Uncomment the following line if you are using arduino compatible firmware made for Arduino version earlier then 1.0
  84. // If it is incompatible you will get compiler errors about write functions not beeing compatible!
  85. //#define COMPAT_PRE1
  86.  
  87. /* Define the type of axis movements needed for your printer. The typical case
  88. is a full cartesian system where x, y and z moves are handled by separate motors.
  89.  
  90. 0 = full cartesian system, xyz have seperate motors.
  91. 1 = z axis + xy H-gantry (x_motor = x+y, y_motor = x-y)
  92. 2 = z axis + xy H-gantry (x_motor = x+y, y_motor = y-x)
  93. 3 = Delta printers (Rostock, Kossel, RostockMax, Cerberus, etc)
  94. 4 = Tuga printer
  95. Cases 1 and 2 cover all needed xy H gantry systems. If you get results mirrored etc. you can swap motor connections for x and y.
  96. If a motor turns in the wrong direction change INVERT_X_DIR or INVERT_Y_DIR.
  97. */
  98. #define DRIVE_SYSTEM 3
  99.  
  100. // ##########################################################################################
  101. // ##                               Calibration                                            ##
  102. // ##########################################################################################
  103.  
  104. /** Drive settings for the Delta printers
  105. */
  106. #if DRIVE_SYSTEM==3
  107.     // ***************************************************
  108.     // *** These parameter are only for Delta printers ***
  109.     // ***************************************************
  110.  
  111.     /** \brief Delta drive type: 0 - belts and pulleys, 1 - filament drive */
  112.     #define DELTA_DRIVE_TYPE 0
  113.  
  114.     #if DELTA_DRIVE_TYPE == 0
  115.       /** \brief Pitch in mm of drive belt. GT2 = 2mm */
  116.       #define BELT_PITCH 2
  117.       /** \brief Number of teeth on X, Y and Z tower pulleys */
  118.       #define PULLEY_TEETH 20
  119.       #define PULLEY_CIRCUMFERENCE (BELT_PITCH * PULLEY_TEETH)
  120.     #elif DELTA_DRIVE_TYPE == 1
  121.       /** \brief Filament pulley diameter in milimeters */
  122.       #define PULLEY_DIAMETER 10
  123.       #define PULLEY_CIRCUMFERENCE (PULLEY_DIAMETER * 3.1415927)
  124.     #endif
  125.  
  126.     /** \brief Steps per rotation of stepper motor */
  127.     #define STEPS_PER_ROTATION 200
  128.  
  129.     /** \brief Micro stepping rate of X, Y and Y tower stepper drivers */
  130.     #define MICRO_STEPS 16
  131.  
  132.     // Calculations
  133.     #define AXIS_STEPS_PER_MM ((float)(MICRO_STEPS * STEPS_PER_ROTATION) / PULLEY_CIRCUMFERENCE)
  134.     #define XAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
  135.     #define YAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
  136.     #define ZAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
  137. #else
  138.     // *******************************************************
  139.     // *** These parameter are for all other printer types ***
  140.     // *******************************************************
  141.  
  142.     /** Drive settings for printers with cartesian drive systems */
  143.     /** \brief Number of steps for a 1mm move in x direction.
  144.     For xy gantry use 2*belt moved!
  145.     Overridden if EEPROM activated. */
  146.     #define XAXIS_STEPS_PER_MM 98.425196
  147.     /** \brief Number of steps for a 1mm move in y direction.
  148.     For xy gantry use 2*belt moved!
  149.     Overridden if EEPROM activated.*/
  150.     #define YAXIS_STEPS_PER_MM 98.425196
  151.     /** \brief Number of steps for a 1mm move in z direction  Overridden if EEPROM activated.*/
  152.     #define ZAXIS_STEPS_PER_MM 2560
  153. #endif
  154.  
  155. // ##########################################################################################
  156. // ##                           Extruder configuration                                     ##
  157. // ##########################################################################################
  158.  
  159. // for each extruder, fan will stay on until extruder temperature is below this value
  160. #define EXTRUDER_FAN_COOL_TEMP 50
  161.  
  162. #define EXT0_X_OFFSET 901
  163. #define EXT0_Y_OFFSET 520
  164. // for skeinforge 40 and later, steps to pull the plasic 1 mm inside the extruder, not out.  Overridden if EEPROM activated.
  165. #define EXT0_STEPS_PER_MM 145.0 //DT_PERFORMANCE
  166. // What type of sensor is used?
  167. // 1 is 100k thermistor (Epcos B57560G0107F000 - RepRap-Fab.org and many other)
  168. // 2 is 200k thermistor
  169. // 3 is mendel-parts thermistor (EPCOS G550)
  170. // 4 is 10k thermistor
  171. // 8 is ATC Semitec 104GT-2
  172. // 5 is userdefined thermistor table 0
  173. // 6 is userdefined thermistor table 1
  174. // 7 is userdefined thermistor table 2
  175. // 50 is userdefined thermistor table 0 for PTC thermistors
  176. // 51 is userdefined thermistor table 0 for PTC thermistors
  177. // 52 is userdefined thermistor table 0 for PTC thermistors
  178. // 60 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1/4 the price of AD595 but only MSOT_08 package)
  179. // 97 Generic thermistor table 1
  180. // 98 Generic thermistor table 2
  181. // 99 Generic thermistor table 3
  182. // 100 is AD595
  183. // 101 is MAX6675
  184. // 102 is MAX31855
  185. #define EXT0_TEMPSENSOR_TYPE 1
  186. // Analog input pin for reading temperatures or pin enabling SS for MAX6675
  187. #define EXT0_TEMPSENSOR_PIN TEMP_0_PIN
  188. // Which pin enables the heater
  189. #define EXT0_HEATER_PIN HEATER_0_PIN
  190. #define EXT0_STEP_PIN E0_STEP_PIN
  191. #define EXT0_DIR_PIN E0_DIR_PIN
  192. // set to false/true for normal / inverse direction
  193. #define EXT0_INVERSE false
  194. #define EXT0_ENABLE_PIN E0_ENABLE_PIN
  195. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  196. #define EXT0_ENABLE_ON false
  197. // The following speed settings are for skeinforge 40+ where e is the
  198. // length of filament pulled inside the heater. For repsnap or older
  199. // skeinforge use higher values.
  200. //  Overridden if EEPROM activated.
  201. #define EXT0_MAX_FEEDRATE 50
  202. // Feedrate from halted extruder in mm/s
  203. //  Overridden if EEPROM activated.
  204. #define EXT0_MAX_START_FEEDRATE 40
  205. // Acceleration in mm/s^2
  206. //  Overridden if EEPROM activated.
  207. #define EXT0_MAX_ACCELERATION 10000
  208. /** Type of heat manager for this extruder.
  209. - 0 = Simply switch on/off if temperature is reached. Works always.
  210. - 1 = PID Temperature control. Is better but needs good PID values. Defaults are a good start for most extruder.
  211. - 3 = Dead-time control. PID_P becomes dead-time in seconds.
  212.  Overridden if EEPROM activated.
  213. */
  214. #define EXT0_HEAT_MANAGER 1
  215. /** Wait x seconds, after reaching target temperature. Only used for M109.  Overridden if EEPROM activated. */
  216. #define EXT0_WATCHPERIOD 1
  217.  
  218. /** \brief The maximum value, I-gain can contribute to the output.
  219.  
  220. A good value is slightly higher then the output needed for your temperature.
  221. Values for starts:
  222. 130 => PLA for temperatures from 170-180 deg C
  223. 180 => ABS for temperatures around 240 deg C
  224.  
  225. The precise values may differ for different nozzle/resistor combination.
  226.  Overridden if EEPROM activated.
  227. */
  228. #define EXT0_PID_INTEGRAL_DRIVE_MAX 140
  229. /** \brief lower value for integral part
  230.  
  231. The I state should converge to the exact heater output needed for the target temperature.
  232. To prevent a long deviation from the target zone, this value limits the lower value.
  233. A good start is 30 lower then the optimal value. You need to leave room for cooling.
  234.  Overridden if EEPROM activated.
  235. */
  236. #define EXT0_PID_INTEGRAL_DRIVE_MIN 60
  237. /** P-gain. Dead-time if dead-time heat manager selected. Overridden if EEPROM activated. */
  238. #define EXT0_PID_P   14.52 //24
  239. /** I-gain. Overridden if EEPROM activated.
  240. */
  241. #define EXT0_PID_I   0.95 //0.88
  242. /** D-gain.  Overridden if EEPROM activated.*/
  243. #define EXT0_PID_D 55.48 //80
  244. // maximum time the heater can be switched on. Max = 255.  Overridden if EEPROM activated.
  245. #define EXT0_PID_MAX 255
  246. /** \brief Faktor for the advance algorithm. 0 disables the algorithm.  Overridden if EEPROM activated.
  247. K is the factor for the quadratic term, which is normally disabled in newer versions. If you want to use
  248. the quadratic factor make sure ENABLE_QUADRATIC_ADVANCE is defined.
  249. L is the linear factor and seems to be working better then the quadratic dependency.
  250. */
  251. #define EXT0_ADVANCE_K 0.0f
  252. #define EXT0_ADVANCE_L 0.0f
  253. /* Motor steps to remove backlash for advance alorithm. These are the steps
  254. needed to move the motor cog in reverse direction until it hits the driving
  255. cog. Direct drive extruder need 0. */
  256. #define EXT0_ADVANCE_BACKLASH_STEPS 0
  257. /** \brief Temperature to retract filament when extruder is heating up. Overridden if EEPROM activated.
  258. */
  259. #define EXT0_WAIT_RETRACT_TEMP      150
  260. /** \brief Units (mm/inches) to retract filament when extruder is heating up. Overridden if EEPROM activated. Set
  261. to 0 to disable.
  262. */
  263. #define EXT0_WAIT_RETRACT_UNITS     0
  264.  
  265. /** You can run any gcode command on extruder deselect/select. Seperate multiple commands with a new line \n.
  266. That way you can execute some mechanical components needed for extruder selection or retract filament or whatever you need.
  267. The codes are only executed for multiple extruder when changing the extruder. */
  268. #define EXT0_SELECT_COMMANDS "M117 Extruder 1"
  269. #define EXT0_DESELECT_COMMANDS ""
  270. /** The extruder cooler is a fan to cool the extruder when it is heating. If you turn the etxruder on, the fan goes on. */
  271. #define EXT0_EXTRUDER_COOLER_PIN 5
  272. /** PWM speed for the cooler fan. 0=off 255=full speed */
  273. #define EXT0_EXTRUDER_COOLER_SPEED 255
  274.  
  275.  
  276. // =========================== Configuration for second extruder ========================
  277. #define EXT1_X_OFFSET -901
  278. #define EXT1_Y_OFFSET -520
  279. // for skeinforge 40 and later, steps to pull the plasic 1 mm inside the extruder, not out.  Overridden if EEPROM activated.
  280. #define EXT1_STEPS_PER_MM 319.8
  281. // What type of sensor is used?
  282. // 1 is 100k thermistor (Epcos B57560G0107F000 - RepRap-Fab.org and many other)
  283. // 2 is 200k thermistor
  284. // 3 is mendel-parts thermistor (EPCOS G550)
  285. // 4 is 10k thermistor
  286. // 5 is userdefined thermistor table 0
  287. // 6 is userdefined thermistor table 1
  288. // 7 is userdefined thermistor table 2
  289. // 8 is ATC Semitec 104GT-2
  290. // 50 is userdefined thermistor table 0 for PTC thermistors
  291. // 51 is userdefined thermistor table 0 for PTC thermistors
  292. // 52 is userdefined thermistor table 0 for PTC thermistors
  293. // 60 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1/4 the price of AD595 but only MSOT_08 package)
  294. // 97 Generic thermistor table 1
  295. // 98 Generic thermistor table 2
  296. // 99 Generic thermistor table 3
  297. // 100 is AD595
  298. // 101 is MAX6675
  299. #define EXT1_TEMPSENSOR_TYPE 1
  300. // Analog input pin for reading temperatures or pin enabling SS for MAX6675
  301. #define EXT1_TEMPSENSOR_PIN TEMP_2_PIN
  302. // Which pin enables the heater
  303. #define EXT1_HEATER_PIN HEATER_2_PIN
  304. #define EXT1_STEP_PIN E1_STEP_PIN
  305. #define EXT1_DIR_PIN E1_DIR_PIN
  306. // set to false/true for normal/inverse direction
  307. #define EXT1_INVERSE true
  308. #define EXT1_ENABLE_PIN E1_ENABLE_PIN
  309. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  310. #define EXT1_ENABLE_ON false
  311. // The following speed settings are for skeinforge 40+ where e is the
  312. // length of filament pulled inside the heater. For repsnap or older
  313. // skeinforge use heigher values.
  314. //  Overridden if EEPROM activated.
  315. #define EXT1_MAX_FEEDRATE 100
  316. // Feedrate from halted extruder in mm/s
  317. //  Overridden if EEPROM activated.
  318. #define EXT1_MAX_START_FEEDRATE 40
  319. // Acceleration in mm/s^2
  320. //  Overridden if EEPROM activated.
  321. #define EXT1_MAX_ACCELERATION 10000
  322. /** Type of heat manager for this extruder.
  323. - 0 = Simply switch on/off if temperature is reached. Works always.
  324. - 1 = PID Temperature control. Is better but needs good PID values. Defaults are a good start for most extruder.
  325.  Overridden if EEPROM activated.
  326. */
  327. #define EXT1_HEAT_MANAGER 3
  328. /** Wait x seconds, after reaching target temperature. Only used for M109.  Overridden if EEPROM activated. */
  329. #define EXT1_WATCHPERIOD 1
  330.  
  331. /** \brief The maximum value, I-gain can contribute to the output.
  332.  
  333. A good value is slightly higher then the output needed for your temperature.
  334. Values for starts:
  335. 130 => PLA for temperatures from 170-180 deg C
  336. 180 => ABS for temperatures around 240 deg C
  337.  
  338. The precise values may differ for different nozzle/resistor combination.
  339.  Overridden if EEPROM activated.
  340. */
  341. #define EXT1_PID_INTEGRAL_DRIVE_MAX 210
  342. /** \brief lower value for integral part
  343.  
  344. The I state should converge to the exact heater output needed for the target temperature.
  345. To prevent a long deviation from the target zone, this value limits the lower value.
  346. A good start is 30 lower then the optimal value. You need to leave room for cooling.
  347.  Overridden if EEPROM activated.
  348. */
  349. #define EXT1_PID_INTEGRAL_DRIVE_MIN 60
  350. /** P-gain or dead time for heat manager 3.  Overridden if EEPROM activated. */
  351. #define EXT1_PID_P   8
  352. /** I-gain.  Overridden if EEPROM activated.
  353. */
  354. #define EXT1_PID_I   0.88
  355. /** D-gain.  Overridden if EEPROM activated.*/
  356. #define EXT1_PID_D 200
  357. // maximum time the heater is can be switched on. Max = 255.  Overridden if EEPROM activated.
  358. #define EXT1_PID_MAX 255
  359. /** \brief Faktor for the advance algorithm. 0 disables the algorithm.  Overridden if EEPROM activated.
  360. K is the factor for the quadratic term, which is normally disabled in newer versions. If you want to use
  361. the quadratic factor make sure ENABLE_QUADRATIC_ADVANCE is defined.
  362. L is the linear factor and seems to be working better then the quadratic dependency.
  363. */
  364. #define EXT1_ADVANCE_K 0.0f
  365. #define EXT1_ADVANCE_L 0.0f
  366. /* Motor steps to remove backlash for advance alorithm. These are the steps
  367. needed to move the motor cog in reverse direction until it hits the driving
  368. cog. Direct drive extruder need 0. */
  369. #define EXT1_ADVANCE_BACKLASH_STEPS 0
  370.  
  371. #define EXT1_WAIT_RETRACT_TEMP  150
  372. #define EXT1_WAIT_RETRACT_UNITS 0
  373. #define EXT1_SELECT_COMMANDS "M117 Extruder 2"
  374. #define EXT1_DESELECT_COMMANDS ""
  375. /** The extruder cooler is a fan to cool the extruder when it is heating. If you turn the extruder on, the fan goes on. */
  376. #define EXT1_EXTRUDER_COOLER_PIN 5
  377. /** PWM speed for the cooler fan. 0=off 255=full speed */
  378. #define EXT1_EXTRUDER_COOLER_SPEED 255
  379.  
  380. /** If enabled you can select the distance your filament gets retracted during a
  381. M140 command, after a given temperature is reached. */
  382. #define RETRACT_DURING_HEATUP true
  383.  
  384. /** PID control only works target temperature +/- PID_CONTROL_RANGE.
  385. If you get much overshoot at the first temperature set, because the heater is going full power too long, you
  386. need to increase this value. For one 6.8 Ohm heater 10 is ok. With two 6.8 Ohm heater use 15.
  387. */
  388. #define PID_CONTROL_RANGE 20
  389.  
  390. /** Skip wait, if the extruder temperature is already within x degrees. Only fixed numbers, 0 = off */
  391. #define SKIP_M109_IF_WITHIN 2
  392.  
  393. /** \brief Set PID scaling
  394.  
  395. PID values assume a usable range from 0-255. This can be further limited to EXT0_PID_MAX by to methods.
  396. Set the value to 0: Normal computation, just clip output to EXT0_PID_MAX if computed value is too high.
  397. Set value to 1: Scale PID by EXT0_PID_MAX/256 and then clip to EXT0_PID_MAX.
  398. If your EXT0_PID_MAX is low, you should prefer the second method.
  399. */
  400. #define SCALE_PID_TO_MAX 0
  401.  
  402. /** Temperature range for target temperature to hold in M109 command. 5 means +/-5 degC
  403.  
  404. Uncomment define to force the temperature into the range for given watchperiod.
  405. */
  406. //#define TEMP_HYSTERESIS 5
  407.  
  408. /** Userdefined thermistor table
  409.  
  410. There are many different thermistors, which can be combined with different resistors. This result
  411. in unpredictable number of tables. As a resolution, the user can define one table here, that can
  412. be used as type 5 for thermister type in extruder/heated bed definition. Make sure, the number of entries
  413. matches the value in NUM_TEMPS_USERTHERMISTOR0. If you span definition over multiple lines, make sure to end
  414. each line, except the last, with a backslash. The table format is {{adc1,temp1},{adc2,temp2}...} with
  415. increasing adc values. For more informations, read
  416. http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html
  417.  
  418. If you have a sprinter temperature table, you have to multiply the first value with 4 and the second with 8.
  419. This firmware works with increased precision, so the value reads go from 0 to 4095 and the temperature is
  420. temperature*8.
  421.  
  422. If you have a PTC thermistor instead of a NTC thermistor, keep the adc values increasing and use themistor types 50-52 instead of 5-7!
  423. */
  424. /** Number of entries in the user thermistor table 0. Set to 0 to disable it. */
  425. #define NUM_TEMPS_USERTHERMISTOR0 28
  426. #define USER_THERMISTORTABLE0  {\
  427.   {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},\
  428.   {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},\
  429.   {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} }
  430.  
  431. /** Number of entries in the user thermistor table 1. Set to 0 to disable it. */
  432. #define NUM_TEMPS_USERTHERMISTOR1 0
  433. #define USER_THERMISTORTABLE1  {}
  434. /** Number of entries in the user thermistor table 2. Set to 0 to disable it. */
  435. #define NUM_TEMPS_USERTHERMISTOR2 0
  436. #define USER_THERMISTORTABLE2  {}
  437.  
  438. /** If defined, creates a thermistor table at startup.
  439.  
  440. If you don't feel like computing the table on your own, you can use this generic method. It is
  441. a simple approximation which may be not as accurate as a good table computed from the reference
  442. values in the datasheet. You can increase precision if you use a temperature/resistance for
  443. R0/T0, which is near your operating temperature. This will reduce precision for lower temperatures,
  444. which are not realy important. The resistors must fit the following schematic:
  445. @code
  446. VREF ---- R2 ---+--- Termistor ---+-- GND
  447.                 |                 |
  448.                 +------ R1 -------+
  449.                 |                 |
  450.                 +---- Capacitor --+
  451.                 |
  452.                 V measured
  453. @endcode
  454.  
  455. If you don't have R1, set it to 0.
  456. The capacitor is for reducing noise from long thermistor cable. If you don't have one, it's OK.
  457.  
  458. If you need the generic table, uncomment the following define.
  459. */
  460. //#define USE_GENERIC_THERMISTORTABLE_1
  461.  
  462. /* Some examples for different thermistors:
  463.  
  464. EPCOS B57560G104+ : R0 = 100000  T0 = 25  Beta = 4036
  465. EPCOS 100K Thermistor (B57560G1104F) :  R0 = 100000  T0 = 25  Beta = 4092
  466. ATC Semitec 104GT-2 : R0 = 100000  T0 = 25  Beta = 4267
  467. Honeywell 100K Thermistor (135-104LAG-J01)  : R0 = 100000  T0 = 25  Beta = 3974
  468.  
  469. */
  470.  
  471. /** Reference Temperature */
  472. #define GENERIC_THERM1_T0 25
  473. /** Resistance at reference temperature */
  474. #define GENERIC_THERM1_R0 100000
  475. /** Beta value of thermistor
  476.  
  477. You can use the beta from the datasheet or compute it yourself.
  478. See http://reprap.org/wiki/MeasuringThermistorBeta for more details.
  479. */
  480. #define GENERIC_THERM1_BETA 4036
  481. /** Start temperature for generated thermistor table */
  482. #define GENERIC_THERM1_MIN_TEMP -20
  483. /** End Temperature for generated thermistor table */
  484. #define GENERIC_THERM1_MAX_TEMP 300
  485. #define GENERIC_THERM1_R1 0
  486. #define GENERIC_THERM1_R2 4700
  487.  
  488. // The same for table 2 and 3 if needed
  489.  
  490. // #define USE_GENERIC_THERMISTORTABLE_2
  491. #define GENERIC_THERM2_R0 100000
  492. #define GENERIC_THERM2_T0 25
  493. #define GENERIC_THERM2_BETA 3950
  494. #define GENERIC_THERM2_MIN_TEMP -20
  495. #define GENERIC_THERM2_MAX_TEMP 300
  496. #define GENERIC_THERM2_R1 0
  497. #define GENERIC_THERM2_R2 4700
  498.  
  499. //#define USE_GENERIC_THERMISTORTABLE_3
  500. #define GENERIC_THERM3_T0 170
  501. #define GENERIC_THERM3_R0 1042.7
  502. #define GENERIC_THERM3_BETA 4036
  503. #define GENERIC_THERM3_MIN_TEMP -20
  504. #define GENERIC_THERM3_MAX_TEMP 300
  505. #define GENERIC_THERM3_R1 0
  506. #define GENERIC_THERM3_R2 4700
  507.  
  508. /** Supply voltage to ADC, can be changed by setting ANALOG_REF below to different value. */
  509. #define GENERIC_THERM_VREF 5
  510. /** Number of entries in generated table. One entry takes 4 bytes. Higher number of entries increase computation time too.
  511. Value is used for all generic tables created. */
  512. #define GENERIC_THERM_NUM_ENTRIES 33
  513.  
  514. // uncomment the following line for MAX6675 support.
  515. //#define SUPPORT_MAX6675
  516. // uncomment the following line for MAX31855 support.
  517. //#define SUPPORT_MAX31855
  518.  
  519. // ############# Heated bed configuration ########################
  520.  
  521. /** \brief Set true if you have a heated bed conected to your board, false if not */
  522. #define HAVE_HEATED_BED false
  523.  
  524. #define HEATED_BED_MAX_TEMP 120
  525. /** Skip M190 wait, if heated bed is already within x degrees. Fixed numbers only, 0 = off. */
  526. #define SKIP_M190_IF_WITHIN 3
  527.  
  528. // Select type of your heated bed. It's the same as for EXT0_TEMPSENSOR_TYPE
  529. // set to 0 if you don't have a heated bed
  530. #define HEATED_BED_SENSOR_TYPE 1
  531. /** Analog pin of analog sensor to read temperature of heated bed.  */
  532. #define HEATED_BED_SENSOR_PIN TEMP_1_PIN
  533. /** \brief Pin to enable heater for bed. */
  534. #define HEATED_BED_HEATER_PIN HEATER_1_PIN
  535. // How often the temperature of the heated bed is set (msec)
  536. #define HEATED_BED_SET_INTERVAL 5000
  537.  
  538. /**
  539. Heat manager for heated bed:
  540. 0 = Bang Bang, fast update
  541. 1 = PID controlled
  542. 2 = Bang Bang, limited check every HEATED_BED_SET_INTERVAL. Use this with relay-driven beds to save life
  543. */
  544. #define HEATED_BED_HEAT_MANAGER 1
  545. /** \brief The maximum value, I-gain can contribute to the output.
  546. The precise values may differ for different nozzle/resistor combination.
  547.  Overridden if EEPROM activated.
  548. */
  549. #define HEATED_BED_PID_INTEGRAL_DRIVE_MAX 255
  550. /** \brief lower value for integral part
  551.  
  552. The I state should converge to the exact heater output needed for the target temperature.
  553. To prevent a long deviation from the target zone, this value limits the lower value.
  554. A good start is 30 lower then the optimal value. You need to leave room for cooling.
  555.  Overridden if EEPROM activated.
  556. */
  557. #define HEATED_BED_PID_INTEGRAL_DRIVE_MIN 80
  558. /** P-gain.  Overridden if EEPROM activated. */
  559. #define HEATED_BED_PID_PGAIN   196
  560. /** I-gain  Overridden if EEPROM activated.*/
  561. #define HEATED_BED_PID_IGAIN   33.02
  562. /** Dgain.  Overridden if EEPROM activated.*/
  563. #define HEATED_BED_PID_DGAIN 290
  564. // maximum time the heater can be switched on. Max = 255.  Overridden if EEPROM activated.
  565. #define HEATED_BED_PID_MAX 255
  566.  
  567. /** Include PID control for all heaters. */
  568. #define TEMP_PID true
  569.  
  570. //// Experimental watchdog and minimal temp
  571. // The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
  572. // If the temperature has not increased at the end of that period, the target temperature is set to zero. It can be reset with another M104/M109
  573. //#define WATCHPERIOD 5000 //5 seconds
  574.  
  575. //// The minimal temperature defines the temperature below which the heater will not be enabled
  576. #define MINTEMP 5
  577.  
  578. //// Experimental max temp
  579. // When temperature exceeds max temp, your heater will be switched off.
  580. // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
  581. // You should use MINTEMP for thermistor short/failure protection.
  582. #define MAXTEMP 260
  583.  
  584. /** Extreme values to detect defect thermistors. */
  585. #define MIN_DEFECT_TEMPERATURE -10
  586. #define MAX_DEFECT_TEMPERATURE 300
  587.  
  588. /** \brief Used reference, normally ANALOG_REF_AVCC or ANALOG_REF_AREF for experts ANALOG_REF_INT_2_56 = 2.56V and ANALOG_REF_INT_1_1=1.1V internaly generated */
  589. #define ANALOG_REF ANALOG_REF_AVCC
  590.  
  591.  
  592. // ##########################################################################################
  593. // ##                            Endstop configuration                                     ##
  594. // ##########################################################################################
  595.  
  596. /* By default all endstops are pulled up to HIGH. You need a pullup if you
  597. use a mechanical endstop connected with GND. Set value to false for no pullup
  598. on this endstop.
  599. */
  600. #define ENDSTOP_PULLUP_X_MIN false
  601. #define ENDSTOP_PULLUP_Y_MIN false
  602. #define ENDSTOP_PULLUP_Z_MIN false
  603. #define ENDSTOP_PULLUP_X_MAX true
  604. #define ENDSTOP_PULLUP_Y_MAX true
  605. #define ENDSTOP_PULLUP_Z_MAX true
  606.  
  607. // Set to true to invert the logic of the endstops
  608. #define ENDSTOP_X_MIN_INVERTING false
  609. #define ENDSTOP_Y_MIN_INVERTING false
  610. #define ENDSTOP_Z_MIN_INVERTING false
  611. #define ENDSTOP_X_MAX_INVERTING false
  612. #define ENDSTOP_Y_MAX_INVERTING false
  613. #define ENDSTOP_Z_MAX_INVERTING false
  614.  
  615. // Set the values true where you have a hardware endstop. The Pin number is taken from pins.h.
  616.  
  617. #define MIN_HARDWARE_ENDSTOP_X false
  618. #define MIN_HARDWARE_ENDSTOP_Y false
  619. #define MIN_HARDWARE_ENDSTOP_Z false
  620. #define MAX_HARDWARE_ENDSTOP_X true
  621. #define MAX_HARDWARE_ENDSTOP_Y true
  622. #define MAX_HARDWARE_ENDSTOP_Z true
  623.  
  624. //If your axes are only moving in one direction, make sure the endstops are connected properly.
  625. //If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here
  626.  
  627.  
  628.  
  629. //// ADVANCED SETTINGS - to tweak parameters
  630.  
  631. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  632. #define X_ENABLE_ON 0
  633. #define Y_ENABLE_ON 0
  634. #define Z_ENABLE_ON 0
  635.  
  636. // Disables axis when it's not being used.
  637. #define DISABLE_X false
  638. #define DISABLE_Y false
  639. #define DISABLE_Z false
  640. #define DISABLE_E false
  641.  
  642. // Inverting axis direction
  643. #define INVERT_X_DIR false
  644. #define INVERT_Y_DIR false
  645. #define INVERT_Z_DIR false
  646.  
  647. //// ENDSTOP SETTINGS:
  648. // Sets direction of endstops when homing; 1=MAX, -1=MIN
  649. #define X_HOME_DIR 1
  650. #define Y_HOME_DIR 1
  651. #define Z_HOME_DIR 1
  652.  
  653. // Delta robot radius endstop
  654. #define max_software_endstop_r true
  655.  
  656. //If true, axis won't move to coordinates less than zero.
  657. #define min_software_endstop_x true
  658. #define min_software_endstop_y true
  659. #define min_software_endstop_z true
  660.  
  661. //If true, axis won't move to coordinates greater than the defined lengths below.
  662. #define max_software_endstop_x true
  663. #define max_software_endstop_y true
  664. #define max_software_endstop_z true
  665.  
  666. // If during homing the endstop is reached, ho many mm should the printer move back for the second try
  667. #define ENDSTOP_X_BACK_MOVE 3
  668. #define ENDSTOP_Y_BACK_MOVE 3
  669. #define ENDSTOP_Z_BACK_MOVE 3
  670.  
  671. // For higher precision you can reduce the speed for the second test on the endstop
  672. // during homing operation. The homing speed is divided by the value. 1 = same speed, 2 = half speed
  673. #define ENDSTOP_X_RETEST_REDUCTION_FACTOR 5
  674. #define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 5
  675. #define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 5
  676.  
  677. // When you have several endstops in one circuit you need to disable it after homing by moving a
  678. // small amount back. This is also the case with H-belt systems.
  679. #define ENDSTOP_X_BACK_ON_HOME 5
  680. #define ENDSTOP_Y_BACK_ON_HOME 5
  681. #define ENDSTOP_Z_BACK_ON_HOME 5
  682.  
  683. // You can disable endstop checking for print moves. This is needed, if you get sometimes
  684. // false signals from your endstops. If your endstops don't give false signals, you
  685. // can set it on for safety.
  686. #define ALWAYS_CHECK_ENDSTOPS true
  687.  
  688. // maximum positions in mm - only fixed numbers!
  689. // For delta robot Z_MAX_LENGTH is the maximum travel of the towers and should be set to the distance between the hotend
  690. // and the platform when the printer is at its home position.
  691. // If EEPROM is enabled these values will be overidden with the values in the EEPROM
  692. #define X_MAX_LENGTH 100
  693. #define Y_MAX_LENGTH 100
  694. #define Z_MAX_LENGTH 437.00
  695.  
  696. // 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
  697. // of the bed. Maximum coordinate is given by adding the above X_MAX_LENGTH values.
  698. #define X_MIN_POS -100
  699. #define Y_MIN_POS -100
  700. #define Z_MIN_POS 0
  701.  
  702. // ##########################################################################################
  703. // ##                           Movement settings                                          ##
  704. // ##########################################################################################
  705.  
  706. // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. Currently only works for RAMBO boards
  707. #define MICROSTEP_MODES {8,8,8,8,8} // [1,2,4,8,16]
  708.  
  709. // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
  710. #if MOTHERBOARD==301
  711. #define MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
  712. #elif MOTHERBOARD==12
  713. #define MOTOR_CURRENT {35713,35713,35713,35713,35713} // Values 0-65535 (3D Master 35713 = ~1A)
  714. #endif
  715.  
  716. /** \brief Number of segments to generate for delta conversions per second of move
  717. */
  718. #define DELTA_SEGMENTS_PER_SECOND_PRINT 180 // Move accurate setting for print moves
  719. #define DELTA_SEGMENTS_PER_SECOND_MOVE 70 // Less accurate setting for other moves
  720.  
  721. // Delta settings
  722. #if DRIVE_SYSTEM==3
  723. /** \brief Delta rod length
  724. */
  725. #define DELTA_DIAGONAL_ROD 250 // mm
  726.  
  727.  
  728. /*  =========== Parameter essential for delta calibration ===================
  729.  
  730.             C, Y-Axis
  731.             |                        |___| CARRIAGE_HORIZONTAL_OFFSET
  732.             |                        |   \
  733.             |_________ X-axis        |    \
  734.            / \                       |     \  DELTA_DIAGONAL_ROD
  735.           /   \                             \
  736.          /     \                             \    Carriage is at printer center!
  737.          A      B                             \_____/
  738.                                               |--| END_EFFECTOR_HORIZONTAL_OFFSET
  739.                                          |----| DELTA_RADIUS
  740.                                      |-----------| PRINTER_RADIUS
  741.  
  742.     Column angles are measured from X-axis counterclockwise
  743.     "Standard" positions: alpha_A = 210, alpha_B = 330, alpha_C = 90
  744. */
  745.  
  746. /** \brief column positions - change only to correct build imperfections! */
  747. #define DELTA_ALPHA_A 210
  748. #define DELTA_ALPHA_B 330
  749. #define DELTA_ALPHA_C 90
  750.  
  751. /** Correct radius by this value for each column. Perfect builds have 0 everywhere. */
  752. #define DELTA_RADIUS_CORRECTION_A 0
  753. #define DELTA_RADIUS_CORRECTION_B 0
  754. #define DELTA_RADIUS_CORRECTION_C 0
  755.  
  756. /** \brief Horizontal offset of the universal joints on the end effector (moving platform).
  757. */
  758. #define END_EFFECTOR_HORIZONTAL_OFFSET 33.50
  759.  
  760. /** \brief Horizontal offset of the universal joints on the vertical carriages.
  761. */
  762. #define CARRIAGE_HORIZONTAL_OFFSET 19.00
  763.  
  764. /** \brief Printer radius in mm, measured from the center of the print area to the vertical smooth rod.
  765. */
  766. #define PRINTER_RADIUS 205.00
  767.  
  768. /**  \brief Horizontal distance bridged by the diagonal push rod when the end effector is in the center. It is pretty close to 50% of the push rod length (250 mm).
  769. */
  770. #define DELTA_RADIUS (PRINTER_RADIUS-END_EFFECTOR_HORIZONTAL_OFFSET-CARRIAGE_HORIZONTAL_OFFSET)
  771. /* ========== END Delta calibation data ==============*/
  772.  
  773. /** When true the delta will home to z max when reset/powered over cord. That way you start with well defined coordinates.
  774. If you don't do it, make sure to home first before your first move.
  775. */
  776. #define DELTA_HOME_ON_POWER true
  777.  
  778. /** \brief Enable counter to count steps for Z max calculations
  779. */
  780. #define STEP_COUNTER
  781.  
  782. /** To allow software correction of misaligned endstops, you can set the correction in steps here. If you have EEPROM enabled
  783. you can also change the values online and auleveling will store the results here. */
  784. #define DELTA_X_ENDSTOP_OFFSET_STEPS 0
  785. #define DELTA_Y_ENDSTOP_OFFSET_STEPS 0
  786. #define DELTA_Z_ENDSTOP_OFFSET_STEPS 0
  787.  
  788.  
  789. /** \brief Experimental calibration utility for delta printers
  790. */
  791. #define SOFTWARE_LEVELING
  792.  
  793. #endif
  794. #if DRIVE_SYSTEM == 4 // ========== Tuga special settings =============
  795. /* Radius of the long arm in mm. */
  796. #define DELTA_DIAGONAL_ROD 240
  797. #endif
  798.  
  799. /** \brief Number of delta moves in each line. Moves that exceed this figure will be split into multiple lines.
  800. Increasing this figure can use a lot of memory since 7 bytes * size of line buffer * MAX_SELTA_SEGMENTS_PER_LINE
  801. will be allocated for the delta buffer. With defaults 7 * 16 * 22 = 2464 bytes. This leaves ~1K free RAM on an Arduino
  802. Mega. Used only for nonlinear systems like delta or tuga. */
  803. #define MAX_DELTA_SEGMENTS_PER_LINE 22
  804.  
  805. /** After x seconds of inactivity, the stepper motors are disabled.
  806.     Set to 0 to leave them enabled.
  807.     This helps cooling the Stepper motors between two print jobs.
  808.     Overridden if EEPROM activated.
  809. */
  810. #define STEPPER_INACTIVE_TIME 180L
  811. /** After x seconds of inactivity, the system will go down as far it can.
  812.     It will at least disable all stepper motors and heaters. If the board has
  813.     a power pin, it will be disabled, too.
  814.     Set value to 0 for disabled.
  815.     Overridden if EEPROM activated.
  816. */
  817. #define MAX_INACTIVE_TIME 600L
  818. /** Maximum feedrate, the system allows. Higher feedrates are reduced to these values.
  819.     The axis order in all axis related arrays is X, Y, Z
  820.      Overridden if EEPROM activated.
  821.     */
  822. #define MAX_FEEDRATE_X 300
  823. #define MAX_FEEDRATE_Y 300
  824. #define MAX_FEEDRATE_Z 300
  825.  
  826. /** Home position speed in mm/s. Overridden if EEPROM activated. */
  827. #define HOMING_FEEDRATE_X 80
  828. #define HOMING_FEEDRATE_Y 80
  829. #define HOMING_FEEDRATE_Z 80
  830.  
  831. /** Set order of axis homing. Use HOME_ORDER_XYZ and replace XYZ with your order. */
  832. #define HOMING_ORDER HOME_ORDER_XYZ
  833. /* 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
  834. own weight, so this is nearly never needed. */
  835. #define ENABLE_BACKLASH_COMPENSATION false
  836. #define Z_BACKLASH 0
  837. #define X_BACKLASH 0
  838. #define Y_BACKLASH 0
  839.  
  840. /** Comment this to disable ramp acceleration */
  841. #define RAMP_ACCELERATION 1
  842.  
  843. /** If your stepper needs a longer high signal then given, you can add a delay here.
  844. The delay is realized as a simple loop wasting time, which is not available for other
  845. computations. So make it as low as possible. For the most common drivers no delay is needed, as the
  846. included delay is already enough.
  847. */
  848. #define STEPPER_HIGH_DELAY 0
  849.  
  850. /** The firmware can only handle 16000Hz interrupt frequency cleanly. If you need higher speeds
  851. a faster solution is needed, and this is to double/quadruple the steps in one interrupt call.
  852. This is like reducing your 1/16th microstepping to 1/8 or 1/4. It is much cheaper then 1 or 3
  853. additional stepper interrupts with all it's overhead. As a result you can go as high as
  854. 40000Hz.
  855. */
  856. #define STEP_DOUBLER_FREQUENCY 12000
  857. /** If you need frequencies off more then 30000 you definitely need to enable this. If you have only 1/8 stepping
  858. enabling this may cause to stall your moves when 20000Hz is reached.
  859. */
  860. #define ALLOW_QUADSTEPPING true
  861. /** If you reach STEP_DOUBLER_FREQUENCY the firmware will do 2 or 4 steps with nearly no delay. That can be too fast
  862. for some printers causing an early stall.
  863.  
  864. */
  865. #define DOUBLE_STEP_DELAY 1 // time in microseconds
  866.  
  867. /** The firmware supports trajectory smoothing. To achieve this, it divides the stepsize by 2, resulting in
  868. the double computation cost. For slow movements this is not an issue, but for really fast moves this is
  869. too much. The value specified here is the number of clock cycles between a step on the driving axis.
  870. If the interval at full speed is below this value, smoothing is disabled for that line.*/
  871. #define MAX_HALFSTEP_INTERVAL 1999
  872.  
  873. //// Acceleration settings
  874.  
  875. /** \brief X, Y, Z max acceleration in mm/s^2 for printing moves or retracts. Make sure your printer can go that high!
  876.  Overridden if EEPROM activated.
  877. */
  878. #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 1500
  879. #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1500
  880. #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 1500
  881.  
  882. /** \brief X, Y, Z max acceleration in mm/s^2 for travel moves.  Overridden if EEPROM activated.*/
  883. #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 3000
  884. #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 3000
  885. #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 3000
  886.  
  887. /** \brief Maximum allowable jerk.
  888.  
  889. Caution: This is no real jerk in a physical meaning.
  890.  
  891. The jerk determines your start speed and the maximum speed at the join of two segments.
  892. Its unit is mm/s. If the printer is standing still, the start speed is jerk/2. At the
  893. join of two segments, the speed difference is limited to the jerk value.
  894.  
  895. Examples:
  896. For all examples jerk is assumed as 40.
  897.  
  898. Segment 1: vx = 50, vy = 0
  899. Segment 2: vx = 0, vy = 50
  900. v_diff = sqrt((50-0)^2+(0-50)^2) = 70.71
  901. v_diff > jerk => vx_1 = vy_2 = jerk/v_diff*vx_1 = 40/70.71*50 = 28.3 mm/s at the join
  902.  
  903. Segment 1: vx = 50, vy = 0
  904. Segment 2: vx = 35.36, vy = 35.36
  905. v_diff = sqrt((50-35.36)^2+(0-35.36)^2) = 38.27 < jerk
  906. Corner can be printed with full speed of 50 mm/s
  907.  
  908. Overridden if EEPROM activated.
  909. */
  910. #define MAX_JERK 25.0
  911. #define MAX_ZJERK 25.0
  912.  
  913. /** \brief Number of moves we can cache in advance.
  914.  
  915. This number of moves can be cached in advance. If you wan't to cache more, increase this. Especially on
  916. many very short moves the cache may go empty. The minimum value is 5.
  917. */
  918. #define MOVE_CACHE_SIZE 16
  919.  
  920. /** \brief Low filled cache size.
  921.  
  922. If the cache contains less then MOVE_CACHE_LOW segments, the time per segment is limited to LOW_TICKS_PER_MOVE clock cycles.
  923. If a move would be shorter, the feedrate will be reduced. This should prevent buffer underflows. Set this to 0 if you
  924. don't care about empty buffers during print.
  925. */
  926. #define MOVE_CACHE_LOW 10
  927. /** \brief Cycles per move, if move cache is low.
  928.  
  929. 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
  930. if you are printing many very short segments at high speed. Higher delays here allow higher values in PATH_PLANNER_CHECK_SEGMENTS.
  931. */
  932. #define LOW_TICKS_PER_MOVE 250000
  933.  
  934. // ##########################################################################################
  935. // ##                           Extruder control                                           ##
  936. // ##########################################################################################
  937.  
  938. /** \brief Prescale factor, timer0 runs at.
  939.  
  940. All known arduino boards use 64. This value is needed for the extruder timing. */
  941. #define TIMER0_PRESCALE 64
  942.  
  943. /* \brief Minimum temperature for extruder operation
  944.  
  945. This is a saftey value. If your extruder temperature is below this temperature, no
  946. extruder steps are executed. This is to prevent your extruder to move unless the fiament
  947. is at least molten. After havong some complains that the extruder does not work, I leave
  948. it 0 as default.
  949. */
  950.  
  951. #define MIN_EXTRUDER_TEMP 0
  952.  
  953. /** \brief Enable advance algorithm.
  954.  
  955. Without a correct adjusted advance algorithm, you get blobs at points, where acceleration changes. The
  956. effect increases with speed and acceleration difference. Using the advance method decreases this effect.
  957. For more informations, read the wiki.
  958. */
  959. #define USE_ADVANCE
  960.  
  961. /** \brief enables quadratic component.
  962.  
  963. Uncomment to allow a quadratic advance dependency. Linear is the dominant value, so no real need
  964. to activate the quadratic term. Only adds lots of computations and storage usage. */
  965. #define ENABLE_QUADRATIC_ADVANCE
  966.  
  967.  
  968. // ##########################################################################################
  969. // ##                           Communication configuration                                ##
  970. // ##########################################################################################
  971.  
  972. //// AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!!
  973.  
  974. /** \brief Communication speed.
  975.  
  976. - 250000 : Fastes with errorrate of 0% with 16 or 32 MHz - update wiring_serial.c in your board files. See boards/readme.txt
  977. - 115200 : Fast, but may produce communication errors on quite regular basis, Error rate -3,5%
  978. - 76800 : Best setting for Arduino with 16 MHz, Error rate 0,2% page 198 AVR1284 Manual. Result: Faster communication then 115200
  979. - 57600 : Should produce nearly no errors, on my gen 6 it's faster than 115200 because there are no errors slowing down the connection
  980. - 38600
  981.  
  982.  Overridden if EEPROM activated.
  983. */
  984. //#define BAUDRATE 76800
  985. #define BAUDRATE 115200
  986. //#define BAUDRATE 250000
  987.  
  988. /**
  989. Some boards like Gen7 have a power on pin, to enable the atx power supply. If this is defined,
  990. the power will be turned on without the need to call M80 if initially started.
  991. */
  992. #define ENABLE_POWER_ON_STARTUP
  993.  
  994. /**
  995. If you use an ATX power supply you need the power pin to work non inverting. For some special
  996. boards you might need to make it inverting.
  997. */
  998. #define POWER_INVERTING false
  999. /** What shall the printer do, when it receives an M112 emergency stop signal?
  1000.  0 = Disable heaters/motors, wait forever until someone presses reset.
  1001.  1 = restart by resetting the AVR controller. The USB connection will not reset if managed by a different chip!
  1002. */
  1003. #define KILL_METHOD 1
  1004.  
  1005. /** \brief Cache size for incoming commands.
  1006.  
  1007. There should be no reason to increase this cache. Commands are nearly immediately sent to
  1008. execution.
  1009. */
  1010. #define GCODE_BUFFER_SIZE 2
  1011. /** Appends the linenumber after every ok send, to acknowledge the received command. Uncomment for plain ok ACK if your host has problems with this */
  1012. #define ACK_WITH_LINENUMBER
  1013. /** Communication errors can swollow part of the ok, which tells the host software to send
  1014. the next command. Not receiving it will cause your printer to stop. Sending this string every
  1015. second, if our queue is empty should prevent this. Comment it, if you don't wan't this feature. */
  1016. #define WAITING_IDENTIFIER "wait"
  1017.  
  1018. /** \brief Sets time for echo debug
  1019.  
  1020. You can set M111 1 which enables ECHO of commands sent. This define specifies the position,
  1021. when it will be executed. In the original FiveD software, echo is done after receiving the
  1022. command. With checksum you know, how it looks from the sending string. With this define
  1023. uncommented, you will see the last command executed. To be more specific: It is written after
  1024. execution. This helps tracking errors, because there may be 8 or more commands in the queue
  1025. and it is elsewise difficult to know, what your reprap is currently doing.
  1026. */
  1027. #define ECHO_ON_EXECUTE
  1028.  
  1029. /** \brief EEPROM storage mode
  1030.  
  1031. Set the EEPROM_MODE to 0 if you always want to use the settings in this configuration file. If not,
  1032. set it to a value not stored in the first EEPROM-byte used. If you later want to overwrite your current
  1033. EEPROM settings with configuration defaults, just select an other value. On the first call to epr_init()
  1034. it will detect a mismatch of the first byte and copy default values into EEPROM. If the first byte
  1035. matches, the stored values are used to overwrite the settings.
  1036.  
  1037. IMPORTANT: With mode <>0 some changes in Configuration.h are not set any more, as they are
  1038.            taken from the EEPROM.
  1039. */
  1040. #define EEPROM_MODE 1
  1041.  
  1042.  
  1043. /**************** duplicate motor driver ***************
  1044.  
  1045. If you have an unused extruder stepper free, you could use it to drive the second z motor
  1046. instead of driving both with a single stepper. The same works for the other axis if needed.
  1047. */
  1048.  
  1049. #define FEATURE_TWO_XSTEPPER false
  1050. #define X2_STEP_PIN   E1_STEP_PIN
  1051. #define X2_DIR_PIN    E1_DIR_PIN
  1052. #define X2_ENABLE_PIN E1_ENABLE_PIN
  1053.  
  1054. #define FEATURE_TWO_YSTEPPER false
  1055. #define Y2_STEP_PIN   E1_STEP_PIN
  1056. #define Y2_DIR_PIN    E1_DIR_PIN
  1057. #define Y2_ENABLE_PIN E1_ENABLE_PIN
  1058.  
  1059. #define FEATURE_TWO_ZSTEPPER false
  1060. #define Z2_STEP_PIN   E1_STEP_PIN
  1061. #define Z2_DIR_PIN    E1_DIR_PIN
  1062. #define Z2_ENABLE_PIN E1_ENABLE_PIN
  1063.  
  1064. /* Ditto printing allows 2 extruders to do the same action. This effectively allows
  1065. to print an object two times at the speed of one. Works only with dual extruder setup.
  1066. */
  1067. #define FEATURE_DITTO_PRINTING false
  1068.  
  1069. /* Servos
  1070.  
  1071. If you need to control servos, enable this feature. You can control up to 4 servos.
  1072. Control the servos with
  1073. M340 P<servoId> S<pulseInUS>
  1074. servoID = 0..3
  1075. Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
  1076.  
  1077. WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!
  1078. */
  1079.  
  1080. #define FEATURE_SERVO false
  1081. // Servo pins on a RAMPS board are 11,6,5,4
  1082. #define SERVO0_PIN 11
  1083. #define SERVO1_PIN 6
  1084. #define SERVO2_PIN 5
  1085. #define SERVO3_PIN 4
  1086.  
  1087. /* A watchdog resets the printer, if a signal is not send within predifined time limits. That way we can be sure that the board
  1088. is always running and is not hung up for some unknown reason. */
  1089. #define FEATURE_WATCHDOG true
  1090.  
  1091. /* Z-Probing */
  1092.  
  1093. #define FEATURE_Z_PROBE true
  1094. #define Z_PROBE_PIN Z_MIN_PIN //63
  1095. #define Z_PROBE_PULLUP true
  1096. #define Z_PROBE_ON_HIGH false
  1097. #define Z_PROBE_X_OFFSET 0.0
  1098. #define Z_PROBE_Y_OFFSET 0.0
  1099. // Waits for a signal to start. Valid signals are probe hit and ok button.
  1100. // This is needful if you have the probe trigger by hand.
  1101. #define Z_PROBE_WAIT_BEFORE_TEST true
  1102. /** Speed of z-axis in mm/s when probing */
  1103. #define Z_PROBE_SPEED 20
  1104. #define Z_PROBE_XY_SPEED 150
  1105. /** The height is the difference between activated probe position and nozzle height. */
  1106. #define Z_PROBE_HEIGHT 21.6
  1107. /** Gap between probe and bed resp. extruder and z sensor. Must be greater then inital z height inaccuracy! Only used for delta printer calibration. */
  1108. #define Z_PROBE_GAP 35.0
  1109. /** These scripts are run before resp. after the z-probe is done. Add here code to activate/deactivate probe if needed. */
  1110. #define Z_PROBE_START_SCRIPT "G0 Z50"
  1111. #define Z_PROBE_FINISHED_SCRIPT "G0 Z400"
  1112.  
  1113. /* Autoleveling allows it to z-probe 3 points to compute the inclination and compensates the error for the print.
  1114.    This feature requires a working z-probe and you should have z-endstop at the top not at the bottom.
  1115.    The same 3 points are used for the G29 command.
  1116. */
  1117. #define FEATURE_AUTOLEVEL true
  1118. #define Z_PROBE_X1 -77.942
  1119. #define Z_PROBE_Y1 -45
  1120. #define Z_PROBE_X2 77.942
  1121. #define Z_PROBE_Y2 -45
  1122. #define Z_PROBE_X3 0
  1123. #define Z_PROBE_Y3 90
  1124.  
  1125. /** Set to false to disable SD support: */
  1126. #ifndef SDSUPPORT  // Some boards have sd support on board. These define the values already in pins.h
  1127. #define SDSUPPORT false
  1128. /** If set to false all files with longer names then 8.3 or having a tilde in the name will be hidden */
  1129. #define SD_ALLOW_LONG_NAMES false
  1130. // Uncomment to enable or change card detection pin. With card detection the card is mounted on insertion.
  1131. #define SDCARDDETECT -1
  1132. // Change to true if you get a inserted message on removal.
  1133. #define SDCARDDETECTINVERTED false
  1134. #endif
  1135. /** Show extended directory including file length. Don't use this with Pronterface! */
  1136. #define SD_EXTENDED_DIR
  1137. // If you want support for G2/G3 arc commands set to true, otherwise false.
  1138. #define ARC_SUPPORT true
  1139.  
  1140. /** You can store the current position with M401 and go back to it with M402.
  1141.    This works only if feature is set to true. */
  1142. #define FEATURE_MEMORY_POSITION true
  1143.  
  1144. /** If a checksum is sent, all future comamnds must also contain a checksum. Increases reliability especially for binary protocol. */
  1145. #define FEATURE_CHECKSUM_FORCED false
  1146.  
  1147. /** Should support for fan control be compiled in. If you enable this make sure
  1148. the FAN pin is not the same as for your second extruder. RAMPS e.g. has FAN_PIN in 9 which
  1149. is also used for the heater if you have 2 extruders connected. */
  1150. #define FEATURE_FAN_CONTROL false
  1151.  
  1152. /** For displays and keys there are too many permutations to handle them all in once.
  1153. For the most common available combinations you can set the controller type here, so
  1154. you don't need to configure uicong.h at all. Controller settings > 1 disable usage
  1155. of uiconfig.h
  1156.  
  1157. 0 = no display
  1158. 1 = Manual definition of display and keys parameter in uiconfig.h
  1159.  
  1160. The following settings override uiconfig.h!
  1161. 2 = Smartcontroller from reprapdiscount on a RAMPS or RUMBA board
  1162. 3 = Adafruit RGB controller
  1163. 4 = Foltyn 3DMaster with display attached
  1164. 5 = ViKi LCD - Check pin configuration in ui.h for feature controller 5!!! sd card disabled by default!
  1165. 6 = 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.
  1166. 7 = RADDS Extension Port
  1167. 8 = PiBot Display/Controller extension with 20x4 character display
  1168. 9 = PiBot Display/Controller extension with 16x2 character display
  1169. 10 = Gadgets3D shield on RAMPS 1.4, see http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
  1170. */
  1171. #define FEATURE_CONTROLLER 0
  1172.  
  1173. /**
  1174. Select the language to use.
  1175. 0 = English
  1176. 1 = German
  1177. 2 = Dutch
  1178. 3 = Brazilian portuguese
  1179. 4 = Italian
  1180. 5 = Spanish
  1181. 6 = Swedish
  1182. */
  1183. #define UI_LANGUAGE 1
  1184.  
  1185. // This is line 2 of the status display at startup. Change to your like.
  1186. #define UI_VERSION_STRING2 "Delta Tower"
  1187.  
  1188. /** How many ms should a single page be shown, until it is switched to the next one.*/
  1189. #define UI_PAGES_DURATION 4000
  1190.  
  1191. /** Uncomment if you don't want automatic page switching. You can still switch the
  1192. info pages with next/previous button/click-encoder */
  1193. #define UI_DISABLE_AUTO_PAGESWITCH true
  1194.  
  1195. /** Time to return to info menu if x millisconds no key was pressed. Set to 0 to disable it. */
  1196. #define UI_AUTORETURN_TO_MENU_AFTER 30000
  1197.  
  1198. #define FEATURE_UI_KEYS 0
  1199.  
  1200. /* Normally cou want a next/previous actions with every click of your encoder.
  1201. Unfotunately, the encoder have a different count of phase changes between clicks.
  1202. Select an encoder speed from 0 = fastest to 2 = slowest that results in one menu move per click.
  1203. */
  1204. #define UI_ENCODER_SPEED 1
  1205. /** \brief bounce time of keys in milliseconds */
  1206. #define UI_KEY_BOUNCETIME 10
  1207.  
  1208. /** \brief First time in ms until repeat of action. */
  1209. #define UI_KEY_FIRST_REPEAT 500
  1210. /** \brief Reduction of repeat time until next execution. */
  1211. #define UI_KEY_REDUCE_REPEAT 50
  1212. /** \brief Lowest repeat time. */
  1213. #define UI_KEY_MIN_REPEAT 50
  1214.  
  1215. #define FEATURE_BEEPER true
  1216. /**
  1217. Beeper sound definitions for short beeps during key actions
  1218. and longer beeps for important actions.
  1219. Parameter is delay in microseconds and the secons is the number of repetitions.
  1220. Values must be in range 1..255
  1221. */
  1222. #define BEEPER_SHORT_SEQUENCE 2,2
  1223. #define BEEPER_LONG_SEQUENCE 8,8
  1224.  
  1225. // ###############################################################################
  1226. // ##                         Values for menu settings                          ##
  1227. // ###############################################################################
  1228.  
  1229. // Values used for preheat
  1230. #define UI_SET_PRESET_HEATED_BED_TEMP_PLA 60
  1231. #define UI_SET_PRESET_EXTRUDER_TEMP_PLA   180
  1232. #define UI_SET_PRESET_HEATED_BED_TEMP_ABS 110
  1233. #define UI_SET_PRESET_EXTRUDER_TEMP_ABS   240
  1234. // Extreme values
  1235. #define UI_SET_MIN_HEATED_BED_TEMP  30
  1236. #define UI_SET_MAX_HEATED_BED_TEMP 120
  1237. #define UI_SET_MIN_EXTRUDER_TEMP   170
  1238. #define UI_SET_MAX_EXTRUDER_TEMP   260
  1239. #define UI_SET_EXTRUDER_FEEDRATE 2 // mm/sec
  1240. #define UI_SET_EXTRUDER_RETRACT_DISTANCE 3 // mm
  1241.  
  1242. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement