1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Merged fetched files from Marlin_v1 branch

Pull requests: #414 #433 #432 #428
This commit is contained in:
Dirk Eichel 2013-03-26 21:43:04 +01:00
commit 4e448b700a
6 changed files with 268 additions and 63 deletions

View File

@ -38,6 +38,7 @@
// 7 = Ultimaker
// 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare)
// 8 = Teensylu
// 80 = Rumba
// 81 = Printrboard (AT90USB1286)
// 82 = Brainwave (AT90USB646)
// 9 = Gen3+
@ -117,7 +118,8 @@
// PID settings:
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#define PID_MAX 256 // limits current to nozzle; 256=full current
#define BANG_MAX 256 // limits current to nozzle while in bang-bang mode; 256=full current
#define PID_MAX 256 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 256=full current
#ifdef PIDTEMP
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX

View File

@ -376,6 +376,14 @@ void setup()
setup_photpin();
lcd_init();
#ifdef CONTROLLERFAN_PIN
SET_OUTPUT(CONTROLLERFAN_PIN); //Set pin used for driver cooling fan
#endif
#ifdef EXTRUDERFAN_PIN
SET_OUTPUT(EXTRUDERFAN_PIN); //Set pin used for extruder cooling fan
#endif
}
@ -1953,6 +1961,27 @@ void controllerFan()
}
#endif
#ifdef EXTRUDERFAN_PIN
unsigned long lastExtruderCheck = 0;
void extruderFan()
{
if ((millis() - lastExtruderCheck) >= 2500) //Not a time critical function, so we only check every 2500ms
{
lastExtruderCheck = millis();
if (degHotend(active_extruder) < EXTRUDERFAN_DEC)
{
WRITE(EXTRUDERFAN_PIN, LOW); //... turn the fan off
}
else
{
WRITE(EXTRUDERFAN_PIN, HIGH); //... turn the fan on
}
}
}
#endif
void manage_inactivity()
{
if( (millis() - previous_millis_cmd) > max_inactive_time )

View File

@ -26,6 +26,9 @@
#if MOTHERBOARD == 7 || MOTHERBOARD == 71
#define MACHINE_NAME "Ultimaker"
#define FIRMWARE_URL "http://firmware.ultimaker.com"
#elif MOTHERBOARD == 80
#define MACHINE_NAME "Rumba"
#define FIRMWARE_URL "https://github.com/ErikZalm/Marlin/"
#else
#define MACHINE_NAME "Mendel"
#define FIRMWARE_URL "http://www.mendel-parts.com"
@ -1461,5 +1464,9 @@
#define MSG_ERR_LONG_EXTRUDE_STOP " liian pitka pursotus estetty"
#endif
<<<<<<< HEAD
#endif // ifndef LANGUAGE_H
=======
#endif // ifndef LANGUAGE_H
>>>>>>> origin/Marlin_v1

View File

@ -979,6 +979,93 @@
#endif
/****************************************************************************************
* RUMBA pin assignment
*
****************************************************************************************/
#if MOTHERBOARD == 80
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define X_STEP_PIN 17
#define X_DIR_PIN 16
#define X_ENABLE_PIN 48
#define X_MIN_PIN 37
#define X_MAX_PIN 36
#define Y_STEP_PIN 54
#define Y_DIR_PIN 47
#define Y_ENABLE_PIN 55
#define Y_MIN_PIN 35
#define Y_MAX_PIN 34
#define Z_STEP_PIN 57
#define Z_DIR_PIN 56
#define Z_ENABLE_PIN 62
#define Z_MIN_PIN 33
#define Z_MAX_PIN 32
#define E0_STEP_PIN 23
#define E0_DIR_PIN 22
#define E0_ENABLE_PIN 24
#define E1_STEP_PIN 26
#define E1_DIR_PIN 25
#define E1_ENABLE_PIN 27
#define E2_STEP_PIN 29
#define E2_DIR_PIN 28
#define E2_ENABLE_PIN 39
#define LED_PIN 13
#define FAN_PIN 7
//additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
#define PS_ON_PIN 45
#define KILL_PIN 46
#define HEATER_0_PIN 2 // EXTRUDER 1
#define HEATER_1_PIN 3 // EXTRUDER 2
#define HEATER_2_PIN 6 // EXTRUDER 3
//optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
#define HEATER_BED_PIN 9 // BED
#define TEMP_0_PIN 15 // ANALOG NUMBERING
#define TEMP_1_PIN 14 // ANALOG NUMBERING
#define TEMP_2_PIN 13 // ANALOG NUMBERING
//optional for extruder 4 or chamber: #define TEMP_2_PIN 12 // ANALOG NUMBERING
#define TEMP_BED_PIN 11 // ANALOG NUMBERING
#define SDPOWER -1
#define SDSS 53
#define SDCARDDETECT 49
#define BEEPER 44
#define LCD_PINS_RS 19
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 18
#define LCD_PINS_D5 38
#define LCD_PINS_D6 41
#define LCD_PINS_D7 40
#define BTN_EN1 11
#define BTN_EN2 12
#define BTN_ENC 43
//encoder rotation values
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#endif //MOTHERBOARD==80
/****************************************************************************************
* Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
* Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!

View File

@ -325,10 +325,10 @@ void manage_heater()
#ifndef PID_OPENLOOP
pid_error[e] = target_temperature[e] - pid_input;
if(pid_error[e] > PID_FUNCTIONAL_RANGE) {
pid_output = PID_MAX;
pid_output = BANG_MAX;
pid_reset[e] = true;
}
else if(pid_error[e] < -PID_FUNCTIONAL_RANGE) {
else if(pid_error[e] < -PID_FUNCTIONAL_RANGE || target_temperature[e] == 0) {
pid_output = 0;
pid_reset[e] = true;
}

View File

@ -254,61 +254,63 @@ const short temptable_6[][2] PROGMEM = {
#if (THERMISTORHEATER_0 == 7) || (THERMISTORHEATER_1 == 7) || (THERMISTORHEATER_2 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01
const short temptable_7[][2] PROGMEM = {
{1*OVERSAMPLENR, 500},
{46*OVERSAMPLENR, 270}, //top rating 300C
{50*OVERSAMPLENR, 265},
{54*OVERSAMPLENR, 260},
{58*OVERSAMPLENR, 255},
{62*OVERSAMPLENR, 250},
{67*OVERSAMPLENR, 245},
{72*OVERSAMPLENR, 240},
{79*OVERSAMPLENR, 235},
{85*OVERSAMPLENR, 230},
{91*OVERSAMPLENR, 225},
{99*OVERSAMPLENR, 220},
{107*OVERSAMPLENR, 215},
{116*OVERSAMPLENR, 210},
{126*OVERSAMPLENR, 205},
{136*OVERSAMPLENR, 200},
{149*OVERSAMPLENR, 195},
{160*OVERSAMPLENR, 190},
{175*OVERSAMPLENR, 185},
{191*OVERSAMPLENR, 180},
{209*OVERSAMPLENR, 175},
{224*OVERSAMPLENR, 170},
{246*OVERSAMPLENR, 165},
{267*OVERSAMPLENR, 160},
{293*OVERSAMPLENR, 155},
{316*OVERSAMPLENR, 150},
{340*OVERSAMPLENR, 145},
{364*OVERSAMPLENR, 140},
{396*OVERSAMPLENR, 135},
{425*OVERSAMPLENR, 130},
{460*OVERSAMPLENR, 125},
{489*OVERSAMPLENR, 120},
{526*OVERSAMPLENR, 115},
{558*OVERSAMPLENR, 110},
{591*OVERSAMPLENR, 105},
{628*OVERSAMPLENR, 100},
{660*OVERSAMPLENR, 95},
{696*OVERSAMPLENR, 90},
{733*OVERSAMPLENR, 85},
{761*OVERSAMPLENR, 80},
{794*OVERSAMPLENR, 75},
{819*OVERSAMPLENR, 70},
{847*OVERSAMPLENR, 65},
{870*OVERSAMPLENR, 60},
{892*OVERSAMPLENR, 55},
{911*OVERSAMPLENR, 50},
{929*OVERSAMPLENR, 45},
{944*OVERSAMPLENR, 40},
{959*OVERSAMPLENR, 35},
{971*OVERSAMPLENR, 30},
{981*OVERSAMPLENR, 25},
{989*OVERSAMPLENR, 20},
{994*OVERSAMPLENR, 15},
{1001*OVERSAMPLENR, 10},
{1005*OVERSAMPLENR, 5},
{1*OVERSAMPLENR, 941},
{19*OVERSAMPLENR, 362},
{37*OVERSAMPLENR, 299}, //top rating 300C
{55*OVERSAMPLENR, 266},
{73*OVERSAMPLENR, 245},
{91*OVERSAMPLENR, 229},
{109*OVERSAMPLENR, 216},
{127*OVERSAMPLENR, 206},
{145*OVERSAMPLENR, 197},
{163*OVERSAMPLENR, 190},
{181*OVERSAMPLENR, 183},
{199*OVERSAMPLENR, 177},
{217*OVERSAMPLENR, 171},
{235*OVERSAMPLENR, 166},
{253*OVERSAMPLENR, 162},
{271*OVERSAMPLENR, 157},
{289*OVERSAMPLENR, 153},
{307*OVERSAMPLENR, 149},
{325*OVERSAMPLENR, 146},
{343*OVERSAMPLENR, 142},
{361*OVERSAMPLENR, 139},
{379*OVERSAMPLENR, 135},
{397*OVERSAMPLENR, 132},
{415*OVERSAMPLENR, 129},
{433*OVERSAMPLENR, 126},
{451*OVERSAMPLENR, 123},
{469*OVERSAMPLENR, 121},
{487*OVERSAMPLENR, 118},
{505*OVERSAMPLENR, 115},
{523*OVERSAMPLENR, 112},
{541*OVERSAMPLENR, 110},
{559*OVERSAMPLENR, 107},
{577*OVERSAMPLENR, 105},
{595*OVERSAMPLENR, 102},
{613*OVERSAMPLENR, 99},
{631*OVERSAMPLENR, 97},
{649*OVERSAMPLENR, 94},
{667*OVERSAMPLENR, 92},
{685*OVERSAMPLENR, 89},
{703*OVERSAMPLENR, 86},
{721*OVERSAMPLENR, 84},
{739*OVERSAMPLENR, 81},
{757*OVERSAMPLENR, 78},
{775*OVERSAMPLENR, 75},
{793*OVERSAMPLENR, 72},
{811*OVERSAMPLENR, 69},
{829*OVERSAMPLENR, 66},
{847*OVERSAMPLENR, 62},
{865*OVERSAMPLENR, 59},
{883*OVERSAMPLENR, 55},
{901*OVERSAMPLENR, 51},
{919*OVERSAMPLENR, 46},
{937*OVERSAMPLENR, 41},
{955*OVERSAMPLENR, 35},
{973*OVERSAMPLENR, 27},
{991*OVERSAMPLENR, 17},
{1009*OVERSAMPLENR, 1},
{1023*OVERSAMPLENR, 0} //to allow internal 0 degrees C
};
#endif
@ -554,6 +556,84 @@ const short temptable_55[][2] PROGMEM = {
};
#endif
#if (THERMISTORHEATER_0 == 60) || (THERMISTORHEATER_1 == 60) || (THERMISTORHEATER_2 == 60) || (THERMISTORBED == 60) // Maker's Tool Works Kapton Bed Thermister
const short temptable_60[][2] PROGMEM = {
{51*OVERSAMPLENR, 272},
{61*OVERSAMPLENR, 258},
{71*OVERSAMPLENR, 247},
{81*OVERSAMPLENR, 237},
{91*OVERSAMPLENR, 229},
{101*OVERSAMPLENR, 221},
{131*OVERSAMPLENR, 204},
{161*OVERSAMPLENR, 190},
{191*OVERSAMPLENR, 179},
{231*OVERSAMPLENR, 167},
{271*OVERSAMPLENR, 157},
{311*OVERSAMPLENR, 148},
{351*OVERSAMPLENR, 140},
{381*OVERSAMPLENR, 135},
{411*OVERSAMPLENR, 130},
{441*OVERSAMPLENR, 125},
{451*OVERSAMPLENR, 123},
{461*OVERSAMPLENR, 122},
{471*OVERSAMPLENR, 120},
{481*OVERSAMPLENR, 119},
{491*OVERSAMPLENR, 117},
{501*OVERSAMPLENR, 116},
{511*OVERSAMPLENR, 114},
{521*OVERSAMPLENR, 113},
{531*OVERSAMPLENR, 111},
{541*OVERSAMPLENR, 110},
{551*OVERSAMPLENR, 108},
{561*OVERSAMPLENR, 107},
{571*OVERSAMPLENR, 105},
{581*OVERSAMPLENR, 104},
{591*OVERSAMPLENR, 102},
{601*OVERSAMPLENR, 101},
{611*OVERSAMPLENR, 100},
{621*OVERSAMPLENR, 98},
{631*OVERSAMPLENR, 97},
{641*OVERSAMPLENR, 95},
{651*OVERSAMPLENR, 94},
{661*OVERSAMPLENR, 92},
{671*OVERSAMPLENR, 91},
{681*OVERSAMPLENR, 90},
{691*OVERSAMPLENR, 88},
{701*OVERSAMPLENR, 87},
{711*OVERSAMPLENR, 85},
{721*OVERSAMPLENR, 84},
{731*OVERSAMPLENR, 82},
{741*OVERSAMPLENR, 81},
{751*OVERSAMPLENR, 79},
{761*OVERSAMPLENR, 77},
{771*OVERSAMPLENR, 76},
{781*OVERSAMPLENR, 74},
{791*OVERSAMPLENR, 72},
{801*OVERSAMPLENR, 71},
{811*OVERSAMPLENR, 69},
{821*OVERSAMPLENR, 67},
{831*OVERSAMPLENR, 65},
{841*OVERSAMPLENR, 63},
{851*OVERSAMPLENR, 62},
{861*OVERSAMPLENR, 60},
{871*OVERSAMPLENR, 57},
{881*OVERSAMPLENR, 55},
{891*OVERSAMPLENR, 53},
{901*OVERSAMPLENR, 51},
{911*OVERSAMPLENR, 48},
{921*OVERSAMPLENR, 45},
{931*OVERSAMPLENR, 42},
{941*OVERSAMPLENR, 39},
{951*OVERSAMPLENR, 36},
{961*OVERSAMPLENR, 32},
{981*OVERSAMPLENR, 23},
{991*OVERSAMPLENR, 17},
{1001*OVERSAMPLENR, 9},
{1008*OVERSAMPLENR, 0},
};
#endif
#define _TT_NAME(_N) temptable_ ## _N
#define TT_NAME(_N) _TT_NAME(_N)