yarf 0.1
Yet Another RepRap Firmware
src/config.h
Go to the documentation of this file.
00001 /*
00002  * config.h
00003  *
00004  * Copyright 2011 Pieter Agten
00005  *
00006  * This file is part of Yarf.
00007  *
00008  * Yarf is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, either version 3 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * Yarf is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with Yarf.  If not, see <http://www.gnu.org/licenses/>.
00020  */
00021 
00029 #ifndef CONFIG_H
00030 #define CONFIG_H
00031 
00032 #include <math.h>
00033 
00034 /* Basic firmware settings */
00042 #define BOARD 1
00043 
00059 #define HOST_BAUD_RATE            19200
00060 
00074 #define E_COORDINATES_ARE_INPUT   1
00075 
00076 
00077 
00078 /* Basic machine parameters */
00091 #define SOFTWARE_MAX_ENDSTOPS 1
00092 
00102 #define X_LENGTH 160
00103 
00113 #define Y_LENGTH 180
00114 
00123 #define Z_LENGTH 80
00124 
00125 
00126 
00133 #define X_STEPS_PER_MM  80L
00134 
00141 #define Y_STEPS_PER_MM  80L
00142 
00149 #define Z_STEPS_PER_MM  2560L
00150 
00151 
00162 #define X_DIR_INVERTED   0
00163 
00174 #define Y_DIR_INVERTED   1
00175 
00186 #define Z_DIR_INVERTED   0
00187 
00198 #define E_DIR_INVERTED   1
00199 
00200 
00206 #define X_MAX_SPEED                6000
00207 
00213 #define Y_MAX_SPEED                6000
00214 
00220 #define Z_MAX_SPEED                 170
00221 
00222 
00230 #define E_MAX_SPEED_IN              100
00231 
00239 #define E_MAX_ADVANCE_SPEED_IN      500
00240 
00241 
00242 
00243 
00244 /* Filament and extruder parameters */
00250 #define FD 2.92
00251 
00257 #define ED 0.5
00258 
00265 #define PWD 6.6
00266 
00274 #define GEAR_RATIO (39.0/11.0)
00275 
00286 #define E_STEPS_PER_REV (360.0*8.0/1.8)
00287 
00288 
00289 
00290 
00291 
00292 /* PID Temperature management settings */
00299 #define HEATER_MANAGEMENT_FREQUENCY_HZ  1.0
00300 
00301 
00302 /* Nozzle temperature settings */
00307 #define NOZZLE_HEATER_PIN              HEAT1_PIN
00308 
00314 #define NOZZLE_HEATER_PWM_REG          OCR0A
00315 
00322 #define NOZZLE_HEATER_MAX_TEMP         250.0
00323 
00330 #define NOZZLE_HEATER_MAX_DUTY_CYCLE   180
00331 
00337 #define NOZZLE_THERMISTOR_PIN          TEMP2_PIN
00338 
00345 #define NOZZLE_THERMISTOR_TABLE        thermistor_table
00346 
00356 #define NOZZLE_PID_ENVELOPE            10
00357 
00366 #define NOZZLE_PID_P_GAIN              20
00367 
00378 #define NOZZLE_PID_I_GAIN              (1/HEATER_MANAGEMENT_FREQUENCY_HZ)
00379 
00390 #define NOZZLE_PID_D_GAIN              (0*HEATER_MANAGEMENT_FREQUENCY_HZ)
00391 
00392 
00393 /* Print bed temperature settings */
00398 #define PRINTBED_HEATER_PIN            HEAT2_PIN
00399 
00405 #define PRINTBED_HEATER_PWM_REG        OCR0B
00406 
00413 #define PRINTBED_HEATER_MAX_TEMP       130.0
00414 
00421 #define PRINTBED_HEATER_MAX_DUTY_CYCLE 255
00422 
00428 #define PRINTBED_THERMISTOR_PIN        TEMP1_PIN
00429 
00436 #define PRINTBED_THERMISTOR_TABLE      thermistor_table
00437 
00447 #define PRINTBED_PID_ENVELOPE          3
00448 
00457 #define PRINTBED_PID_P_GAIN            20
00458 
00469 #define PRINTBED_PID_I_GAIN            (2/HEATER_MANAGEMENT_FREQUENCY_HZ)
00470 
00481 #define PRINTBED_PID_D_GAIN            (1*HEATER_MANAGEMENT_FREQUENCY_HZ)
00482 
00483 
00484 
00485 /* Movements and acceleration settings */
00495 #define START_FEED_RATE 1000
00496 
00497 
00504 #define ACCELERATION   2000000.0
00505 
00506 
00507 /* Lookahead component settings */
00518 #define PLANNER_LOOKAHEAD         1
00519 
00529 #define JUNCTION_DEVIATION        ((float)START_FEED_RATE)
00530 
00531 
00532 /* Advance pressure management system settings */
00540 #define ADVANCE_ALGORITHM         1
00541 
00552 #define FILAMENT_DENSITY       0.0013
00553 
00563 #define EXTRUDER_K              1200000
00564 
00576 #define ADVANCE_DEPRIME_MM_OUT   5
00577 
00591 #define ADVANCE_BASE_FEEDRATE_E 0
00592 
00593 
00594 
00595 /* More technical settings */
00611 #define PLANNER_QUEUE_SIZE 32
00612 
00622 #define STEPPER_HOLD_E   1
00623 
00630 #define USART0_RECEIVE_BUFFER_SIZE 128
00631 
00639 #define GCODE_BUFFER_SIZE  64
00640 
00641 
00649 #define STEPPER_HOLD_X   1
00650 
00658 #define STEPPER_HOLD_Y   1
00659 
00668 #define STEPPER_HOLD_Z   0
00669 
00670 
00671 #endif // CONFIG_H
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines