🎨 Refactor MOSFET pins layout (#22983)

This commit is contained in:
Scott Lahteine 2021-10-19 05:59:48 -05:00
parent aa198e41dd
commit ed78f7f4e6
23 changed files with 175 additions and 289 deletions

View File

@ -595,6 +595,8 @@
#error "ARC_SUPPORT now requires MIN_ARC_SEGMENT_MM and MAX_ARC_SEGMENT_MM." #error "ARC_SUPPORT now requires MIN_ARC_SEGMENT_MM and MAX_ARC_SEGMENT_MM."
#elif defined(SPINDLE_LASER_PWM) #elif defined(SPINDLE_LASER_PWM)
#error "SPINDLE_LASER_PWM (true) is now set with SPINDLE_LASER_USE_PWM (enabled)." #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 #endif
#if MB(DUE3DOM_MINI) && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD) #if MB(DUE3DOM_MINI) && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD)

View File

@ -57,8 +57,6 @@
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#endif #endif
#define IS_RAMPS_EFB
// //
// Servos // Servos
// //
@ -144,58 +142,41 @@
#define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN)
#endif #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 // 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 #ifndef MOSFET_D_PIN
#define MOSFET_D_PIN -1 #define MOSFET_D_PIN -1
#endif #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 #if FET_ORDER_EFB // Hotend, Fan, Bed
#define FAN_PIN RAMPS_D9_PIN #define FAN_PIN MOSFET_B_PIN
#define HEATER_BED_PIN RAMPS_D8_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan #elif FET_ORDER_EEF // Hotend, Hotend, Fan
#define HEATER_1_PIN RAMPS_D9_PIN #define HEATER_1_PIN MOSFET_B_PIN
#define FAN_PIN RAMPS_D8_PIN #define FAN_PIN MOSFET_C_PIN
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed #elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define HEATER_1_PIN RAMPS_D9_PIN #define HEATER_1_PIN MOSFET_B_PIN
#define HEATER_BED_PIN RAMPS_D8_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan #elif FET_ORDER_EFF // Hotend, Fan, Fan
#define FAN_PIN RAMPS_D9_PIN #define FAN_PIN MOSFET_B_PIN
#define FAN1_PIN RAMPS_D8_PIN #define FAN1_PIN MOSFET_C_PIN
#elif ENABLED(IS_RAMPS_SF) // Spindle, Fan #elif FET_ORDER_SF // Spindle, Fan
#define FAN_PIN RAMPS_D8_PIN #define FAN_PIN MOSFET_C_PIN
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
#define FAN_PIN RAMPS_D9_PIN #define FAN_PIN MOSFET_B_PIN
#define HEATER_BED_PIN RAMPS_D8_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
#define FAN1_PIN MOSFET_D_PIN #define FAN1_PIN MOSFET_D_PIN
#else #else

View File

@ -145,9 +145,9 @@
* PWM1.4 DIO53 SDSS(SSEL0) J3-5 AUX-3 * PWM1.4 DIO53 SDSS(SSEL0) J3-5 AUX-3
* PWM1.4 DIO46 Z_STEP_PIN * PWM1.4 DIO46 Z_STEP_PIN
* PWM1.5 DIO3 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES * 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 DIO14 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
* PWM1.6 DIO10 RAMPS_D10_PIN * PWM1.6 DIO10 MOSFET_A_PIN
*/ */
/** /**

View File

@ -363,9 +363,9 @@
* PWM1.4 P1_23 SDSS(SSEL0) J3-5 AUX-3 * PWM1.4 P1_23 SDSS(SSEL0) J3-5 AUX-3
* PWM1.4 P2_03 Z_STEP_PIN * PWM1.4 P2_03 Z_STEP_PIN
* PWM1.5 P1_24 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES * 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 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
*/ */
/** /**

View File

@ -168,52 +168,35 @@
//#define ?? P0_03_A6 // A6 - ( 0) - RXD0 - J4-4 & AUX-1 //#define ?? P0_03_A6 // A6 - ( 0) - RXD0 - J4-4 & AUX-1
#define FILWIDTH_PIN P0_02_A7 // A7 - ( 1) - TXD0 - J4-5 & 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 // 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 #ifndef MOSFET_D_PIN
#define MOSFET_D_PIN -1 #define MOSFET_D_PIN -1
#endif #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 #if FET_ORDER_EFB // Hotend, Fan, Bed
#define HEATER_BED_PIN RAMPS_D8_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan #elif FET_ORDER_EEF // Hotend, Hotend, Fan
#define HEATER_1_PIN RAMPS_D9_PIN #define HEATER_1_PIN MOSFET_B_PIN
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed #elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define HEATER_1_PIN RAMPS_D9_PIN #define HEATER_1_PIN MOSFET_B_PIN
#define HEATER_BED_PIN RAMPS_D8_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan #elif FET_ORDER_EFF // Hotend, Fan, Fan
#define FAN1_PIN RAMPS_D8_PIN #define FAN1_PIN MOSFET_C_PIN
#elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") #elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
#define HEATER_BED_PIN RAMPS_D8_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
#define FAN1_PIN MOSFET_D_PIN #define FAN1_PIN MOSFET_D_PIN
#else #else
@ -222,14 +205,14 @@
#endif #endif
#ifndef FAN_PIN #ifndef FAN_PIN
#if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
#define FAN_PIN RAMPS_D9_PIN #define FAN_PIN MOSFET_B_PIN
#elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan
#define FAN_PIN RAMPS_D8_PIN #define FAN_PIN MOSFET_C_PIN
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed #elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define FAN_PIN P1_18 // (4) IO pin. Buffer needed #define FAN_PIN P1_18 // (4) IO pin. Buffer needed
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
#define FAN_PIN RAMPS_D9_PIN #define FAN_PIN MOSFET_B_PIN
#endif #endif
#endif #endif
@ -484,14 +467,14 @@
* All Fast PWMs have a 50Hz rate. * All Fast PWMs have a 50Hz rate.
* *
* The following pins/signals use the direct method. All other pins use the * 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. * interrupt method.
* *
* P1_20 (11) SERVO0_PIN * P1_20 (11) SERVO0_PIN
* P1_21 ( 6) SERVO1_PIN J5-1 * P1_21 ( 6) SERVO1_PIN J5-1
* P0_18 ( 4) SERVO3_PIN 5V output * P0_18 ( 4) SERVO3_PIN 5V output
* *P2_04 ( 9) RAMPS_D9_PIN * *P2_04 ( 9) MOSFET_B_PIN
* *P2_05 (10) RAMPS_D10_PIN * *P2_05 (10) MOSFET_A_PIN
* *
* * - If used as a heater driver then a Fast PWM is NOT assigned. If used as * * - 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. * a fan driver then enabling FAST_PWM_FAN assigns a Fast PWM to it.

View File

@ -151,54 +151,43 @@
// With no heated bed, an additional 24V fan is possible. // With no heated bed, an additional 24V fan is possible.
// //
// Labels from the schematic: #define MOSFET_A_PIN 6 // H3 EX1_HEAT_PIN
#define EX1_HEAT_PIN 6 // H3 #define MOSFET_B_PIN 11 // B5 EX2_HEAT_PIN
#define EX1_FAN_PIN 7 // H4 #define MOSFET_C_PIN 45 // L4 HBP_PIN
#define EX2_HEAT_PIN 11 // B5 #define MOSFET_D_PIN 44 // L5 EXTRA_FET_PIN
#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
// //
// Heaters / Fans (24V) // Heaters / Fans (24V)
// //
#define HEATER_0_PIN EX1_HEAT_PIN #define HEATER_0_PIN MOSFET_A_PIN
#if ENABLED(IS_EFB) // Hotend, Fan, Bed #if FET_ORDER_EFB // Hotend, Fan, Bed
#define HEATER_BED_PIN HBP_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#elif ENABLED(IS_EEF) // Hotend, Hotend, Fan #elif FET_ORDER_EEF // Hotend, Hotend, Fan
#define HEATER_1_PIN EX2_HEAT_PIN #define HEATER_1_PIN MOSFET_B_PIN
#elif ENABLED(IS_EEB) // Hotend, Hotend, Bed #elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define HEATER_1_PIN EX2_HEAT_PIN #define HEATER_1_PIN MOSFET_B_PIN
#define HEATER_BED_PIN HBP_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#elif ENABLED(IS_EFF) // Hotend, Fan, Fan #elif FET_ORDER_EFF // Hotend, Fan, Fan
#define FAN1_PIN HBP_PIN #define FAN1_PIN MOSFET_C_PIN
#endif #endif
#ifndef FAN_PIN #ifndef FAN_PIN
#if EITHER(IS_EFB, IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
#define FAN_PIN EX2_HEAT_PIN #define FAN_PIN MOSFET_B_PIN
#elif EITHER(IS_EEF, IS_SF) // Hotend, Hotend, Fan or Spindle, Fan #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan
#define FAN_PIN HBP_PIN #define FAN_PIN MOSFET_C_PIN
#else #else
#define FAN_PIN EXTRA_FET_PIN #define FAN_PIN MOSFET_D_PIN
#endif #endif
#endif #endif
#ifndef FAN1_PIN
#define FAN1_PIN 7 // H4 EX1_FAN_PIN
#endif
#ifndef CONTROLLER_FAN_PIN #ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN EX2_FAN_PIN #define CONTROLLER_FAN_PIN 12 // B6 EX2_FAN_PIN
#endif #endif
// //
@ -268,9 +257,6 @@
#define SDSS 53 // B0 #define SDSS 53 // B0
#define SD_DETECT_PIN 9 // H6 #define SD_DETECT_PIN 9 // H6
//
// TMC 220x
//
#if HAS_TMC_UART #if HAS_TMC_UART
/** /**
* TMC220x stepper drivers * TMC220x stepper drivers

View File

@ -38,15 +38,23 @@
#define MAX_E_STEPPERS 8 #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) #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) #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) #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) #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 #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) #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 IS_RAMPS_SF #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 #endif
#if !(BOTH(IS_ULTRA_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) #if !(BOTH(IS_ULTRA_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))

View File

@ -974,15 +974,6 @@
#if _EXISTS(REF_CLK) #if _EXISTS(REF_CLK)
REPORT_NAME_DIGITAL(__LINE__, REF_CLK) REPORT_NAME_DIGITAL(__LINE__, REF_CLK)
#endif #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) #if PIN_EXISTS(NEOPIXEL)
REPORT_NAME_DIGITAL(__LINE__, NEOPIXEL_PIN) REPORT_NAME_DIGITAL(__LINE__, NEOPIXEL_PIN)
#endif #endif

View File

@ -62,8 +62,8 @@
// //
// Heaters / Fans // Heaters / Fans
// //
#define RAMPS_D8_PIN 9 #define MOSFET_B_PIN 8
#define RAMPS_D9_PIN 8 #define MOSFET_C_PIN 9
#define MOSFET_D_PIN 12 #define MOSFET_D_PIN 12
// //

View File

@ -68,9 +68,9 @@
// //
// Heaters / Fans // Heaters / Fans
// //
#define RAMPS_D8_PIN 10 #define MOSFET_A_PIN 9
#define RAMPS_D9_PIN 12 #define MOSFET_B_PIN 12
#define RAMPS_D10_PIN 9 #define MOSFET_C_PIN 10
#define MOSFET_D_PIN 7 #define MOSFET_D_PIN 7
// //

View File

@ -121,23 +121,6 @@
#define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN)
#endif #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 // Heaters / Fans
// //

View File

@ -118,23 +118,6 @@
#define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN)
#endif #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 // Heaters / Fans
// //

View File

@ -59,7 +59,6 @@
// //
// Other RAMPS pins // Other RAMPS pins
// //
#define IS_RAMPS_EFB // Override autodetection. Bed will be undefined.
#include "pins_RAMPS.h" #include "pins_RAMPS.h"
// //

View File

@ -116,5 +116,4 @@
// //
// Other RAMPS 1.3 pins // Other RAMPS 1.3 pins
// //
#define IS_RAMPS_EFB // Override autodetection. Bed will be undefined.
#include "pins_RAMPS_13.h" // ... RAMPS #include "pins_RAMPS_13.h" // ... RAMPS

View File

@ -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) #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN)
#endif #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 // 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 #ifndef MOSFET_D_PIN
#define MOSFET_D_PIN -1 #define MOSFET_D_PIN -1
#endif #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 #if FET_ORDER_EFB // Hotend, Fan, Bed
#define HEATER_BED_PIN RAMPS_D8_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan #elif FET_ORDER_EEF // Hotend, Hotend, Fan
#define HEATER_1_PIN RAMPS_D9_PIN #define HEATER_1_PIN MOSFET_B_PIN
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed #elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define HEATER_1_PIN RAMPS_D9_PIN #define HEATER_1_PIN MOSFET_B_PIN
#define HEATER_BED_PIN RAMPS_D8_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan #elif FET_ORDER_EFF // Hotend, Fan, Fan
#define FAN1_PIN RAMPS_D8_PIN #define FAN1_PIN MOSFET_C_PIN
#elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") #elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
#define HEATER_BED_PIN RAMPS_D8_PIN #define HEATER_BED_PIN MOSFET_C_PIN
#if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) #if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
#define HEATER_1_PIN MOSFET_D_PIN #define HEATER_1_PIN MOSFET_D_PIN
#else #else
@ -243,14 +226,14 @@
#endif #endif
#ifndef FAN_PIN #ifndef FAN_PIN
#if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
#define FAN_PIN RAMPS_D9_PIN #define FAN_PIN MOSFET_B_PIN
#elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan
#define FAN_PIN RAMPS_D8_PIN #define FAN_PIN MOSFET_C_PIN
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed #elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define FAN_PIN 4 // IO pin. Buffer needed #define FAN_PIN 4 // IO pin. Buffer needed
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
#define FAN_PIN RAMPS_D9_PIN #define FAN_PIN MOSFET_B_PIN
#endif #endif
#endif #endif

View File

@ -36,6 +36,6 @@
#if ENABLED(CASE_LIGHT_ENABLE) #if ENABLED(CASE_LIGHT_ENABLE)
#undef FAN_PIN #undef FAN_PIN
#ifndef CASE_LIGHT_PIN #ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN RAMPS_D9_PIN #define CASE_LIGHT_PIN MOSFET_B_PIN
#endif #endif
#endif #endif

View File

@ -41,8 +41,8 @@
#define BOARD_INFO_NAME "RAMPS 1.4 Plus" #define BOARD_INFO_NAME "RAMPS 1.4 Plus"
#define RAMPS_D8_PIN 10 #define MOSFET_A_PIN 8
#define RAMPS_D10_PIN 8 #define MOSFET_C_PIN 10
// //
// Steppers // Steppers

View File

@ -51,8 +51,8 @@
// //
// MOSFET changes // MOSFET changes
// //
#define RAMPS_D9_PIN 8 // FAN (by default) #define MOSFET_A_PIN 9 // EXTRUDER 1
#define RAMPS_D10_PIN 9 // EXTRUDER 1 #define MOSFET_B_PIN 8 // FAN (by default)
#define MOSFET_D_PIN 12 // EXTRUDER 2 or FAN #define MOSFET_D_PIN 12 // EXTRUDER 2 or FAN
#include "pins_RAMPS.h" #include "pins_RAMPS.h"

View File

@ -34,9 +34,9 @@
// //
// Heaters / Fans // Heaters / Fans
// //
#define RAMPS_D10_PIN 9 // E #define MOSFET_A_PIN 9 // E
#define RAMPS_D9_PIN 7 // F PART FAN in front of board next to Extruder heat #define MOSFET_B_PIN 7 // F PART FAN in front of board next to Extruder heat
// RAMPS_D8_PIN 8 // B // MOSFET_C_PIN 8 // B
#define MOSFET_D_PIN 10 // F / E #define MOSFET_D_PIN 10 // F / E
#include "pins_RAMPS.h" #include "pins_RAMPS.h"

View File

@ -27,8 +27,7 @@
#define BOARD_INFO_NAME "Anycubic RAMPS 1.3" #define BOARD_INFO_NAME "Anycubic RAMPS 1.3"
#define IS_RAMPS_EFB #define MOSFET_B_PIN 44
#define RAMPS_D9_PIN 44
#define E1_STEP_PIN -1 #define E1_STEP_PIN -1
#define E1_DIR_PIN -1 #define E1_DIR_PIN -1

View File

@ -27,16 +27,6 @@
#define BOARD_INFO_NAME "Anycubic RAMPS 1.4" #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 // Servos
// //
@ -47,45 +37,45 @@
#define SERVO3_PIN 6 #define SERVO3_PIN 6
#endif #endif
// Remap MOSFET pins to common usages: //
// PWM FETS
#define RAMPS_D10_PIN TG_HEATER_0_PIN // HEATER_0_PIN is always RAMPS_D10_PIN in pins_RAMPS.h //
#if EITHER(FET_ORDER_EEF, FET_ORDER_EEB)
#if HAS_MULTI_HOTEND // EEF and EEB #define MOSFET_B_PIN 45 // HEATER1
#define RAMPS_D9_PIN TG_HEATER_1_PIN #elif FET_ORDER_EFB
#if !TEMP_SENSOR_BED #define MOSFET_B_PIN 9 // FAN0
// EEF
#define RAMPS_D8_PIN TG_FAN0_PIN
#else #else
// EEB #define MOSFET_B_PIN 7 // FAN1
#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
#else
// EFF
#define RAMPS_D9_PIN TG_FAN1_PIN
#define RAMPS_D8_PIN TG_FAN0_PIN
#endif #endif
#if HAS_MULTI_HOTEND || TEMP_SENSOR_BED // EEF, EEB, EFB #if FET_ORDER_EEB
#define FAN1_PIN TG_FAN1_PIN #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 #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 #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 #endif
#if ENABLED(ANYCUBIC_LCD_I3MEGA) #if ENABLED(ANYCUBIC_LCD_I3MEGA)
#define CONTROLLER_FAN_PIN TG_FAN1_PIN #define CONTROLLER_FAN_PIN 7
#endif #endif
// //

View File

@ -28,7 +28,7 @@
#define BOARD_INFO_NAME "VORON Design v2" #define BOARD_INFO_NAME "VORON Design v2"
#define RAMPS_D8_PIN 11 #define MOSFET_C_PIN 11
#include "pins_RAMPS.h" #include "pins_RAMPS.h"

View File

@ -32,11 +32,11 @@
#define BOARD_INFO_NAME "ZRIB V5.2" #define BOARD_INFO_NAME "ZRIB V5.2"
#define MKS_BASE_VERSION 14 #define MKS_BASE_VERSION 14
#define IS_RAMPS_EFB
// //
// Heaters / Fans // Heaters / Fans
// //
#define HEATER_1_PIN 7
#define FAN_PIN 9 // PH6 ** Pin18 ** PWM9 #define FAN_PIN 9 // PH6 ** Pin18 ** PWM9
#define FAN1_PIN 6 #define FAN1_PIN 6
@ -46,7 +46,6 @@
#define E2_STEP_PIN 4 #define E2_STEP_PIN 4
#define E2_DIR_PIN 5 #define E2_DIR_PIN 5
#define E2_ENABLE_PIN 22 #define E2_ENABLE_PIN 22
#define HEATER_1_PIN 7
#include "pins_MKS_BASE_common.h" // ... RAMPS #include "pins_MKS_BASE_common.h" // ... RAMPS