Guest User

Untitled

a guest
Sep 15th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 12.06 KB | None | 0 0
  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 "2012-05-02" //Personal revision number for changes to THIS file.
  12. #define STRING_CONFIG_H_AUTHOR "erik" //Who made the changes.
  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.  
  34. #ifndef MOTHERBOARD
  35. #define MOTHERBOARD 13
  36. #endif
  37.  
  38.  
  39.  
  40. //===========================================================================
  41. //=============================Thermal Settings  ============================
  42. //===========================================================================
  43. //
  44. //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
  45. //
  46. //// Temperature sensor settings:
  47. // -2 is thermocouple with MAX6675 (only for sensor 0)
  48. // -1 is thermocouple with AD595
  49. // 0 is not used
  50. // 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
  51. // 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
  52. // 3 is mendel-parts thermistor (4.7k pullup)
  53. // 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
  54. // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan) (4.7k pullup)
  55. // 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
  56. // 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
  57. //
  58. //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
  59. //                          (but gives greater accuracy and more stable PID)
  60. // 51 is 100k thermistor - EPCOS (1k pullup)
  61. // 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
  62. // 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan) (1k pullup)
  63.  
  64. #define TEMP_SENSOR_0 98
  65. #define TEMP_SENSOR_1 0
  66. #define TEMP_SENSOR_2 0
  67. #define TEMP_SENSOR_BED 99
  68.  
  69. // Actual temperature must be close to target for this long before M109 returns success
  70. #define TEMP_RESIDENCY_TIME 10  // (seconds)
  71. #define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
  72. #define TEMP_WINDOW     1       // (degC) Window around target to start the recidency timer x degC early.
  73.  
  74. // The minimal temperature defines the temperature below which the heater will not be enabled It is used
  75. // to check that the wiring to the thermistor is not broken.
  76. // Otherwise this would lead to the heater being powered on all the time.
  77. #define HEATER_0_MINTEMP 5
  78. #define HEATER_1_MINTEMP 5
  79. #define HEATER_2_MINTEMP 5
  80. #define BED_MINTEMP 5
  81.  
  82. // When temperature exceeds max temp, your heater will be switched off.
  83. // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
  84. // You should use MINTEMP for thermistor short/failure protection.
  85. #define HEATER_0_MAXTEMP 275
  86. #define HEATER_1_MAXTEMP 275
  87. #define HEATER_2_MAXTEMP 275
  88. #define BED_MAXTEMP 150
  89.  
  90. // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
  91. // average current. The value should be an integer and the heat bed will be turned on for 1 interval of
  92. // HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
  93. //#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
  94.  
  95. // PID settings:
  96. // Comment the following line to disable PID and enable bang-bang.
  97. #define PIDTEMP
  98. #define PID_MAX 255 // limits current to nozzle; 255=full current
  99. #ifdef PIDTEMP
  100.   //#define PID_DEBUG // Sends debug data to the serial port.
  101.   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
  102.   #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
  103.   #define K1 0.95 //smoothing factor withing the PID
  104.   #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the
  105.  
  106. // If you are using a preconfigured hotend then you can use one of the value sets by uncommenting it
  107. // Ultimaker
  108. //    #define  DEFAULT_Kp 22.2
  109. //    #define  DEFAULT_Ki 1.08  
  110. //    #define  DEFAULT_Kd 114  
  111.  
  112. // Makergear
  113. //    #define  DEFAULT_Kp 7.0
  114. //    #define  DEFAULT_Ki 0.1  
  115. //    #define  DEFAULT_Kd 12  
  116.  
  117. // Mendel Parts V9 on 12V    
  118. //    #define  DEFAULT_Kp 63.0
  119. //    #define  DEFAULT_Ki 2.25
  120. //    #define  DEFAULT_Kd 440
  121.  
  122. // My M303 results
  123.     #define  DEFAULT_Kp 37.35
  124.     #define  DEFAULT_Ki 2.37
  125.     #define  DEFAULT_Kd 134.90
  126. #endif // PIDTEMP
  127.  
  128. //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
  129. //can be software-disabled for whatever purposes by
  130. #define PREVENT_DANGEROUS_EXTRUDE
  131. //if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
  132. #define PREVENT_LENGTHY_EXTRUDE
  133.  
  134. #define EXTRUDE_MINTEMP 170
  135. #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
  136.  
  137. //===========================================================================
  138. //=============================Mechanical Settings===========================
  139. //===========================================================================
  140.  
  141. // Uncomment the following line to enable CoreXY kinematics
  142. // #define COREXY
  143.  
  144. // corse Endstop Settings
  145. //#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
  146.  
  147. #ifndef ENDSTOPPULLUPS
  148.   // fine Enstop settings: Individual Pullups. will be ignord if ENDSTOPPULLUPS is defined
  149. //  #define ENDSTOPPULLUP_XMAX
  150. //  #define ENDSTOPPULLUP_YMAX
  151. //  #define ENDSTOPPULLUP_ZMAX
  152. //  #define ENDSTOPPULLUP_XMIN
  153. //  #define ENDSTOPPULLUP_YMIN
  154. //  #define ENDSTOPPULLUP_ZMIN
  155. #endif
  156.  
  157. #ifdef ENDSTOPPULLUPS
  158.   #define ENDSTOPPULLUP_XMAX
  159.   #define ENDSTOPPULLUP_YMAX
  160.   #define ENDSTOPPULLUP_ZMAX
  161.   #define ENDSTOPPULLUP_XMIN
  162.   #define ENDSTOPPULLUP_YMIN
  163.   #define ENDSTOPPULLUP_ZMIN
  164. #endif
  165.  
  166. // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
  167. const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
  168. const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
  169. const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
  170. #define DISABLE_MAX_ENDSTOPS
  171.  
  172. // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
  173. #define X_ENABLE_ON 0
  174. #define Y_ENABLE_ON 0
  175. #define Z_ENABLE_ON 0
  176. #define E_ENABLE_ON 0 // For all extruders
  177.  
  178. // Disables axis when it's not being used.
  179. #define DISABLE_X false
  180. #define DISABLE_Y false
  181. #define DISABLE_Z false
  182. #define DISABLE_E false // For all extruders
  183.  
  184. #define INVERT_X_DIR true    // for Mendel set to false, for Orca set to true
  185. #define INVERT_Y_DIR true    // for Mendel set to true, for Orca set to false
  186. #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
  187. #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
  188. #define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
  189. #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
  190.  
  191. // ENDSTOP SETTINGS:
  192. // Sets direction of endstops when homing; 1=MAX, -1=MIN
  193. #define X_HOME_DIR -1
  194. #define Y_HOME_DIR -1
  195. #define Z_HOME_DIR -1
  196.  
  197. #define min_software_endstops true //If true, axis won't move to coordinates less than HOME_POS.
  198. #define max_software_endstops true  //If true, axis won't move to coordinates greater than the defined lengths below.
  199. // Travel limits after homing
  200. #define X_MAX_POS 180
  201. #define X_MIN_POS 0
  202. #define Y_MAX_POS 200
  203. #define Y_MIN_POS 0
  204. #define Z_MAX_POS 105
  205. #define Z_MIN_POS 0
  206.  
  207. #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
  208. #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
  209. #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
  210.  
  211. // The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
  212. #define X_HOME_POS 0
  213. #define Y_HOME_POS 0
  214. #define Z_HOME_POS 0
  215.  
  216. //// MOVEMENT SETTINGS
  217. #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
  218. #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
  219.  
  220. // default settings
  221.  
  222. #define DEFAULT_AXIS_STEPS_PER_UNIT   {53.333,53.333,1280.000,588.263}  // default steps per unit for ultimaker
  223. #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 45}    // (mm/sec)    
  224. #define DEFAULT_MAX_ACCELERATION      {9000,9000,100,10000}    // 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.
  225.  
  226. #define DEFAULT_ACCELERATION          1500    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
  227. #define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for r retracts
  228.  
  229. //
  230. #define DEFAULT_XYJERK                15.0    // (mm/sec)
  231. #define DEFAULT_ZJERK                 0.4     // (mm/sec)
  232. #define DEFAULT_EJERK                 5.0    // (mm/sec)
  233.  
  234. //===========================================================================
  235. //=============================Additional Features===========================
  236. //===========================================================================
  237.  
  238. // EEPROM
  239. // the microcontroller can store settings in the EEPROM, e.g. max velocity...
  240. // M500 - stores paramters in EEPROM
  241. // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).  
  242. // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
  243. //define this to enable eeprom support
  244. //#define EEPROM_SETTINGS
  245. //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
  246. // please keep turned on if you can.
  247. //#define EEPROM_CHITCHAT
  248.  
  249. //LCD and SD support
  250. //#define ULTRA_LCD  //general lcd support, also 16x2
  251. //#define SDSUPPORT // Enable SD Card Support in Hardware Console
  252.  
  253. //#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
  254. //#define ULTIPANEL  //the ultipanel as on thingiverse
  255.  
  256.  
  257. #ifdef ULTIMAKERCONTROLLER    //automatic expansion
  258.  #define ULTIPANEL
  259.  #define NEWPANEL
  260. #endif
  261.  
  262.  
  263. #ifdef ULTIPANEL
  264. //  #define NEWPANEL  //enable this if you have a click-encoder panel
  265.   #define SDSUPPORT
  266.   #define ULTRA_LCD
  267.   #define LCD_WIDTH 20
  268.   #define LCD_HEIGHT 4
  269.  
  270. // Preheat Constants
  271.   #define PLA_PREHEAT_HOTEND_TEMP 180
  272.   #define PLA_PREHEAT_HPB_TEMP 60
  273.   #define PLA_PREHEAT_FAN_SPEED 255     // Insert Value between 0 and 255
  274.  
  275.   #define ABS_PREHEAT_HOTEND_TEMP 240
  276.   #define ABS_PREHEAT_HPB_TEMP 110
  277.   #define ABS_PREHEAT_FAN_SPEED 255     // Insert Value between 0 and 255
  278.  
  279. #else //no panel but just lcd
  280.   #ifdef ULTRA_LCD
  281.     #define LCD_WIDTH 16
  282.     #define LCD_HEIGHT 2    
  283.   #endif
  284. #endif
  285.  
  286. // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
  287. //#define FAST_PWM_FAN
  288.  
  289. // M240  Triggers a camera by emulating a Canon RC-1 Remote
  290. // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
  291. // #define PHOTOGRAPH_PIN     23
  292.  
  293. #include "Configuration_adv.h"
  294. #include "thermistortables.h"
  295. #include "thermistortables_custom.h"
  296.  
  297. #endif //__CONFIGURATION_H
Advertisement
Add Comment
Please, Sign In to add comment