Support for Z-Bold board (#14024)

This commit is contained in:
Aliaksei Kvitsinski 2019-06-13 11:21:18 +03:00 committed by Scott Lahteine
parent 18904c42f6
commit 648a91bce8
5 changed files with 296 additions and 32 deletions

View File

@ -237,6 +237,8 @@ else ifeq ($(HARDWARE_MOTHERBOARD),31)
else ifeq ($(HARDWARE_MOTHERBOARD),441) else ifeq ($(HARDWARE_MOTHERBOARD),441)
# TRONXY V3 1.0 # TRONXY V3 1.0
else ifeq ($(HARDWARE_MOTHERBOARD),442) else ifeq ($(HARDWARE_MOTHERBOARD),442)
# Z-Bolt X Series
else ifeq ($(HARDWARE_MOTHERBOARD),550)
# #
# Other ATmega1280, ATmega2560 # Other ATmega1280, ATmega2560
@ -288,6 +290,8 @@ else ifeq ($(HARDWARE_MOTHERBOARD),75)
else ifeq ($(HARDWARE_MOTHERBOARD),76) else ifeq ($(HARDWARE_MOTHERBOARD),76)
# Geeetech GT2560 Rev B for A20(M/D) # Geeetech GT2560 Rev B for A20(M/D)
else ifeq ($(HARDWARE_MOTHERBOARD),86) else ifeq ($(HARDWARE_MOTHERBOARD),86)
# Einstart retrofit
else ifeq ($(HARDWARE_MOTHERBOARD),666)
# #
# ATmega1281, ATmega2561 # ATmega1281, ATmega2561

View File

@ -91,6 +91,7 @@
#define BOARD_DUPLICATOR_I3_PLUS 31 // Wanhao Duplicator i3 Plus #define BOARD_DUPLICATOR_I3_PLUS 31 // Wanhao Duplicator i3 Plus
#define BOARD_VORON 441 // VORON Design #define BOARD_VORON 441 // VORON Design
#define BOARD_TRONXY_V3_1_0 442 // Tronxy TRONXY-V3-1.0 #define BOARD_TRONXY_V3_1_0 442 // Tronxy TRONXY-V3-1.0
#define BOARD_Z_BOLT_X_SERIES 550 // Z-Bolt X Series
// //
// Other ATmega1280, ATmega2560 // Other ATmega1280, ATmega2560

View File

@ -170,6 +170,8 @@
#include "pins_VORON.h" // ATmega2560 env:megaatmega2560 #include "pins_VORON.h" // ATmega2560 env:megaatmega2560
#elif MB(TRONXY_V3_1_0) #elif MB(TRONXY_V3_1_0)
#include "pins_TRONXY_V3_1_0.h" // ATmega2560 env:megaatmega2560 #include "pins_TRONXY_V3_1_0.h" // ATmega2560 env:megaatmega2560
#elif MB(Z_BOLT_X_SERIES)
#include "pins_Z_BOLT_X_SERIES.h" // ATmega2560 env:megaatmega2560
// //
// Other ATmega1280, ATmega2560 // Other ATmega1280, ATmega2560

View File

@ -42,28 +42,28 @@
// //
// Limit Switches // Limit Switches
// //
#define X_STOP_PIN 44 // 2560 PIN 40 #define X_STOP_PIN 44
#define Y_STOP_PIN 43 // 2560 PIN 41 #define Y_STOP_PIN 43
#define Z_STOP_PIN 42 // 2560 PIN 42 #define Z_STOP_PIN 42
// //
// Steppers // Steppers
// //
#define X_STEP_PIN 76 // 2560 PIN 68 #define X_STEP_PIN 76
#define X_DIR_PIN 75 // 2560 PIN 67 #define X_DIR_PIN 75
#define X_ENABLE_PIN 73 // 2560 PIN 66 #define X_ENABLE_PIN 73
#define Y_STEP_PIN 31 // 2560 PIN 59 #define Y_STEP_PIN 31
#define Y_DIR_PIN 32 // 2560 PIN 58 #define Y_DIR_PIN 32
#define Y_ENABLE_PIN 72 // 2560 PIN 65 #define Y_ENABLE_PIN 72
#define Z_STEP_PIN 34 // 2560 PIN 56 #define Z_STEP_PIN 34
#define Z_DIR_PIN 35 // 2560 PIN 55 #define Z_DIR_PIN 35
#define Z_ENABLE_PIN 33 // 2560 PIN 57 #define Z_ENABLE_PIN 33
#define E0_STEP_PIN 36 // 2560 PIN 54 #define E0_STEP_PIN 36
#define E0_DIR_PIN 37 // 2560 PIN 53 #define E0_DIR_PIN 37
#define E0_ENABLE_PIN 30 // 2560 PIN 60 #define E0_ENABLE_PIN 30
// //
// Temperature Sensors // Temperature Sensors
@ -74,16 +74,16 @@
// //
// Heaters / Fans // Heaters / Fans
// //
#define HEATER_0_PIN 83 // 2560 PIN 49 #define HEATER_0_PIN 83
#define HEATER_BED_PIN 38 // 2560 PIN 50 #define HEATER_BED_PIN 38
#define FAN_PIN 82 // 2560 PIN 48 #define FAN_PIN 82
// //
// Misc. Functions // Misc. Functions
// //
#define SDSS 53 // 2560 PIN 19 #define SDSS 53
#define LED_PIN 4 // 2560 PIN 1 #define LED_PIN 4
////////////////////////// //////////////////////////
// LCDs and Controllers // // LCDs and Controllers //
@ -97,24 +97,24 @@
// u8glib constructor // u8glib constructor
// U8GLIB_SH1106_128X64 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, LCD_PINS_DC, LCD_PINS_RS); // U8GLIB_SH1106_128X64 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, LCD_PINS_DC, LCD_PINS_RS);
#define LCD_PINS_DC 78 // 2560 PIN 4 #define LCD_PINS_DC 78
#define LCD_PINS_RS 79 // 2560 PIN 8 #define LCD_PINS_RS 79
// DOGM SPI LCD Support // DOGM SPI LCD Support
#define DOGLCD_CS 3 // 2560 PIN 7 #define DOGLCD_CS 3
#define DOGLCD_MOSI 2 // 2560 PIN 6 #define DOGLCD_MOSI 2
#define DOGLCD_SCK 5 // 2560 PIN 5 #define DOGLCD_SCK 5
#define DOGLCD_A0 2 // 2560 PIN 6 #define DOGLCD_A0 2
// //
// LCD Display input pins // LCD Display input pins
// //
#define BTN_UP 25 // 2560 PIN 75 #define BTN_UP 25
#define BTN_DWN 26 // 2560 PIN 74 #define BTN_DWN 26
#define BTN_LFT 27 // 2560 PIN 73 #define BTN_LFT 27
#define BTN_RT 28 // 2560 PIN 72 #define BTN_RT 28
// 'OK' button // 'OK' button
#define BTN_ENC 29 // 2560 PIN 71 #define BTN_ENC 29
// Set Kill to right arrow, same as RIGID_PANEL // Set Kill to right arrow, same as RIGID_PANEL
#define KILL_PIN 28 // 2560 PIN 72 #define KILL_PIN 28

View File

@ -0,0 +1,257 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2019 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Z-Bolt X Series board based on Arduino Mega2560
*/
#if HOTENDS > 4 || E_STEPPERS > 4
#error "Z-Bolt X Series board supports up to 4 hotends / E-steppers."
#endif
#define BOARD_NAME "Z-Bolt X Series"
#if ENABLED(TARGET_LPC1768)
#error "Oops! Set MOTHERBOARD to an LPC1768-based board when building for LPC1768."
#elif defined(__STM32F1__)
#error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
#endif
#if DISABLED(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768)
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
#endif
#endif
//
// Servos
//
#ifndef SERVO0_PIN
#define SERVO0_PIN 11
#endif
#ifndef SERVO3_PIN
#define SERVO3_PIN 4
#endif
//
// Limit Switches
//
#define X_MIN_PIN 3
#ifndef X_MAX_PIN
#define X_MAX_PIN 2
#endif
#define Y_MIN_PIN 14
#define Y_MAX_PIN 15
#define Z_MIN_PIN 18
#define Z_MAX_PIN 19
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 32
#endif
//
// Steppers
//
#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#ifndef X_CS_PIN
#define X_CS_PIN -1
#endif
#define Y_STEP_PIN 60
#define Y_DIR_PIN 61
#define Y_ENABLE_PIN 56
#ifndef Y_CS_PIN
#define Y_CS_PIN -1
#endif
#define Z_STEP_PIN 46
#define Z_DIR_PIN 48
#define Z_ENABLE_PIN 62
#ifndef Z_CS_PIN
#define Z_CS_PIN -1
#endif
#define E0_STEP_PIN 26
#define E0_DIR_PIN 28
#define E0_ENABLE_PIN 24
#ifndef E0_CS_PIN
#define E0_CS_PIN -1
#endif
#define E1_STEP_PIN 36
#define E1_DIR_PIN 34
#define E1_ENABLE_PIN 30
#ifndef E1_CS_PIN
#define E1_CS_PIN -1
#endif
// Red
#define E2_STEP_PIN 42
#define E2_DIR_PIN 40
#define E2_ENABLE_PIN 65
#ifndef E2_CS_PIN
#define E2_CS_PIN -1
#endif
// Black
#define E3_STEP_PIN 44
#define E3_DIR_PIN 64
#define E3_ENABLE_PIN 66
#ifndef E3_CS_PIN
#define E3_CS_PIN -1
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN 13 // Analog Input
#define TEMP_1_PIN 15 // Analog Input
#define TEMP_2_PIN 5 // Analog Input (BLACK)
#define TEMP_3_PIN 9 // Analog Input (RED)
#define TEMP_BED_PIN 14 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 10
#define HEATER_1_PIN 7
#define HEATER_2_PIN 6
#define HEATER_3_PIN 5
#define HEATER_BED_PIN 8
#define FAN_PIN 9
//
// Misc. Functions
//
#define SDSS 53
#define LED_PIN 13
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 5 // Analog Input on AUX2
#endif
// Оn the servos connector
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 4
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN 12
#endif
#define AUX2_PINS_FREE !( BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD) )
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
#if NUM_SERVOS <= 1 // try to use servo connector first
#define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM
#elif AUX2_PINS_FREE
#define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM
#endif
#endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
#if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
#define SPINDLE_LASER_ENA_PIN 4 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 5
#elif AUX2_PINS_FREE
#define SPINDLE_LASER_ENA_PIN 40 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 65
#endif
#endif
#undef AUX2_PINS_FREE
//
// TMC software SPI
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI 66
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO 44
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK 64
#endif
#endif
#if HAS_DRIVER(TMC2208)
/**
* TMC2208 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial1
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
//
// Software serial
//
#define X_SERIAL_TX_PIN 40
#define X_SERIAL_RX_PIN 63
#define X2_SERIAL_TX_PIN -1
#define X2_SERIAL_RX_PIN -1
#define Y_SERIAL_TX_PIN 59
#define Y_SERIAL_RX_PIN 64
#define Y2_SERIAL_TX_PIN -1
#define Y2_SERIAL_RX_PIN -1
#define Z_SERIAL_TX_PIN 42
#define Z_SERIAL_RX_PIN 65
#define Z2_SERIAL_TX_PIN -1
#define Z2_SERIAL_RX_PIN -1
#define E0_SERIAL_TX_PIN 44
#define E0_SERIAL_RX_PIN 66
#define E1_SERIAL_TX_PIN -1
#define E1_SERIAL_RX_PIN -1
#define E2_SERIAL_TX_PIN -1
#define E2_SERIAL_RX_PIN -1
#define E3_SERIAL_TX_PIN -1
#define E3_SERIAL_RX_PIN -1
#define E4_SERIAL_TX_PIN -1
#define E4_SERIAL_RX_PIN -1
#endif