![]() |
Repetier-Firmware 0.2
|
00001 /* 00002 This file is part of Repetier-Firmware. 00003 00004 Repetier-Firmware is free software: you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation, either version 3 of the License, or 00007 (at your option) any later version. 00008 00009 Foobar is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with Repetier-Firmware. If not, see <http://www.gnu.org/licenses/>. 00016 00017 */ 00018 00019 #ifndef CONFIGURATION_H 00020 #define CONFIGURATION_H 00021 00022 // BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration 00023 00025 // MEGA/RAMPS up to 1.2 = 3, 00026 // RAMPS 1.3 = 33 00027 // Gen6 = 5, 00028 // Sanguinololu up to 1.1 = 6 00029 // Sanguinololu 1.2 and above = 62 00030 #define MOTHERBOARD 5 00031 00032 #include <avr/io.h> 00033 #include "pins.h" 00034 00035 // ########################################################################################## 00036 // ## Calibration ## 00037 // ########################################################################################## 00038 00039 00041 #define XAXIS_STEPS_PER_MM 40 00042 00043 #define YAXIS_STEPS_PER_MM 40 00044 00045 #define ZAXIS_STEPS_PER_MM 3360 00046 00047 // ########################################################################################## 00048 // ## Extruder configuration ## 00049 // ########################################################################################## 00050 00052 #define NUM_EXTRUDER 1 00053 00054 #define EXT0_X_OFFSET 0 00055 #define EXT0_Y_OFFSET 0 00056 // for skeinforge 40 and later, steps to pull the plasic 1 mm inside the extruder, not out 00057 #define EXT0_STEPS_PER_MM 373 00058 // What type of sensor is used? 00059 // 1 is 100k thermistor 00060 // 2 is 200k thermistor 00061 // 3 is mendel-parts thermistor 00062 // 4 is 10k thermistor 00063 // 5 is userdefined thermistor table 0 00064 // 6 is userdefined thermistor table 1 00065 // 7 is userdefined thermistor table 2 00066 // 99 Generic thermistor table 00067 // 100 is AD595 00068 // 101 is MAX6675 00069 #define EXT0_TEMPSENSOR_TYPE 5 00070 // Position in analog input table below for reading temperatures or pin enabling SS for MAX6675 00071 #define EXT0_TEMPSENSOR_PIN 0 00072 // WHich pin enables the heater 00073 #define EXT0_HEATER_PIN HEATER_0_PIN 00074 #define EXT0_STEP_PIN E_STEP_PIN 00075 #define EXT0_DIR_PIN E_DIR_PIN 00076 // set to 0/1 for normal / inverse direction 00077 #define EXT0_INVERSE false 00078 #define EXT0_ENABLE_PIN E_ENABLE_PIN 00079 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 00080 #define EXT0_ENABLE_ON false 00081 // The following speed settings are for skeinforge 40+ where e is the 00082 // length of filament pulled inside the heater. For repsnap or older 00083 // skeinforge use hiher values. 00084 #define EXT0_MAX_FEEDRATE 1200 00085 // Feedrate from halted extruder in mm/s 00086 #define EXT0_MAX_START_FEEDRATE 10 00087 // Acceleration in mm/s^2 00088 #define EXT0_MAX_ACCELERATION 10000 00089 00094 #define EXT0_HEAT_MANAGER 1 00095 00096 #define EXT0_WATCHPERIOD 40 00097 00099 #define EXT0_PID_INTEGRAL_DRIVE_MAX 130 00100 00101 #define EXT0_PID_PGAIN 300 00102 00103 #define EXT0_PID_IGAIN 2 00104 00105 #define EXT0_PID_DGAIN 2000 00106 // maximum time the heater is can be switched on. Max = 255 00107 #define EXT0_PID_MAX 200 00108 00109 #define EXT0_ADVANCE_K 0.0f 00110 00111 #define NUM_TEMPS_USERTHERMISTOR0 28 00112 00113 #define NUM_TEMPS_USERTHERMISTOR1 0 00114 00115 #define NUM_TEMPS_USERTHERMISTOR2 0 00116 00123 #define SCALE_PID_TO_MAX 0 00124 00135 #define USER_THERMISTORTABLE0 {\ 00136 {1,864},{21,300},{25,290},{29,280},{33,270},{39,260},{46,250},{54,240},{64,230},{75,220},\ 00137 {90,210},{107,200},{128,190},{154,180},{184,170},{221,160},{265,150},{316,140},{375,130},\ 00138 {441,120},{513,110},{588,100},{734,80},{856,60},{938,40},{986,20},{1008,0},{1018,-20} } 00139 00140 #define USER_THERMISTORTABLE1 {} 00141 #define USER_THERMISTORTABLE2 {} 00142 00165 //#define USE_GENERIC_THERMISTORTABLE 1 00167 #define GENERIC_THERM_R0 1042.7 00168 00169 #define GENERIC_THERM_T0 170 00170 00176 #define GENERIC_THERM_BETA 4036 00177 #define GENERIC_THERM_R1 0 00178 #define GENERIC_THERM_R2 4700 00179 #define GENERIC_THERM_VREF 5 00180 00181 #define GENERIC_THERM_VADC 5 00182 00183 #define GENERIC_THERM_NUM_ENTRIES 40 00184 00185 // uncomment the following line for MAX6675 support. 00186 //#define SUPPORT_MAX6675 00187 // Select type of your heated bed. It's the same as for EXT0_TEMPSENSOR_TYPE 00188 // set to 0 if you don't have a heated bed 00189 #define HEATED_BED_SENSOR_TYPE 0 00190 // Pin to enable heater for bed 00191 #define HEATED_BED_SENSOR_PIN -1 00192 // Pin to read temperature of heated bed 00193 #define HEATED_BED_HEATER_PIN -1 00194 00195 // uncomment to use AREF for reference voltage 00196 // on a GEN6 you want AVCC 00197 #define USE_AVCC_FOR_TEMP 00198 // how many samples do we want per reading. 1 sample takes 1/125000 seconds. 00199 // more samples get more reliable values, but take more time. 00200 #define ANALOG_SUPERSAMPLE 10 00201 #define NUM_ANALOG_SENSORS 1 00202 #define NUM_DIGITAL_SENSORS 0 00203 #define TEMP_PID true 00204 00206 // The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature 00207 // 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 00208 //#define WATCHPERIOD 5000 //5 seconds 00209 00211 #define MINTEMP 5 00212 00214 // When temperature exceeds max temp, your heater will be switched off. 00215 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! 00216 // You should use MINTEMP for thermistor short/failure protection. 00217 #define MAXTEMP 275 00218 00220 #define ANALOG_INPUTS NUM_ANALOG_SENSORS 00221 #if ANALOG_INPUTS>0 00222 // Channels are the MUX-part of ADMUX register 00223 #define ANALOG_INPUT_CHANNELS {TEMP_0_PIN} 00224 // Bits of the ADC converter 00225 #define ANALOG_INPUT_BITS 10 00226 // Build median from 2^ANALOG_INPUT_SAMPLE samples 00227 #define ANALOG_INPUT_SAMPLE 2 00228 #define ANALOG_REF_AREF 0 00229 #define ANALOG_REF_AVCC _BV(REFS0) 00230 #define ANALOG_REF_INT_1_1 _BV(REFS1) 00231 #define ANALOG_REF_INT_2_56 _BV(REFS0) | _BV(REFS1) 00232 00233 #define ANALOG_REF ANALOG_REF_AVCC 00234 #define ANALOG_PRESCALER _BV(ADPS0)|_BV(ADPS1)|_BV(ADPS2) 00235 00236 00237 #endif 00238 // ########################################################################################## 00239 // ## Endstop configuration ## 00240 // ########################################################################################## 00241 00243 #define ENDSTOPPULLUPS 0 // Comment this out (using // at the start of the line) to disable the endstop pullup resistors 00244 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. 00245 //set to true to invert the logic of the endstops 00246 #define ENDSTOPS_INVERTING false 00247 //If your axes are only moving in one direction, make sure the endstops are connected properly. 00248 //If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here 00249 00250 00251 00253 00254 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 00255 #define X_ENABLE_ON 0 00256 #define Y_ENABLE_ON 0 00257 #define Z_ENABLE_ON 0 00258 00259 // Disables axis when it's not being used. 00260 #define DISABLE_X false 00261 #define DISABLE_Y false 00262 #define DISABLE_Z true 00263 #define DISABLE_E false 00264 00265 // Inverting axis direction 00266 #define INVERT_X_DIR false 00267 #define INVERT_Y_DIR true 00268 #define INVERT_Z_DIR false 00269 00271 // Sets direction of endstops when homing; 1=MAX, -1=MIN 00272 #define X_HOME_DIR -1 00273 #define Y_HOME_DIR -1 00274 #define Z_HOME_DIR -1 00275 00276 //If true, axis won't move to coordinates less than zero. 00277 #define min_software_endstops false 00278 //If true, axis won't move to coordinates greater than the defined lengths below. 00279 #define max_software_endstops true 00280 // You can disable endstop checking for print moves. This is needed, if you get sometimes 00281 // false signals from your endstops. If your endstops don't give false signals, you 00282 // can set it on for safety. 00283 #define ALWAYS_CHECK_ENDSTOPS false 00284 // maximum positions in mm - only fixed numbers! 00285 #define X_MAX_LENGTH 200 00286 #define Y_MAX_LENGTH 200 00287 #define Z_MAX_LENGTH 100 00288 00289 // ########################################################################################## 00290 // ## Mevement settings ## 00291 // ########################################################################################## 00292 00297 #define STEPPER_INACTIVE_TIME 120L 00298 00303 #define MAX_INACTIVE_TIME 0L 00304 00306 #define MAX_FEEDRATE {15000, 15000, 100, 100} 00307 00308 #define HOMING_FEEDRATE {2400,2400,100} 00309 00311 #define RAMP_ACCELERATION 1 00312 00314 00316 #ifdef RAMP_ACCELERATION 00317 00318 #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND {7000,7000,100,1000} 00319 00320 #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND {7000,7000,100,1000} 00321 #endif 00322 00345 #define MAX_JERK 40.0 00346 #define MAX_ZJERK 0.3 00347 00348 // ########################################################################################## 00349 // ## Extruder control ## 00350 // ########################################################################################## 00351 00355 #define TIMER0_PRESCALE 64 00356 00371 #define EXTRUDER_SPEED 25.0 00372 00373 /* \brief Minimum temperature for extruder operation 00374 00375 This is a saftey value. If your extruder temperature is below this temperature, no 00376 extruder steps are executed. This is to prevent your extruder to move unless the fiament 00377 is at least molten. 00378 */ 00379 00380 #define MIN_EXTRUDER_TEMP 160 00381 00394 #define USE_OPS 1 00395 00404 #define OPS_MODE 0 00405 00411 #define OPS_MIN_DISTANCE 0.8 00412 00414 #define OPS_MOVE_AFTER 50.0 00415 00417 #define OPS_RETRACT_DISTANCE 3.0 00418 00424 #define OPS_RETRACT_BACKSLASH 0.0 00425 00426 00427 00434 #define USE_ADVANCE 00435 00440 #define MAX_HALFSTEP_INTERVAL 1999 00441 00442 // ########################################################################################## 00443 // ## Communication configuration ## 00444 // ########################################################################################## 00445 00447 00456 #define BAUDRATE 76800 00457 //#define BAUDRATE 57600 00458 //#define BAUDRATE 250000 00460 #define OUTPUT_BUFFER_SIZE 64 00461 00469 #define USE_BUFFERED_OUTPUT 00470 00475 #define MOVE_CACHE_SIZE 16 00476 00483 #define MOVE_CACHE_LOW 12 00484 00489 #define LOW_TICKS_PER_MOVE 200000 00490 00495 #define GCODE_BUFFER_SIZE 2 00496 00497 #define ACK_WITH_LINENUMBER 00498 00501 #define WAITING_IDENTIFIER "wait" 00502 00512 #define ECHO_ON_EXECUTE 00513 00522 #define EEPROM_MODE 1 00523 00524 //#define SDSUPPORT 1 00525 00526 // ########################################################################################## 00527 // ## Debug configuration ## 00528 // ########################################################################################## 00529 00531 //#define DEBUG_QUEUE_MOVE 00534 #define INCLUDE_DEBUG_COMMUNICATION 00535 00537 //#define INCLUDE_DEBUG_NO_MOVE 00541 //#define DEBUG_FREE_MEMORY 00542 #define DEBUG_ADVANCE 00543 00544 //#define DEBUG_OPS 00546 //#define DEBUG_GENERIC 00547 // Uncomment the following line to enable debugging. You can better control debugging below the following line 00548 //#define DEBUG 00549 // #################################################################################### 00550 // # Below this line only for experts # 00551 // #################################################################################### 00552 00553 00554 // #################################################################################### 00555 // # No configuration below this line - just some errorchecking # 00556 // #################################################################################### 00557 #ifdef SUPPORT_MAX6675 00558 #if !defined SCK_PIN || !defined MOSI_PIN || !defined MISO_PIN 00559 #error For MAX6675 support, you need to define SCK_PIN, MISO_PIN and MOSI_PIN in pins.h 00560 #endif 00561 #endif 00562 #if X_STEP_PIN<0 || Y_STEP_PIN<0 || Z_STEP_PIN<0 00563 #error One of the following pins is not assigned: X_STEP_PIN,Y_STEP_PIN,Z_STEP_PIN 00564 #endif 00565 #if EXT0_STEP_PIN<0 00566 #error EXT0_STEP_PIN not set to a pin number. 00567 #endif 00568 #if EXT0_DIR_PIN<0 00569 #error EXT0_DIR_PIN not set to a pin number. 00570 #endif 00571 #if MOVE_CACHE_SIZE<4 00572 #error MOVE_CACHE_SIZE must be at least 5 00573 #endif 00574 #if OUTPUT_BUFFER_SIZE>250 || OUTPUT_BUFFER_SIZE<16 00575 #error OUTPUT_BUFFER_SIZE must be in range 16..250 00576 #endif 00577 #endif 00578