2010-05-02 19:39:31 +00:00
|
|
|
#ifndef PARAMETERS_H
|
|
|
|
|
#define PARAMETERS_H
|
|
|
|
|
|
|
|
|
|
// NO RS485/EXTRUDER CONTROLLER SUPPORT
|
|
|
|
|
// PLEASE VERIFY PIN ASSIGNMENTS FOR YOUR CONFIGURATION!!!!!!!
|
2011-04-29 18:17:22 +00:00
|
|
|
#define MOTHERBOARD 3 // ATMEGA168 = 0, SANGUINO = 1, MOTHERBOARD = 2, MEGA/RAMPS = 3, ATMEGA328 = 4, Gen6 = 5, Sanguinololu = 6
|
2011-03-28 16:15:38 +00:00
|
|
|
|
|
|
|
|
//Comment out to disable SD support
|
2011-03-13 11:34:34 +00:00
|
|
|
#define SDSUPPORT 1
|
2010-05-02 19:39:31 +00:00
|
|
|
|
2011-05-01 03:13:04 +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.
|
|
|
|
|
#define STEP_DELAY_MICROS 1
|
2011-05-01 03:13:04 +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-05-02 21:19:36 +00:00
|
|
|
//If you enable this, make sure STEP_DELAY_MICROS is disabled.
|
|
|
|
|
//#define STEP_DELAY_RATIO 0.25
|
2011-05-01 02:36:45 +00:00
|
|
|
|
2011-05-04 19:49:09 +00:00
|
|
|
//Comment this to disable ramp acceleration
|
|
|
|
|
#define RAMP_ACCELERATION 1
|
2011-05-04 18:44:50 +00:00
|
|
|
|
2011-05-19 19:52:30 +00:00
|
|
|
//Uncomment this to enable exponential acceleration. WARNING!! This is not supported in the current version, and will be fixed before
|
|
|
|
|
// merging it to the stable branch.
|
|
|
|
|
// TODO: fix exp acceleration to correctly perform N bresenham.
|
2011-05-04 19:49:09 +00:00
|
|
|
//#define EXP_ACCELERATION 1
|
2011-05-04 18:44:50 +00:00
|
|
|
|
2011-04-07 04:14:23 +00:00
|
|
|
//Acceleration settings
|
2011-05-04 19:49:09 +00:00
|
|
|
#ifdef RAMP_ACCELERATION
|
2011-05-20 08:25:34 +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-19 19:52:30 +00:00
|
|
|
float max_start_speed_units_per_second[] = {35.0,35.0,0.2,10.0};
|
2011-05-20 08:25:34 +00:00
|
|
|
long max_acceleration_units_per_sq_second[] = {750,750,50,4000}; // X, Y, Z and E max acceleration in mm/s^2 for printing moves or retracts
|
2011-05-19 19:52:30 +00:00
|
|
|
long max_travel_acceleration_units_per_sq_second[] = {1500,1500,50}; // X, Y, Z max acceleration in mm/s^2 for travel moves
|
2011-05-04 19:49:09 +00:00
|
|
|
#endif
|
2011-05-04 18:44:50 +00:00
|
|
|
#ifdef EXP_ACCELERATION
|
2011-04-24 17:25:30 +00:00
|
|
|
float full_velocity_units = 10; // the units between minimum and G1 move feedrate
|
2011-04-25 21:38:27 +00:00
|
|
|
float travel_move_full_velocity_units = 10; // used for travel moves
|
2011-04-24 17:25:30 +00:00
|
|
|
float min_units_per_second = 35.0; // the minimum feedrate
|
|
|
|
|
float min_constant_speed_units = 2; // the minimum units of an accelerated move that must be done at constant speed
|
|
|
|
|
// Note that if the move is shorter than this value, acceleration won't be perfomed,
|
|
|
|
|
// but will be done at the minimum between min_units_per_seconds and move feedrate speeds.
|
2011-05-04 18:44:50 +00:00
|
|
|
#endif
|
2011-04-07 04:14:23 +00:00
|
|
|
|
2011-04-19 07:26:56 +00:00
|
|
|
// AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!!
|
2010-05-02 19:39:31 +00:00
|
|
|
|
2011-04-10 19:58:56 +00:00
|
|
|
//PID settings:
|
|
|
|
|
//Uncomment the following line to enable PID support. This is untested and could be disastrous. Be careful.
|
|
|
|
|
//#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-05-15 12:08:04 +00:00
|
|
|
//How often should the heater check for new temp readings, in milliseconds
|
|
|
|
|
#define HEATER_CHECK_INTERVAL 50
|
2011-05-15 22:02:54 +00:00
|
|
|
#define BED_CHECK_INTERVAL 5000
|
2011-05-15 12:08:04 +00:00
|
|
|
|
2011-04-27 21:30:58 +00:00
|
|
|
//Experimental temperature smoothing - only uncomment this if your temp readings are noisy
|
|
|
|
|
//#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-05-01 14:31:46 +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
|
|
|
|
|
//#define WATCHPERIOD 5000 //5 seconds
|
|
|
|
|
//The minimal temperature defines the temperature below which the heater will not be enabled
|
|
|
|
|
//#define MINTEMP
|
|
|
|
|
|
2011-05-12 12:26:31 +00:00
|
|
|
//Experimental max temp
|
|
|
|
|
//When temperature exceeds max temp, your bot will halt.
|
|
|
|
|
//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.
|
|
|
|
|
//#define MAXTEMP 275
|
|
|
|
|
|
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
|
|
|
|
2010-05-02 19:39:31 +00:00
|
|
|
// Calibration formulas
|
|
|
|
|
// e_extruded_steps_per_mm = e_feedstock_steps_per_mm * (desired_extrusion_diameter^2 / feedstock_diameter^2)
|
|
|
|
|
// new_axis_steps_per_mm = previous_axis_steps_per_mm * (test_distance_instructed/test_distance_traveled)
|
|
|
|
|
// units are in millimeters or whatever length unit you prefer: inches,football-fields,parsecs etc
|
|
|
|
|
|
|
|
|
|
//Calibration variables
|
2011-05-17 18:30:27 +00:00
|
|
|
const int NUM_AXIS = 4; // The axis order in all axis related arrays is X, Y, Z, E
|
2011-05-19 13:57:29 +00:00
|
|
|
float axis_steps_per_unit[] = {80.376,80.376,3200/1.25,16};
|
2011-05-19 19:52:30 +00:00
|
|
|
float max_feedrate = 200000; // mm/min, acceleration!
|
|
|
|
|
float max_z_feedrate = 180; // mm/min, acceleration!
|
2010-05-02 19:39:31 +00:00
|
|
|
|
2010-08-12 03:50:51 +00:00
|
|
|
//float x_steps_per_unit = 10.047;
|
|
|
|
|
//float y_steps_per_unit = 10.047;
|
|
|
|
|
//float z_steps_per_unit = 833.398;
|
|
|
|
|
//float e_steps_per_unit = 0.706;
|
|
|
|
|
//float max_feedrate = 3000;
|
|
|
|
|
|
2010-05-02 19:39:31 +00:00
|
|
|
//For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
|
|
|
|
|
const bool X_ENABLE_ON = 0;
|
|
|
|
|
const bool Y_ENABLE_ON = 0;
|
|
|
|
|
const bool Z_ENABLE_ON = 0;
|
|
|
|
|
const bool E_ENABLE_ON = 0;
|
|
|
|
|
|
|
|
|
|
//Disables axis when it's not being used.
|
|
|
|
|
const bool DISABLE_X = false;
|
|
|
|
|
const bool DISABLE_Y = false;
|
|
|
|
|
const bool DISABLE_Z = true;
|
|
|
|
|
const bool DISABLE_E = false;
|
|
|
|
|
|
2010-05-02 20:47:44 +00:00
|
|
|
const bool INVERT_X_DIR = false;
|
|
|
|
|
const bool INVERT_Y_DIR = false;
|
2010-08-12 03:50:51 +00:00
|
|
|
const bool INVERT_Z_DIR = true;
|
2010-08-12 16:26:13 +00:00
|
|
|
const bool INVERT_E_DIR = false;
|
2010-05-02 20:47:44 +00:00
|
|
|
|
2011-05-15 00:47:12 +00:00
|
|
|
// Sets direction of endstops when homing; 1=MAX, -1=MIN
|
|
|
|
|
const int X_HOME_DIR = -1;
|
|
|
|
|
const int Y_HOME_DIR = -1;
|
|
|
|
|
const int Z_HOME_DIR = -1;
|
|
|
|
|
|
|
|
|
|
|
2011-03-28 16:15:38 +00:00
|
|
|
//Thermistor settings:
|
|
|
|
|
|
|
|
|
|
//Uncomment for 100k thermistor
|
|
|
|
|
//#include "ThermistorTable_100k.h"
|
|
|
|
|
//#include "BedThermistorTable_100k.h"
|
|
|
|
|
|
|
|
|
|
//Uncomment for 200k thermistor
|
|
|
|
|
//#include "ThermistorTable_200k.h"
|
|
|
|
|
//#include "BedThermistorTable_200k.h"
|
|
|
|
|
|
2011-04-15 07:02:06 +00:00
|
|
|
//Identical thermistors on heater and bed - use this if you have no heated bed or if the thermistors are the same on both:
|
2011-03-28 16:15:38 +00:00
|
|
|
#include "ThermistorTable_200k.h"
|
|
|
|
|
//#include "ThermistorTable_100k.h"
|
2011-04-15 07:02:06 +00:00
|
|
|
//#include "ThermistorTable_mendelparts.h"
|
2011-03-28 16:15:38 +00:00
|
|
|
#define BNUMTEMPS NUMTEMPS
|
|
|
|
|
#define bedtemptable temptable
|
|
|
|
|
|
2010-05-02 19:39:31 +00:00
|
|
|
//Endstop Settings
|
2011-03-13 11:34:34 +00:00
|
|
|
#define ENDSTOPPULLUPS 1
|
2011-01-06 07:01:30 +00:00
|
|
|
const bool ENDSTOPS_INVERTING = false;
|
2010-05-02 19:39:31 +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.
|
2011-03-13 11:34:34 +00:00
|
|
|
const int X_MAX_LENGTH = 220;
|
|
|
|
|
const int Y_MAX_LENGTH = 220;
|
|
|
|
|
const int Z_MAX_LENGTH = 100;
|
2010-05-02 19:39:31 +00:00
|
|
|
|
2010-08-12 03:50:51 +00:00
|
|
|
#define BAUDRATE 115200
|
2010-05-02 19:39:31 +00:00
|
|
|
|
2011-05-20 08:25:34 +00:00
|
|
|
//Uncomment the following line to enable debugging. You can better control debugging below the following line
|
|
|
|
|
//#define DEBUG
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
#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
|
|
|
|
|
#endif
|
2011-03-28 16:15:38 +00:00
|
|
|
|
2010-08-30 00:45:38 +00:00
|
|
|
#endif
|