2011-07-05 18:20:15 +00:00
# ifndef CONFIGURATION_H
# define CONFIGURATION_H
2010-05-02 19:39:31 +00:00
2011-07-06 11:34:08 +00:00
// BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
2011-03-28 16:15:38 +00:00
2011-07-06 11:34:08 +00:00
//// The following define selects which electronics board you have. Please choose the one that matches your setup
2011-07-05 18:20:15 +00:00
// MEGA/RAMPS up to 1.2 = 3,
2011-07-05 21:29:45 +00:00
// RAMPS 1.3 = 33
2011-07-05 18:20:15 +00:00
// Gen6 = 5,
// Sanguinololu up to 1.1 = 6
// Sanguinololu 1.2 and above = 62
# define MOTHERBOARD 3
2011-07-06 11:34:08 +00:00
//// Thermistor settings:
2011-07-05 18:20:15 +00:00
// 1 is 100k thermistor
// 2 is 200k thermistor
// 3 is mendel-parts thermistor
2011-07-12 13:24:09 +00:00
// 4 is 10k thermistor
2011-07-25 17:56:55 +00:00
# define THERMISTORHEATER 1
# define THERMISTORBED 1
2011-07-05 18:20:15 +00:00
2011-07-06 11:34:08 +00:00
//// Calibration variables
// X, Y, Z, E steps per unit - Metric Prusa Mendel with Wade extruder:
2011-07-25 17:56:55 +00:00
float axis_steps_per_unit [ ] = { 80 , 80 , 3200 / 1.25 , 700 } ;
2011-07-06 11:34:08 +00:00
// Metric Prusa Mendel with Makergear geared stepper extruder:
2011-07-05 18:20:15 +00:00
//float axis_steps_per_unit[] = {80,80,3200/1.25,1380};
2011-07-06 11:34:08 +00:00
//// Endstop Settings
2011-07-05 18:20:15 +00:00
# define ENDSTOPPULLUPS 1 // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
2011-07-06 11:34:08 +00:00
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
2011-07-05 18:20:15 +00:00
const bool ENDSTOPS_INVERTING = false ; //set to true to invert the logic of the endstops
2011-07-17 12:09:14 +00:00
//If your axes are only moving in one direction, make sure the endstops are connected properly.
//If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here
2011-07-05 18:20:15 +00:00
2011-07-06 11:34:08 +00:00
// This determines the communication speed of the printer
2011-07-05 18:20:15 +00:00
# define BAUDRATE 115200
2011-07-06 11:34:08 +00:00
// Comment out (using // at the start of the line) to disable SD support:
2011-07-25 17:56:55 +00:00
# define SDSUPPORT 1
2010-05-02 19:39:31 +00:00
2011-07-05 18:20:15 +00:00
2011-07-06 11:34:08 +00:00
//// ADVANCED SETTINGS - to tweak parameters
2011-07-05 18:20:15 +00:00
# include "thermistortables.h"
2011-07-06 11:34:08 +00:00
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
2011-07-17 12:09:14 +00:00
# define X_ENABLE_ON 0
# define Y_ENABLE_ON 0
# define Z_ENABLE_ON 0
# define E_ENABLE_ON 0
2011-07-05 18:20:15 +00:00
2011-07-06 11:34:08 +00:00
// Disables axis when it's not being used.
2011-07-05 18:20:15 +00:00
const bool DISABLE_X = false ;
const bool DISABLE_Y = false ;
const bool DISABLE_Z = true ;
const bool DISABLE_E = false ;
2011-07-06 11:34:08 +00:00
// Inverting axis direction
2011-07-05 18:20:15 +00:00
const bool INVERT_X_DIR = false ;
const bool INVERT_Y_DIR = false ;
const bool INVERT_Z_DIR = true ;
const bool INVERT_E_DIR = false ;
2011-07-06 11:34:08 +00:00
//// ENDSTOP SETTINGS:
2011-07-05 18:20:15 +00:00
// Sets direction of endstops when homing; 1=MAX, -1=MIN
2011-07-17 12:09:14 +00:00
# define X_HOME_DIR -1
# define Y_HOME_DIR -1
# define Z_HOME_DIR -1
2011-07-05 18:20:15 +00:00
const bool min_software_endstops = false ; //If true, axis won't move to coordinates less than zero.
const bool max_software_endstops = true ; //If true, axis won't move to coordinates greater than the defined lengths below.
const int X_MAX_LENGTH = 200 ;
const int Y_MAX_LENGTH = 200 ;
const int Z_MAX_LENGTH = 100 ;
2011-07-06 11:34:08 +00:00
//// MOVEMENT SETTINGS
2011-07-05 18:20:15 +00:00
const int NUM_AXIS = 4 ; // The axis order in all axis related arrays is X, Y, Z, E
float max_feedrate [ ] = { 200000 , 200000 , 240 , 500000 } ;
2011-07-17 12:09:14 +00:00
float homing_feedrate [ ] = { 1500 , 1500 , 120 } ;
2011-07-05 18:20:15 +00:00
bool axis_relative_modes [ ] = { false , false , false , false } ;
2011-07-06 11:34:08 +00:00
// Min step delay in microseconds. If you are experiencing missing steps, try to raise the delay microseconds, but be aware this
2011-05-02 21:19:36 +00:00
// If you enable this, make sure STEP_DELAY_RATIO is disabled.
2011-05-22 17:52:00 +00:00
//#define STEP_DELAY_MICROS 1
2011-05-01 03:13:04 +00:00
2011-07-06 11:34:08 +00:00
// Step delay over interval ratio. If you are still experiencing missing steps, try to uncomment the following line, but be aware this
2011-07-06 12:59:27 +00:00
// If you enable this, make sure STEP_DELAY_MICROS is disabled. (except for Gen6: both need to be enabled.)
2011-05-02 21:19:36 +00:00
//#define STEP_DELAY_RATIO 0.25
2011-05-01 02:36:45 +00:00
2011-07-06 11:34:08 +00:00
// Comment this to disable ramp acceleration
2011-05-04 19:49:09 +00:00
# define RAMP_ACCELERATION 1
2011-05-04 18:44:50 +00:00
2011-07-06 11:34:08 +00:00
//// Acceleration settings
2011-05-04 19:49:09 +00:00
# ifdef RAMP_ACCELERATION
2011-07-06 11:34:08 +00:00
// 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.
2011-05-23 18:03:47 +00:00
float max_start_speed_units_per_second [ ] = { 25.0 , 25.0 , 0.2 , 10.0 } ;
2011-06-05 02:22:57 +00:00
long max_acceleration_units_per_sq_second [ ] = { 1000 , 1000 , 50 , 10000 } ; // X, Y, Z and E max acceleration in mm/s^2 for printing moves or retracts
2011-07-07 14:32:10 +00:00
long max_travel_acceleration_units_per_sq_second [ ] = { 500 , 500 , 50 , 500 } ; // X, Y, Z max acceleration in mm/s^2 for travel moves
2011-05-04 19:49:09 +00:00
# endif
2011-04-07 04:14:23 +00:00
2011-07-23 22:36:32 +00:00
// Machine UUID
// This may be useful if you have multiple machines and wish to identify them by using the M115 command.
// By default we set it to zeros.
2011-07-25 17:56:55 +00:00
char uuid [ ] = " 00000000-0000-0000-0000-000000000000 " ;
2011-07-23 22:36:32 +00:00
2011-07-06 11:34:08 +00:00
//// AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!!
2010-05-02 19:39:31 +00:00
2011-07-06 11:34:08 +00:00
//// PID settings:
// Uncomment the following line to enable PID support. This is untested and could be disastrous. Be careful.
2011-04-10 19:58:56 +00:00
//#define PIDTEMP 1
# ifdef PIDTEMP
# define PID_MAX 255 // limits current to nozzle
# define PID_INTEGRAL_DRIVE_MAX 220
# define PID_PGAIN 180 //100 is 1.0
# define PID_IGAIN 2 //100 is 1.0
# define PID_DGAIN 100 //100 is 1.0
# endif
2011-07-06 11:34:08 +00:00
// How often should the heater check for new temp readings, in milliseconds
2011-05-23 18:03:47 +00:00
# define HEATER_CHECK_INTERVAL 500
2011-07-25 17:56:55 +00:00
# define BED_CHECK_INTERVAL 5000
2011-07-06 11:34:08 +00:00
// Comment the following line to enable heat management during acceleration
2011-05-23 18:03:47 +00:00
# define DISABLE_CHECK_DURING_ACC
2011-05-20 23:51:29 +00:00
# ifndef DISABLE_CHECK_DURING_ACC
2011-07-06 11:34:08 +00:00
// Uncomment the following line to disable heat management during moves
2011-05-20 23:51:29 +00:00
//#define DISABLE_CHECK_DURING_MOVE
# endif
2011-07-06 11:34:08 +00:00
// Uncomment the following line to disable heat management during travel moves (and extruder-only moves, eg: retracts), strongly recommended if you are missing steps mid print.
// Probably this should remain commented if are using PID.
// It also defines the max milliseconds interval after which a travel move is not considered so for the sake of this feature.
2011-06-06 17:59:47 +00:00
# define DISABLE_CHECK_DURING_TRAVEL 1000
2011-05-15 12:08:04 +00:00
2011-07-06 12:59:27 +00:00
//// Temperature smoothing - only uncomment this if your temp readings are noisy (Gen6 without EvdZ's 5V hack)
2011-04-27 21:30:58 +00:00
//#define SMOOTHING 1
//#define SMOOTHFACTOR 16 //best to use a power of two here - determines how many values are averaged together by the smoothing algorithm
2011-07-06 11:34:08 +00:00
//// Experimental watchdog and minimal temp
// The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
// 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
2011-05-01 14:31:46 +00:00
//#define WATCHPERIOD 5000 //5 seconds
2011-07-06 11:34:08 +00:00
2011-07-25 07:51:01 +00:00
// Wait this long after achieving target temperature on M109 before continuing with print (seconds)
2011-07-25 17:58:02 +00:00
//#define TEMP_RESIDENCY_TIME 20
2011-07-25 07:51:01 +00:00
2011-07-06 11:34:08 +00:00
//// The minimal temperature defines the temperature below which the heater will not be enabled
2011-07-05 18:20:15 +00:00
# define MINTEMP 5
2011-05-01 14:31:46 +00:00
2011-07-06 11:34:08 +00:00
//// Experimental max temp
// When temperature exceeds max temp, your heater will be switched off.
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
// You should use MINTEMP for thermistor short/failure protection.
2011-07-25 17:56:55 +00:00
# define MAXTEMP 275
2011-05-12 12:26:31 +00:00
2011-04-19 07:26:56 +00:00
// Select one of these only to define how the nozzle temp is read.
2011-04-22 10:18:12 +00:00
# define HEATER_USES_THERMISTOR
2011-04-19 07:26:56 +00:00
//#define HEATER_USES_AD595
2011-04-22 10:18:12 +00:00
//#define HEATER_USES_MAX6675
2011-04-19 07:26:56 +00:00
// Select one of these only to define how the bed temp is read.
# define BED_USES_THERMISTOR
//#define BED_USES_AD595
2011-04-10 19:58:56 +00:00
2011-07-06 11:34:08 +00:00
// Uncomment the following line to enable debugging. You can better control debugging below the following line
2011-05-20 08:25:34 +00:00
//#define DEBUG
# ifdef DEBUG
2011-06-05 02:22:57 +00:00
//#define DEBUG_PREPARE_MOVE //Enable this to debug prepare_move() function
//#define DEBUG_BRESENHAM //Enable this to debug the Bresenham algorithm
//#define DEBUG_RAMP_ACCELERATION //Enable this to debug all constant acceleration info
//#define DEBUG_MOVE_TIME //Enable this to time each move and print the result
2011-06-06 16:29:04 +00:00
//#define DEBUG_HEAT_MGMT //Enable this to debug heat management. WARNING, this will cause axes to jitter!
2011-06-06 17:59:47 +00:00
//#define DEBUG_DISABLE_CHECK_DURING_TRAVEL //Debug the namesake feature, see above in this file
2011-05-20 08:25:34 +00:00
# endif
2011-03-28 16:15:38 +00:00
2010-08-30 00:45:38 +00:00
# endif