diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 7e6683483d..d7d61fd6c1 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -595,6 +595,8 @@ #error "ARC_SUPPORT now requires MIN_ARC_SEGMENT_MM and MAX_ARC_SEGMENT_MM." #elif defined(SPINDLE_LASER_PWM) #error "SPINDLE_LASER_PWM (true) is now set with SPINDLE_LASER_USE_PWM (enabled)." +#elif ANY(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) + #error "The IS_RAMPS_* conditionals (for heater/fan/bed pins) are now called FET_ORDER_*." #endif #if MB(DUE3DOM_MINI) && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD) diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 04f9afaad2..20bd5ef8cc 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -57,8 +57,6 @@ #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif -#define IS_RAMPS_EFB - // // Servos // @@ -144,58 +142,41 @@ #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif -// -// Augmentation for auto-assigning RAMPS plugs -// -#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) - #if HAS_MULTI_HOTEND - #if TEMP_SENSOR_BED - #define IS_RAMPS_EEB - #else - #define IS_RAMPS_EEF - #endif - #elif TEMP_SENSOR_BED - #define IS_RAMPS_EFB - #else - #define IS_RAMPS_EFF - #endif -#endif - // // Heaters / Fans // +#ifndef MOSFET_A_PIN + #define MOSFET_A_PIN 10 +#endif +#ifndef MOSFET_B_PIN + #define MOSFET_B_PIN 9 +#endif +#ifndef MOSFET_C_PIN + #define MOSFET_C_PIN 8 +#endif #ifndef MOSFET_D_PIN #define MOSFET_D_PIN -1 #endif -#ifndef RAMPS_D8_PIN - #define RAMPS_D8_PIN 8 -#endif -#ifndef RAMPS_D9_PIN - #define RAMPS_D9_PIN 9 -#endif -#ifndef RAMPS_D10_PIN - #define RAMPS_D10_PIN 10 -#endif -#define HEATER_0_PIN RAMPS_D10_PIN +#define HEATER_0_PIN MOSFET_A_PIN -#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed - #define FAN_PIN RAMPS_D9_PIN - #define HEATER_BED_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan - #define HEATER_1_PIN RAMPS_D9_PIN - #define FAN_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed - #define HEATER_1_PIN RAMPS_D9_PIN - #define HEATER_BED_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan - #define FAN_PIN RAMPS_D9_PIN - #define FAN1_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_SF) // Spindle, Fan - #define FAN_PIN RAMPS_D8_PIN +#if FET_ORDER_EFB // Hotend, Fan, Bed + #define FAN_PIN MOSFET_B_PIN + #define HEATER_BED_PIN MOSFET_C_PIN +#elif FET_ORDER_EEF // Hotend, Hotend, Fan + #define HEATER_1_PIN MOSFET_B_PIN + #define FAN_PIN MOSFET_C_PIN +#elif FET_ORDER_EEB // Hotend, Hotend, Bed + #define HEATER_1_PIN MOSFET_B_PIN + #define HEATER_BED_PIN MOSFET_C_PIN +#elif FET_ORDER_EFF // Hotend, Fan, Fan + #define FAN_PIN MOSFET_B_PIN + #define FAN1_PIN MOSFET_C_PIN +#elif FET_ORDER_SF // Spindle, Fan + #define FAN_PIN MOSFET_C_PIN #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") - #define FAN_PIN RAMPS_D9_PIN - #define HEATER_BED_PIN RAMPS_D8_PIN + #define FAN_PIN MOSFET_B_PIN + #define HEATER_BED_PIN MOSFET_C_PIN #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #define FAN1_PIN MOSFET_D_PIN #else diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index ff36796207..4d1dbecf2e 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -145,9 +145,9 @@ * PWM1.4 DIO53 SDSS(SSEL0) J3-5 AUX-3 * PWM1.4 DIO46 Z_STEP_PIN * PWM1.5 DIO3 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES - * PWM1.5 DIO9 RAMPS_D9_PIN + * PWM1.5 DIO9 MOSFET_B_PIN * PWM1.6 DIO14 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES - * PWM1.6 DIO10 RAMPS_D10_PIN + * PWM1.6 DIO10 MOSFET_A_PIN */ /** diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 258ecd107b..406e65d295 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -363,9 +363,9 @@ * PWM1.4 P1_23 SDSS(SSEL0) J3-5 AUX-3 * PWM1.4 P2_03 Z_STEP_PIN * PWM1.5 P1_24 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES - * PWM1.5 P2_04 RAMPS_D9_PIN + * PWM1.5 P2_04 MOSFET_B_PIN * PWM1.6 P1_26 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES - * PWM1.6 P2_05 RAMPS_D10_PIN + * PWM1.6 P2_05 MOSFET_A_PIN */ /** diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index ce5d5ad7c6..934b74cbb1 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -168,52 +168,35 @@ //#define ?? P0_03_A6 // A6 - ( 0) - RXD0 - J4-4 & AUX-1 #define FILWIDTH_PIN P0_02_A7 // A7 - ( 1) - TXD0 - J4-5 & AUX-1 -// -// Augmentation for auto-assigning RAMPS plugs -// -#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) - #if HAS_MULTI_HOTEND - #if TEMP_SENSOR_BED - #define IS_RAMPS_EEB - #else - #define IS_RAMPS_EEF - #endif - #elif TEMP_SENSOR_BED - #define IS_RAMPS_EFB - #else - #define IS_RAMPS_EFF - #endif -#endif - // // Heaters / Fans // +#ifndef MOSFET_A_PIN + #define MOSFET_A_PIN P2_05 +#endif +#ifndef MOSFET_B_PIN + #define MOSFET_B_PIN P2_04 +#endif +#ifndef MOSFET_C_PIN + #define MOSFET_C_PIN P2_07 +#endif #ifndef MOSFET_D_PIN #define MOSFET_D_PIN -1 #endif -#ifndef RAMPS_D8_PIN - #define RAMPS_D8_PIN P2_07 // (8) -#endif -#ifndef RAMPS_D9_PIN - #define RAMPS_D9_PIN P2_04 // (9) -#endif -#ifndef RAMPS_D10_PIN - #define RAMPS_D10_PIN P2_05 // (10) -#endif -#define HEATER_0_PIN RAMPS_D10_PIN +#define HEATER_0_PIN MOSFET_A_PIN -#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed - #define HEATER_BED_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan - #define HEATER_1_PIN RAMPS_D9_PIN -#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed - #define HEATER_1_PIN RAMPS_D9_PIN - #define HEATER_BED_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan - #define FAN1_PIN RAMPS_D8_PIN -#elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") - #define HEATER_BED_PIN RAMPS_D8_PIN +#if FET_ORDER_EFB // Hotend, Fan, Bed + #define HEATER_BED_PIN MOSFET_C_PIN +#elif FET_ORDER_EEF // Hotend, Hotend, Fan + #define HEATER_1_PIN MOSFET_B_PIN +#elif FET_ORDER_EEB // Hotend, Hotend, Bed + #define HEATER_1_PIN MOSFET_B_PIN + #define HEATER_BED_PIN MOSFET_C_PIN +#elif FET_ORDER_EFF // Hotend, Fan, Fan + #define FAN1_PIN MOSFET_C_PIN +#elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") + #define HEATER_BED_PIN MOSFET_C_PIN #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #define FAN1_PIN MOSFET_D_PIN #else @@ -222,14 +205,14 @@ #endif #ifndef FAN_PIN - #if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan - #define FAN_PIN RAMPS_D9_PIN - #elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan - #define FAN_PIN RAMPS_D8_PIN - #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed + #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #define FAN_PIN MOSFET_B_PIN + #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan + #define FAN_PIN MOSFET_C_PIN + #elif FET_ORDER_EEB // Hotend, Hotend, Bed #define FAN_PIN P1_18 // (4) IO pin. Buffer needed #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") - #define FAN_PIN RAMPS_D9_PIN + #define FAN_PIN MOSFET_B_PIN #endif #endif @@ -484,14 +467,14 @@ * All Fast PWMs have a 50Hz rate. * * The following pins/signals use the direct method. All other pins use the - * the interrupt method. Note that SERVO2_PIN and RAMPS_D8_PIN use the + * the interrupt method. Note that SERVO2_PIN and MOSFET_C_PIN use the * interrupt method. * * P1_20 (11) SERVO0_PIN * P1_21 ( 6) SERVO1_PIN J5-1 * P0_18 ( 4) SERVO3_PIN 5V output - * *P2_04 ( 9) RAMPS_D9_PIN - * *P2_05 (10) RAMPS_D10_PIN + * *P2_04 ( 9) MOSFET_B_PIN + * *P2_05 (10) MOSFET_A_PIN * * * - If used as a heater driver then a Fast PWM is NOT assigned. If used as * a fan driver then enabling FAST_PWM_FAN assigns a Fast PWM to it. diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index aea05134a8..d5122e46a9 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -151,54 +151,43 @@ // With no heated bed, an additional 24V fan is possible. // -// Labels from the schematic: -#define EX1_HEAT_PIN 6 // H3 -#define EX1_FAN_PIN 7 // H4 -#define EX2_HEAT_PIN 11 // B5 -#define EX2_FAN_PIN 12 // B6 -#define HBP_PIN 45 // L4 -#define EXTRA_FET_PIN 44 // L5 - -#if HAS_MULTI_HOTEND - #if TEMP_SENSOR_BED - #define IS_EEB - #else - #define IS_EEF - #endif -#elif TEMP_SENSOR_BED - #define IS_EFB -#else - #define IS_EFF -#endif +#define MOSFET_A_PIN 6 // H3 EX1_HEAT_PIN +#define MOSFET_B_PIN 11 // B5 EX2_HEAT_PIN +#define MOSFET_C_PIN 45 // L4 HBP_PIN +#define MOSFET_D_PIN 44 // L5 EXTRA_FET_PIN // // Heaters / Fans (24V) // -#define HEATER_0_PIN EX1_HEAT_PIN +#define HEATER_0_PIN MOSFET_A_PIN -#if ENABLED(IS_EFB) // Hotend, Fan, Bed - #define HEATER_BED_PIN HBP_PIN -#elif ENABLED(IS_EEF) // Hotend, Hotend, Fan - #define HEATER_1_PIN EX2_HEAT_PIN -#elif ENABLED(IS_EEB) // Hotend, Hotend, Bed - #define HEATER_1_PIN EX2_HEAT_PIN - #define HEATER_BED_PIN HBP_PIN -#elif ENABLED(IS_EFF) // Hotend, Fan, Fan - #define FAN1_PIN HBP_PIN +#if FET_ORDER_EFB // Hotend, Fan, Bed + #define HEATER_BED_PIN MOSFET_C_PIN +#elif FET_ORDER_EEF // Hotend, Hotend, Fan + #define HEATER_1_PIN MOSFET_B_PIN +#elif FET_ORDER_EEB // Hotend, Hotend, Bed + #define HEATER_1_PIN MOSFET_B_PIN + #define HEATER_BED_PIN MOSFET_C_PIN +#elif FET_ORDER_EFF // Hotend, Fan, Fan + #define FAN1_PIN MOSFET_C_PIN #endif #ifndef FAN_PIN - #if EITHER(IS_EFB, IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan - #define FAN_PIN EX2_HEAT_PIN - #elif EITHER(IS_EEF, IS_SF) // Hotend, Hotend, Fan or Spindle, Fan - #define FAN_PIN HBP_PIN + #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #define FAN_PIN MOSFET_B_PIN + #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan + #define FAN_PIN MOSFET_C_PIN #else - #define FAN_PIN EXTRA_FET_PIN + #define FAN_PIN MOSFET_D_PIN #endif #endif +#ifndef FAN1_PIN + #define FAN1_PIN 7 // H4 EX1_FAN_PIN +#endif + #ifndef CONTROLLER_FAN_PIN - #define CONTROLLER_FAN_PIN EX2_FAN_PIN + #define CONTROLLER_FAN_PIN 12 // B6 EX2_FAN_PIN #endif // @@ -268,9 +257,6 @@ #define SDSS 53 // B0 #define SD_DETECT_PIN 9 // H6 -// -// TMC 220x -// #if HAS_TMC_UART /** * TMC220x stepper drivers diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 49585673bd..99fdd71016 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -38,15 +38,23 @@ #define MAX_E_STEPPERS 8 #if MB(RAMPS_13_EFB, RAMPS_14_EFB, RAMPS_PLUS_EFB, RAMPS_14_RE_ARM_EFB, RAMPS_SMART_EFB, RAMPS_DUO_EFB, RAMPS4DUE_EFB) - #define IS_RAMPS_EFB + #define FET_ORDER_EFB 1 #elif MB(RAMPS_13_EEB, RAMPS_14_EEB, RAMPS_PLUS_EEB, RAMPS_14_RE_ARM_EEB, RAMPS_SMART_EEB, RAMPS_DUO_EEB, RAMPS4DUE_EEB) - #define IS_RAMPS_EEB + #define FET_ORDER_EEB 1 #elif MB(RAMPS_13_EFF, RAMPS_14_EFF, RAMPS_PLUS_EFF, RAMPS_14_RE_ARM_EFF, RAMPS_SMART_EFF, RAMPS_DUO_EFF, RAMPS4DUE_EFF) - #define IS_RAMPS_EFF + #define FET_ORDER_EFF 1 #elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF) - #define IS_RAMPS_EEF -#elif MB(RAMPS_13_SF, RAMPS_14_SF, RAMPS_PLUS_SF, RAMPS_14_RE_ARM_SF, RAMPS_SMART_SF, RAMPS_DUO_SF, RAMPS4DUE_SF) - #define IS_RAMPS_SF + #define FET_ORDER_EEF 1 +#elif MB(RAMPS_13_SF, RAMPS_14_SF, RAMPS_PLUS_SF, RAMPS_14_RE_ARM_SF, RAMPS_SMART_SF, RAMPS_DUO_SF, RAMPS4DUE_SF) || EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define FET_ORDER_SF 1 +#elif HAS_MULTI_HOTEND && TEMP_SENSOR_BED + #define FET_ORDER_EEB 1 +#elif HAS_MULTI_HOTEND + #define FET_ORDER_EEF 1 +#elif TEMP_SENSOR_BED + #define FET_ORDER_EFB 1 +#else + #define FET_ORDER_EFF 1 #endif #if !(BOTH(IS_ULTRA_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 50304648ab..05756d6004 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -974,15 +974,6 @@ #if _EXISTS(REF_CLK) REPORT_NAME_DIGITAL(__LINE__, REF_CLK) #endif -#if PIN_EXISTS(RAMPS_D10) - REPORT_NAME_DIGITAL(__LINE__, RAMPS_D10_PIN) -#endif -#if PIN_EXISTS(RAMPS_D8) - REPORT_NAME_DIGITAL(__LINE__, RAMPS_D8_PIN) -#endif -#if PIN_EXISTS(RAMPS_D9) - REPORT_NAME_DIGITAL(__LINE__, RAMPS_D9_PIN) -#endif #if PIN_EXISTS(NEOPIXEL) REPORT_NAME_DIGITAL(__LINE__, NEOPIXEL_PIN) #endif diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 5bd1667356..63b838f52f 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -62,8 +62,8 @@ // // Heaters / Fans // -#define RAMPS_D8_PIN 9 -#define RAMPS_D9_PIN 8 +#define MOSFET_B_PIN 8 +#define MOSFET_C_PIN 9 #define MOSFET_D_PIN 12 // diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h index 4d7c67fc39..b5eb6f1545 100644 --- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h @@ -68,9 +68,9 @@ // // Heaters / Fans // -#define RAMPS_D8_PIN 10 -#define RAMPS_D9_PIN 12 -#define RAMPS_D10_PIN 9 +#define MOSFET_A_PIN 9 +#define MOSFET_B_PIN 12 +#define MOSFET_C_PIN 10 #define MOSFET_D_PIN 7 // diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index 34a4ceb27d..845e2d65ec 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -121,23 +121,6 @@ #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif -// -// Augmentation for auto-assigning RAMPS plugs -// -#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) - #if HAS_MULTI_HOTEND - #if TEMP_SENSOR_BED - #define IS_RAMPS_EEB - #else - #define IS_RAMPS_EEF - #endif - #elif TEMP_SENSOR_BED - #define IS_RAMPS_EFB - #else - #define IS_RAMPS_EFF - #endif -#endif - // // Heaters / Fans // diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index 94c4551fc2..9893ef3b17 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -118,23 +118,6 @@ #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif -// -// Augmentation for auto-assigning RAMPS plugs -// -#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) - #if HAS_MULTI_HOTEND - #if TEMP_SENSOR_BED - #define IS_RAMPS_EEB - #else - #define IS_RAMPS_EEF - #endif - #elif TEMP_SENSOR_BED - #define IS_RAMPS_EFB - #else - #define IS_RAMPS_EFF - #endif -#endif - // // Heaters / Fans // diff --git a/Marlin/src/pins/ramps/pins_K8600.h b/Marlin/src/pins/ramps/pins_K8600.h index d312490dbe..f37516b710 100644 --- a/Marlin/src/pins/ramps/pins_K8600.h +++ b/Marlin/src/pins/ramps/pins_K8600.h @@ -59,7 +59,6 @@ // // Other RAMPS pins // -#define IS_RAMPS_EFB // Override autodetection. Bed will be undefined. #include "pins_RAMPS.h" // diff --git a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h index 6b48e3cbd6..3b2639b431 100644 --- a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h +++ b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h @@ -116,5 +116,4 @@ // // Other RAMPS 1.3 pins // -#define IS_RAMPS_EFB // Override autodetection. Bed will be undefined. #include "pins_RAMPS_13.h" // ... RAMPS diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index e90c3d03fc..4697ff61b2 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -189,52 +189,35 @@ #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) #endif -// -// Augmentation for auto-assigning RAMPS plugs -// -#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) - #if HAS_MULTI_HOTEND - #if TEMP_SENSOR_BED - #define IS_RAMPS_EEB - #else - #define IS_RAMPS_EEF - #endif - #elif TEMP_SENSOR_BED - #define IS_RAMPS_EFB - #else - #define IS_RAMPS_EFF - #endif -#endif - // // Heaters / Fans // +#ifndef MOSFET_A_PIN + #define MOSFET_A_PIN 10 +#endif +#ifndef MOSFET_B_PIN + #define MOSFET_B_PIN 9 +#endif +#ifndef MOSFET_C_PIN + #define MOSFET_C_PIN 8 +#endif #ifndef MOSFET_D_PIN #define MOSFET_D_PIN -1 #endif -#ifndef RAMPS_D8_PIN - #define RAMPS_D8_PIN 8 -#endif -#ifndef RAMPS_D9_PIN - #define RAMPS_D9_PIN 9 -#endif -#ifndef RAMPS_D10_PIN - #define RAMPS_D10_PIN 10 -#endif -#define HEATER_0_PIN RAMPS_D10_PIN +#define HEATER_0_PIN MOSFET_A_PIN -#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed - #define HEATER_BED_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan - #define HEATER_1_PIN RAMPS_D9_PIN -#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed - #define HEATER_1_PIN RAMPS_D9_PIN - #define HEATER_BED_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan - #define FAN1_PIN RAMPS_D8_PIN -#elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") - #define HEATER_BED_PIN RAMPS_D8_PIN +#if FET_ORDER_EFB // Hotend, Fan, Bed + #define HEATER_BED_PIN MOSFET_C_PIN +#elif FET_ORDER_EEF // Hotend, Hotend, Fan + #define HEATER_1_PIN MOSFET_B_PIN +#elif FET_ORDER_EEB // Hotend, Hotend, Bed + #define HEATER_1_PIN MOSFET_B_PIN + #define HEATER_BED_PIN MOSFET_C_PIN +#elif FET_ORDER_EFF // Hotend, Fan, Fan + #define FAN1_PIN MOSFET_C_PIN +#elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") + #define HEATER_BED_PIN MOSFET_C_PIN #if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) #define HEATER_1_PIN MOSFET_D_PIN #else @@ -243,14 +226,14 @@ #endif #ifndef FAN_PIN - #if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan - #define FAN_PIN RAMPS_D9_PIN - #elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan - #define FAN_PIN RAMPS_D8_PIN - #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed + #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #define FAN_PIN MOSFET_B_PIN + #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan + #define FAN_PIN MOSFET_C_PIN + #elif FET_ORDER_EEB // Hotend, Hotend, Bed #define FAN_PIN 4 // IO pin. Buffer needed #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") - #define FAN_PIN RAMPS_D9_PIN + #define FAN_PIN MOSFET_B_PIN #endif #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h b/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h index d9964242dd..ebd0bdc0c6 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h @@ -36,6 +36,6 @@ #if ENABLED(CASE_LIGHT_ENABLE) #undef FAN_PIN #ifndef CASE_LIGHT_PIN - #define CASE_LIGHT_PIN RAMPS_D9_PIN + #define CASE_LIGHT_PIN MOSFET_B_PIN #endif #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h index af91f63bdb..a69572dee7 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h @@ -41,8 +41,8 @@ #define BOARD_INFO_NAME "RAMPS 1.4 Plus" -#define RAMPS_D8_PIN 10 -#define RAMPS_D10_PIN 8 +#define MOSFET_A_PIN 8 +#define MOSFET_C_PIN 10 // // Steppers diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h index 0263c78b06..2d68577f7c 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h @@ -51,8 +51,8 @@ // // MOSFET changes // -#define RAMPS_D9_PIN 8 // FAN (by default) -#define RAMPS_D10_PIN 9 // EXTRUDER 1 +#define MOSFET_A_PIN 9 // EXTRUDER 1 +#define MOSFET_B_PIN 8 // FAN (by default) #define MOSFET_D_PIN 12 // EXTRUDER 2 or FAN #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h b/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h index e15fc94ac4..85defdf1bd 100644 --- a/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h +++ b/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h @@ -34,9 +34,9 @@ // // Heaters / Fans // -#define RAMPS_D10_PIN 9 // E -#define RAMPS_D9_PIN 7 // F PART FAN in front of board next to Extruder heat - // RAMPS_D8_PIN 8 // B -#define MOSFET_D_PIN 10 // F / E +#define MOSFET_A_PIN 9 // E +#define MOSFET_B_PIN 7 // F PART FAN in front of board next to Extruder heat + // MOSFET_C_PIN 8 // B +#define MOSFET_D_PIN 10 // F / E #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h index eee0dcd3d2..71dfb8c704 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h @@ -27,8 +27,7 @@ #define BOARD_INFO_NAME "Anycubic RAMPS 1.3" -#define IS_RAMPS_EFB -#define RAMPS_D9_PIN 44 +#define MOSFET_B_PIN 44 #define E1_STEP_PIN -1 #define E1_DIR_PIN -1 diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h index 54d91cee6a..994a54297f 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h @@ -27,16 +27,6 @@ #define BOARD_INFO_NAME "Anycubic RAMPS 1.4" -// Board labeled pins: - -#define TG_HEATER_BED_PIN 8 -#define TG_HEATER_0_PIN 10 -#define TG_HEATER_1_PIN 45 // Anycubic Kossel: Unused - -#define TG_FAN0_PIN 9 // Anycubic Kossel: Usually the part cooling fan -#define TG_FAN1_PIN 7 // Anycubic Kossel: Unused -#define TG_FAN2_PIN 44 // Anycubic Kossel: Hotend fan - // // Servos // @@ -47,45 +37,45 @@ #define SERVO3_PIN 6 #endif -// Remap MOSFET pins to common usages: - -#define RAMPS_D10_PIN TG_HEATER_0_PIN // HEATER_0_PIN is always RAMPS_D10_PIN in pins_RAMPS.h - -#if HAS_MULTI_HOTEND // EEF and EEB - #define RAMPS_D9_PIN TG_HEATER_1_PIN - #if !TEMP_SENSOR_BED - // EEF - #define RAMPS_D8_PIN TG_FAN0_PIN - #else - // EEB - #define RAMPS_D8_PIN TG_HEATER_BED_PIN - #define FAN_PIN TG_FAN0_PIN // Override pin 4 in pins_RAMPS.h - #endif -#elif TEMP_SENSOR_BED - // EFB (Anycubic Kossel default) - #define RAMPS_D9_PIN TG_FAN0_PIN - #if ENABLED(ANYCUBIC_LCD_CHIRON) - #define RAMPS_D8_PIN TG_HEATER_1_PIN // Heated bed is connected to HEATER1 output - #else - #define RAMPS_D8_PIN TG_HEATER_BED_PIN - #endif +// +// PWM FETS +// +#if EITHER(FET_ORDER_EEF, FET_ORDER_EEB) + #define MOSFET_B_PIN 45 // HEATER1 +#elif FET_ORDER_EFB + #define MOSFET_B_PIN 9 // FAN0 #else - // EFF - #define RAMPS_D9_PIN TG_FAN1_PIN - #define RAMPS_D8_PIN TG_FAN0_PIN + #define MOSFET_B_PIN 7 // FAN1 #endif -#if HAS_MULTI_HOTEND || TEMP_SENSOR_BED // EEF, EEB, EFB - #define FAN1_PIN TG_FAN1_PIN +#if FET_ORDER_EEB + #define MOSFET_C_PIN 8 // BED +#elif FET_ORDER_EFB + #if DISABLED(ANYCUBIC_LCD_CHIRON) + #define MOSFET_C_PIN 8 + #else + #define MOSFET_C_PIN 45 + #endif +#else // EEF, EFF + #define MOSFET_C_PIN 9 #endif -#define FAN2_PIN TG_FAN2_PIN +#if FET_ORDER_EEB + #define FAN_PIN 9 // Override pin 4 in pins_RAMPS.h +#endif + +// +// Heaters / Fans +// +#if ANY(FET_ORDER_EEF, FET_ORDER_EEB, FET_ORDER_EFB) + #define FAN1_PIN 7 +#endif +#define FAN2_PIN 44 #ifndef E0_AUTO_FAN_PIN - #define E0_AUTO_FAN_PIN TG_FAN2_PIN // Used in Anycubic Kossel example config + #define E0_AUTO_FAN_PIN 44 // Used in Anycubic Kossel example config #endif - #if ENABLED(ANYCUBIC_LCD_I3MEGA) - #define CONTROLLER_FAN_PIN TG_FAN1_PIN + #define CONTROLLER_FAN_PIN 7 #endif // diff --git a/Marlin/src/pins/ramps/pins_VORON.h b/Marlin/src/pins/ramps/pins_VORON.h index 9ab6573468..9390381010 100644 --- a/Marlin/src/pins/ramps/pins_VORON.h +++ b/Marlin/src/pins/ramps/pins_VORON.h @@ -28,7 +28,7 @@ #define BOARD_INFO_NAME "VORON Design v2" -#define RAMPS_D8_PIN 11 +#define MOSFET_C_PIN 11 #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V52.h b/Marlin/src/pins/ramps/pins_ZRIB_V52.h index a6e9175b62..27f043914f 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V52.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V52.h @@ -32,11 +32,11 @@ #define BOARD_INFO_NAME "ZRIB V5.2" #define MKS_BASE_VERSION 14 -#define IS_RAMPS_EFB // // Heaters / Fans // +#define HEATER_1_PIN 7 #define FAN_PIN 9 // PH6 ** Pin18 ** PWM9 #define FAN1_PIN 6 @@ -46,7 +46,6 @@ #define E2_STEP_PIN 4 #define E2_DIR_PIN 5 #define E2_ENABLE_PIN 22 -#define HEATER_1_PIN 7 #include "pins_MKS_BASE_common.h" // ... RAMPS