Skip to content

Commit

Permalink
Merge pull request #4 from lulzbot3d/Bed_Cooling_fan
Browse files Browse the repository at this point in the history
Bed cooling fan
  • Loading branch information
bmkahl authored Mar 6, 2024
2 parents 6fb2b4f + 54a78b0 commit df31661
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 34 deletions.
37 changes: 23 additions & 14 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,8 @@
#define LULZBOT_EXTRUDERS 2
#define LULZBOT_TOOLCHANGE_ZRAISE 0
#define LULZBOT_NUM_SERVOS 2
#define LULZBOT_SERVO_DELAY {1000, 1000}
#define LULZBOT_SERVO_E0_DELAY 1000
#define LULZBOT_SERVO_E1_DELAY 1000
#define LULZBOT_SWITCHING_NOZZLE
#define LULZBOT_SWITCHING_NOZZLE_E1_SERVO_NR 1
#define LULZBOT_SWITCHING_NOZZLE_SERVO_ANGLES { 55, 120}
Expand Down Expand Up @@ -549,7 +550,8 @@
#define LULZBOT_EXTRUDERS 2
#define LULZBOT_TOOLCHANGE_ZRAISE 0
#define LULZBOT_NUM_SERVOS 2
#define LULZBOT_SERVO_DELAY {500, 500}
#define LULZBOT_SERVO_E0_DELAY 500
#define LULZBOT_SERVO_E1_DELAY 500
#define LULZBOT_SWITCHING_NOZZLE
#define LULZBOT_SWITCHING_NOZZLE_E1_SERVO_NR 1
#define LULZBOT_SWITCHING_NOZZLE_SERVO_ANGLES { 75, 125}
Expand Down Expand Up @@ -624,8 +626,8 @@
#define SWITCHING_NOZZLE
#endif
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
#define SWITCHING_NOZZLE_SERVO_NR 1
#define SWITCHING_NOZZLE_E1_SERVO_NR 2 // If two servos are used, the index of the second
#define SWITCHING_NOZZLE_SERVO_ANGLES { LULZBOT_SWITCHING_NOZZLE_SERVO_ANGLES, LULZBOT_SWITCHING_NOZZLE_SERVO_ANGLES } // A pair of angles for { E0, E1 }.
// For Dual Servo use two pairs: { { lower, raise }, { lower, raise } }
#define SWITCHING_NOZZLE_SERVO_DWELL 300
Expand Down Expand Up @@ -1962,7 +1964,7 @@
* Z Servo Probe, such as an endstop switch on a rotating arm.
*/
#if ENABLED(TAZProV2)
//#define Z_PROBE_SERVO_NR 2
#define Z_PROBE_SERVO_NR 0
#endif
#ifdef Z_PROBE_SERVO_NR
//#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles
Expand Down Expand Up @@ -2160,7 +2162,7 @@
#if ENABLED(TOOLHEAD_Galaxy_DualExtruder)
#define NOZZLE_TO_PROBE_OFFSET { 100, 70, -3.2 }
#else
#define NOZZLE_TO_PROBE_OFFSET { 23, 63, -3.2 }
#define NOZZLE_TO_PROBE_OFFSET { 23, 63, 0 }
#endif
#elif ANY(Sidekick_289, Sidekick_747)
#define NOZZLE_TO_PROBE_OFFSET { -1, 50, -1.23 }
Expand All @@ -2176,7 +2178,7 @@

// Most probes should stay away from the edges of the bed, but
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
#if ENABLED(LULZBOT_BLTouch, TazDualZ)
#if ENABLED(TazDualZ)
#define PROBING_MARGIN 5
#elif ENABLED(LULZBOT_BLTouch)
#define PROBING_MARGIN 50
Expand Down Expand Up @@ -2427,7 +2429,7 @@
#else
#define Y_HOME_DIR 1
#endif
#if ANY(MiniV2, MiniV3, TAZPro, TAZProXT, Workhorse, Sidekick289, Sidekick747)
#if ANY(MiniV2, MiniV3, TAZPro, TAZProXT, TAZProV2, Workhorse, Sidekick289, Sidekick747)
#define Z_HOME_DIR 1
#else
#define Z_HOME_DIR -1
Expand Down Expand Up @@ -2619,7 +2621,7 @@
#define LULZBOT_X_MAX_POS 313
#define LULZBOT_Y_MAX_POS 330
#define LULZBOT_Z_MIN_POS -9
#define LULZBOT_Z_MAX_POS 303
#define LULZBOT_Z_MAX_POS 300
#endif
#elif defined(Sidekick_289)
#define X_BED_SIZE 161
Expand Down Expand Up @@ -3117,15 +3119,15 @@
* - Allows Z homing only when XY positions are known and trusted.
* - If stepper drivers sleep, XY homing may be required again before Z homing.
*/
#if ANY(TAZ6, Sidekick_289, Sidekick_747, TAZProV2)
#if ANY(TAZ6, Sidekick_289, Sidekick_747)
#define Z_SAFE_HOMING
#endif

#if ENABLED(Z_SAFE_HOMING)
#if ENABLED(TAZ6)
#define Z_SAFE_HOMING_X_POINT -20.1 // (mm) X point for Z homing
#define Z_SAFE_HOMING_Y_POINT 259.5 // (mm) Y point for Z homing
#elif ANY(Sidekick_289, Sidekick_747, TAZProV2)
#elif ANY(Sidekick_289, Sidekick_747)
#define Z_SAFE_HOMING_X_POINT (X_CENTER) // (mm) X point for Z homing
#define Z_SAFE_HOMING_Y_POINT (Y_BED_SIZE/2) // (mm) Y point for Z homing
//#define Z_SAFE_HOMING_POINT_ABSOLUTE // Ignore home offsets (M206) for Z homing position
Expand All @@ -3140,7 +3142,7 @@
#else
#define HOMING_FEEDRATE_Z (4*60)
#endif
#define HOMING_FEEDRATE_MM_M { (50*60), (50*60), HOMING_FEEDRATE_Z }
#define HOMING_FEEDRATE_MM_M { (60*60), (60*60), HOMING_FEEDRATE_Z }

// Validate that endstops are triggered on homing moves
#define VALIDATE_HOMING_ENDSTOPS
Expand Down Expand Up @@ -3321,6 +3323,7 @@
#define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
#define NOZZLE_PARK_Z_FEEDRATE Z_FEEDRATE // (mm/s) Z axis feedrate (not used for delta printers)
#define PARK_NOZZLE_MENU_OPTION // Adds an option to park the nozzle under motion menu
#define PARKING_COMMAND_GCODE "G28O\nG0 X140 Y140 Z71 F3000"
#endif

/**
Expand Down Expand Up @@ -4589,8 +4592,10 @@
// (ms) Delay before the next move will start, to give the servo time to reach its target angle.
// 300ms is a good value but you can try less delay.
// If the servo can't reach the requested position, increase it.
#if defined(LULZBOT_SERVO_DELAY)
#define SERVO_DELAY LULZBOT_SERVO_DELAY
#if ENABLED(TAZProV2) && ENABLED(TOOLHEAD_Galaxy_DualExtruder)
#define SERVO_DELAY {100, LULZBOT_SERVO_E0_DELAY, LULZBOT_SERVO_E1_DELAY}
#elif ANY(TOOLHEAD_Quiver_DualExtruder, TOOLHEAD_Galaxy_DualExtruder)
#define SERVO_DELAY {LULZBOT_SERVO_E0_DELAY, LULZBOT_SERVO_E1_DELAY}
#endif

// Only power servos during movement, otherwise leave off to prevent jitter
Expand Down Expand Up @@ -4637,4 +4642,8 @@

#if defined(LULZBOT_LONG_BED) && !defined(LULZBOT_BLTouch)
#error LULZBOT_Quiver_TAZPro with LULZBOT_LONG_BED requires LULZBOT_BLTouch to be enabled.
#endif

#if defined(TAZProV2) && defined(TOOLHEAD_Quiver_DualExtruder)
#error LULZBOT TAZProV2 is not capatible with Legacy dual extruder, please select a different Tool Head.
#endif
18 changes: 9 additions & 9 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@
*/
#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
#if ANY(MiniV2, MiniV3, TAZPro, TAZProXT, TAZProV2, Sidekick_289, Sidekick_747)
#if ANY(MiniV2, MiniV3, Sidekick_289, Sidekick_747)
#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan
#else
#define CONTROLLER_FAN_PIN FAN2_PIN // Set a custom pin for the controller fan
Expand Down Expand Up @@ -893,9 +893,9 @@
#ifdef Z2_DRIVER_TYPE
//#define INVERT_Z2_VS_Z_DIR // Z2 direction signal is the opposite of Z

//#define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops
#define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops
#if ENABLED(Z_MULTI_ENDSTOPS)
//#define Z2_STOP_PIN X_MAX_PIN // Z2 endstop pin override
#define Z2_STOP_PIN Y_MAX_PIN // Z2 endstop pin override
#define Z2_ENDSTOP_ADJUSTMENT 0 // Z2 offset relative to Z endstop
#endif
#ifdef Z3_DRIVER_TYPE
Expand Down Expand Up @@ -934,11 +934,11 @@
* the position of the toolhead relative to the workspace.
*/

#if ANY(MiniV2, MiniV3, TAZPro, TAZProXT, TAZProV2, Sidekick_289, Sidekick_747)
#if ANY(MiniV2, MiniV3, TAZPro, TAZProXT, Sidekick_289, Sidekick_747)
#define SENSORLESS_BACKOFF_MM { 4, 4 , 0} // (mm) Backoff from endstops before sensorless homing
#define HOMING_BACKOFF_POST_MM { 5, 5, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing
#else
#if defined(Workhorse)
#if ANY(Workhorse, TAZProV2)
#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (mm) Backoff from endstops after homing
#define QUICK_HOME // If G28 contains XY do a diagonal move first
#elif defined(TAZ6)
Expand Down Expand Up @@ -1054,7 +1054,7 @@
#if ANY(TAZPro, TAZProXT) && ENABLED(LULZBOT_BLTouch)
#define Z_STEPPER_ALIGN_XY { { 10, (Y_BED_SIZE / 2) }, { (X_BED_SIZE - 10 ), (Y_BED_SIZE / 2) } }
#elif ENABLED(TAZProV2)
#define Z_STEPPER_ALIGN_XY { { 10, (Y_BED_SIZE / 2) }, { (X_BED_SIZE - 10 ), (Y_BED_SIZE / 2) } }
#define Z_STEPPER_ALIGN_XY { { 25, (Y_BED_SIZE / 2) }, { (X_BED_SIZE - 10 ), (Y_BED_SIZE / 2) } }
#else
#define Z_STEPPER_ALIGN_XY { { -10, -9 }, { (X_BED_SIZE + 8), -9 } }
#endif
Expand Down Expand Up @@ -1095,7 +1095,7 @@
#ifndef Z_STEPPER_ALIGN_STEPPER_XY
// Amplification factor. Used to scale the correction step up or down in case
// the stepper (spindle) position is farther out than the test point.
#define Z_STEPPER_ALIGN_AMP 1 // Use a value > 1.0 NOTE: This may cause instability!
#define Z_STEPPER_ALIGN_AMP 1.6 // Use a value > 1.0 NOTE: This may cause instability!
#endif

// On a 300mm bed a 5% grade would give a misalignment of ~1.5cm
Expand All @@ -1105,7 +1105,7 @@
#define RESTORE_LEVELING_AFTER_G34 // Restore leveling after G34 is done?
// After G34, re-home Z (G28 Z) or just calculate it from the last probe heights?
// Re-homing might be more precise in reproducing the actual 'G28 Z' homing height, especially on an uneven bed.
#define HOME_AFTER_G34
//#define HOME_AFTER_G34
#endif

//
Expand Down Expand Up @@ -4180,7 +4180,7 @@
#else
#define E_CURRENT_Aero "M906 E960"
#define E_CURRENT_BMG "M906 E960"
#define E_CURRENT_LGX175 "M906 E750"
#define E_CURRENT_LGX175 "M906 E850"
#define E_CURRENT_LGX285 "M906 E850"
#define E_CURRENT_TWNB175 "M906 T0 E750\n M906 T1 E750"
#define E_CURRENT_TWNB285 "M906 T0 E850\n M906 T1 E850"
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/Lulzbot_Extras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void LULZBOT_ON_STARTUP(void) {
LULZBOT_EMI_SHUTOFF(GPIO_PB4_J20_12)
LULZBOT_EMI_SHUTOFF(GPIO_PB9_J20_13)
LULZBOT_EMI_SHUTOFF(GPIO_PB7_J20_14)
LULZBOT_EMI_SHUTOFF(GPIO_PB14_J20_17)
//LULZBOT_EMI_SHUTOFF(GPIO_PB14_J20_17)
LULZBOT_EMI_SHUTOFF(GPIO_PA18_J20_21)
LULZBOT_EMI_SHUTOFF(GPIO_PA17_J20_22)
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void BaseNumericAdjustmentScreen::onEntry() {
bool BaseNumericAdjustmentScreen::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1: GOTO_PREVIOUS(); return true;
case 100: SpinnerDialogBox::enqueueAndWait(F("G28O\nG0 X100 Y283 Z200 F3000"));
case 100: SpinnerDialogBox::enqueueAndWait(F(PARKING_COMMAND_GCODE)); break;
case 240 ... 245: mydata.increment = tag; break;
default: return current_screen.onTouchHeld(tag);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ bool ChangeFilamentScreen::onTouchEnd(uint8_t tag) {
injectCommands(F("M117 Print Resumed")); resumePrint(); GOTO_SCREEN(StatusScreen); break;
}
else{
injectCommands(F("G28O\nG0 X100 Y283 Z200 F3000"));
injectCommands(F(PARKING_COMMAND_GCODE)); break;
}
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ bool CustomUserMenus::onTouchEnd(uint8_t tag) {
#endif

case 1: GOTO_PREVIOUS(); break;
case 20: injectCommands(F("G28O\nG0 X100 Y283 Z200 F3000"));
case 20: injectCommands(F(PARKING_COMMAND_GCODE)); break;
default: return false;
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ bool BaseMoveAxisScreen::onTouchHeld(const uint8_t tag) {
#endif
#endif
case 23: SpinnerDialogBox::enqueueAndWait(F("G28")); break;
case 25: SpinnerDialogBox::enqueueAndWait(F("G28O\nG0 X100 Y283 Z200 F3000"));
case 25: injectCommands(F(PARKING_COMMAND_GCODE)); break;
default:
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ bool TemperatureScreen::onTouchHeld(uint8_t tag) {
case 32: injectCommands_P(PSTR(PREHEAT_2_COMMAND)); GOTO_SCREEN(StatusScreen); break;
case 33: injectCommands_P(PSTR(PREHEAT_3_COMMAND)); GOTO_SCREEN(StatusScreen); break;
case 34: injectCommands_P(PSTR(PREHEAT_4_COMMAND)); GOTO_SCREEN(StatusScreen); break;
case 35: injectCommands(F("G28O\nG0 X100 Y283 Z200 F3000"));
case 35: injectCommands(F(PARKING_COMMAND_GCODE)); break;
default:
return false;
}
Expand Down
10 changes: 5 additions & 5 deletions Marlin/src/pins/sam/pins_ARCHIM2.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
// Servos
//
#if ENABLED(TAZProV2)
#define SERVO0_PIN 15 // PD5 MAX ES2 (Y_MAX_PIN)
#define SERVO0_PIN 53 // D53 PB14 (Header J20 17)
#define SERVO1_PIN 21 // D21 PB13 (Header J20 19)
#define SERVO2_PIN 20 // D20 PB12 (Header J20 20)
#elif ENABLED(LULZBOT_BLTouch) && DISABLED(TAZProV2)
Expand Down Expand Up @@ -102,9 +102,9 @@
#define X_MIN_PIN 14 // PD4 MIN ES1
#if DISABLED(TAZProV2)
#define X_MAX_PIN 32 // PD10 MAX ES1
#define Y_MAX_PIN 15 // PD5 MAX ES2
#endif
#define Y_MIN_PIN 29 // PD6 MIN ES2
#define Y_MAX_PIN 15 // PD5 MAX ES2 NOTE: TAZProV2 uses this as second Z Max limit
#endif

#if ENABLED(LULZBOT_BLTouch, TAZProV2)
Expand Down Expand Up @@ -190,13 +190,14 @@
//
#define HEATER_0_PIN 6 // D6 PC24 FET_PWM3
#define HEATER_1_PIN 7 // D7 PC23 FET_PWM4
#define HEATER_2_PIN 8 // D8 PC22 FET_PWM5
//#define HEATER_2_PIN 8 // D8 PC22 FET_PWM5
#define HEATER_BED_PIN 9 // D9 PC21 BED_PWM

#ifndef FAN0_PIN
#define FAN0_PIN 4 // D4 PC26 FET_PWM1
#endif
#define FAN1_PIN 5 // D5 PC25 FET_PWM2
#define FAN2_PIN 5 // D5 PC25 FET_PWM2
#define FAN1_PIN 8 // D8 PC22 FET_PWM5

//
// Misc. Functions
Expand Down Expand Up @@ -227,7 +228,6 @@
#define GPIO_PB7_J20_14 98 // D98 PB7 (Header J20 14)
#define GPIO_PB15_J20_15 66 // D66 PB15 (Header J20 15)
#define GPIO_PB16_J20_16 67 // D67 PB16 (Header J20 16)
#define GPIO_PB14_J20_17 53 // D53 PB14 (Header J20 17)
#define GPIO_PA18_J20_21 71 // D71 PA17 (Header J20 21)
#define GPIO_PA17_J20_22 70 // D70 PA17 (Header J20 22)

Expand Down

0 comments on commit df31661

Please sign in to comment.