Skip to content

Commit

Permalink
Elegoo Neptune boards
Browse files Browse the repository at this point in the history
Co-Authored-By: Michael <[email protected]>
  • Loading branch information
thinkyhead and mlee12382 committed Dec 1, 2024
1 parent 22182d9 commit 8d0d510
Show file tree
Hide file tree
Showing 11 changed files with 578 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@
#define BOARD_BLACKBEEZMINI_V1 5251 // BlackBeezMini V1 (STM32F401CCU6)
#define BOARD_XTLW_CLIMBER_8TH 5252 // XTLW Climber-8th (STM32F407VGT6)
#define BOARD_FLY_RRF_E3_V1 5253 // Fly RRF E3 V1.0 (STM32F407VG)
#define BOARD_ZNP_ROBIN_NANO_V1_3 5254 // Elegoo Neptune 2 v1.3 board
#define BOARD_MKS_NEPTUNE_X 5255 // Elegoo Neptune X
#define BOARD_ZNP_ROBIN_NANO 5256 // Elegoo Neptune 2 v1.2 board
#define BOARD_MKS_NEPTUNE_3 5257 // Elegoo Neptune 3

//
// Other ARM Cortex-M4
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/mega/pins_WEEDO_62A.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

/**
* Based on WEEDO 62A pin configuration
* Copyright (c) 2019 WEEDO3D Perron
* ATmega2560
*/
#pragma once

#include "env_validate.h"

Expand Down
8 changes: 8 additions & 0 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,14 @@
#include "stm32f4/pins_XTLW_CLIMBER_8TH.h" // STM32F4 env:XTLW_CLIMBER_8TH
#elif MB(FLY_RRF_E3_V1)
#include "stm32f4/pins_FLY_RRF_E3_V1.h" // STM32F4 env:FLY_RRF_E3_V1
#elif MB(ZNP_ROBIN_NANO_V1_3)
#include "stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h" // STM32F4 env:znp_robin_nano_v1_3
#elif MB(MKS_NEPTUNE_X)
#include "stm32f4/pins_MKS_NEPTUNE_X.h" // STM32F4 env:mks_neptune_x
#elif MB(ZNP_ROBIN_NANO)
#include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:znp_robin_nano35
#elif MB(MKS_NEPTUNE_3)
#include "stm32f4/pins_MKS_NEPTUNE_3.h" // STM32F4 env:mks_neptune_3

//
// Other ARM Cortex-M4
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

/**
* Pxmalion Core i3 - https://github.com/Pxmalion
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

/**
* Creality CREALITY_CR4NTXXC10 (STM32F401RET6) board pin assignments
Expand Down
143 changes: 143 additions & 0 deletions Marlin/src/pins/stm32f4/pins_MKS_NEPTUNE_3.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once

//
// MKS Neptune 3
//

// Avoid conflict with TIMER_TONE
#define ALLOW_STM32F4
#include "env_validate.h"

#define BOARD_INFO_NAME "MKS Neptune 3"

//
// Release PB4 (Z_DIR_PIN) from JTAG NRST role
//
//#define DISABLE_DEBUG

// Use one of these or SDCard-based Emulation will be used
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
//#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM)
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#define I2C_SCL_PIN PB6
#define I2C_SDA_PIN PB7
#endif

//
// Servos
//
#define SERVO0_PIN PA8 // BLTOUCH

//
// Limit Switches
//
//#define ZNP_TEST
#ifdef ZNP_TEST
#define X_DIAG_PIN PC14 // Z+
#else
#define X_DIAG_PIN PA13 // X-
#endif

#define Y_DIAG_PIN PB8
#define Z_DIAG_PIN PC13

#define X_STOP_PIN X_DIAG_PIN
#define Y_STOP_PIN Y_DIAG_PIN
#define Z_STOP_PIN Z_DIAG_PIN

//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PC14 // PB9
#endif

//
// Steppers
//
#define X_ENABLE_PIN PD2
#define X_STEP_PIN PC12
#define X_DIR_PIN PB3

#define Y_ENABLE_PIN PC10
#define Y_STEP_PIN PC11
#define Y_DIR_PIN PA15

#define Z_ENABLE_PIN PC8
#define Z_STEP_PIN PC7
#define Z_DIR_PIN PC9

#define E0_ENABLE_PIN PC6
#define E0_STEP_PIN PB10
#define E0_DIR_PIN PB1

#define E1_ENABLE_PIN PC5
#define E1_STEP_PIN PC4
#define E1_DIR_PIN PA4

//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // TH1
#define TEMP_1_PIN PC2 // TH2
#define TEMP_BED_PIN PC0 // TB1

//
// Heaters / Fans
//
#define HEATER_0_PIN PA6 // HEATER1
#define HEATER_BED_PIN PA5 // HOT BED

#define FAN_PIN PB0 // FAN
//#define FAN1_PIN PA7 // FAN1

#if NEED_TOUCH_PINS
#define TOUCH_CS_PIN PA7 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#endif

//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif

#if SD_CONNECTION_IS(ONBOARD)
#define ENABLE_SPI3
#define SD_SS_PIN -1
#define SDSS PB12
#define SD_SCK_PIN PB13
#define SD_MISO_PIN PB14
#define SD_MOSI_PIN PB15
#define SD_SPI_SPEED SPI_HALF_SPEED
#if ENABLED(NO_SD_HOST_DRIVE)
// Detect pin doesn't work when NO_SD_HOST_DRIVE disabled
#define SD_DETECT_PIN PC3
#endif
#endif
52 changes: 52 additions & 0 deletions Marlin/src/pins/stm32f4/pins_MKS_NEPTUNE_X.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once

#define ALLOW_STM32DUINO
#include "env_validate.h"

#if HOTENDS > 2 || E_STEPPERS > 2
#error "MKS Neptune X supports up to 2 hotends / E steppers."
#endif

#define BOARD_INFO_NAME "MKS Neptune X"

//
// Software SPI pins for TMC2130 stepper drivers
// This board only supports SW SPI for stepper drivers
//
#if HAS_TMC_SPI && DISABLED(TMC_USE_SW_SPI)
#warning "TMC_USE_SW_SPI is required for MKS Neptune X with TMC drivers."
#endif
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PD14
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PD1
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PD0
#endif
#endif

#include "pins_MKS_NEPTUNE_X_common.h"
Loading

0 comments on commit 8d0d510

Please sign in to comment.