Merge pull request #563 from njprossi/Marlin_v1

Improvment for delta, Honeywell thermistor table and move from panel
This commit is contained in:
ErikZalm 2013-08-03 08:05:26 -07:00
commit 07f029c2d5
6 changed files with 179 additions and 11 deletions

View File

@ -107,6 +107,9 @@
#define DELTA_TOWER3_X 0.0 // back middle tower #define DELTA_TOWER3_X 0.0 // back middle tower
#define DELTA_TOWER3_Y DELTA_RADIUS #define DELTA_TOWER3_Y DELTA_RADIUS
// Diagonal rod squared
#define DELTA_DIAGONAL_ROD_2 pow(DELTA_DIAGONAL_ROD,2)
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================
//=========================================================================== //===========================================================================
@ -124,6 +127,7 @@
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan) (4.7k pullup) // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan) (4.7k pullup)
// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) // 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) // 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) // 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) // 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
// 10 is 100k RS thermistor 198-961 (4.7k pullup) // 10 is 100k RS thermistor 198-961 (4.7k pullup)

View File

@ -193,6 +193,11 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// Feedrates for manual moves along X, Y, Z, E from panel
#ifdef ULTIPANEL
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // set the speeds for manual moves (mm/min)
#endif
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000

View File

@ -2254,15 +2254,15 @@ void clamp_to_software_endstops(float target[3])
#ifdef DELTA #ifdef DELTA
void calculate_delta(float cartesian[3]) void calculate_delta(float cartesian[3])
{ {
delta[X_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD) delta[X_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2
- sq(DELTA_TOWER1_X-cartesian[X_AXIS]) - sq(DELTA_TOWER1_X-cartesian[X_AXIS])
- sq(DELTA_TOWER1_Y-cartesian[Y_AXIS]) - sq(DELTA_TOWER1_Y-cartesian[Y_AXIS])
) + cartesian[Z_AXIS]; ) + cartesian[Z_AXIS];
delta[Y_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD) delta[Y_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2
- sq(DELTA_TOWER2_X-cartesian[X_AXIS]) - sq(DELTA_TOWER2_X-cartesian[X_AXIS])
- sq(DELTA_TOWER2_Y-cartesian[Y_AXIS]) - sq(DELTA_TOWER2_Y-cartesian[Y_AXIS])
) + cartesian[Z_AXIS]; ) + cartesian[Z_AXIS];
delta[Z_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD) delta[Z_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2
- sq(DELTA_TOWER3_X-cartesian[X_AXIS]) - sq(DELTA_TOWER3_X-cartesian[X_AXIS])
- sq(DELTA_TOWER3_Y-cartesian[Y_AXIS]) - sq(DELTA_TOWER3_Y-cartesian[Y_AXIS])
) + cartesian[Z_AXIS]; ) + cartesian[Z_AXIS];

View File

@ -195,6 +195,11 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
// Feedrates for manual moves along X, Y, Z, E from panel
#ifdef ULTIPANEL
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // set the speeds for manual moves (mm/min)
#endif
// minimum time in microseconds that a movement needs to take if the buffer is emptied. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000

View File

@ -314,6 +314,158 @@ const short temptable_7[][2] PROGMEM = {
{1023*OVERSAMPLENR, 0} //to allow internal 0 degrees C {1023*OVERSAMPLENR, 0} //to allow internal 0 degrees C
}; };
#endif #endif
#if (THERMISTORHEATER_0 == 71) || (THERMISTORHEATER_1 == 71) || (THERMISTORHEATER_2 == 71) || (THERMISTORBED == 71) // 100k Honeywell 135-104LAF-J01
// R0 = 100000 Ohm
// T0 = 25 °C
// Beta = 3974
// R1 = 0 Ohm
// R2 = 4700 Ohm
const short temptable_71[][2] PROGMEM = {
{35*OVERSAMPLENR, 300},
{51*OVERSAMPLENR, 270},
{54*OVERSAMPLENR, 265},
{58*OVERSAMPLENR, 260},
{59*OVERSAMPLENR, 258},
{61*OVERSAMPLENR, 256},
{63*OVERSAMPLENR, 254},
{64*OVERSAMPLENR, 252},
{66*OVERSAMPLENR, 250},
{67*OVERSAMPLENR, 249},
{68*OVERSAMPLENR, 248},
{69*OVERSAMPLENR, 247},
{70*OVERSAMPLENR, 246},
{71*OVERSAMPLENR, 245},
{72*OVERSAMPLENR, 244},
{73*OVERSAMPLENR, 243},
{74*OVERSAMPLENR, 242},
{75*OVERSAMPLENR, 241},
{76*OVERSAMPLENR, 240},
{77*OVERSAMPLENR, 239},
{78*OVERSAMPLENR, 238},
{79*OVERSAMPLENR, 237},
{80*OVERSAMPLENR, 236},
{81*OVERSAMPLENR, 235},
{82*OVERSAMPLENR, 234},
{84*OVERSAMPLENR, 233},
{85*OVERSAMPLENR, 232},
{86*OVERSAMPLENR, 231},
{87*OVERSAMPLENR, 230},
{89*OVERSAMPLENR, 229},
{90*OVERSAMPLENR, 228},
{91*OVERSAMPLENR, 227},
{92*OVERSAMPLENR, 226},
{94*OVERSAMPLENR, 225},
{95*OVERSAMPLENR, 224},
{97*OVERSAMPLENR, 223},
{98*OVERSAMPLENR, 222},
{99*OVERSAMPLENR, 221},
{101*OVERSAMPLENR, 220},
{102*OVERSAMPLENR, 219},
{104*OVERSAMPLENR, 218},
{106*OVERSAMPLENR, 217},
{107*OVERSAMPLENR, 216},
{109*OVERSAMPLENR, 215},
{110*OVERSAMPLENR, 214},
{112*OVERSAMPLENR, 213},
{114*OVERSAMPLENR, 212},
{115*OVERSAMPLENR, 211},
{117*OVERSAMPLENR, 210},
{119*OVERSAMPLENR, 209},
{121*OVERSAMPLENR, 208},
{123*OVERSAMPLENR, 207},
{125*OVERSAMPLENR, 206},
{126*OVERSAMPLENR, 205},
{128*OVERSAMPLENR, 204},
{130*OVERSAMPLENR, 203},
{132*OVERSAMPLENR, 202},
{134*OVERSAMPLENR, 201},
{136*OVERSAMPLENR, 200},
{139*OVERSAMPLENR, 199},
{141*OVERSAMPLENR, 198},
{143*OVERSAMPLENR, 197},
{145*OVERSAMPLENR, 196},
{147*OVERSAMPLENR, 195},
{150*OVERSAMPLENR, 194},
{152*OVERSAMPLENR, 193},
{154*OVERSAMPLENR, 192},
{157*OVERSAMPLENR, 191},
{159*OVERSAMPLENR, 190},
{162*OVERSAMPLENR, 189},
{164*OVERSAMPLENR, 188},
{167*OVERSAMPLENR, 187},
{170*OVERSAMPLENR, 186},
{172*OVERSAMPLENR, 185},
{175*OVERSAMPLENR, 184},
{178*OVERSAMPLENR, 183},
{181*OVERSAMPLENR, 182},
{184*OVERSAMPLENR, 181},
{187*OVERSAMPLENR, 180},
{190*OVERSAMPLENR, 179},
{193*OVERSAMPLENR, 178},
{196*OVERSAMPLENR, 177},
{199*OVERSAMPLENR, 176},
{202*OVERSAMPLENR, 175},
{205*OVERSAMPLENR, 174},
{208*OVERSAMPLENR, 173},
{212*OVERSAMPLENR, 172},
{215*OVERSAMPLENR, 171},
{219*OVERSAMPLENR, 170},
{237*OVERSAMPLENR, 165},
{256*OVERSAMPLENR, 160},
{300*OVERSAMPLENR, 150},
{351*OVERSAMPLENR, 140},
{470*OVERSAMPLENR, 120},
{504*OVERSAMPLENR, 115},
{538*OVERSAMPLENR, 110},
{552*OVERSAMPLENR, 108},
{566*OVERSAMPLENR, 106},
{580*OVERSAMPLENR, 104},
{594*OVERSAMPLENR, 102},
{608*OVERSAMPLENR, 100},
{622*OVERSAMPLENR, 98},
{636*OVERSAMPLENR, 96},
{650*OVERSAMPLENR, 94},
{664*OVERSAMPLENR, 92},
{678*OVERSAMPLENR, 90},
{712*OVERSAMPLENR, 85},
{745*OVERSAMPLENR, 80},
{758*OVERSAMPLENR, 78},
{770*OVERSAMPLENR, 76},
{783*OVERSAMPLENR, 74},
{795*OVERSAMPLENR, 72},
{806*OVERSAMPLENR, 70},
{818*OVERSAMPLENR, 68},
{829*OVERSAMPLENR, 66},
{840*OVERSAMPLENR, 64},
{850*OVERSAMPLENR, 62},
{860*OVERSAMPLENR, 60},
{870*OVERSAMPLENR, 58},
{879*OVERSAMPLENR, 56},
{888*OVERSAMPLENR, 54},
{897*OVERSAMPLENR, 52},
{905*OVERSAMPLENR, 50},
{924*OVERSAMPLENR, 45},
{940*OVERSAMPLENR, 40},
{955*OVERSAMPLENR, 35},
{967*OVERSAMPLENR, 30},
{970*OVERSAMPLENR, 29},
{972*OVERSAMPLENR, 28},
{974*OVERSAMPLENR, 27},
{976*OVERSAMPLENR, 26},
{978*OVERSAMPLENR, 25},
{980*OVERSAMPLENR, 24},
{982*OVERSAMPLENR, 23},
{984*OVERSAMPLENR, 22},
{985*OVERSAMPLENR, 21},
{987*OVERSAMPLENR, 20},
{995*OVERSAMPLENR, 15},
{1001*OVERSAMPLENR, 10},
{1006*OVERSAMPLENR, 5},
{1010*OVERSAMPLENR, 0},
};
#endif
#if (THERMISTORHEATER_0 == 8) || (THERMISTORHEATER_1 == 8) || (THERMISTORHEATER_2 == 8) || (THERMISTORBED == 8) #if (THERMISTORHEATER_0 == 8) || (THERMISTORHEATER_1 == 8) || (THERMISTORHEATER_2 == 8) || (THERMISTORBED == 8)
// 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
const short temptable_8[][2] PROGMEM = { const short temptable_8[][2] PROGMEM = {

View File

@ -18,6 +18,8 @@ int plaPreheatFanSpeed;
int absPreheatHotendTemp; int absPreheatHotendTemp;
int absPreheatHPBTemp; int absPreheatHPBTemp;
int absPreheatFanSpeed; int absPreheatFanSpeed;
static float manual_feedrate[] = MANUAL_FEEDRATE;
/* !Configuration settings */ /* !Configuration settings */
//Function pointer to menu functions. //Function pointer to menu functions.
@ -377,9 +379,9 @@ static void lcd_move_x()
encoderPosition = 0; encoderPosition = 0;
#ifdef DELTA #ifdef DELTA
calculate_delta(current_position); calculate_delta(current_position);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], 600, active_extruder); plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder);
#else #else
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600, active_extruder); plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder);
#endif #endif
lcdDrawUpdate = 1; lcdDrawUpdate = 1;
} }
@ -406,9 +408,9 @@ static void lcd_move_y()
encoderPosition = 0; encoderPosition = 0;
#ifdef DELTA #ifdef DELTA
calculate_delta(current_position); calculate_delta(current_position);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], 600, active_extruder); plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[Y_AXIS]/60, active_extruder);
#else #else
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600, active_extruder); plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[Y_AXIS]/60, active_extruder);
#endif #endif
lcdDrawUpdate = 1; lcdDrawUpdate = 1;
} }
@ -435,9 +437,9 @@ static void lcd_move_z()
encoderPosition = 0; encoderPosition = 0;
#ifdef DELTA #ifdef DELTA
calculate_delta(current_position); calculate_delta(current_position);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS]/60, active_extruder); plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[Z_AXIS]/60, active_extruder);
#else #else
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS]/60, active_extruder); plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[Z_AXIS]/60, active_extruder);
#endif #endif
lcdDrawUpdate = 1; lcdDrawUpdate = 1;
} }
@ -460,9 +462,9 @@ static void lcd_move_e()
encoderPosition = 0; encoderPosition = 0;
#ifdef DELTA #ifdef DELTA
calculate_delta(current_position); calculate_delta(current_position);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], 20, active_extruder); plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[E_AXIS]/60, active_extruder);
#else #else
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 20, active_extruder); plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[E_AXIS]/60, active_extruder);
#endif #endif
lcdDrawUpdate = 1; lcdDrawUpdate = 1;
} }