From b6ba32ce75c49a39ece50d42b7211ff3e93234ae Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 5 Dec 2017 00:33:25 -0600 Subject: [PATCH] Support for RAMPS Plus (3DYMY) --- Marlin/src/core/boards.h | 8 +++ Marlin/src/pins/pins.h | 20 +++++-- Marlin/src/pins/pins_RAMPS_PLUS.h | 87 +++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+), 5 deletions(-) create mode 100644 Marlin/src/pins/pins_RAMPS_PLUS.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 0d3b114fda..29d18d79a4 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -30,17 +30,25 @@ // #define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2 + #define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 (Power outputs: Hotend, Fan, Bed) #define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed) #define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1) #define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan) #define BOARD_RAMPS_13_SF 38 // RAMPS 1.3 (Power outputs: Spindle, Controller Fan) + #define BOARD_RAMPS_14_EFB 43 // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed) #define BOARD_RAMPS_14_EEB 44 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed) #define BOARD_RAMPS_14_EFF 45 // RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1) #define BOARD_RAMPS_14_EEF 46 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan) #define BOARD_RAMPS_14_SF 48 // RAMPS 1.4 (Power outputs: Spindle, Controller Fan) +#define BOARD_RAMPS_PLUS_EFB 143 // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed) +#define BOARD_RAMPS_PLUS_EEB 144 // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed) +#define BOARD_RAMPS_PLUS_EFF 145 // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1) +#define BOARD_RAMPS_PLUS_EEF 146 // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan) +#define BOARD_RAMPS_PLUS_SF 148 // RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan) + // // RAMPS Derivatives - ATmega1280, ATmega2560 // diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index a49bdb5159..e578c1504b 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -37,15 +37,15 @@ #include "../inc/MarlinConfig.h" -#if MB(RAMPS_13_EFB) || MB(RAMPS_14_EFB) || MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_SMART_EFB) || MB(RAMPS_DUO_EFB) || MB(RAMPS4DUE_EFB) +#if MB(RAMPS_13_EFB) || MB(RAMPS_14_EFB) || MB(RAMPS_PLUS_EFB) || MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_SMART_EFB) || MB(RAMPS_DUO_EFB) || MB(RAMPS4DUE_EFB) #define IS_RAMPS_EFB -#elif MB(RAMPS_13_EEB) || MB(RAMPS_14_EEB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_SMART_EEB) || MB(RAMPS_DUO_EEB) || MB(RAMPS4DUE_EEB) +#elif MB(RAMPS_13_EEB) || MB(RAMPS_14_EEB) || MB(RAMPS_PLUS_EEB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_SMART_EEB) || MB(RAMPS_DUO_EEB) || MB(RAMPS4DUE_EEB) #define IS_RAMPS_EEB -#elif MB(RAMPS_13_EFF) || MB(RAMPS_14_EFF) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_SMART_EFF) || MB(RAMPS_DUO_EFF) || MB(RAMPS4DUE_EFF) +#elif MB(RAMPS_13_EFF) || MB(RAMPS_14_EFF) || MB(RAMPS_PLUS_EFF) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_SMART_EFF) || MB(RAMPS_DUO_EFF) || MB(RAMPS4DUE_EFF) #define IS_RAMPS_EFF -#elif MB(RAMPS_13_EEF) || MB(RAMPS_14_EEF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_SMART_EEF) || MB(RAMPS_DUO_EEF) || MB(RAMPS4DUE_EEF) +#elif MB(RAMPS_13_EEF) || MB(RAMPS_14_EEF) || MB(RAMPS_PLUS_EEF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_SMART_EEF) || MB(RAMPS_DUO_EEF) || MB(RAMPS4DUE_EEF) #define IS_RAMPS_EEF -#elif MB(RAMPS_13_SF) || MB(RAMPS_14_SF) || MB(RAMPS_14_RE_ARM_SF) || MB(RAMPS_SMART_SF) || MB(RAMPS_DUO_SF) || MB(RAMPS4DUE_SF) +#elif MB(RAMPS_13_SF) || MB(RAMPS_14_SF) || MB(RAMPS_PLUS_SF) || MB(RAMPS_14_RE_ARM_SF) || MB(RAMPS_SMART_SF) || MB(RAMPS_DUO_SF) || MB(RAMPS4DUE_SF) #define IS_RAMPS_SF #endif @@ -75,6 +75,16 @@ #include "pins_RAMPS.h" #elif MB(RAMPS_14_SF) #include "pins_RAMPS.h" +#elif MB(RAMPS_PLUS_EFB) + #include "pins_RAMPS_PLUS.h" +#elif MB(RAMPS_PLUS_EEB) + #include "pins_RAMPS_PLUS.h" +#elif MB(RAMPS_PLUS_EFF) + #include "pins_RAMPS_PLUS.h" +#elif MB(RAMPS_PLUS_EEF) + #include "pins_RAMPS_PLUS.h" +#elif MB(RAMPS_PLUS_SF) + #include "pins_RAMPS_PLUS.h" // // RAMPS Derivatives - ATmega1280, ATmega2560 diff --git a/Marlin/src/pins/pins_RAMPS_PLUS.h b/Marlin/src/pins/pins_RAMPS_PLUS.h new file mode 100644 index 0000000000..5b9fd50f9f --- /dev/null +++ b/Marlin/src/pins/pins_RAMPS_PLUS.h @@ -0,0 +1,87 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Arduino Mega with RAMPS v1.4Plus, also known as 3DYMY version, pin assignments + * The differences to the RAMPS v1.4 are: + * - Swap heater E0 with E1 + * - Swap pins 8 and 10. Bed/Fan/Hotend as labeled on the board are on pins 8/9/10. + * - Change pins 16->42, 17->44 and 29->53 used for display. + * + * Applies to the following boards: + * + * RAMPS_PLUS_EFB (Extruder, Fan, Bed) + * RAMPS_PLUS_EEB (Extruder, Extruder, Bed) + * RAMPS_PLUS_EFF (Extruder, Fan, Fan) + * RAMPS_PLUS_EEF (Extruder, Extruder, Fan) + * RAMPS_PLUS_SF (Spindle, Controller Fan) + * + */ + +#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) + #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME "RAMPS 1.4 Plus" +#endif + +#define RAMPS_D8_PIN 10 +#define RAMPS_D10_PIN 8 + +#include "pins_RAMPS.h" + +// +// Steppers - Swap E0 / E1 on 3DYMY +// +#undef E0_STEP_PIN +#undef E0_DIR_PIN +#undef E0_ENABLE_PIN + +#undef E1_STEP_PIN +#undef E1_DIR_PIN +#undef E1_ENABLE_PIN + +#define E0_STEP_PIN 36 +#define E0_DIR_PIN 34 +#define E0_ENABLE_PIN 30 + +#define E1_STEP_PIN 26 +#define E1_DIR_PIN 28 +#define E1_ENABLE_PIN 24 + +#undef X_CS_PIN +#undef Y_CS_PIN +#undef Z_CS_PIN +#undef E0_CS_PIN +#undef E1_CS_PIN + +#if ENABLED(ULTRA_LCD) && DISABLED(REPRAPWORLD_GRAPHICAL_LCD) && (DISABLED(NEWPANEL) || DISABLED(PANEL_ONE)) && DISABLED(CR10_STOCKDISPLAY) + #if DISABLED(MKS_12864OLED) + #undef LCD_PINS_RS + #define LCD_PINS_RS 42 // 3DYMY boards pin 16 -> 42 + #undef LCD_PINS_ENABLE + #define LCD_PINS_ENABLE 44 // 3DYMY boards pin 17 -> 44 + #endif + #undef LCD_PINS_D7 + #define LCD_PINS_D7 53 // 3DYMY boards pin 29 -> 53 +#endif