WANHAO_D9 (need EXP) (#28073)

This commit is contained in:
Sylvain 2025-10-04 21:23:40 +02:00 committed by GitHub
parent b60838508b
commit a506701a8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 161 additions and 15 deletions

View file

@ -176,16 +176,17 @@
#define BOARD_GT2560_V41B 1322 // Geeetech GT2560 V4.1B for A10(M/T/D)
#define BOARD_EINSTART_S 1323 // Einstart retrofit
#define BOARD_WANHAO_ONEPLUS 1324 // Wanhao 0ne+ i3 Mini
#define BOARD_OVERLORD 1325 // Overlord/Overlord Pro
#define BOARD_HJC2560C_REV1 1326 // ADIMLab Gantry v1
#define BOARD_HJC2560C_REV2 1327 // ADIMLab Gantry v2
#define BOARD_LEAPFROG_XEED2015 1328 // Leapfrog Xeed 2015
#define BOARD_PICA_REVB 1329 // PICA Shield (original version)
#define BOARD_PICA 1330 // PICA Shield (rev C or later)
#define BOARD_INTAMSYS40 1331 // Intamsys 4.0 (Funmat HT)
#define BOARD_MALYAN_M180 1332 // Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
#define BOARD_PROTONEER_CNC_SHIELD_V3 1333 // Mega controller & Protoneer CNC Shield V3.00
#define BOARD_WEEDO_62A 1334 // WEEDO 62A board (TINA2, Monoprice Cadet, etc.)
#define BOARD_WANHAO_D9 1325 // Wanhao D9 MK2
#define BOARD_OVERLORD 1326 // Overlord/Overlord Pro
#define BOARD_HJC2560C_REV1 1327 // ADIMLab Gantry v1
#define BOARD_HJC2560C_REV2 1328 // ADIMLab Gantry v2
#define BOARD_LEAPFROG_XEED2015 1329 // Leapfrog Xeed 2015
#define BOARD_PICA_REVB 1330 // PICA Shield (original version)
#define BOARD_PICA 1331 // PICA Shield (rev C or later)
#define BOARD_INTAMSYS40 1332 // Intamsys 4.0 (Funmat HT)
#define BOARD_MALYAN_M180 1333 // Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
#define BOARD_PROTONEER_CNC_SHIELD_V3 1334 // Mega controller & Protoneer CNC Shield V3.00
#define BOARD_WEEDO_62A 1335 // WEEDO 62A board (TINA2, Monoprice Cadet, etc.)
//
// ATmega1281, ATmega2561

View file

@ -408,7 +408,7 @@
#define SD_DETECT_PIN EXP2_07_PIN
#else // !CR10_STOCKDISPLAY
#else
#define LCD_PINS_RS EXP1_04_PIN
@ -495,7 +495,7 @@
#endif // !FYSETC_MINI_12864
#endif // !CR10_STOCKDISPLAY
#endif
#endif // HAS_WIRED_LCD

View file

@ -0,0 +1,141 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2025 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
/**
* Wanhao Duplicator D9 MK2 pin assignments
* ATmega2560
*/
#include "env_validate.h"
#if NOT_TARGET(__AVR_ATmega2560__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
#endif
#define BOARD_INFO_NAME "Wanhao D9 MK2"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
#define BOARD_WEBSITE_URL "wanhao.store"
#define LARGE_FLASH true
//
// Limit Switches
//
#ifndef X_MIN_PIN
#define X_MIN_PIN 54
#endif
#ifndef Y_MIN_PIN
#define Y_MIN_PIN 24
#endif
#ifndef Z_MIN_PIN
#define Z_MIN_PIN 6
#endif
//
// Steppers
//
#define X_STEP_PIN 61
#define X_DIR_PIN 62
#define X_ENABLE_PIN 60
#define Y_STEP_PIN 64
#define Y_DIR_PIN 65
#define Y_ENABLE_PIN 2
#define Z_STEP_PIN 67
#define Z_DIR_PIN 69
#define Z_ENABLE_PIN 66
#define E0_STEP_PIN 58
#define E0_DIR_PIN 59
#define E0_ENABLE_PIN 57
//
// Temperature Sensors
//
#define TEMP_0_PIN 1
#define TEMP_BED_PIN 14
//
// Heaters / Fans
//
#define HEATER_0_PIN 4
#define HEATER_BED_PIN 3
#define FAN0_PIN 5
//
// Servos
//
#define SERVO0_PIN 7
//
// SD Card
//
#define SD_DETECT_PIN 49
#define SD_SS_PIN 53
//
// Misc. Functions
//
#define LED_PIN 13
#define KILL_PIN -1
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 12
#endif
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 8
#endif
//
// LCD / Controller
//
#if HAS_WIRED_LCD
#define BEEPER_PIN 27 // EXP1-1
#define LCD_PINS_RS 37 // EXP1-4
#define LCD_PINS_EN 36 // EXP1-8
#define LCD_PINS_D4 34 // EXP1-4
#define LCD_PINS_D5 35 // EXP1-6
#define LCD_PINS_D6 32 // EXP1-7
#define LCD_PINS_D7 33 // EXP1-8
#define BTN_ENC 30 // EXP1-2
#define BTN_EN1 29 // EXP1-3 or EXP2-3
#define BTN_EN2 28 // EXP1-5 or EXP2-5
#endif // HAS_WIRED_LCD
//
// Power Loss Recovery
//
#ifndef POWER_LOSS_PIN
#define POWER_LOSS_PIN 63
#endif
#ifndef POWER_LOSS_STATE
#define POWER_LOSS_STATE LOW
#endif

View file

@ -295,6 +295,8 @@
#include "mega/pins_EINSTART-S.h" // ATmega2560, ATmega1280 env:mega2560ext env:mega1280
#elif MB(WANHAO_ONEPLUS)
#include "mega/pins_WANHAO_ONEPLUS.h" // ATmega2560 env:mega2560
#elif MB(WANHAO_D9)
#include "mega/pins_WANHAO_D9.h" // ATmega2560 env:mega2560
#elif MB(OVERLORD)
#include "mega/pins_OVERLORD.h" // ATmega2560 env:mega2560
#elif MB(HJC2560C_REV1)

View file

@ -78,7 +78,7 @@
//
// Filament Runout Sensor
//
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PA15 // "Pulled-high"
#endif

View file

@ -75,7 +75,7 @@
//
// Filament runout
//
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PC15
#endif

View file

@ -103,8 +103,10 @@
//
// Filament Sensors
//
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PE6
#endif
#ifndef FIL_RUNOUT2_PIN
#define FIL_RUNOUT2_PIN PF12
#endif