From 7beebcd315da6587891a50fde1f7d53a8ec57c51 Mon Sep 17 00:00:00 2001 From: Albert van Osch Date: Sat, 7 Nov 2020 23:59:19 +0100 Subject: [PATCH] Zonestar Z8 XM2 support (#19991) --- Marlin/src/core/boards.h | 87 +++++----- Marlin/src/lcd/menu/menu_tramming.cpp | 2 +- Marlin/src/lcd/thermistornames.h | 2 + Marlin/src/module/thermistor/thermistor_503.h | 57 +++++++ Marlin/src/module/thermistor/thermistors.h | 3 + Marlin/src/pins/pins.h | 10 +- Marlin/src/pins/ramps/pins_ZRIB_V52.h | 159 ++++++++++++++++++ 7 files changed, 272 insertions(+), 48 deletions(-) create mode 100644 Marlin/src/module/thermistor/thermistor_503.h create mode 100644 Marlin/src/pins/ramps/pins_ZRIB_V52.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 12bf167f40..efccc3716d 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -69,49 +69,50 @@ #define BOARD_MKS_GEN_L 1113 // MKS GEN L #define BOARD_KFB_2 1114 // BigTreeTech or BIQU KFB2.0 #define BOARD_ZRIB_V20 1115 // zrib V2.0 control board (Chinese knock off RAMPS replica) -#define BOARD_FELIX2 1116 // Felix 2.0+ Electronics Board (RAMPS like) -#define BOARD_RIGIDBOARD 1117 // Invent-A-Part RigidBoard -#define BOARD_RIGIDBOARD_V2 1118 // Invent-A-Part RigidBoard V2 -#define BOARD_SAINSMART_2IN1 1119 // Sainsmart 2-in-1 board -#define BOARD_ULTIMAKER 1120 // Ultimaker -#define BOARD_ULTIMAKER_OLD 1121 // Ultimaker (Older electronics. Pre 1.5.4. This is rare) -#define BOARD_AZTEEG_X3 1122 // Azteeg X3 -#define BOARD_AZTEEG_X3_PRO 1123 // Azteeg X3 Pro -#define BOARD_ULTIMAIN_2 1124 // Ultimainboard 2.x (Uses TEMP_SENSOR 20) -#define BOARD_RUMBA 1125 // Rumba -#define BOARD_RUMBA_RAISE3D 1126 // Raise3D N series Rumba derivative -#define BOARD_RL200 1127 // Rapide Lite 200 (v1, low-cost RUMBA clone with drv) -#define BOARD_FORMBOT_TREX2PLUS 1128 // Formbot T-Rex 2 Plus -#define BOARD_FORMBOT_TREX3 1129 // Formbot T-Rex 3 -#define BOARD_FORMBOT_RAPTOR 1130 // Formbot Raptor -#define BOARD_FORMBOT_RAPTOR2 1131 // Formbot Raptor 2 -#define BOARD_BQ_ZUM_MEGA_3D 1132 // bq ZUM Mega 3D -#define BOARD_MAKEBOARD_MINI 1133 // MakeBoard Mini v2.1.2 is a control board sold by MicroMake -#define BOARD_TRIGORILLA_13 1134 // TriGorilla Anycubic version 1.3-based on RAMPS EFB -#define BOARD_TRIGORILLA_14 1135 // ... Ver 1.4 -#define BOARD_TRIGORILLA_14_11 1136 // ... Rev 1.1 (new servo pin order) -#define BOARD_RAMPS_ENDER_4 1137 // Creality: Ender-4, CR-8 -#define BOARD_RAMPS_CREALITY 1138 // Creality: CR10S, CR20, CR-X -#define BOARD_DAGOMA_F5 1139 // Dagoma F5 -#define BOARD_FYSETC_F6_13 1140 // FYSETC F6 1.3 -#define BOARD_FYSETC_F6_14 1141 // FYSETC F6 1.4 -#define BOARD_DUPLICATOR_I3_PLUS 1142 // Wanhao Duplicator i3 Plus -#define BOARD_VORON 1143 // VORON Design -#define BOARD_TRONXY_V3_1_0 1144 // Tronxy TRONXY-V3-1.0 -#define BOARD_Z_BOLT_X_SERIES 1145 // Z-Bolt X Series -#define BOARD_TT_OSCAR 1146 // TT OSCAR -#define BOARD_OVERLORD 1147 // Overlord/Overlord Pro -#define BOARD_HJC2560C_REV1 1148 // ADIMLab Gantry v1 -#define BOARD_HJC2560C_REV2 1149 // ADIMLab Gantry v2 -#define BOARD_TANGO 1150 // BIQU Tango V1 -#define BOARD_MKS_GEN_L_V2 1151 // MKS GEN L V2 -#define BOARD_MKS_GEN_L_V21 1152 // MKS GEN L V2.1 -#define BOARD_COPYMASTER_3D 1153 // Copymaster 3D -#define BOARD_ORTUR_4 1154 // Ortur 4 -#define BOARD_TENLOG_D3_HERO 1155 // Tenlog D3 Hero IDEX printer -#define BOARD_RAMPS_S_12_EEFB 1156 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed) -#define BOARD_RAMPS_S_12_EEEB 1157 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed) -#define BOARD_RAMPS_S_12_EFFB 1158 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed) +#define BOARD_ZRIB_V52 1116 // zrib V5.2 control board (Chinese knock off RAMPS replica) +#define BOARD_FELIX2 1117 // Felix 2.0+ Electronics Board (RAMPS like) +#define BOARD_RIGIDBOARD 1118 // Invent-A-Part RigidBoard +#define BOARD_RIGIDBOARD_V2 1119 // Invent-A-Part RigidBoard V2 +#define BOARD_SAINSMART_2IN1 1120 // Sainsmart 2-in-1 board +#define BOARD_ULTIMAKER 1121 // Ultimaker +#define BOARD_ULTIMAKER_OLD 1122 // Ultimaker (Older electronics. Pre 1.5.4. This is rare) +#define BOARD_AZTEEG_X3 1123 // Azteeg X3 +#define BOARD_AZTEEG_X3_PRO 1124 // Azteeg X3 Pro +#define BOARD_ULTIMAIN_2 1125 // Ultimainboard 2.x (Uses TEMP_SENSOR 20) +#define BOARD_RUMBA 1126 // Rumba +#define BOARD_RUMBA_RAISE3D 1127 // Raise3D N series Rumba derivative +#define BOARD_RL200 1128 // Rapide Lite 200 (v1, low-cost RUMBA clone with drv) +#define BOARD_FORMBOT_TREX2PLUS 1129 // Formbot T-Rex 2 Plus +#define BOARD_FORMBOT_TREX3 1130 // Formbot T-Rex 3 +#define BOARD_FORMBOT_RAPTOR 1131 // Formbot Raptor +#define BOARD_FORMBOT_RAPTOR2 1132 // Formbot Raptor 2 +#define BOARD_BQ_ZUM_MEGA_3D 1133 // bq ZUM Mega 3D +#define BOARD_MAKEBOARD_MINI 1134 // MakeBoard Mini v2.1.2 is a control board sold by MicroMake +#define BOARD_TRIGORILLA_13 1135 // TriGorilla Anycubic version 1.3-based on RAMPS EFB +#define BOARD_TRIGORILLA_14 1136 // ... Ver 1.4 +#define BOARD_TRIGORILLA_14_11 1137 // ... Rev 1.1 (new servo pin order) +#define BOARD_RAMPS_ENDER_4 1138 // Creality: Ender-4, CR-8 +#define BOARD_RAMPS_CREALITY 1139 // Creality: CR10S, CR20, CR-X +#define BOARD_DAGOMA_F5 1140 // Dagoma F5 +#define BOARD_FYSETC_F6_13 1141 // FYSETC F6 1.3 +#define BOARD_FYSETC_F6_14 1142 // FYSETC F6 1.4 +#define BOARD_DUPLICATOR_I3_PLUS 1143 // Wanhao Duplicator i3 Plus +#define BOARD_VORON 1144 // VORON Design +#define BOARD_TRONXY_V3_1_0 1145 // Tronxy TRONXY-V3-1.0 +#define BOARD_Z_BOLT_X_SERIES 1146 // Z-Bolt X Series +#define BOARD_TT_OSCAR 1147 // TT OSCAR +#define BOARD_OVERLORD 1148 // Overlord/Overlord Pro +#define BOARD_HJC2560C_REV1 1149 // ADIMLab Gantry v1 +#define BOARD_HJC2560C_REV2 1150 // ADIMLab Gantry v2 +#define BOARD_TANGO 1151 // BIQU Tango V1 +#define BOARD_MKS_GEN_L_V2 1152 // MKS GEN L V2 +#define BOARD_MKS_GEN_L_V21 1153 // MKS GEN L V2.1 +#define BOARD_COPYMASTER_3D 1154 // Copymaster 3D +#define BOARD_ORTUR_4 1155 // Ortur 4 +#define BOARD_TENLOG_D3_HERO 1156 // Tenlog D3 Hero IDEX printer +#define BOARD_RAMPS_S_12_EEFB 1157 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed) +#define BOARD_RAMPS_S_12_EEEB 1158 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed) +#define BOARD_RAMPS_S_12_EFFB 1159 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed) // // RAMBo and derivatives diff --git a/Marlin/src/lcd/menu/menu_tramming.cpp b/Marlin/src/lcd/menu/menu_tramming.cpp index c01f983833..a102fe7e57 100644 --- a/Marlin/src/lcd/menu/menu_tramming.cpp +++ b/Marlin/src/lcd/menu/menu_tramming.cpp @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . * */ diff --git a/Marlin/src/lcd/thermistornames.h b/Marlin/src/lcd/thermistornames.h index 37f285d483..f9f91ac49a 100644 --- a/Marlin/src/lcd/thermistornames.h +++ b/Marlin/src/lcd/thermistornames.h @@ -68,6 +68,8 @@ #define THERMISTOR_NAME "Zonestar (Tronxy X3A)" #elif THERMISTOR_ID == 502 #define THERMISTOR_NAME "Zonestar (P802M Hot Bed)" +#elif THERMISTOR_ID == 503 + #define THERMISTOR_NAME "Zonestar (Z8XM2 Bed)" #elif THERMISTOR_ID == 512 #define THERMISTOR_NAME "RPW-Ultra" #elif THERMISTOR_ID == 6 diff --git a/Marlin/src/module/thermistor/thermistor_503.h b/Marlin/src/module/thermistor/thermistor_503.h new file mode 100644 index 0000000000..fc4bffffdb --- /dev/null +++ b/Marlin/src/module/thermistor/thermistor_503.h @@ -0,0 +1,57 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 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 . + * + */ +#pragma once + +// Zonestar (Z8XM2) Heated Bed thermistor. Added By AvanOsch +// These are taken from the Zonestar settings in original Repetier firmware: Z8XM2_ZRIB_LCD12864_V51.zip +const temp_entry_t temptable_503[] PROGMEM = { + { OV( 12), 300 }, + { OV( 27), 270 }, + { OV( 47), 250 }, + { OV( 68), 230 }, + { OV( 99), 210 }, + { OV( 120), 200 }, + { OV( 141), 190 }, + { OV( 171), 180 }, + { OV( 201), 170 }, + { OV( 261), 160 }, + { OV( 321), 150 }, + { OV( 401), 140 }, + { OV( 451), 130 }, + { OV( 551), 120 }, + { OV( 596), 110 }, + { OV( 626), 105 }, + { OV( 666), 100 }, + { OV( 697), 90 }, + { OV( 717), 85 }, + { OV( 798), 69 }, + { OV( 819), 65 }, + { OV( 870), 55 }, + { OV( 891), 51 }, + { OV( 922), 39 }, + { OV( 968), 28 }, + { OV( 980), 23 }, + { OV( 991), 17 }, + { OV( 1001), 9 }, + { OV(1021), -27 }, + { OV(1023), -200} +}; diff --git a/Marlin/src/module/thermistor/thermistors.h b/Marlin/src/module/thermistor/thermistors.h index f90361d9a3..ab92102de3 100644 --- a/Marlin/src/module/thermistor/thermistors.h +++ b/Marlin/src/module/thermistor/thermistors.h @@ -75,6 +75,9 @@ typedef struct { int16_t value, celsius; } temp_entry_t; #if ANY_THERMISTOR_IS(502) // Unknown thermistor used by the Zonestar Průša P802M hot bed #include "thermistor_502.h" #endif +#if ANY_THERMISTOR_IS(503) // Zonestar (Z8XM2) Heated Bed thermistor + #include "thermistor_503.h" +#endif #if ANY_THERMISTOR_IS(512) // 100k thermistor in RPW-Ultra hotend, Pull-up = 4.7 kOhm, "unknown model" #include "thermistor_512.h" #endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 22b0c6947f..5eb4717e78 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -104,13 +104,13 @@ #elif MB(3DRAG) #include "ramps/pins_3DRAG.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 #elif MB(K8200) - #include "ramps/pins_K8200.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (3DRAG) + #include "ramps/pins_K8200.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 #elif MB(K8400) - #include "ramps/pins_K8400.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (3DRAG) + #include "ramps/pins_K8400.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 #elif MB(K8600) #include "ramps/pins_K8600.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 #elif MB(K8800) - #include "ramps/pins_K8800.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (3DRAG) + #include "ramps/pins_K8800.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 #elif MB(BAM_DICE) #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 #elif MB(BAM_DICE_DUE) @@ -132,7 +132,9 @@ #elif MB(KFB_2) #include "ramps/pins_BIQU_KFB_2.h" // ATmega2560 env:mega2560 #elif MB(ZRIB_V20) - #include "ramps/pins_ZRIB_V20.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (MKS_GEN_13) + #include "ramps/pins_ZRIB_V20.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 +#elif MB(ZRIB_V52) + #include "ramps/pins_ZRIB_V52.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 #elif MB(FELIX2) #include "ramps/pins_FELIX2.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 #elif MB(RIGIDBOARD) diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V52.h b/Marlin/src/pins/ramps/pins_ZRIB_V52.h new file mode 100644 index 0000000000..983c840bbc --- /dev/null +++ b/Marlin/src/pins/ramps/pins_ZRIB_V52.h @@ -0,0 +1,159 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 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 . + * + */ +#pragma once + +/** + * ZRIB V5.2 Based on MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping + */ + +#if HOTENDS > 2 || E_STEPPERS > 2 + #error "ZRIB V5.2 only supports up to 2 hotends / E-steppers. Comment out this line to continue." +#endif + +#define BOARD_INFO_NAME "ZRIB V5.2" + +#define MKS_BASE_VERSION 14 +#define IS_RAMPS_EFB + +// +// Heaters / Fans +// +#define FAN_PIN 9 // PH6 ** Pin18 ** PWM9 +#define FAN1_PIN 6 + +// +// Extra Extruder / Stepper for V5.2 +// +#define E2_STEP_PIN 4 +#define E2_DIR_PIN 5 +#define E2_ENABLE_PIN 22 + +#include "pins_MKS_BASE_common.h" + +/* + Available connectors on MKS BASE v1.4 (Basically same as ZRIB V5.2) + + ======= + | GND | + |-----| E0 + | 10 | (10) PB4 ** Pin23 ** PWM10 + |-----| + | GND | + |-----| E1 + | 7 | ( 7) PH4 ** Pin16 ** PWM7 + |-----| + | GND | + |-----| FAN + | 9 | ( 9) PH6 ** Pin18 ** PWM9 + ======= + + ======= + | GND | + |-----| Heated Bed + | 8 | ( 8) PH5 ** Pin17 ** PWM8 + ======= + + ========== + | 12-24V | + |--------| Power + | GND | + ========== + + XS3 Connector + ================= + | 65 | GND | 5V | (65) PK3 ** Pin86 ** A11 + |----|-----|----| + | 66 | GND | 5V | (66) PK4 ** Pin85 ** A12 + ================= + + Servos Connector + ================= + | 11 | GND | 5V | (11) PB5 ** Pin24 ** PWM11 + |----|-----|----| + | 12 | GND | 5V | (12) PB6 ** Pin25 ** PWM12 + ================= + + ICSP + ================= + | 5V | 51 | GND | (51) PB2 ** Pin21 ** SPI_MOSI + |----|----|-----| + | 50 | 52 | RST | (50) PB3 ** Pin22 ** SPI_MISO + ================= (52) PB1 ** Pin20 ** SPI_SCK + + XS6/AUX-1 Connector + ====================== + | 5V | GND | NC | 20 | (20) PD1 ** Pin44 ** I2C_SDA + |----|-----|----|----| + | 50 | 51 | 52 | 21 | (50) PB3 ** Pin22 ** SPI_MISO + ====================== (51) PB2 ** Pin21 ** SPI_MOSI + (52) PB1 ** Pin20 ** SPI_SCK + (21) PD0 ** Pin43 ** I2C_SCL + + Temperature + ================================== + | GND | 69 | GND | 68 | GND | 67 | + ================================== + (69) PK7 ** Pin82 ** A15 + (68) PK6 ** Pin83 ** A14 + (67) PK5 ** Pin84 ** A13 + + Limit Switches + ============ + | 2 | GND | X+ ( 2) PE4 ** Pin6 ** PWM2 + |----|-----| + | 3 | GND | X- ( 3) PE5 ** Pin7 ** PWM3 + |----|-----| + | 15 | GND | Y+ (15) PJ0 ** Pin63 ** USART3_RX + |----|-----| + | 14 | GND | Y- (14) PJ1 ** Pin64 ** USART3_TX + |----|-----| + | 19 | GND | Z+ (19) PD2 ** Pin45 ** USART1_RX + |----|-----| + | 18 | GND | Z- (18) PD3 ** Pin46 ** USART1_TX + ============ + + EXP1 + ============ + | 37 | 35 | (37) PC0 ** Pin53 ** D37 + |-----|----| (35) PC2 ** Pin55 ** D35 + | 17 | 16 | (17) PH0 ** Pin12 ** USART2_RX + |-----|----| (16) PH1 ** Pin13 ** USART2_TX + | 23 | 25 | (23) PA1 ** Pin77 ** D23 + |-----|----| (25) PA3 ** Pin75 ** D25 + | 27 | 29 | (27) PA5 ** Pin73 ** D27 + |-----|----| (29) PA7 ** Pin71 ** D29 + | GND | 5V | + ============ + + EXP2 + ============ + | 50 | 52 | (50) PB3 ** Pin22 ** SPI_MISO + |-----|----| (52) PB1 ** Pin20 ** SPI_SCK + | 31 | 53 | (31) PC6 ** Pin59 ** D31 + |-----|----| (53) PB0 ** Pin19 ** SPI_SS + | 33 | 51 | (33) PC4 ** Pin57 ** D33 + |-----|----| (51) PB2 ** Pin21 ** SPI_MOSI + | 49 | 41 | (49) PL0 ** Pin35 ** D49 + |-----|----| (41) PG0 ** Pin51 ** D41 + | GND | NC | + ============ +*/