Guest User

Untitled

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