Merge branch 'MK3' into MK3

This commit is contained in:
XPila 2017-11-13 18:48:19 +01:00 committed by GitHub
commit dfe3541d2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 4355 additions and 2194 deletions

View File

@ -9,7 +9,8 @@
// Firmware version
#define FW_version "3.0.12-RC2"
#define FW_build 107
//#define FW_build 107
#define FW_build --BUILD-NUMBER--
#define FW_version_build FW_version " b" STR(FW_build)
@ -101,6 +102,8 @@
#define EEPROM_XYZ_CAL_SKEW (EEPROM_POWER_COUNT - 4) //float for skew backup
#define EEPROM_WIZARD_ACTIVE (EEPROM_XYZ_CAL_SKEW - 1)
// Currently running firmware, each digit stored as uint16_t.
// The flavor differentiates a dev, alpha, beta, release candidate or a release version.
#define EEPROM_FIRMWARE_VERSION_END (FW_PRUSA3D_MAGIC_LEN+8)
@ -769,7 +772,7 @@ enum CalibrationStatus
CALIBRATION_STATUS_ASSEMBLED = 255,
// For the wizard: self test has been performed, now the XYZ calibration is needed.
// CALIBRATION_STATUS_XYZ_CALIBRATION = 250,
CALIBRATION_STATUS_XYZ_CALIBRATION = 250,
// For the wizard: factory assembled, needs to run Z calibration.
CALIBRATION_STATUS_Z_CALIBRATION = 240,

View File

@ -46,7 +46,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define MANUAL_Z_HOME_POS 0.2
// Travel limits after homing
#define X_MAX_POS 255
#define X_MAX_POS 250
#define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS -12 //orig -4
@ -94,7 +94,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
//#define DEBUG_DISABLE_YMAXLIMIT //y max limit ignored
//#define DEBUG_DISABLE_ZMINLIMIT //z min limit ignored
//#define DEBUG_DISABLE_ZMAXLIMIT //z max limit ignored
#define DEBUG_DISABLE_STARTMSGS //no startup messages
//#define DEBUG_DISABLE_STARTMSGS //no startup messages
//#define DEBUG_DISABLE_MINTEMP //mintemp error ignored
//#define DEBUG_DISABLE_SWLIMITS //sw limits ignored
//#define DEBUG_DISABLE_LCD_STATUS_LINE //empty four lcd line

View File

@ -234,7 +234,6 @@ void cmdqueue_reset();
void prepare_arc_move(char isclockwise);
void clamp_to_software_endstops(float target[3]);
void refresh_cmd_timeout(void);
#ifdef FAST_PWM_FAN
@ -382,5 +381,8 @@ extern void print_world_coordinates();
extern void print_physical_coordinates();
extern void print_mesh_bed_leveling_table();
// G-codes
bool gcode_M45(bool onlyZ);
void gcode_M701();
#define UVLO !(PINE & (1<<4))

View File

@ -271,7 +271,7 @@ int extruder_multiply[EXTRUDERS] = {100
#endif
};
int bowden_length[4];
int bowden_length[4] = {385, 385, 385, 385};
bool is_usb_printing = false;
bool homing_flag = false;
@ -960,6 +960,7 @@ void setup()
// EEPROM_LANG to number lower than 0x0ff.
// 1) Set a high power mode.
eeprom_write_byte((uint8_t*)EEPROM_SILENT, 0);
eeprom_write_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 1); //run wizard
}
#ifdef SNMM
if (eeprom_read_dword((uint32_t*)EEPROM_BOWDEN_LENGTH) == 0x0ffffffff) { //bowden length used for SNMM
@ -992,29 +993,36 @@ void setup()
setup_uvlo_interrupt();
setup_fan_interrupt();
fsensor_setup_interrupt();
for (int i = 0; i<4; i++) EEPROM_read_B(EEPROM_BOWDEN_LENGTH + i * 2, &bowden_length[i]);
#ifndef DEBUG_DISABLE_STARTMSGS
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||
calibration_status() == CALIBRATION_STATUS_UNKNOWN) {
// Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled.
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
// Show the message.
lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
} else if (calibration_status() == CALIBRATION_STATUS_LIVE_ADJUST) {
// Show the message.
lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
lcd_update_enable(true);
} else if (calibration_status() == CALIBRATION_STATUS_CALIBRATED && temp_cal_active == true && calibration_status_pinda() == false) {
lcd_show_fullscreen_message_and_wait_P(MSG_PINDA_NOT_CALIBRATED);
lcd_update_enable(true);
} else if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION) {
// Show the message.
lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) == 1) {
lcd_wizard(0);
}
else if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) == 0) { //dont show calibration status messages if wizard is currently active
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||
calibration_status() == CALIBRATION_STATUS_UNKNOWN) {
// Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled.
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
// Show the message.
lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
}
else if (calibration_status() == CALIBRATION_STATUS_LIVE_ADJUST) {
// Show the message.
lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
lcd_update_enable(true);
}
else if (calibration_status() == CALIBRATION_STATUS_CALIBRATED && temp_cal_active == true && calibration_status_pinda() == false) {
lcd_show_fullscreen_message_and_wait_P(MSG_PINDA_NOT_CALIBRATED);
lcd_update_enable(true);
}
else if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION) {
// Show the message.
lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
}
}
#endif //DEBUG_DISABLE_STARTMSGS
for (int i = 0; i<4; i++) EEPROM_read_B(EEPROM_BOWDEN_LENGTH + i * 2, &bowden_length[i]);
lcd_update_enable(true);
lcd_implementation_clear();
lcd_update(2);
@ -1416,7 +1424,6 @@ static float probe_pt(float x, float y, float z_before) {
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
#ifdef LIN_ADVANCE
/**
* M900: Set and/or Get advance K factor and WH/D ratio
@ -1454,6 +1461,8 @@ inline void gcode_M900() {
bool calibrate_z_auto()
{
//lcd_display_message_fullscreen_P(MSG_CALIBRATE_Z_AUTO);
lcd_implementation_clear();
lcd_print_at_PGM(0,1, MSG_CALIBRATE_Z_AUTO);
bool endstops_enabled = enable_endstops(true);
int axis_up_dir = -home_dir(Z_AXIS);
tmc2130_home_enter(Z_AXIS_MASK);
@ -1477,7 +1486,7 @@ bool calibrate_z_auto()
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
st_synchronize();
enable_endstops(endstops_enabled);
current_position[Z_AXIS] = Z_MAX_POS-3.f;
current_position[Z_AXIS] = Z_MAX_POS+2.0;
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
return true;
}
@ -1734,6 +1743,178 @@ void ramming() {
}
}
*/
bool gcode_M45(bool onlyZ) {
bool final_result = false;
// Only Z calibration?
if (!onlyZ) {
setTargetBed(0);
setTargetHotend(0, 0);
setTargetHotend(0, 1);
setTargetHotend(0, 2);
adjust_bed_reset(); //reset bed level correction
}
// Disable the default update procedure of the display. We will do a modal dialog.
lcd_update_enable(false);
// Let the planner use the uncorrected coordinates.
mbl.reset();
// Reset world2machine_rotation_and_skew and world2machine_shift, therefore
// the planner will not perform any adjustments in the XY plane.
// Wait for the motors to stop and update the current position with the absolute values.
world2machine_revert_to_uncorrected();
// Reset the baby step value applied without moving the axes.
babystep_reset();
// Mark all axes as in a need for homing.
memset(axis_known_position, 0, sizeof(axis_known_position));
// Home in the XY plane.
//set_destination_to_current();
setup_for_endstop_move();
lcd_display_message_fullscreen_P(MSG_AUTO_HOME);
home_xy();
// Let the user move the Z axes up to the end stoppers.
#ifdef TMC2130
if (calibrate_z_auto()) {
#else //TMC2130
if (lcd_calibrate_z_end_stop_manual(onlyZ)) {
#endif //TMC2130
refresh_cmd_timeout();
//if (((degHotend(0) > MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) && (!onlyZ)) {
// lcd_wait_for_cool_down();
//}
if(!onlyZ){
bool result = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_STEEL_SHEET_CHECK, false, false);
if(result) lcd_show_fullscreen_message_and_wait_P(MSG_REMOVE_STEEL_SHEET);
lcd_show_fullscreen_message_and_wait_P(MSG_PAPER);
lcd_display_message_fullscreen_P(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1);
lcd_implementation_print_at(0, 2, 1);
lcd_printPGM(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2);
}
// Move the print head close to the bed.
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder);
st_synchronize();
//#ifdef TMC2130
// tmc2130_home_enter(X_AXIS_MASK | Y_AXIS_MASK);
//#endif
int8_t verbosity_level = 0;
if (code_seen('V')) {
// Just 'V' without a number counts as V1.
char c = strchr_pointer[1];
verbosity_level = (c == ' ' || c == '\t' || c == 0) ? 1 : code_value_short();
}
if (onlyZ) {
clean_up_after_endstop_move();
// Z only calibration.
// Load the machine correction matrix
world2machine_initialize();
// and correct the current_position to match the transformed coordinate system.
world2machine_update_current();
//FIXME
bool result = sample_mesh_and_store_reference();
if (result) {
if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION)
// Shipped, the nozzle height has been set already. The user can start printing now.
calibration_status_store(CALIBRATION_STATUS_CALIBRATED);
// babystep_apply();
}
}
else {
// Reset the baby step value and the baby step applied flag.
calibration_status_store(CALIBRATION_STATUS_ASSEMBLED);
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
// Complete XYZ calibration.
uint8_t point_too_far_mask = 0;
BedSkewOffsetDetectionResultType result = find_bed_offset_and_skew(verbosity_level, point_too_far_mask);
clean_up_after_endstop_move();
// Print head up.
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder);
st_synchronize();
if (result >= 0) {
point_too_far_mask = 0;
// Second half: The fine adjustment.
// Let the planner use the uncorrected coordinates.
mbl.reset();
world2machine_reset();
// Home in the XY plane.
setup_for_endstop_move();
home_xy();
result = improve_bed_offset_and_skew(1, verbosity_level, point_too_far_mask);
clean_up_after_endstop_move();
// Print head up.
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder);
st_synchronize();
// if (result >= 0) babystep_apply();
}
lcd_bed_calibration_show_result(result, point_too_far_mask);
if (result >= 0) {
// Calibration valid, the machine should be able to print. Advise the user to run the V2Calibration.gcode.
calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST);
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) != 1) lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
final_result = true;
}
}
#ifdef TMC2130
tmc2130_home_exit();
#endif
}
else {
// Timeouted.
}
lcd_update_enable(true);
return final_result;
}
void gcode_M701() {
#ifdef SNMM
extr_adj(snmm_extruder);//loads current extruder
#else
enable_z();
custom_message = true;
custom_message_type = 2;
lcd_setstatuspgm(MSG_LOADING_FILAMENT);
current_position[E_AXIS] += 70;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400 / 60, active_extruder); //fast sequence
current_position[E_AXIS] += 25;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 100 / 60, active_extruder); //slow sequence
st_synchronize();
if (!farm_mode && loading_flag) {
bool clean = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_FILAMENT_CLEAN, false, true);
while (!clean) {
lcd_update_enable(true);
lcd_update(2);
current_position[E_AXIS] += 25;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 100 / 60, active_extruder); //slow sequence
st_synchronize();
clean = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_FILAMENT_CLEAN, false, true);
}
}
lcd_update_enable(true);
lcd_update(2);
lcd_setstatuspgm(WELCOME_MSG);
disable_z();
loading_flag = false;
custom_message = false;
custom_message_type = 0;
#endif
}
void process_commands()
{
#ifdef FILAMENT_RUNOUT_SUPPORT
@ -3586,130 +3767,10 @@ void process_commands()
case 45: // M45: Prusa3D: bed skew and offset with manual Z up
{
// Only Z calibration?
bool onlyZ = code_seen('Z');
if (!onlyZ) {
setTargetBed(0);
setTargetHotend(0, 0);
setTargetHotend(0, 1);
setTargetHotend(0, 2);
adjust_bed_reset(); //reset bed level correction
}
// Disable the default update procedure of the display. We will do a modal dialog.
lcd_update_enable(false);
// Let the planner use the uncorrected coordinates.
mbl.reset();
// Reset world2machine_rotation_and_skew and world2machine_shift, therefore
// the planner will not perform any adjustments in the XY plane.
// Wait for the motors to stop and update the current position with the absolute values.
world2machine_revert_to_uncorrected();
// Reset the baby step value applied without moving the axes.
babystep_reset();
// Mark all axes as in a need for homing.
memset(axis_known_position, 0, sizeof(axis_known_position));
// Home in the XY plane.
//set_destination_to_current();
setup_for_endstop_move();
lcd_display_message_fullscreen_P(MSG_AUTO_HOME);
home_xy();
// Let the user move the Z axes up to the end stoppers.
#ifdef TMC2130
if (calibrate_z_auto()) {
#else //TMC2130
if (lcd_calibrate_z_end_stop_manual( onlyZ )) {
#endif //TMC2130
refresh_cmd_timeout();
if (((degHotend(0) > MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) && (!onlyZ)) {
lcd_wait_for_cool_down();
lcd_show_fullscreen_message_and_wait_P(MSG_PAPER);
lcd_display_message_fullscreen_P(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1);
lcd_implementation_print_at(0, 2, 1);
lcd_printPGM(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2);
}
// Move the print head close to the bed.
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS],current_position[Z_AXIS] , current_position[E_AXIS], homing_feedrate[Z_AXIS]/40, active_extruder);
st_synchronize();
//#ifdef TMC2130
// tmc2130_home_enter(X_AXIS_MASK | Y_AXIS_MASK);
//#endif
int8_t verbosity_level = 0;
if (code_seen('V')) {
// Just 'V' without a number counts as V1.
char c = strchr_pointer[1];
verbosity_level = (c == ' ' || c == '\t' || c == 0) ? 1 : code_value_short();
}
if (onlyZ) {
clean_up_after_endstop_move();
// Z only calibration.
// Load the machine correction matrix
world2machine_initialize();
// and correct the current_position to match the transformed coordinate system.
world2machine_update_current();
//FIXME
bool result = sample_mesh_and_store_reference();
if (result) {
if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION)
// Shipped, the nozzle height has been set already. The user can start printing now.
calibration_status_store(CALIBRATION_STATUS_CALIBRATED);
// babystep_apply();
}
} else {
// Reset the baby step value and the baby step applied flag.
calibration_status_store(CALIBRATION_STATUS_ASSEMBLED);
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
// Complete XYZ calibration.
uint8_t point_too_far_mask = 0;
BedSkewOffsetDetectionResultType result = find_bed_offset_and_skew(verbosity_level, point_too_far_mask);
clean_up_after_endstop_move();
// Print head up.
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS],current_position[Z_AXIS] , current_position[E_AXIS], homing_feedrate[Z_AXIS]/40, active_extruder);
st_synchronize();
if (result >= 0) {
point_too_far_mask = 0;
// Second half: The fine adjustment.
// Let the planner use the uncorrected coordinates.
mbl.reset();
world2machine_reset();
// Home in the XY plane.
setup_for_endstop_move();
home_xy();
result = improve_bed_offset_and_skew(1, verbosity_level, point_too_far_mask);
clean_up_after_endstop_move();
// Print head up.
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS],current_position[Z_AXIS] , current_position[E_AXIS], homing_feedrate[Z_AXIS]/40, active_extruder);
st_synchronize();
// if (result >= 0) babystep_apply();
}
lcd_bed_calibration_show_result(result, point_too_far_mask);
if (result >= 0) {
// Calibration valid, the machine should be able to print. Advise the user to run the V2Calibration.gcode.
calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST);
lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
}
}
#ifdef TMC2130
tmc2130_home_exit();
#endif
} else {
// Timeouted.
}
lcd_update_enable(true);
break;
bool only_Z = code_seen('Z');
gcode_M45(only_Z);
}
break;
/*
case 46:
@ -5540,37 +5601,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
break;
case 701: //M701: load filament
{
enable_z();
custom_message = true;
custom_message_type = 2;
lcd_setstatuspgm(MSG_LOADING_FILAMENT);
current_position[E_AXIS] += 70;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400 / 60, active_extruder); //fast sequence
current_position[E_AXIS] += 25;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 100 / 60, active_extruder); //slow sequence
st_synchronize();
if (!farm_mode && loading_flag) {
bool clean = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_FILAMENT_CLEAN, false, true);
while (!clean) {
lcd_update_enable(true);
lcd_update(2);
current_position[E_AXIS] += 25;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 100 / 60, active_extruder); //slow sequence
st_synchronize();
clean = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_FILAMENT_CLEAN, false, true);
}
}
lcd_update_enable(true);
lcd_update(2);
lcd_setstatuspgm(WELCOME_MSG);
disable_z();
loading_flag = false;
custom_message = false;
custom_message_type = 0;
gcode_M701();
}
break;
case 702:

View File

@ -310,6 +310,11 @@ void enquecommand(const char *cmd, bool from_progmem)
}
}
bool cmd_buffer_empty()
{
return (buflen == 0);
}
void enquecommand_front(const char *cmd, bool from_progmem)
{
int len = from_progmem ? strlen_P(cmd) : strlen(cmd);

View File

@ -59,6 +59,7 @@ extern bool cmdqueue_could_enqueue_back(int len_asked, bool atomic_update = fals
extern void cmdqueue_dump_to_serial_single_line(int nr, const char *p);
extern void cmdqueue_dump_to_serial();
#endif /* CMDBUFFER_DEBUG */
extern bool cmd_buffer_empty();
extern void enquecommand(const char *cmd, bool from_progmem);
extern void enquecommand_front(const char *cmd, bool from_progmem);
extern void repeatcommand_front();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -302,3 +302,27 @@
#define MSG_EXTRUDER_2 "Extruder 2"
#define MSG_EXTRUDER_3 "Extruder 3"
#define MSG_EXTRUDER_4 "Extruder 4"
#define MSG_WIZARD "Wizard"
#define MSG_WIZARD_WELCOME "Dobry den, jsem vase tiskarna Original Prusa i3. Chcete abych Vas provedla kalibracnim procesem?"
#define MSG_WIZARD_QUIT "Wizarda muzete kdykoliv znovu spustit z menu Calibration -> Wizard"
#define MSG_WIZARD_SELFTEST "Nejdriv pomoci selftestu zkontoluji nejcastejsi chyby vznikajici pri sestaveni tiskarny."
#define MSG_WIZARD_CALIBRATION_FAILED "Prosim nahlednete do manualu a opravte problem. Po te obnovte Wizarda rebootovanim tiskarny."
#define MSG_WIZARD_XYZ_CAL "Nyni provedu xyz kalibraci. Zabere to priblizne 12 min."
#define MSG_WIZARD_FILAMENT_LOADED "Je filament zaveden?"
#define MSG_WIZARD_Z_CAL "Nyni provedu z kalibraci."
#define MSG_WIZARD_WILL_PREHEAT "Nyni predehreji trysku pro PLA."
#define MSG_WIZARD_V2_CAL "Nyni zkalibruji vzdalenost mezi koncem trysky a povrchem heatbedu."
#define MSG_WIZARD_V2_CAL_2 "Zacnu tisknout linku a Vy budete postupne snizovat trysku otacenim tlacitka dokud nedosahnete optimalni vysky. Prohlednete si obrazky v nasi prirucce v kapitole Kalibrace"
#define MSG_V2_CALIBRATION "Kal. prvni vrstvy"
#define MSG_WIZARD_DONE "Vse je hotovo."
#define MSG_WIZARD_LOAD_FILAMENT "Prosim vlozte PLA filament do extruderu, po te stisknete tlacitko pro zavedeni filamentu."
#define MSG_WIZARD_RERUN "Spusteni Wizarda vymaze ulozene vysledky vsech kalibraci a spusti kalibracni proces od zacatku. Pokracovat?"
#define MSG_WIZARD_REPEAT_V2_CAL "Chcete opakovat posledni krok a pozmenit vzdalenost mezi tryskou a heatbed?"
#define MSG_WIZARD_CLEAN_HEATBED "Prosim ocistete heatbed a stisknete tlacitko."
#define MSG_WIZARD_PLA_FILAMENT "Je to PLA filament?"
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Prosim zavedte PLA filament a po te obnovte Wizarda stisknutim reset tlacitka."
#define MSG_PLA_FILAMENT_LOADED "Je PLA filament zaveden?"
#define MSG_PLEASE_LOAD_PLA "Nejdrive zavedte PLA filament prosim."
#define MSG_WIZARD_HEATING "Predehrivam trysku. Prosim cekejte."
#define MSG_M117_V2_CALIBRATION "M117 Kal. prvni vrstvy"

View File

@ -315,3 +315,27 @@
#define MSG_EXTRUDER_2 "Extruder 2"
#define MSG_EXTRUDER_3 "Extruder 3"
#define MSG_EXTRUDER_4 "Extruder 4"
#define MSG_WIZARD "Wizard"
#define MSG_WIZARD_WELCOME "Hallo, ich bin dein Original Prusa i3 Drucker. Moechten Sie meine Hilfe durch den Setup-Prozess?"
#define MSG_WIZARD_QUIT "Sie koennen immer den Asistenten im Menu neu aufrufen: Kalibrierung -> Assistant"
#define MSG_WIZARD_SELFTEST "Zunaechst fuehre ich den Selbsttest durch um die haeufigsten Probleme bei der Aufbau zu ueberpruefen."
#define MSG_WIZARD_CALIBRATION_FAILED "Bitte ueberpruefen Sie unser Handbuch und beheben Sie das Problem. Fahren Sie dann mit dem Assistenten fort, indem Sie den Drucker neu starten."
#define MSG_WIZARD_XYZ_CAL "Ich werde jetzt die XYZ-Kalibrierung durchfuehren. Es wird ca. 12 Minuten dauern"
#define MSG_WIZARD_FILAMENT_LOADED "Ist das Filament geladen?"
#define MSG_WIZARD_Z_CAL "Ich werde jetzt die Z Kalibrierung durchfuehren."
#define MSG_WIZARD_WILL_PREHEAT "Jetzt werde ich die Duese fuer PLA vorheizen. "
#define MSG_WIZARD_V2_CAL "Jetzt werde ich den Abstand zwischen Duesenspitze und Druckbett kalibrieren."
#define MSG_WIZARD_V2_CAL_2 "Ich werde jetzt erste Linie drucken. Waehrend des Druckes koennen Sie die Duese allmaehlich senken indem Sie den Knopf drehen, bis Sie die optimale Hoehe erreichen. Ueberpruefen Sie die Bilder in unserem Handbuch im Kapitel Kalibrierung"
#define MSG_V2_CALIBRATION "Erste-Schicht Kal"
#define MSG_WIZARD_DONE "Alles wurde getan. Viel Spass beim Drucken!"
#define MSG_WIZARD_LOAD_FILAMENT "Fuehren Sie bitte PLA Filament in den Extruder und bestaetigen Sie den Knopf um es zu laden."
#define MSG_WIZARD_RERUN "Der laufende Assistent loescht die aktuelle Kalibrierergebnisse und wird von Anfang an beginnen. Fortsetzen?"
#define MSG_WIZARD_REPEAT_V2_CAL "Moechten Sie den letzten Schritt wiederholen um den Abstand zwischen Duese und Druckbett neu einzustellen?"
#define MSG_WIZARD_CLEAN_HEATBED "Bitte reinigen Sie das Heizbett und druecken Sie dann den Knopf."
#define MSG_WIZARD_PLA_FILAMENT "Ist es wirklich PLA Filament?"
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Bitte laden Sie PLA-Filament und fahren Sie mit dem Assistenten fort, indem Sie den Drucker neu starten."
#define MSG_PLA_FILAMENT_LOADED "Ist PLA Filament geladen?"
#define MSG_PLEASE_LOAD_PLA "Bitte laden Sie zuerst PLA Filament."
#define MSG_WIZARD_HEATING "Vorheizen der Duese. Bitte warten."
#define MSG_M117_V2_CALIBRATION "M117 Erste-Schicht Kal."

View File

@ -314,3 +314,40 @@
#define(length=11, lines=1) MSG_INFO_PRINT_FAN "Print FAN: "
#define(length=11, lines=1) MSG_INFO_FILAMENT_XDIFF "Fil. Xd:"
#define(length=11, lines=1) MSG_INFO_FILAMENT_YDIFF "Fil. Ydiff:"
//Wizard messages which has tranlsations
#define(length=17, lines=1) MSG_WIZARD "Wizard"
#define(length=20, lines=7) MSG_WIZARD_WELCOME "Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?"
#define(length=20, lines=8) MSG_WIZARD_QUIT "You can always resume the Wizard from Calibration -> Wizard."
#define(length=20, lines=8) MSG_WIZARD_SELFTEST "First, I will run the selftest to check most common assembly problems."
#define(length=20, lines=8) MSG_WIZARD_CALIBRATION_FAILED "Please check our handbook and fix the problem. Then resume the Wizard by rebooting the printer."
#define(length=20, lines=8) MSG_WIZARD_XYZ_CAL "I will run xyz calibration now. It will take approx. 12 mins."
#define(length=20, lines=2) MSG_WIZARD_FILAMENT_LOADED "Is filament loaded?"
#define(length=20, lines=8) MSG_WIZARD_Z_CAL "I will run z calibration now."
#define(length=20, lines=4) MSG_WIZARD_WILL_PREHEAT "Now I will preheat nozzle for PLA."
#define(length=20, lines=3) MSG_WIZARD_HEATING "Preheating nozzle. Please wait."
#define(lenght=20, lines=8) MSG_WIZARD_V2_CAL "Now I will calibrate distance between tip of the nozzle and heatbed surface."
#define(lenght=20, lines=12) MSG_WIZARD_V2_CAL_2 "I will start to print line and you will gradually lower the nozzle by rotating the knob, until you reach optimal height. Check the pictures in our handbook in chapter Calibration."
#define(lenght=17, lines=1) MSG_V2_CALIBRATION "First layer cal."
#define(lenght=20, lines=8) MSG_WIZARD_DONE "All is done. Happy printing!"
#define(lenght=20, lines=8) MSG_WIZARD_LOAD_FILAMENT "Please insert PLA filament to the extruder, then press knob to load it."
#define(lenght=20, lines=7) MSG_WIZARD_RERUN "Running Wizard will delete current calibration results and start from the beginning. Continue?"
#define(lenght=20, lines=7) MSG_WIZARD_REPEAT_V2_CAL "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
#define(lenght=20, lines=8) MSG_WIZARD_CLEAN_HEATBED "Please clean heatbed and then press the knob."
#define(lenght=20, lines=2) MSG_WIZARD_PLA_FILAMENT "Is it PLA filament?"
#define(lenght=20, lines=8) MSG_WIZARD_INSERT_CORRECT_FILAMENT "Please load PLA filament and then resume Wizard by rebooting the printer."
#define(lenght=20, lines=2) MSG_PLA_FILAMENT_LOADED "Is PLA filament loaded?"
#define(lenght=20, lines=4) MSG_PLEASE_LOAD_PLA "Please load PLA filament first."
#define(length=25, lines=1) MSG_M117_V2_CALIBRATION "M117 First layer cal."
//messages bellow has no translation yet
#define MSG_CRASHDETECT_OFF "Crash det. [off]"
#define MSG_CRASHDETECT_ON "Crash det. [on]"
#define MSG_FSENSOR_OFF "Fil. sensor [off]"
#define MSG_FSENSOR_ON "Fil. sensor [on]"
#define(length=20, lines=4) MSG_PLACE_STEEL_SHEET "Please place steel sheet on heatbed."
#define(length=20, lines=4) MSG_REMOVE_STEEL_SHEET "Please remove steel sheet from heatbed."
#define(length=20, lines=2) MSG_CALIBRATE_Z_AUTO "Calibrating Z"
#define(length=20, lines=2) MSG_STEEL_SHEET_CHECK "Is steel sheet on heatbed?"

View File

@ -296,3 +296,27 @@
#define MSG_EXTRUDER_2 "Extrusor 2"
#define MSG_EXTRUDER_3 "Extrusor 3"
#define MSG_EXTRUDER_4 "Extrusor 4"
#define MSG_WIZARD "Wizard"
#define MSG_WIZARD_WELCOME "Hola, soy tu impresora Original Prusa i3. Quieres que te guie a traves de la configuracion?"
#define MSG_WIZARD_QUIT "Siempre puedes acceder al asistente desde Calibracion -> Wizard"
#define MSG_WIZARD_SELFTEST "Primero, hare el Selftest para comprobar los problemas de montaje mas comunes."
#define MSG_WIZARD_CALIBRATION_FAILED "Lee el manual y resuelve el problema. Despues, reinicia la impresora y continua con el Wizard"
#define MSG_WIZARD_XYZ_CAL "Hare la calibracion XYZ. Tardara 12 min. aproximadamente."
#define MSG_WIZARD_FILAMENT_LOADED "Esta el filamento cargado?"
#define MSG_WIZARD_Z_CAL "Voy a hacer Calibracion Z ahora."
#define MSG_WIZARD_WILL_PREHEAT "Voy a precalentar el nozzle para PLA ahora."
#define MSG_WIZARD_V2_CAL "Voy a calibrar la distancia entre la punta del nozzle y la superficie de la heatbed."
#define MSG_WIZARD_V2_CAL_2 "Voy a comenzar a imprimir la linea y tu bajaras el nozzle gradualmente al rotar el mando, hasta que llegues a la altura optima. Mira las imagenes del capitulo Calibracion en el manual."
#define MSG_V2_CALIBRATION "Cal. primera cap."
#define MSG_WIZARD_DONE "Terminado! Feliz impresion!"
#define MSG_WIZARD_LOAD_FILAMENT "Inserta, por favor, filamento PLA en el extrusor. Despues haz clic para cargarlo."
#define MSG_WIZARD_RERUN "Ejecutar el Wizard borrara los valores de calibracion actuales y comenzara de nuevo. Continuar?"
#define MSG_WIZARD_REPEAT_V2_CAL "Quieres repetir el ultimo paso para reajustar la distancia nozzle-heatbed?"
#define MSG_WIZARD_CLEAN_HEATBED "Limpia la superficie de la heatbed, por favor, y haz clic"
#define MSG_WIZARD_PLA_FILAMENT "Es el filamento PLA?"
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Carga filamento PLA, por favor, y reinicia la impresora para continuar con el Wizard"
#define MSG_PLA_FILAMENT_LOADED "Esta el filamento PLA cargado?"
#define MSG_PLEASE_LOAD_PLA "Carga el filamento PLA primero por favor."
#define MSG_WIZARD_HEATING "Precalentando nozzle. Espera por favor."
#define MSG_M117_V2_CALIBRATION "M117 Cal. primera cap."

View File

@ -287,3 +287,27 @@
#define MSG_EXTRUDER_2 "Estrusore 2"
#define MSG_EXTRUDER_3 "Estrusore 3"
#define MSG_EXTRUDER_4 "Estrusore 4"
#define MSG_WIZARD "Wizard"
#define MSG_WIZARD_WELCOME "Ciao, sono la tua stampante Original Prusa i3. Gradiresti aiuto attraverso il processo di configurazione?"
#define MSG_WIZARD_QUIT "E possibile proseguire la guide Wizard in qualsiasi momento attraverso Calibrazione -> Wizard."
#define MSG_WIZARD_SELFTEST "Anzitutto avviero il Self Test per controllare gli errori di assemblaggio piu comuni."
#define MSG_WIZARD_CALIBRATION_FAILED "Per favore consulta il nostro manuale per risolvere il problema. Poi riprendi il Wizard dopo aver riavviato la stampante."
#define MSG_WIZARD_XYZ_CAL "Adesso avviero una Calibrazione XYZ. Puo durare circa 12 min."
#define MSG_WIZARD_FILAMENT_LOADED "Il filamento e stato caricato?"
#define MSG_WIZARD_Z_CAL "Adesso avviero una Calibrazione Z."
#define MSG_WIZARD_WILL_PREHEAT "Adesso preriscaldero l'ugello per PLA."
#define MSG_WIZARD_V2_CAL "Adesso tarero lo stacco fra ugello e superfice del piatto."
#define MSG_WIZARD_V2_CAL_2 "Adesso iniziero a stampare una linea e tu dovrai abbassare l'ugello poco per volta ruotando la manopola sino a raggiungere una altezza ottimale. Per favore dai uno sguardo all'immagine del nostro manuale, cap.Calibrazione."
#define MSG_V2_CALIBRATION "Cal. primo layer."
#define MSG_WIZARD_DONE "Ben fatto. Buona stampa!"
#define MSG_WIZARD_LOAD_FILAMENT "Per favore inserisci il filamento di PLA nell'estrusore, poi premi la manopola per caricare."
#define MSG_WIZARD_RERUN "Se avvi il Wizard perderai la calibrazione preesistente e dovrai ricominciare dall'inizio. Continuare?"
#define MSG_WIZARD_REPEAT_V2_CAL "Desideri ripetere l'ultimo passaggio per migliorare la distanza fra ugello e piatto?"
#define MSG_WIZARD_CLEAN_HEATBED "Per favore pulisci il piatto, poi premi la manopola."
#define MSG_WIZARD_PLA_FILAMENT "E questo un filamento di PLA?"
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Per favore carica filamento di PLA e riprendi il Wizard dopo aver riavviato la stampante."
#define MSG_PLA_FILAMENT_LOADED "Il PLA e stato caricato?"
#define MSG_PLEASE_LOAD_PLA "Per favore prima caricare filamento di PLA."
#define MSG_WIZARD_HEATING "Sto preriscaldando l'ugello. Per favore attendi."
#define MSG_M117_V2_CALIBRATION "M117 Cal. primo layer."

View File

@ -299,3 +299,27 @@
#define MSG_EXTRUDER_2 "Ekstruder 2"
#define MSG_EXTRUDER_3 "Ekstruder 3"
#define MSG_EXTRUDER_4 "Ekstruder 4"
#define MSG_WIZARD "Wizard"
#define MSG_WIZARD_WELCOME "Czesc, jestem Twoja drukarka Original Prusa i3. Czy potrzebujesz pomocy z instalacja?"
#define MSG_WIZARD_QUIT "Zawsze mozesz przywrocic Wizard przez Kalibracja -> Wizard."
#define MSG_WIZARD_SELFTEST "Najpierw wlacze autotest w celu kontrolli najczestszych problemow z montazem."
#define MSG_WIZARD_CALIBRATION_FAILED "Prosze sprawdz nasz poradnik i napraw problem. Potem przywroc Wizard restartujac drukarke."
#define MSG_WIZARD_XYZ_CAL "Wlaczam kalibracje xyz. Zajmie to ok. 12 min."
#define MSG_WIZARD_FILAMENT_LOADED "Filament jest zaladowany?"
#define MSG_WIZARD_Z_CAL "Wlaczam kalibracje z."
#define MSG_WIZARD_WILL_PREHEAT "Nagrzewam dysze dla PLA."
#define MSG_WIZARD_V2_CAL "Kalibruje odleglosc miedzy koncowka dyszy a stolikiem."
#define MSG_WIZARD_V2_CAL_2 "Zaczne drukowac linie. Stopniowo opuszczaj dysze przekrecajac guzik, poki nie uzyskasz optymalnej wysokosci. Sprawdz obrazki w naszym poradniku w rozdz. Kalibracja"
#define MSG_V2_CALIBRATION "Kal. 1. warstwy"
#define MSG_WIZARD_DONE "Gotowe. Udanego druku!"
#define MSG_WIZARD_LOAD_FILAMENT "Prosze umiesc filament PLA w ekstruderze i nacisnij przycisk by zaladowac."
#define MSG_WIZARD_RERUN "Wlaczenie Wizard usunie obecne dane kalibracyjne i zacznie od nowa. Kontynuowac?"
#define MSG_WIZARD_REPEAT_V2_CAL "Chcesz powtorzyc ostatni krok i przestawic odleglosc miedzy dysza a stolikiem?"
#define MSG_WIZARD_CLEAN_HEATBED "Prosze oczysc stolik i nacisnij guzik."
#define MSG_WIZARD_PLA_FILAMENT "Czy to filament PLA?"
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Prosze zaladuj filament PLA i przywroc Wizard przez restart drukarki."
#define MSG_PLA_FILAMENT_LOADED "Fialment PLA jest zaladowany?"
#define MSG_PLEASE_LOAD_PLA "Prosze, najpierw zaladuj filament PLA."
#define MSG_WIZARD_HEATING "Nagrzewanie dyszy. Prosze czekac."
#define MSG_M117_V2_CALIBRATION "M117 Kal. 1. warstwy"

View File

@ -2294,6 +2294,13 @@ BedSkewOffsetDetectionResultType improve_bed_offset_and_skew(int8_t method, int8
}
#endif // SUPPORT_VERBOSITY
//make space
current_position[Z_AXIS] += 150;
go_to_current(homing_feedrate[Z_AXIS] / 60);
//plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate, active_extruder););
lcd_show_fullscreen_message_and_wait_P(MSG_PLACE_STEEL_SHEET);
// Sample Z heights for the mesh bed leveling.
// In addition, store the results into an eeprom, to be used later for verification of the bed leveling process.
if (! sample_mesh_and_store_reference())

File diff suppressed because it is too large Load Diff

View File

@ -35,7 +35,7 @@ void lcd_mylang();
bool lcd_detected(void);
static void lcd_selftest();
static bool lcd_selftest();
static bool lcd_selfcheck_endstops();
static bool lcd_selfcheck_axis(int _axis, int _travel);
static bool lcd_selfcheck_axis_sg(char axis);
@ -55,10 +55,12 @@ void lcd_mylang();
extern void lcd_show_fullscreen_message_and_wait_P(const char *msg);
// 0: no, 1: yes, -1: timeouted
extern int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false);
extern int8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false);
// Ask the user to move the Z axis up to the end stoppers and let
// the user confirm that it has been done.
#ifndef TMC2130
extern bool lcd_calibrate_z_end_stop_manual(bool only_z);
#endif
// Show the result of the calibration process on the LCD screen.
extern void lcd_bed_calibration_show_result(BedSkewOffsetDetectionResultType result, uint8_t point_too_far_mask);
@ -98,6 +100,7 @@ void lcd_mylang();
#define LCD_COMMAND_LONG_PAUSE 5
#define LCD_COMMAND_LONG_PAUSE_RESUME 6
#define LCD_COMMAND_PID_EXTRUDER 7
#define LCD_COMMAND_V2_CAL 8
extern unsigned long lcd_timeoutToStatus;
extern int lcd_commands_type;
@ -231,6 +234,8 @@ void extr_unload_all();
void extr_unload_used();
void extr_unload();
static char snmm_stop_print_menu();
static float count_e(float layer_heigth, float extrusion_width, float extrusion_length);
static void lcd_babystep_z();
void stack_error();
static void lcd_ping_allert();
@ -245,7 +250,7 @@ void lcd_farm_sdcard_menu();
void lcd_farm_sdcard_menu_w();
//void get_description();
void lcd_wait_for_cool_down();
//void lcd_wait_for_cool_down();
void adjust_bed_reset();
void lcd_extr_cal_reset();
@ -263,4 +268,7 @@ void display_loading();
void lcd_service_mode_show_result();
void lcd_wizard();
void lcd_wizard(int state);
#endif //ULTRALCD_H

View File

@ -476,7 +476,18 @@ void lcd_set_custom_characters_nextpage()
B00100
};
byte confirm[8] = {
B00000,
B00001,
B00011,
B10110,
B11100,
B01000,
B00000
};
lcd.createChar(1, arrdown);
lcd.createChar(2, confirm);
}
void lcd_set_custom_characters_degree()

View File

@ -1,421 +0,0 @@
#ifndef CONFIGURATION_PRUSA_H
#define CONFIGURATION_PRUSA_H
/*------------------------------------
GENERAL SETTINGS
*------------------------------------*/
// Printer revision
#define FILAMENT_SIZE "1_75mm_MK3"
#define NOZZLE_TYPE "E3Dv6full"
// Developer flag
#define DEVELOPER
// Printer name
#define CUSTOM_MENDEL_NAME "Prusa i3 MK3"
// Electronics
#define MOTHERBOARD BOARD_EINY_0_1a
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
//#define E3D_PT100_EXTRUDER_WITH_AMP
//#define E3D_PT100_EXTRUDER_NO_AMP
//#define E3D_PT100_BED_WITH_AMP
//#define E3D_PT100_BED_NO_AMP
/*------------------------------------
AXIS SETTINGS
*------------------------------------*/
// Steps per unit {X,Y,Z,E}
#define DEFAULT_AXIS_STEPS_PER_UNIT {100,100,3200/8,140}
// Endstop inverting
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
// Home position
#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS -2.2
#define MANUAL_Z_HOME_POS 0.2
// Travel limits after homing
#define X_MAX_POS 255
#define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS -4
#define Z_MAX_POS 210
#define Z_MIN_POS 0.15
// Canceled home position
#define X_CANCEL_POS 50
#define Y_CANCEL_POS 190
//Pause print position
#define X_PAUSE_POS 50
#define Y_PAUSE_POS 190
#define Z_PAUSE_LIFT 20
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {3000, 3000, 800, 0} // set the homing speeds (mm/min) // 3000 is also valid for stallGuard homing. Valid range: 2200 - 3000
#define DEFAULT_MAX_FEEDRATE {400, 400, 12, 120} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {2000,2000,500,10000} // 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.
#define DEFAULT_ACCELERATION 1200 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 1500 // X, Y, Z and E max acceleration in mm/s^2 for retracts
#define MANUAL_FEEDRATE {3000, 3000, 1000, 100} // set the speeds for manual moves (mm/min)
#define Z_AXIS_ALWAYS_ON 1
/*------------------------------------
TMC2130 default settings
*------------------------------------*/
// PWM register configuration
#define PWM_GRAD 0x08 // 0x0F - Sets gradient - (max 15 with PWM autoscale activated)
#define PWM_AMPL 0xC8 // 0xFF - Sets PWM amplitude to 200 (max is 255)
#define PWM_AUTOSCALE 0x04 // 0x04 since writing in PWM_CONF (Activates PWM autoscaling)
#define PWM_FREQ 0x01 // 0x01 since writing in PWM_CONF (Sets PWM frequency to 2/683 fCLK)
#define PWM_THRS 0x00 // TPWM_THRS - Sets the switching speed threshold based on TSTEP from stealthChop to spreadCycle mode
#define SG_HOMING_SW 1 // stallguard "software" homing
//#define SG_HOMING_HW 1 // stallguard "hardware" homing
#define SG_THRESHOLD_X 8 // stallguard sensitivity for X axis
#define SG_THRESHOLD_Y 8 // stallguard sensitivity for Y axis
#define TCOOLTHRS 239 // coolstep treshold
#define TMC2130_CURRENTS_H {2, 2, 2, 4} // default holding currents for all axes
#define TMC2130_CURRENTS_R {6, 6, 8, 8} // default running currents for all axes
#define TMC2130_DEBUG
//#define TMC_DBG_READS
//#define TMC_DBG_WRITE
/*------------------------------------
EXTRUDER SETTINGS
*------------------------------------*/
// Mintemps
#define HEATER_0_MINTEMP 15
#define HEATER_1_MINTEMP 5
#define HEATER_2_MINTEMP 5
#define BED_MINTEMP 15
// Maxtemps
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
#define HEATER_0_MAXTEMP 410
#else
#define HEATER_0_MAXTEMP 305
#endif
#define HEATER_1_MAXTEMP 305
#define HEATER_2_MAXTEMP 305
#define BED_MAXTEMP 150
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
// Define PID constants for extruder with PT100
#define DEFAULT_Kp 21.70
#define DEFAULT_Ki 1.60
#define DEFAULT_Kd 73.76
#else
// Define PID constants for extruder
#define DEFAULT_Kp 40.925
#define DEFAULT_Ki 4.875
#define DEFAULT_Kd 86.085
#endif
// Extrude mintemp
#define EXTRUDE_MINTEMP 130
// Extruder cooling fans
#define EXTRUDER_0_AUTO_FAN_PIN 8
#define EXTRUDER_1_AUTO_FAN_PIN -1
#define EXTRUDER_2_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
/*------------------------------------
LOAD/UNLOAD FILAMENT SETTINGS
*------------------------------------*/
// Load filament commands
#define LOAD_FILAMENT_0 "M83"
#define LOAD_FILAMENT_1 "G1 E70 F400"
#define LOAD_FILAMENT_2 "G1 E40 F100"
// Unload filament commands
#define UNLOAD_FILAMENT_0 "M83"
#define UNLOAD_FILAMENT_1 "G1 E-80 F7000"
/*------------------------------------
CHANGE FILAMENT SETTINGS
*------------------------------------*/
// Filament change configuration
#define FILAMENTCHANGEENABLE
#ifdef FILAMENTCHANGEENABLE
#define FILAMENTCHANGE_XPOS 211
#define FILAMENTCHANGE_YPOS 0
#define FILAMENTCHANGE_ZADD 2
#define FILAMENTCHANGE_FIRSTRETRACT -2
#define FILAMENTCHANGE_FINALRETRACT -80
#define FILAMENTCHANGE_FIRSTFEED 70
#define FILAMENTCHANGE_FINALFEED 50
#define FILAMENTCHANGE_RECFEED 5
#define FILAMENTCHANGE_XYFEED 50
#define FILAMENTCHANGE_EFEED 20
#define FILAMENTCHANGE_RFEED 400
#define FILAMENTCHANGE_EXFEED 2
#define FILAMENTCHANGE_ZFEED 15
#endif
/*------------------------------------
ADDITIONAL FEATURES SETTINGS
*------------------------------------*/
// Define Prusa filament runout sensor
//#define FILAMENT_RUNOUT_SUPPORT
#ifdef FILAMENT_RUNOUT_SUPPORT
#define FILAMENT_RUNOUT_SENSOR 1
#endif
// temperature runaway
//#define TEMP_RUNAWAY_BED_HYSTERESIS 5
//#define TEMP_RUNAWAY_BED_TIMEOUT 360
#define TEMP_RUNAWAY_EXTRUDER_HYSTERESIS 15
#define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45
/*------------------------------------
MOTOR CURRENT SETTINGS
*------------------------------------*/
// Motor Current setting for BIG RAMBo
#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
#define DIGIPOT_MOTOR_CURRENT_LOUD {135,135,135,135,135}
// Motor Current settings for RAMBo mini PWM value = MotorCurrentSetting * 255 / range
#if MOTHERBOARD == 102 || MOTHERBOARD == 302 || MOTHERBOARD == 300
#define MOTOR_CURRENT_PWM_RANGE 2000
#define DEFAULT_PWM_MOTOR_CURRENT {400, 750, 750} // {XY,Z,E}
#define DEFAULT_PWM_MOTOR_CURRENT_LOUD {400, 750, 750} // {XY,Z,E}
#endif
/*------------------------------------
BED SETTINGS
*------------------------------------*/
// Define Mesh Bed Leveling system to enable it
#define MESH_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MBL_Z_STEP 0.01
// Mesh definitions
#define MESH_MIN_X 35
#define MESH_MAX_X 238
#define MESH_MIN_Y 6
#define MESH_MAX_Y 202
// Mesh upsample definition
#define MESH_NUM_X_POINTS 7
#define MESH_NUM_Y_POINTS 7
// Mesh measure definition
#define MESH_MEAS_NUM_X_POINTS 3
#define MESH_MEAS_NUM_Y_POINTS 3
#define MESH_HOME_Z_CALIB 0.2
#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc.
#define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER 9 // Z probe to nozzle Y offset: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.4 // Z probe to nozzle Z offset: -below (always!)
#endif
// Bed Temperature Control
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
//
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably
// shouldn't use bed PID until someone else verifies your hardware works.
// If this is enabled, find your own PID constants below.
#define PIDTEMPBED
//
//#define BED_LIMIT_SWITCHING
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
// Bed temperature compensation settings
#define BED_OFFSET 10
#define BED_OFFSET_START 40
#define BED_OFFSET_CENTER 50
#ifdef PIDTEMPBED
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#if defined(E3D_PT100_BED_WITH_AMP) || defined(E3D_PT100_BED_NO_AMP)
// Define PID constants for extruder with PT100
#define DEFAULT_bedKp 21.70
#define DEFAULT_bedKi 1.60
#define DEFAULT_bedKd 73.76
#else
#define DEFAULT_bedKp 126.13
#define DEFAULT_bedKi 4.30
#define DEFAULT_bedKd 924.76
#endif
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
// #define DEFAULT_bedKp 97.1
// #define DEFAULT_bedKi 1.41
// #define DEFAULT_bedKd 1675.16
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
/*-----------------------------------
PREHEAT SETTINGS
*------------------------------------*/
#define PLA_PREHEAT_HOTEND_TEMP 215
#define PLA_PREHEAT_HPB_TEMP 55
#define PLA_PREHEAT_FAN_SPEED 0
#define ABS_PREHEAT_HOTEND_TEMP 255
#define ABS_PREHEAT_HPB_TEMP 100
#define ABS_PREHEAT_FAN_SPEED 0
#define HIPS_PREHEAT_HOTEND_TEMP 220
#define HIPS_PREHEAT_HPB_TEMP 100
#define HIPS_PREHEAT_FAN_SPEED 0
#define PP_PREHEAT_HOTEND_TEMP 254
#define PP_PREHEAT_HPB_TEMP 100
#define PP_PREHEAT_FAN_SPEED 0
#define PET_PREHEAT_HOTEND_TEMP 240
#define PET_PREHEAT_HPB_TEMP 90
#define PET_PREHEAT_FAN_SPEED 0
#define FLEX_PREHEAT_HOTEND_TEMP 230
#define FLEX_PREHEAT_HPB_TEMP 50
#define FLEX_PREHEAT_FAN_SPEED 0
/*------------------------------------
THERMISTORS SETTINGS
*------------------------------------*/
//
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
//
//// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595
// 0 is not used
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
// 3 is Mendel-parts thermistor (4.7k pullup)
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (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)
// 71 is 100k Honeywell thermistor 135-104LAF-J01 (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)
// 10 is 100k RS thermistor 198-961 (4.7k pullup)
// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
// 20 is the PT100 circuit found in the Ultimainboard V2.x
// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
//
// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
// (but gives greater accuracy and more stable PID)
// 51 is 100k thermistor - EPCOS (1k pullup)
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
//
// 1047 is Pt1000 with 4k7 pullup
// 1010 is Pt1000 with 1k pullup (non standard)
// 147 is Pt100 with 4k7 pullup
// 148 is E3D Pt100 with 4k7 pullup and no PT100 Amplifier on a MiniRambo 1.3a
// 247 is Pt100 with 4k7 pullup and PT100 Amplifier
// 110 is Pt100 with 1k pullup (non standard)
#if defined(E3D_PT100_EXTRUDER_WITH_AMP)
#define TEMP_SENSOR_0 247
#elif defined(E3D_PT100_EXTRUDER_NO_AMP)
#define TEMP_SENSOR_0 148
#else
#define TEMP_SENSOR_0 5
#endif
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#if defined(E3D_PT100_BED_WITH_AMP)
#define TEMP_SENSOR_BED 247
#elif defined(E3D_PT100_BED_NO_AMP)
#define TEMP_SENSOR_BED 148
#else
#define TEMP_SENSOR_BED 1
#endif
#define STACK_GUARD_TEST_VALUE 0xA2A2
#define MAX_BED_TEMP_CALIBRATION 50
#define MAX_HOTEND_TEMP_CALIBRATION 50
#define MAX_E_STEPS_PER_UNIT 250
#define MIN_E_STEPS_PER_UNIT 100
#define Z_BABYSTEP_MIN -3999
#define Z_BABYSTEP_MAX 0
#define PINDA_PREHEAT_X 70
#define PINDA_PREHEAT_Y -3
#define PINDA_PREHEAT_Z 1
#define PINDA_HEAT_T 120 //time in s
#define PINDA_MIN_T 50
#define PINDA_STEP_T 10
#define PINDA_MAX_T 100
#define PING_TIME 60 //time in s
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
#define PING_ALLERT_PERIOD 60 //time in s
#define LONG_PRESS_TIME 1000 //time in ms for button long press
#define BUTTON_BLANKING_TIME 200 //time in ms for blanking after button release
#define DEFAULT_PID_TEMP 210
#define MIN_PRINT_FAN_SPEED 50
#ifdef SNMM
#define DEFAULT_RETRACTION 4 //used for PINDA temp calibration and pause print
#else
#define DEFAULT_RETRACTION 1 //used for PINDA temp calibration and pause print
#endif
#endif //__CONFIGURATION_PRUSA_H

View File

@ -1,401 +0,0 @@
#ifndef CONFIGURATION_PRUSA_H
#define CONFIGURATION_PRUSA_H
/*------------------------------------
GENERAL SETTINGS
*------------------------------------*/
// Printer revision
#define FILAMENT_SIZE "1_75mm_MK2"
#define NOZZLE_TYPE "E3Dv6full"
// Developer flag
#define DEVELOPER
// Printer name
#define CUSTOM_MENDEL_NAME "Prusa i3 MK2"
// Electronics
#define MOTHERBOARD BOARD_RAMBO_MINI_1_0
// Prusa Single extruder multiple material suport
//#define SNMM
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
//#define E3D_PT100_EXTRUDER_WITH_AMP
//#define E3D_PT100_EXTRUDER_NO_AMP
//#define E3D_PT100_BED_WITH_AMP
//#define E3D_PT100_BED_NO_AMP
/*------------------------------------
AXIS SETTINGS
*------------------------------------*/
// Steps per unit {X,Y,Z,E}
#ifdef SNMM
#define DEFAULT_AXIS_STEPS_PER_UNIT {100,100,3200/8,140}
#else
#define DEFAULT_AXIS_STEPS_PER_UNIT {100,100,3200/8,161.3}
#endif
// Endstop inverting
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
// Home position
#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS -2.2
#define MANUAL_Z_HOME_POS 0.15
// Travel limits after homing
#define X_MAX_POS 250
#define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS -2.2
#define Z_MAX_POS 210
#define Z_MIN_POS 0.15
// Canceled home position
#define X_CANCEL_POS 50
#define Y_CANCEL_POS 190
//Pause print position
#define X_PAUSE_POS 50
#define Y_PAUSE_POS 190
#define Z_PAUSE_LIFT 20
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {3000, 3000, 800, 0} // set the homing speeds (mm/min)
#define DEFAULT_MAX_FEEDRATE {500, 500, 12, 120} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {9000,9000,500,10000} // 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.
#define DEFAULT_ACCELERATION 1500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 1500 // X, Y, Z and E max acceleration in mm/s^2 for retracts
#define MANUAL_FEEDRATE {3000, 3000, 1000, 100} // set the speeds for manual moves (mm/min)
#define Z_AXIS_ALWAYS_ON 1
/*------------------------------------
EXTRUDER SETTINGS
*------------------------------------*/
// Mintemps
#define HEATER_0_MINTEMP 15
#define HEATER_1_MINTEMP 5
#define HEATER_2_MINTEMP 5
#define BED_MINTEMP 15
// Maxtemps
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
#define HEATER_0_MAXTEMP 410
#else
#define HEATER_0_MAXTEMP 305
#endif
#define HEATER_1_MAXTEMP 305
#define HEATER_2_MAXTEMP 305
#define BED_MAXTEMP 150
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
// Define PID constants for extruder with PT100
#define DEFAULT_Kp 21.70
#define DEFAULT_Ki 1.60
#define DEFAULT_Kd 73.76
#else
// Define PID constants for extruder
#define DEFAULT_Kp 40.925
#define DEFAULT_Ki 4.875
#define DEFAULT_Kd 86.085
#endif
// Extrude mintemp
#define EXTRUDE_MINTEMP 130
// Extruder cooling fans
#define EXTRUDER_0_AUTO_FAN_PIN 8
#define EXTRUDER_1_AUTO_FAN_PIN -1
#define EXTRUDER_2_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
// Prusa Single extruder multiple material suport
//#define SNMM
#ifdef SNMM
//#define BOWDEN_LENGTH 408
#define BOWDEN_LENGTH 433 //default total length for filament fast loading part; max length for extrusion is 465 mm!; this length can be adjusted in service menu
#define FIL_LOAD_LENGTH 102 //length for loading filament into the nozzle
#define FIL_COOLING 10 //length for cooling moves
#define E_MOTOR_LOW_CURRENT 350 // current for PRUSAY code
#define E_MOTOR_HIGH_CURRENT 700 //current for unloading filament, stop print, PRUSAY ramming
#endif //SNMM
//#define DIS //for measuring bed heigth and PINDa detection heigth relative to auto home point, experimental function
/*------------------------------------
CHANGE FILAMENT SETTINGS
*------------------------------------*/
// Filament change configuration
#define FILAMENTCHANGEENABLE
#ifdef FILAMENTCHANGEENABLE
#define FILAMENTCHANGE_XPOS 211
#define FILAMENTCHANGE_YPOS 0
#define FILAMENTCHANGE_ZADD 2
#define FILAMENTCHANGE_FIRSTRETRACT -2
#define FILAMENTCHANGE_FINALRETRACT -80
#define FILAMENTCHANGE_FIRSTFEED 70
#define FILAMENTCHANGE_FINALFEED 50
#define FILAMENTCHANGE_RECFEED 5
#define FILAMENTCHANGE_XYFEED 50
#define FILAMENTCHANGE_EFEED 20
#define FILAMENTCHANGE_RFEED 400
#define FILAMENTCHANGE_EXFEED 2
#define FILAMENTCHANGE_ZFEED 15
#endif
/*------------------------------------
ADDITIONAL FEATURES SETTINGS
*------------------------------------*/
// Define Prusa filament runout sensor
//#define FILAMENT_RUNOUT_SUPPORT
#ifdef FILAMENT_RUNOUT_SUPPORT
#define FILAMENT_RUNOUT_SENSOR 1
#endif
// temperature runaway
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
#define TEMP_RUNAWAY_BED_TIMEOUT 360
#define TEMP_RUNAWAY_EXTRUDER_HYSTERESIS 15
#define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45
/*------------------------------------
MOTOR CURRENT SETTINGS
*------------------------------------*/
// Motor Current setting for BIG RAMBo
#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
#define DIGIPOT_MOTOR_CURRENT_LOUD {135,135,135,135,135}
// Motor Current settings for RAMBo mini PWM value = MotorCurrentSetting * 255 / range
#if MOTHERBOARD == 102 || MOTHERBOARD == 302
#define MOTOR_CURRENT_PWM_RANGE 2000
#define DEFAULT_PWM_MOTOR_CURRENT {270, 830, 450} // {XY,Z,E}
#define DEFAULT_PWM_MOTOR_CURRENT_LOUD {540, 830, 500} // {XY,Z,E}
#endif
/*------------------------------------
BED SETTINGS
*------------------------------------*/
// Define Mesh Bed Leveling system to enable it
#define MESH_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MBL_Z_STEP 0.01
// Mesh definitions
#define MESH_MIN_X 35
#define MESH_MAX_X 238
#define MESH_MIN_Y 6
#define MESH_MAX_Y 202
// Mesh upsample definition
#define MESH_NUM_X_POINTS 7
#define MESH_NUM_Y_POINTS 7
// Mesh measure definition
#define MESH_MEAS_NUM_X_POINTS 3
#define MESH_MEAS_NUM_Y_POINTS 3
#define MESH_HOME_Z_CALIB 0.2
#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc.
#define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER 9 // Z probe to nozzle Y offset: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.4 // Z probe to nozzle Z offset: -below (always!)
#endif
// Bed Temperature Control
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
//
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably
// shouldn't use bed PID until someone else verifies your hardware works.
// If this is enabled, find your own PID constants below.
#define PIDTEMPBED
//
//#define BED_LIMIT_SWITCHING
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
// Bed temperature compensation settings
#define BED_OFFSET 10
#define BED_OFFSET_START 40
#define BED_OFFSET_CENTER 50
#ifdef PIDTEMPBED
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#if defined(E3D_PT100_BED_WITH_AMP) || defined(E3D_PT100_BED_NO_AMP)
// Define PID constants for extruder with PT100
#define DEFAULT_bedKp 21.70
#define DEFAULT_bedKi 1.60
#define DEFAULT_bedKd 73.76
#else
#define DEFAULT_bedKp 126.13
#define DEFAULT_bedKi 4.30
#define DEFAULT_bedKd 924.76
#endif
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
// #define DEFAULT_bedKp 97.1
// #define DEFAULT_bedKi 1.41
// #define DEFAULT_bedKd 1675.16
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
/*-----------------------------------
PREHEAT SETTINGS
*------------------------------------*/
#define PLA_PREHEAT_HOTEND_TEMP 215
#define PLA_PREHEAT_HPB_TEMP 55
#define PLA_PREHEAT_FAN_SPEED 0
#define ABS_PREHEAT_HOTEND_TEMP 255
#define ABS_PREHEAT_HPB_TEMP 100
#define ABS_PREHEAT_FAN_SPEED 0
#define HIPS_PREHEAT_HOTEND_TEMP 220
#define HIPS_PREHEAT_HPB_TEMP 100
#define HIPS_PREHEAT_FAN_SPEED 0
#define PP_PREHEAT_HOTEND_TEMP 254
#define PP_PREHEAT_HPB_TEMP 100
#define PP_PREHEAT_FAN_SPEED 0
#define PET_PREHEAT_HOTEND_TEMP 240
#define PET_PREHEAT_HPB_TEMP 90
#define PET_PREHEAT_FAN_SPEED 0
#define FLEX_PREHEAT_HOTEND_TEMP 230
#define FLEX_PREHEAT_HPB_TEMP 50
#define FLEX_PREHEAT_FAN_SPEED 0
/*------------------------------------
THERMISTORS SETTINGS
*------------------------------------*/
//
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
//
//// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595
// 0 is not used
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
// 3 is Mendel-parts thermistor (4.7k pullup)
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (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)
// 71 is 100k Honeywell thermistor 135-104LAF-J01 (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)
// 10 is 100k RS thermistor 198-961 (4.7k pullup)
// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
// 20 is the PT100 circuit found in the Ultimainboard V2.x
// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
//
// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
// (but gives greater accuracy and more stable PID)
// 51 is 100k thermistor - EPCOS (1k pullup)
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
//
// 1047 is Pt1000 with 4k7 pullup
// 1010 is Pt1000 with 1k pullup (non standard)
// 147 is Pt100 with 4k7 pullup
// 148 is Pt100 with 4k7 pullup and no PT100 Amplifier (in case type 147 doesn't work)
// 247 is Pt100 with 4k7 pullup and PT100 Amplifier
// 110 is Pt100 with 1k pullup (non standard)
#if defined(E3D_PT100_EXTRUDER_WITH_AMP)
#define TEMP_SENSOR_0 247
#elif defined(E3D_PT100_EXTRUDER_NO_AMP)
#define TEMP_SENSOR_0 148
#else
#define TEMP_SENSOR_0 5
#endif
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#if defined(E3D_PT100_BED_WITH_AMP)
#define TEMP_SENSOR_BED 247
#elif defined(E3D_PT100_BED_NO_AMP)
#define TEMP_SENSOR_BED 148
#else
#define TEMP_SENSOR_BED 1
#endif
#define STACK_GUARD_TEST_VALUE 0xA2A2
#define MAX_BED_TEMP_CALIBRATION 50
#define MAX_HOTEND_TEMP_CALIBRATION 50
#define MAX_E_STEPS_PER_UNIT 250
#define MIN_E_STEPS_PER_UNIT 100
#define Z_BABYSTEP_MIN -3999
#define Z_BABYSTEP_MAX 0
#define PINDA_PREHEAT_X 70
#define PINDA_PREHEAT_Y -3
#define PINDA_PREHEAT_Z 1
#define PINDA_HEAT_T 120 //time in s
#define PINDA_MIN_T 50
#define PINDA_STEP_T 10
#define PINDA_MAX_T 100
#define PING_TIME 60 //time in s
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
#define PING_ALLERT_PERIOD 60 //time in s
#define LONG_PRESS_TIME 1000 //time in ms for button long press
#define BUTTON_BLANKING_TIME 200 //time in ms for blanking after button release
#define DEFAULT_PID_TEMP 210
#ifdef SNMM
#define DEFAULT_RETRACTION 4 //used for PINDA temp calibration and pause print
#else
#define DEFAULT_RETRACTION 1 //used for PINDA temp calibration and pause print
#endif
#endif //__CONFIGURATION_PRUSA_H

View File

@ -1,403 +0,0 @@
#ifndef CONFIGURATION_PRUSA_H
#define CONFIGURATION_PRUSA_H
/*------------------------------------
GENERAL SETTINGS
*------------------------------------*/
// Printer revision
#define FILAMENT_SIZE "1_75mm_MK2"
#define NOZZLE_TYPE "E3Dv6full"
// Developer flag
#define DEVELOPER
// Printer name
#define CUSTOM_MENDEL_NAME "Prusa i3 MK2"
// Electronics
#define MOTHERBOARD BOARD_RAMBO_MINI_1_3
// Prusa Single extruder multiple material suport
//#define SNMM
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
//#define E3D_PT100_EXTRUDER_WITH_AMP
//#define E3D_PT100_EXTRUDER_NO_AMP
//#define E3D_PT100_BED_WITH_AMP
//#define E3D_PT100_BED_NO_AMP
/*------------------------------------
AXIS SETTINGS
*------------------------------------*/
// Steps per unit {X,Y,Z,E}
#ifdef SNMM
#define DEFAULT_AXIS_STEPS_PER_UNIT {100,100,3200/8,140}
#else
#define DEFAULT_AXIS_STEPS_PER_UNIT {100,100,3200/8,161.3}
#endif
// Endstop inverting
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
// Home position
#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS -2.2
#define MANUAL_Z_HOME_POS 0.15
// Travel limits after homing
#define X_MAX_POS 250
#define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS -2.2
#define Z_MAX_POS 210
#define Z_MIN_POS 0.15
// Canceled home position
#define X_CANCEL_POS 50
#define Y_CANCEL_POS 190
//Pause print position
#define X_PAUSE_POS 50
#define Y_PAUSE_POS 190
#define Z_PAUSE_LIFT 20
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {3000, 3000, 800, 0} // set the homing speeds (mm/min)
#define DEFAULT_MAX_FEEDRATE {500, 500, 12, 120} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {9000,9000,500,10000} // 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.
#define DEFAULT_ACCELERATION 1500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 1500 // X, Y, Z and E max acceleration in mm/s^2 for retracts
#define MANUAL_FEEDRATE {3000, 3000, 1000, 100} // set the speeds for manual moves (mm/min)
#define Z_AXIS_ALWAYS_ON 1
/*------------------------------------
EXTRUDER SETTINGS
*------------------------------------*/
// Mintemps
#define HEATER_0_MINTEMP 15
#define HEATER_1_MINTEMP 5
#define HEATER_2_MINTEMP 5
#define BED_MINTEMP 15
// Maxtemps
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
#define HEATER_0_MAXTEMP 410
#else
#define HEATER_0_MAXTEMP 305
#endif
#define HEATER_1_MAXTEMP 305
#define HEATER_2_MAXTEMP 305
#define BED_MAXTEMP 150
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
// Define PID constants for extruder with PT100
#define DEFAULT_Kp 21.70
#define DEFAULT_Ki 1.60
#define DEFAULT_Kd 73.76
#else
// Define PID constants for extruder
#define DEFAULT_Kp 40.925
#define DEFAULT_Ki 4.875
#define DEFAULT_Kd 86.085
#endif
// Extrude mintemp
#define EXTRUDE_MINTEMP 130
// Extruder cooling fans
#define EXTRUDER_0_AUTO_FAN_PIN 8
#define EXTRUDER_1_AUTO_FAN_PIN -1
#define EXTRUDER_2_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
#ifdef SNMM
//#define BOWDEN_LENGTH 408
#define BOWDEN_LENGTH 433 //default total length for filament fast loading part; max length for extrusion is 465 mm!; this length can be adjusted in service menu
#define FIL_LOAD_LENGTH 102 //length for loading filament into the nozzle
#define FIL_COOLING 10 //length for cooling moves
#define E_MOTOR_LOW_CURRENT 350 // current for PRUSAY code
#define E_MOTOR_HIGH_CURRENT 700 //current for unloading filament, stop print, PRUSAY ramming
#endif //SNMM
//#define DIS //for measuring bed heigth and PINDa detection heigth relative to auto home point, experimental function
/*------------------------------------
CHANGE FILAMENT SETTINGS
*------------------------------------*/
// Filament change configuration
#define FILAMENTCHANGEENABLE
#ifdef FILAMENTCHANGEENABLE
#define FILAMENTCHANGE_XPOS 211
#define FILAMENTCHANGE_YPOS 0
#define FILAMENTCHANGE_ZADD 2
#define FILAMENTCHANGE_FIRSTRETRACT -2
#define FILAMENTCHANGE_FINALRETRACT -80
#define FILAMENTCHANGE_FIRSTFEED 70
#define FILAMENTCHANGE_FINALFEED 50
#define FILAMENTCHANGE_RECFEED 5
#define FILAMENTCHANGE_XYFEED 50
#define FILAMENTCHANGE_EFEED 20
#define FILAMENTCHANGE_RFEED 400
#define FILAMENTCHANGE_EXFEED 2
#define FILAMENTCHANGE_ZFEED 15
#endif
/*------------------------------------
ADDITIONAL FEATURES SETTINGS
*------------------------------------*/
// Define Prusa filament runout sensor
//#define FILAMENT_RUNOUT_SUPPORT
#ifdef FILAMENT_RUNOUT_SUPPORT
#define FILAMENT_RUNOUT_SENSOR 1
#endif
// temperature runaway
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
#define TEMP_RUNAWAY_BED_TIMEOUT 360
#define TEMP_RUNAWAY_EXTRUDER_HYSTERESIS 15
#define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45
/*------------------------------------
MOTOR CURRENT SETTINGS
*------------------------------------*/
// Motor Current setting for BIG RAMBo
#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
#define DIGIPOT_MOTOR_CURRENT_LOUD {135,135,135,135,135}
// Motor Current settings for RAMBo mini PWM value = MotorCurrentSetting * 255 / range
#if MOTHERBOARD == 102 || MOTHERBOARD == 302
#define MOTOR_CURRENT_PWM_RANGE 2000
#define DEFAULT_PWM_MOTOR_CURRENT {270, 830, 450} // {XY,Z,E}
#define DEFAULT_PWM_MOTOR_CURRENT_LOUD {540, 830, 500} // {XY,Z,E}
#endif
/*------------------------------------
BED SETTINGS
*------------------------------------*/
// Define Mesh Bed Leveling system to enable it
#define MESH_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define MBL_Z_STEP 0.01
// Mesh definitions
#define MESH_MIN_X 35
#define MESH_MAX_X 238
#define MESH_MIN_Y 6
#define MESH_MAX_Y 202
// Mesh upsample definition
#define MESH_NUM_X_POINTS 7
#define MESH_NUM_Y_POINTS 7
// Mesh measure definition
#define MESH_MEAS_NUM_X_POINTS 3
#define MESH_MEAS_NUM_Y_POINTS 3
#define MESH_HOME_Z_CALIB 0.2
#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc.
#define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER 9 // Z probe to nozzle Y offset: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.4 // Z probe to nozzle Z offset: -below (always!)
#endif
// Bed Temperature Control
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
//
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably
// shouldn't use bed PID until someone else verifies your hardware works.
// If this is enabled, find your own PID constants below.
#define PIDTEMPBED
//
//#define BED_LIMIT_SWITCHING
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
// Bed temperature compensation settings
#define BED_OFFSET 10
#define BED_OFFSET_START 40
#define BED_OFFSET_CENTER 50
#ifdef PIDTEMPBED
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#if defined(E3D_PT100_BED_WITH_AMP) || defined(E3D_PT100_BED_NO_AMP)
// Define PID constants for extruder with PT100
#define DEFAULT_bedKp 21.70
#define DEFAULT_bedKi 1.60
#define DEFAULT_bedKd 73.76
#else
#define DEFAULT_bedKp 126.13
#define DEFAULT_bedKi 4.30
#define DEFAULT_bedKd 924.76
#endif
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
// #define DEFAULT_bedKp 97.1
// #define DEFAULT_bedKi 1.41
// #define DEFAULT_bedKd 1675.16
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
/*-----------------------------------
PREHEAT SETTINGS
*------------------------------------*/
#define PLA_PREHEAT_HOTEND_TEMP 215
#define PLA_PREHEAT_HPB_TEMP 55
#define PLA_PREHEAT_FAN_SPEED 0
#define ABS_PREHEAT_HOTEND_TEMP 255
#define ABS_PREHEAT_HPB_TEMP 100
#define ABS_PREHEAT_FAN_SPEED 0
#define HIPS_PREHEAT_HOTEND_TEMP 220
#define HIPS_PREHEAT_HPB_TEMP 100
#define HIPS_PREHEAT_FAN_SPEED 0
#define PP_PREHEAT_HOTEND_TEMP 254
#define PP_PREHEAT_HPB_TEMP 100
#define PP_PREHEAT_FAN_SPEED 0
#define PET_PREHEAT_HOTEND_TEMP 240
#define PET_PREHEAT_HPB_TEMP 90
#define PET_PREHEAT_FAN_SPEED 0
#define FLEX_PREHEAT_HOTEND_TEMP 230
#define FLEX_PREHEAT_HPB_TEMP 50
#define FLEX_PREHEAT_FAN_SPEED 0
/*------------------------------------
THERMISTORS SETTINGS
*------------------------------------*/
//
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
//
//// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595
// 0 is not used
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
// 3 is Mendel-parts thermistor (4.7k pullup)
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (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)
// 71 is 100k Honeywell thermistor 135-104LAF-J01 (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)
// 10 is 100k RS thermistor 198-961 (4.7k pullup)
// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
// 20 is the PT100 circuit found in the Ultimainboard V2.x
// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
//
// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
// (but gives greater accuracy and more stable PID)
// 51 is 100k thermistor - EPCOS (1k pullup)
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
//
// 1047 is Pt1000 with 4k7 pullup
// 1010 is Pt1000 with 1k pullup (non standard)
// 147 is Pt100 with 4k7 pullup
// 148 is E3D Pt100 with 4k7 pullup and no PT100 Amplifier on a MiniRambo 1.3a
// 247 is Pt100 with 4k7 pullup and PT100 Amplifier
// 110 is Pt100 with 1k pullup (non standard)
#if defined(E3D_PT100_EXTRUDER_WITH_AMP)
#define TEMP_SENSOR_0 247
#elif defined(E3D_PT100_EXTRUDER_NO_AMP)
#define TEMP_SENSOR_0 148
#else
#define TEMP_SENSOR_0 5
#endif
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#if defined(E3D_PT100_BED_WITH_AMP)
#define TEMP_SENSOR_BED 247
#elif defined(E3D_PT100_BED_NO_AMP)
#define TEMP_SENSOR_BED 148
#else
#define TEMP_SENSOR_BED 1
#endif
#define STACK_GUARD_TEST_VALUE 0xA2A2
#define MAX_BED_TEMP_CALIBRATION 50
#define MAX_HOTEND_TEMP_CALIBRATION 50
#define MAX_E_STEPS_PER_UNIT 250
#define MIN_E_STEPS_PER_UNIT 100
#define Z_BABYSTEP_MIN -3999
#define Z_BABYSTEP_MAX 0
#define PINDA_PREHEAT_X 70
#define PINDA_PREHEAT_Y -3
#define PINDA_PREHEAT_Z 1
#define PINDA_HEAT_T 120 //time in s
#define PINDA_MIN_T 50
#define PINDA_STEP_T 10
#define PINDA_MAX_T 100
#define PING_TIME 60 //time in s
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
#define PING_ALLERT_PERIOD 60 //time in s
#define LONG_PRESS_TIME 1000 //time in ms for button long press
#define BUTTON_BLANKING_TIME 200 //time in ms for blanking after button release
#define DEFAULT_PID_TEMP 210
#ifdef SNMM
#define DEFAULT_RETRACTION 4 //used for PINDA temp calibration and pause print
#else
#define DEFAULT_RETRACTION 1 //used for PINDA temp calibration and pause print
#endif
#endif //__CONFIGURATION_PRUSA_H

View File

@ -16,8 +16,7 @@
#define CUSTOM_MENDEL_NAME "Prusa i3 MK3"
// Electronics
//#define MOTHERBOARD BOARD_EINY_0_4a
#define MOTHERBOARD BOARD_EINY_0_3a
#define MOTHERBOARD BOARD_EINY_0_4a
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
@ -33,8 +32,8 @@
// Steps per unit {X,Y,Z,E}
//#define DEFAULT_AXIS_STEPS_PER_UNIT {100,100,3200/8,140}
#define DEFAULT_AXIS_STEPS_PER_UNIT {100,100,3200/8,280}
//#define DEFAULT_AXIS_STEPS_PER_UNIT {200,200,3200/4,560}
//#define DEFAULT_AXIS_STEPS_PER_UNIT {100,100,3200/8,280}
#define DEFAULT_AXIS_STEPS_PER_UNIT {100,100,3200/8,560}
// Endstop inverting
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@ -50,7 +49,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define X_MAX_POS 255
#define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS -4
#define Y_MIN_POS -12 //orig -4
#define Z_MAX_POS 210
#define Z_MIN_POS 0.15
@ -64,61 +63,109 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define Z_PAUSE_LIFT 20
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {3000, 3000, 800, 0} // set the homing speeds (mm/min) // 3000 is also valid for stallGuard homing. Valid range: 2200 - 3000
#define HOMING_FEEDRATE {2500, 3000, 800, 0} // set the homing speeds (mm/min) // 3000 is also valid for stallGuard homing. Valid range: 2200 - 3000
//#define DEFAULT_MAX_FEEDRATE {400, 400, 12, 120} // (mm/sec)
#define DEFAULT_MAX_FEEDRATE {400, 400, 12, 120} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {1000, 1000, 100, 5000} // 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.
#define DEFAULT_MAX_FEEDRATE {500, 500, 12, 120} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {1000, 1000, 200, 5000} // 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.
#define DEFAULT_ACCELERATION 1250 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 1250 // X, Y, Z and E max acceleration in mm/s^2 for retracts
#define MANUAL_FEEDRATE {2700, 2700, 1000, 100} // set the speeds for manual moves (mm/min)
#define MAX_SILENT_FEEDRATE 2700 //
//#define MAX_SILENT_FEEDRATE 2700 //
#define Z_AXIS_ALWAYS_ON 1
// Automatic recovery after crash is detected
#define AUTOMATIC_RECOVERY_AFTER_CRASH
//DEBUG
#define DEBUG_DCODES //D codes
#if 1
//#define DEBUG_FSENSOR_LOG //Reports fsensor status to serial
//#define DEBUG_CRASHDET_COUNTERS //Display crash-detection counters on LCD
//#define DEBUG_RESUME_PRINT //Resume/save print debug enable
//#define DEBUG_UVLO_AUTOMATIC_RECOVER // Power panic automatic recovery debug output
//#define DEBUG_DISABLE_XMINLIMIT //x min limit ignored
//#define DEBUG_DISABLE_XMAXLIMIT //x max limit ignored
//#define DEBUG_DISABLE_YMINLIMIT //y min limit ignored
//#define DEBUG_DISABLE_YMAXLIMIT //y max limit ignored
//#define DEBUG_DISABLE_ZMINLIMIT //z min limit ignored
//#define DEBUG_DISABLE_ZMAXLIMIT //z max limit ignored
#define DEBUG_DISABLE_STARTMSGS //no startup messages
//#define DEBUG_DISABLE_MINTEMP //mintemp error ignored
//#define DEBUG_DISABLE_SWLIMITS //sw limits ignored
//#define DEBUG_DISABLE_LCD_STATUS_LINE //empty four lcd line
//#define DEBUG_DISABLE_PREVENT_EXTRUDER //cold extrusion and long extrusion allowed
#define DEBUG_DISABLE_PRUSA_STATISTICS //disable prusa_statistics() mesages
//#define DEBUG_XSTEP_DUP_PIN 21 //duplicate x-step output to pin 21 (SCL on P3)
//#define DEBUG_YSTEP_DUP_PIN 21 //duplicate y-step output to pin 21 (SCL on P3)
//#define DEBUG_BLINK_ACTIVE
#endif
/*------------------------------------
TMC2130 default settings
*------------------------------------*/
// PWM register configuration
//#define TMC2130_PWM_GRAD 0x08 // 0x0F - Sets gradient - (max 15 with PWM autoscale activated)
//#define TMC2130_PWM_AMPL 0xC8 // 0xFF - Sets PWM amplitude to 200 (max is 255)
#define TMC2130_PWM_GRAD 0x01 // 0x0F - Sets gradient - (max 15 with PWM autoscale activated)
#define TMC2130_PWM_AMPL 0xc8 // 0xFF - Sets PWM amplitude to 200 (max is 255)
#define TMC2130_PWM_AUTO 0x04 // 0x04 since writing in PWM_CONF (Activates PWM autoscaling)
//#define TMC2130_PWM_FREQ 0x01 // 0x01 since writing in PWM_CONF (Sets PWM frequency to 2/683 fCLK) 35.1kHz
#define TMC2130_PWM_FREQ 0x02 // 0x02 since writing in PWM_CONF (Sets PWM frequency to 2/683 fCLK) 46.9kHz
#define TMC2130_FCLK 12000000 // fclk = 12MHz
#define TMC2130_USTEPS_XY 16
#define TMC2130_USTEPS_Z 16
#define TMC2130_USTEPS_E 16
#define TMC2130_EXP256_XY 1
#define TMC2130_EXP256_Z 1
#define TMC2130_EXP256_E 1
#define TMC2130_USTEPS_XY 16 // microstep resolution for XY axes
#define TMC2130_USTEPS_Z 16 // microstep resolution for Z axis
#define TMC2130_USTEPS_E 64 // microstep resolution for E axis
#define TMC2130_INTPOL_XY 1 // extrapolate 256 for XY axes
#define TMC2130_INTPOL_Z 1 // extrapolate 256 for Z axis
#define TMC2130_INTPOL_E 1 // extrapolate 256 for E axis
// Special configuration for XY axes for operation (during standstill, use same settings as for other axes) //todo
// RP: this settings does not work (overtemp)
//#define TMC2130_PWM_GRAD_XY 156 // 0x0F - Sets gradient - (max 15 with PWM autoscale activated)
//#define TMC2130_PWM_AMPL_XY 63 // 0xFF - Sets PWM amplitude to 200 (max is 255)
//#define TMC2130_PWM_AUTO_XY 0x00 // 0x04 since writing in PWM_CONF (Activates PWM autoscaling)
//#define TMC2130_PWM_FREQ_XY 0x01 // 0x01 since writing in PWM_CONF (Sets PWM frequency to 2/683 fCLK)
#define TMC2130_PWM_GRAD_X 2 // PWMCONF
#define TMC2130_PWM_AMPL_X 230 // PWMCONF
#define TMC2130_PWM_AUTO_X 1 // PWMCONF
#define TMC2130_PWM_FREQ_X 2 // PWMCONF
#define TMC2130_TPWMTHRS 0 // TPWMTHRS - Sets the switching speed threshold based on TSTEP from stealthChop to spreadCycle mode
#define TMC2130_THIGH 0 // THIGH - unused
#define TMC2130_PWM_GRAD_Y 2 // PWMCONF
#define TMC2130_PWM_AMPL_Y 235 // PWMCONF
#define TMC2130_PWM_AUTO_Y 1 // PWMCONF
#define TMC2130_PWM_FREQ_Y 2 // PWMCONF
#define TMC2130_TCOOLTHRS 239 // TCOOLTHRS - coolstep treshold
/* //not used
#define TMC2130_PWM_GRAD_Z 4 // PWMCONF
#define TMC2130_PWM_AMPL_Z 200 // PWMCONF
#define TMC2130_PWM_AUTO_Z 1 // PWMCONF
#define TMC2130_PWM_FREQ_Z 2 // PWMCONF
#define TMC2130_PWM_GRAD_E 4 // PWMCONF
#define TMC2130_PWM_AMPL_E 200 // PWMCONF
#define TMC2130_PWM_AUTO_E 1 // PWMCONF
#define TMC2130_PWM_FREQ_E 2 // PWMCONF
*/
#define TMC2130_SG_HOMING 1 // stallguard homing
#define TMC2130_SG_HOMING_SW 1 // stallguard "software" homing
#define TMC2130_SG_THRS_X 12 // stallguard sensitivity for X axis
#define TMC2130_SG_THRS_Y 12 // stallguard sensitivity for Y axis
//#define TMC2130_PWM_DIV 683 // PWM frequency divider (1024, 683, 512, 410)
#define TMC2130_PWM_DIV 512 // PWM frequency divider (1024, 683, 512, 410)
#define TMC2130_PWM_CLK (2 * TMC2130_FCLK / TMC2130_PWM_DIV) // PWM frequency (23.4kHz, 35.1kHz, 46.9kHz, 58.5kHz for 12MHz fclk)
#define TMC2130_CURRENTS_H {2, 2, 2, 4} // default holding currents for all axes
#define TMC2130_CURRENTS_R {6, 6, 10, 8} // default running currents for all axes
#define TMC2130_DEBUG
#define TMC2130_TPWMTHRS 0 // TPWMTHRS - Sets the switching speed threshold based on TSTEP from stealthChop to spreadCycle mode
#define TMC2130_THIGH 0 // THIGH - unused
//#define TMC2130_TCOOLTHRS_X 450 // TCOOLTHRS - coolstep treshold
//#define TMC2130_TCOOLTHRS_Y 450 // TCOOLTHRS - coolstep treshold
#define TMC2130_TCOOLTHRS_X 430 // TCOOLTHRS - coolstep treshold
#define TMC2130_TCOOLTHRS_Y 430 // TCOOLTHRS - coolstep treshold
#define TMC2130_TCOOLTHRS_Z 500 // TCOOLTHRS - coolstep treshold
#define TMC2130_TCOOLTHRS_E 500 // TCOOLTHRS - coolstep treshold
#define TMC2130_SG_HOMING 1 // stallguard homing
//#define TMC2130_SG_HOMING_SW_XY 1 // stallguard "software" homing for XY axes
#define TMC2130_SG_HOMING_SW_Z 1 // stallguard "software" homing for Z axis
#define TMC2130_SG_THRS_X 1 // stallguard sensitivity for X axis
#define TMC2130_SG_THRS_Y 3 // stallguard sensitivity for Y axis
#define TMC2130_SG_THRS_Z 3 // stallguard sensitivity for Z axis
#define TMC2130_SG_THRS_E 3 // stallguard sensitivity for E axis
#define TMC2130_SG_DELTA 128 // stallguard delta [usteps] (minimum usteps before stallguard readed - SW homing)
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
#define TMC2130_CURRENTS_H {3, 3, 20, 28} // default holding currents for all axes
#define TMC2130_CURRENTS_R {13, 20, 20, 28} // default running currents for all axes
//#define TMC2130_DEBUG
//#define TMC2130_DEBUG_WR
//#define TMC2130_DEBUG_RD
@ -150,9 +197,12 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define DEFAULT_Kd 73.76
#else
// Define PID constants for extruder
#define DEFAULT_Kp 40.925
#define DEFAULT_Ki 4.875
#define DEFAULT_Kd 86.085
//#define DEFAULT_Kp 40.925
//#define DEFAULT_Ki 4.875
//#define DEFAULT_Kd 86.085
#define DEFAULT_Kp 16.13
#define DEFAULT_Ki 1.1625
#define DEFAULT_Kd 56.23
#endif
// Extrude mintemp
@ -199,7 +249,8 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define FILAMENTCHANGE_XYFEED 50
#define FILAMENTCHANGE_EFEED 20
#define FILAMENTCHANGE_RFEED 400
//#define FILAMENTCHANGE_RFEED 400
#define FILAMENTCHANGE_RFEED 7000 / 60
#define FILAMENTCHANGE_EXFEED 2
#define FILAMENTCHANGE_ZFEED 15
@ -232,7 +283,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define DIGIPOT_MOTOR_CURRENT_LOUD {135,135,135,135,135}
// Motor Current settings for RAMBo mini PWM value = MotorCurrentSetting * 255 / range
#if MOTHERBOARD == 102 || MOTHERBOARD == 302 || MOTHERBOARD == 300 || MOTHERBOARD == 299
#if MOTHERBOARD == 200 || MOTHERBOARD == 203 || MOTHERBOARD == 303 || MOTHERBOARD == 304 || MOTHERBOARD == 305
#define MOTOR_CURRENT_PWM_RANGE 2000
#define DEFAULT_PWM_MOTOR_CURRENT {400, 750, 750} // {XY,Z,E}
#define DEFAULT_PWM_MOTOR_CURRENT_LOUD {400, 750, 750} // {XY,Z,E}
@ -404,6 +455,8 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#else
#define TEMP_SENSOR_BED 1
#endif
#define TEMP_SENSOR_PINDA 1
#define TEMP_SENSOR_AMBIENT 2000
#define STACK_GUARD_TEST_VALUE 0xA2A2
@ -434,7 +487,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define DEFAULT_PID_TEMP 210
#define MIN_PRINT_FAN_SPEED 50
#define MIN_PRINT_FAN_SPEED 75
#ifdef SNMM
#define DEFAULT_RETRACTION 4 //used for PINDA temp calibration and pause print
@ -442,4 +495,18 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define DEFAULT_RETRACTION 1 //used for PINDA temp calibration and pause print
#endif
// How much shall the print head be lifted on power panic?
// Ideally the Z axis will reach a zero phase of the stepper driver on power outage. To simplify this,
// UVLO_Z_AXIS_SHIFT shall be an integer multiply of the stepper driver cycle, that is 4x full step.
// For example, the Prusa i3 MK2 with 16 microsteps per full step has Z stepping of 400 microsteps per mm.
// At 400 microsteps per mm, a full step lifts the Z axis by 0.04mm, and a stepper driver cycle is 0.16mm.
// The following example, 12 * (4 * 16 / 400) = 12 * 0.16mm = 1.92mm.
#define UVLO_Z_AXIS_SHIFT 1.92
// If power panic occured, and the current temperature is higher then target temperature before interrupt minus this offset, print will be recovered automatically.
#define AUTOMATIC_UVLO_BED_TEMP_OFFSET 5
#define HEATBED_V2
//#define SUPPORT_VERBOSITY
#endif //__CONFIGURATION_PRUSA_H