Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #ifndef CONFIGURATION_H
  2. #define CONFIGURATION_H
  3.  
  4. // This configurtion file contains the basic settings.
  5. // Advanced settings can be found in Configuration_adv.h
  6. // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
  7.  
  8. //User specified version info of THIS file to display in [Pronterface, etc] terminal window during startup.
  9. //Implementation of an idea by Prof Braino to inform user that any changes made
  10. //to THIS file by the user have been successfully uploaded into firmware.
  11. #define STRING_VERSION_CONFIG_H "2014-02-05" //Personal revision number for changes to THIS file.
  12. #define STRING_CONFIG_H_AUTHOR "Cagy-1st-Prusa-i3" //Who made the changes for Prusa Mendel
  13.  
  14. // This determines the communication speed of the printer
  15. #define BAUDRATE 250000
  16. //#define BAUDRATE 115200
  17.  
  18. //// The following define selects which electronics board you have. Please choose the one that matches your setup
  19. // Gen7 custom (Alfons3 Version) = 10 "https://github.com/Alfons3/Generation_7_Electronics"
  20. // Gen7 v1.1, v1.2 = 11
  21. // Gen7 v1.3 = 12
  22. // Gen7 v1.4 = 13
  23. // MEGA/RAMPS up to 1.2 = 3
  24. // RAMPS 1.3 = 33 (Power outputs: Extruder, Bed, Fan)
  25. // RAMPS 1.3 = 34 (Power outputs: Extruder0, Extruder1, Bed)
  26. // Gen6 = 5
  27. // Gen6 deluxe = 51
  28. // Sanguinololu 1.2 and above = 62
  29. // Melzi = 63
  30. // Ultimaker = 7
  31. // Teensylu = 8
  32. // Gen3+ =9
  33. #ifndef MOTHERBOARD
  34. #define MOTHERBOARD 62
  35. #endif
  36.  
  37. //===========================================================================
  38. //=============================Thermal Settings  ============================
  39. //===========================================================================
  40. //
  41. //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
  42. //
  43. //// Temperature sensor settings:
  44. // -2 is thermocouple with MAX6675 (only for sensor 0)
  45. // -1 is thermocouple with AD595
  46. // 0 is not used
  47. // 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
  48. // 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
  49. // 3 is mendel-parts thermistor (4.7k pullup)
  50. // 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
  51. // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan) (4.7k pullup)
  52. // 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
  53. // 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
  54. //
  55. //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
  56. //                          (but gives greater accuracy and more stable PID)
  57. // 51 is 100k thermistor - EPCOS (1k pullup)
  58. // 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
  59. // 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan) (1k pullup)
  60.  
  61. #define TEMP_SENSOR_0 1 //for J-head hotend with EPCOS
  62. #define TEMP_SENSOR_1 0
  63. #define TEMP_SENSOR_2 0
  64. #define TEMP_SENSOR_BED 1 //for PCB heatbed Mk2 with EPCOS
  65.  
  66. // Actual temperature must be close to target for this long before M109 returns success
  67. #define TEMP_RESIDENCY_TIME 10  // (seconds)
  68. #define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
  69. #define TEMP_WINDOW     1       // (degC) Window around target to start the recidency timer x degC early.
  70.  
  71. // The minimal temperature defines the temperature below which the heater will not be enabled It is used
  72. // to check that the wiring to the thermistor is not broken.
  73. // Otherwise this would lead to the heater being powered on all the time.
  74. #define HEATER_0_MINTEMP 5
  75. #define HEATER_1_MINTEMP 5
  76. #define HEATER_2_MINTEMP 5
  77. #define BED_MINTEMP 5
  78.  
  79. // When temperature exceeds max temp, your heater will be switched off.
  80. // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
  81. // You should use MINTEMP for thermistor short/failure protection.
  82. #define HEATER_0_MAXTEMP 275
  83. #define HEATER_1_MAXTEMP 275
  84. #define HEATER_2_MAXTEMP 275
  85. #define BED_MAXTEMP 150
  86.  
  87.  
  88. // PID settings:
  89. // Comment the following line to disable PID and enable bang-bang.
  90. #define PIDTEMP
  91. #define PID_MAX 255 // limits current to nozzle; 255=full current
  92. #ifdef PIDTEMP
  93.   //#define PID_DEBUG // Sends debug data to the serial port.
  94.   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
  95.   #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
  96.   #define K1 0.95 //smoothing factor withing the PID
  97.   #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the
  98.  
  99. // If you are using a preconfigured hotend then you can use one of the value sets by uncommenting it
  100. // Ultimaker
  101.     #define  DEFAULT_Kp 22.2
  102.     #define  DEFAULT_Ki 1.08  
  103.     #define  DEFAULT_Kd 114  
  104.  
  105. // Makergear
  106. //    #define  DEFAULT_Kp 7.0
  107. //    #define  DEFAULT_Ki 0.1  
  108. //    #define  DEFAULT_Kd 12  
  109.  
  110. // Mendel Parts V9 on 12V    
  111. //    #define  DEFAULT_Kp 63.0
  112. //    #define  DEFAULT_Ki 2.25
  113. //    #define  DEFAULT_Kd 440
  114. #endif // PIDTEMP
  115.  
  116. //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
  117. //can be software-disabled for whatever purposes by
  118. #define PREVENT_DANGEROUS_EXTRUDE
  119. //if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
  120. #define PREVENT_LENGTHY_EXTRUDE
  121.  
  122. #define EXTRUDE_MINTEMP 170
  123. #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
  124.  
  125. //===========================================================================
  126. //=============================Mechanical Settings===========================
  127. //===========================================================================
  128.  
  129. // coarse Endstop Settings
  130. #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
  131.  
  132. #ifndef ENDSTOPPULLUPS
  133.   // fine Enstop settings: Individual Pullups. will be ignored if ENDSTOPPULLUPS is defined
  134.   #define ENDSTOPPULLUP_XMAX
  135.   #define ENDSTOPPULLUP_YMAX
  136.   #define ENDSTOPPULLUP_ZMAX
  137.   #define ENDSTOPPULLUP_XMIN
  138.   #define ENDSTOPPULLUP_YMIN
  139.   //#define ENDSTOPPULLUP_ZMIN
  140. #endif
  141.  
  142. #ifdef ENDSTOPPULLUPS
  143.   #define ENDSTOPPULLUP_XMAX
  144.   #define ENDSTOPPULLUP_YMAX
  145.   #define ENDSTOPPULLUP_ZMAX
  146.   #define ENDSTOPPULLUP_XMIN
  147.   #define ENDSTOPPULLUP_YMIN
  148.   #define ENDSTOPPULLUP_ZMIN
  149. #endif
  150.  
  151. // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
  152. const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
  153. const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
  154. const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
  155. //#define DISABLE_MAX_ENDSTOPS
  156.  
  157. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  158. #define X_ENABLE_ON 0
  159. #define Y_ENABLE_ON 0
  160. #define Z_ENABLE_ON 0
  161. #define E_ENABLE_ON 0 // For all extruders
  162.  
  163. // Disables axis when it's not being used.
  164. #define DISABLE_X false
  165. #define DISABLE_Y false
  166. #define DISABLE_Z true
  167. #define DISABLE_E false // For all extruders
  168.  
  169. #define INVERT_X_DIR false   // for Mendel set to false, for Orca set to true, for Prusa set to false
  170. #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false, for Prusa set to false
  171. #define INVERT_Z_DIR false     // for Mendel set to false, for Orca set to true, for Prusa set to true
  172. #define INVERT_E0_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
  173. #define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
  174. #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
  175.  
  176. // ENDSTOP SETTINGS:
  177. // Sets direction of endstops when homing; 1=MAX, -1=MIN
  178. #define X_HOME_DIR -1
  179. #define Y_HOME_DIR -1
  180. #define Z_HOME_DIR -1
  181.  
  182. #define min_software_endstops true //If true, axis won't move to coordinates less than HOME_POS.
  183. #define max_software_endstops true  //If true, axis won't move to coordinates greater than the defined lengths below.
  184. #define X_MAX_LENGTH 200 //for Prusa
  185. #define Y_MAX_LENGTH 200 //for Prusa
  186. #define Z_MAX_LENGTH 150 //for Prusa
  187.  
  188. // The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
  189. #define X_HOME_POS 0
  190. #define Y_HOME_POS 0
  191. #define Z_HOME_POS 0
  192.  
  193. //// MOVEMENT SETTINGS
  194. #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
  195. #define HOMING_FEEDRATE {20*60, 20*60, 3*60, 0}  // set the homing speeds (mm/min) DERATED FOR PRUSA FROM 50*60, 50*60, 4*60, 0
  196.  
  197. // default settings DERATED FOR PRUSA
  198.  
  199. #define DEFAULT_AXIS_STEPS_PER_UNIT   {80,80,4000,595.281328}  // (80,80,2560,600)
  200. //#define DEFAULT_AXIS_STEPS_PER_UNIT   {80,80,3200/1.25,650}  // default steps per unit for Prusa Mendel
  201. #define DEFAULT_MAX_FEEDRATE          {300, 300, 3, 45}    // (mm/sec) DERATED FOR PRUSA FROM 500, 500, 5, 45
  202. #define DEFAULT_MAX_ACCELERATION      {1000,1000,50,500}    // X, Y, Z, E maximum start speed for accelerated moves.
  203. // DERATED FOR PRUSA FROM DEFAULTS 9000,9000,100,10000
  204. // E default values are good for skeinforge 40+, for older versions raise them a lot.
  205. // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
  206. #define DEFAULT_ACCELERATION          1000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves DERATED FOR PRUSA FROM 3000
  207. #define DEFAULT_RETRACT_ACCELERATION  1000   // X, Y, Z and E max acceleration in mm/s^2 for r retracts DERATED FOR PRUSA FROM 3000
  208.  
  209. //
  210. #define DEFAULT_XYJERK                15.0    // (mm/sec)  DERATED FOR PRUSA FROM 20.0
  211. #define DEFAULT_ZJERK                 0.4     // (mm/sec)
  212. #define DEFAULT_EJERK                 5.0    // (mm/sec)
  213.  
  214. //===========================================================================
  215. //=============================Additional Features===========================
  216. //===========================================================================
  217.  
  218. // EEPROM
  219. // the microcontroller can store settings in the EEPROM, e.g. max velocity...
  220. // M500 - stores paramters in EEPROM
  221. // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).  
  222. // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
  223. //define this to enable eeprom support
  224. #define EEPROM_SETTINGS
  225. //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
  226. // please keep turned on if you can.
  227. #define EEPROM_CHITCHAT
  228.  
  229. //LCD and SD support
  230. // #define ULTRA_LCD  //general lcd support, also 16x2
  231. // #define SDSUPPORT // Enable SD Card Support in Hardware Console
  232.  
  233. //#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
  234. #define ULTIPANEL  //the ultipanel as on thingiverse
  235.  
  236.  
  237. #ifdef ULTIMAKERCONTROLLER    //automatic expansion
  238.  #define ULTIPANEL
  239.  #define NEWPANEL
  240. #endif
  241.  
  242.  
  243. #ifdef ULTIPANEL
  244.   #define NEWPANEL  //enable this if you have a click-encoder panel
  245.   #define SDSUPPORT
  246.   #define ULTRA_LCD
  247.   #define LCD_WIDTH 20
  248.   #define LCD_HEIGHT 4
  249.  
  250. // Preheat Constants
  251.   #define PLA_PREHEAT_HOTEND_TEMP 180
  252.   #define PLA_PREHEAT_HPB_TEMP 70
  253.   #define PLA_PREHEAT_FAN_SPEED 255     // Insert Value between 0 and 255
  254.  
  255.   #define ABS_PREHEAT_HOTEND_TEMP 240
  256.   #define ABS_PREHEAT_HPB_TEMP 100
  257.   #define ABS_PREHEAT_FAN_SPEED 255     // Insert Value between 0 and 255
  258.  
  259. #else //no panel but just lcd
  260.   #ifdef ULTRA_LCD
  261.     #define LCD_WIDTH 16
  262.     #define LCD_HEIGHT 2    
  263.   #endif
  264. #endif
  265.  
  266. // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
  267. #define FAST_PWM_FAN
  268.  
  269. // M240  Triggers a camera by emulating a Canon RC-1 Remote
  270. // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
  271. // #define PHOTOGRAPH_PIN     23
  272.  
  273. #include "Configuration_adv.h"
  274. #include "thermistortables.h"
  275.  
  276. #endif //__CONFIGURATION_H