Skip to content

Commit cd8974f

Browse files
committed
KAD Anycubic Mega Zero v1 and v2 unified configuration
- Supported printers: - Anycubic Mega Zero - Anycubic Mega Zero 2.0 - Supported boards: - Anycubic Melzi - BigTreeTech SKR mini MZ V1.0 / SKR mini E3 V2.0 - BigTreeTech SKR E3 Turbo - Leveling sensors: - BLTouch - BFPTouch - PINDA - Allenkey Probe - PSU control with BTT Relay 1.2 or MKS PWC - Fixed MAX Temp for bed (115) and hotend (245) - Defaults for bed PID calibration from MZ 2.0 - Increase probing grid to 7x7 - Probing margin 10mm - Enabled Subdivision of the grid by Catmull-Rom method (SKR boards) - PLA bed preheat at 60C - Use CR10_STOCKDISPLAY on all boards - Use smaller Marlin logo - Enabled M154 support - Board specific changes: - Anycubic Melzi: - BLTouch/BFPTouch variants: - PIN27 + EXT-A2 - PIN27 + Zmin - EXT-A2 + Zmin - Filament Sensors: - PIN27 - EXT-A2 - BigTreeTech SKR (all): - Enable M73 support - Display remaining time - Power Loss function tailored for UPS modules - Binary file transfers - ARC support - Advanced Pause + filament load/unload - BigTreeTech SKR E3 Turbo: - Dual extruder configs: - 2E: dual independant (Chimera) - 2to1: single nozzle, one filament at a time - 2mix: single mixing nozzle - UBL with BLTouch
1 parent 1dfa6cb commit cd8974f

21 files changed

+2683
-194
lines changed

Marlin/Configuration.h

Lines changed: 323 additions & 117 deletions
Large diffs are not rendered by default.

Marlin/Configuration_adv.h

Lines changed: 173 additions & 75 deletions
Large diffs are not rendered by default.

Marlin/Version_kad.h

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4+
*
5+
* Based on Sprinter and grbl.
6+
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
#pragma once
23+
24+
////////////////////////////
25+
// VENDOR VERSION EXAMPLE //
26+
////////////////////////////
27+
28+
/**
29+
* Marlin release version identifier
30+
*/
31+
#define SHORT_BUILD_VERSION "2.0.8.1-kad1"
32+
33+
/**
34+
* Verbose version identifier which should contain a reference to the location
35+
* from where the binary was downloaded or the source code was compiled.
36+
*/
37+
//#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION
38+
39+
/**
40+
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
41+
* here we define this default string as the date where the latest release
42+
* version was tagged.
43+
*/
44+
//#define STRING_DISTRIBUTION_DATE "2021-05-15"
45+
46+
/**
47+
* Defines a generic printer name to be output to the LCD after booting Marlin.
48+
*/
49+
//#define MACHINE_NAME "3D Printer"
50+
51+
/**
52+
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
53+
* Code which is installed on the device. In most cases —unless the manufacturer
54+
* has a distinct Github fork— the Source Code URL should just be the main
55+
* Marlin repository.
56+
*/
57+
//#define SOURCE_CODE_URL "github.com/MarlinFirmware/Marlin"
58+
#define SOURCE_CODE_URL "github.com/kad/Marlin"
59+
60+
/**
61+
* Default generic printer UUID.
62+
*/
63+
//#define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
64+
65+
/**
66+
* The WEBSITE_URL is the location where users can get more information such as
67+
* documentation about a specific Marlin release.
68+
*/
69+
//#define WEBSITE_URL "marlinfw.org"
70+
#define WEBSITE_URL "github.com/kad/Marlin/wiki"
71+
72+
/**
73+
* Set the vendor info the serial USB interface, if changable
74+
* Currently only supported by DUE platform
75+
*/
76+
//#define USB_DEVICE_VENDOR_ID 0x0000
77+
//#define USB_DEVICE_PRODUCT_ID 0x0000
78+
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL

Marlin/_Bootscreen.h

Lines changed: 174 additions & 0 deletions
Large diffs are not rendered by default.

Marlin/_Statusscreen.h

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4+
*
5+
* Based on Sprinter and grbl.
6+
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
23+
#pragma once
24+
25+
//
26+
// Status Screen Logo bitmap
27+
//
28+
#if ENABLED(KAD_SKR_BED)
29+
#define STATUS_LOGO_X 0
30+
#endif
31+
32+
#if HOTENDS < 2
33+
#define STATUS_LOGO_WIDTH 48
34+
35+
const unsigned char status_logo_bmp[] PROGMEM = {
36+
B00000000,B00011101,B11000100,B00111111,B00000000,B00000000, // ...........###.###...#....######................
37+
B00000000,B00001100,B10000110,B00011001,B10000000,B00000000, // ............##..#....##....##..##...............
38+
B00000000,B00001101,B00001110,B00011001,B10000000,B00000000, // ............##.#....###....##..##...............
39+
B00000000,B00001111,B00001011,B00011001,B10000000,B00000000, // ............####....#.##...##..##...............
40+
B00000000,B00001101,B10011111,B00011001,B10000000,B00000000, // ............##.##..#####...##..##...............
41+
B00000000,B00001101,B11010011,B10011001,B10000000,B00000000, // ............##.###.#..###..##..##...............
42+
B00000000,B00011100,B11111011,B11111111,B00000000,B00000000, // ...........###..#####.##########................
43+
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, // ................................................
44+
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, // ................................................
45+
B11110011,B10000000,B00000000,B00011111,B10000000,B00000000, // ####..###..................######...............
46+
B01110111,B00000000,B00000000,B00011001,B10000000,B00000000, // .###.###...................##..##...............
47+
B01011011,B00011100,B11110110,B00010011,B00011101,B10101110, // .#.##.##...###..####.##....#..##...###.##.#.###.
48+
B01011011,B00110101,B10101011,B00000110,B00110101,B11111011, // .#.##.##..##.#.##.#.#.##.....##...##.#.######.##
49+
B01011011,B00111101,B10100111,B00001100,B10111101,B10011011, // .#.##.##..####.##.#..###....##..#.####.##..##.##
50+
B01001011,B00110000,B11101011,B00011001,B10110001,B10011011, // .#..#.##..##....###.#.##...##..##.##...##..##.##
51+
B11100011,B10011101,B10001110,B10011111,B10011101,B10001110, // ###...###..###.##...###.#..######..###.##...###.
52+
B00000000,B00000001,B11100000,B00000000,B00000000,B00000000, // ...............####.............................
53+
B00000000,B00000001,B00100000,B00000000,B00000000,B00000000, // ...............#..#.............................
54+
B00000000,B00000001,B11100000,B00000000,B00000000,B00000000 // ...............####.............................
55+
};
56+
#else
57+
#define STATUS_LOGO_WIDTH 25
58+
59+
const unsigned char status_logo_bmp[] PROGMEM = {
60+
B01110111,B00010000,B11111100,B00000000, // .###.###...#....######..........
61+
B00110010,B00011000,B01100110,B00000000, // ..##..#....##....##..##.........
62+
B00110100,B00111000,B01100110,B00000000, // ..##.#....###....##..##.........
63+
B00111100,B00101100,B01100110,B00000000, // ..####....#.##...##..##.........
64+
B00110110,B01111100,B01100110,B00000000, // ..##.##..#####...##..##.........
65+
B00110111,B01001110,B01100110,B00000000, // ..##.###.#..###..##..##.........
66+
B01110011,B11101111,B11111100,B00000000, // .###..#####.##########..........
67+
B00000000,B00000000,B00000000,B00000000, // ................................
68+
B00000000,B00000000,B00000000,B00000000, // ................................
69+
B00000000,B00000000,B00000000,B00000000, // ................................
70+
B00000000,B00000000,B00000000,B00000000, // ................................
71+
B11110011,B10000000,B00000000,B00000000, // ####..###.......................
72+
B01110111,B00000000,B00000000,B00000000, // .###.###........................
73+
B01011011,B00011100,B11110110,B00000000, // .#.##.##...###..####.##.........
74+
B01011011,B00110101,B10101011,B00000000, // .#.##.##..##.#.##.#.#.##........
75+
B01011011,B00111101,B10100111,B00000000, // .#.##.##..####.##.#..###........
76+
B01001011,B00110000,B11101011,B00000000, // .#..#.##..##....###.#.##........
77+
B11100011,B10011101,B10001110,B10000000, // ###...###..###.##...###.#.......
78+
B00000000,B00000001,B11100000,B00000000, // ...............####.............
79+
B00000000,B00000001,B00100000,B00000000, // ...............#..#.............
80+
B00000000,B00000001,B11100000,B00000000, // ...............####.............
81+
B00111111,B00000000,B00000000,B00000000, // ..######........................
82+
B00110011,B00000000,B00000000,B00000000, // ..##..##........................
83+
B00100110,B00111011,B01001110,B00000000, // ..#..##...###.##.#..###.........
84+
B00001100,B01101011,B11011011,B00000000, // ....##...##.#.####.##.##........
85+
B00011001,B01111011,B00011011,B00000000, // ...##..#.####.##...##.##........
86+
B00110011,B01100011,B00011011,B00000000, // ..##..##.##...##...##.##........
87+
B00111111,B00111011,B00001110,B00000000 // ..######..###.##....###.........
88+
};
89+
#endif

Marlin/src/HAL/STM32F1/inc/SanityCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#error "SERIAL_STATS_DROPPED_RX is not supported on the STM32F1 platform."
4040
#endif
4141

42-
#if ENABLED(NEOPIXEL_LED)
42+
#if ENABLED(NEOPIXEL_LED) && DISABLED(KAD_SKR_MINI)
4343
#error "NEOPIXEL_LED (Adafruit NeoPixel) is not supported for HAL/STM32F1. Comment out this line to proceed at your own risk!"
4444
#endif
4545

anycubic_mega_zero.ini

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
############################################
2+
# #
3+
# KAD: Anycubic Mega Zero build variants #
4+
# #
5+
############################################
6+
#
7+
# Board: Melzi v0.0.2, PSU: 12 Volt
8+
#
9+
# Build targets:
10+
#
11+
# anycubic_mega_zero_melzi Highly recommended configuration. Manual Mesh Bed Leveling
12+
# anycubic_mega_zero_melzi_minimal Simple menus, no advanced bed leveling
13+
# anycubic_mega_zero_melzi_bl_zmin Automatic bed leveling, BLTouch is connected to PIN27 (Servo) and Z min stop
14+
# anycubic_mega_zero_melzi_bl_a2 Automatic bed leveling, BLTouch is connected to PIN27 (Servo) and EXT-A2
15+
# anycubic_mega_zero_melzi_bl_zmin_sfs Same as anycubic_mega_zero_bl_zmin, + BTT Smart filament sensor connected to EXT-A2
16+
# anycubic_mega_zero_melzi_bl_zmin_fs Same as anycubic_mega_zero_bl_zmin, + simple filament runout sensort connected to EXT-2
17+
# anycubic_mega_zero_melzi_bed_bl_a2 Same as anycubic_mega_zero_bl_a2, + Heated Bed
18+
# anycubic_mega_zero_melzi_bed_bl_zmin Same as anycubic_mega_zero_bl_zmin, + Heated Bed
19+
#
20+
21+
#
22+
# Anycubic Mega Zero Melzi clone, standard config
23+
#
24+
[env:anycubic_mega_zero_melzi_minimal]
25+
platform = atmelavr
26+
extends = env:melzi
27+
upload_speed = 115200
28+
build_flags = ${common.build_flags} -DKAD_MELZI
29+
extra_scripts = ${env:melzi.extra_scripts}
30+
pre:buildroot/share/PlatformIO/scripts/env-bin.py
31+
32+
# Base optimized build with dynamic feature configurations
33+
[anycubic_mega_zero_melzi_dynamic]
34+
extends = env:anycubic_mega_zero_melzi_minimal
35+
build_flags = ${env:anycubic_mega_zero_melzi_minimal.build_flags}
36+
-fno-tree-scev-cprop -fno-split-wide-types
37+
-Wl,--relax -mcall-prologues -finline-limit=3 -ffast-math
38+
extra_scripts = pre:buildroot/share/PlatformIO/scripts/kad_build_options.py
39+
${env:anycubic_mega_zero_melzi_minimal.extra_scripts}
40+
41+
#
42+
# Anycubic Mega Zero Melzi clone, standard config with Mesh Bed Leveling
43+
#
44+
[env:anycubic_mega_zero_melzi]
45+
extends = anycubic_mega_zero_melzi_dynamic
46+
build_flags = ${anycubic_mega_zero_melzi_dynamic.build_flags}
47+
-DMESH_BED_LEVELING
48+
49+
#
50+
# Anycubic Mega Zero Melzi clone, standard config with Mesh Bed Leveling
51+
#
52+
[env:anycubic_mega_zero_melzi_bed]
53+
extends = anycubic_mega_zero_melzi_dynamic
54+
build_flags = ${anycubic_mega_zero_melzi_dynamic.build_flags}
55+
-DMESH_BED_LEVELING
56+
57+
#
58+
# Anycubic Mega Zero Melzi clone, BLTouch config, PIN27 + EXT-A2 are used to connect probe
59+
#
60+
[env:anycubic_mega_zero_melzi_bl_a2]
61+
extends = anycubic_mega_zero_melzi_dynamic
62+
63+
#
64+
# Anycubic Mega Zero Melzi clone, BLTouch config, PIN27 + ZMIN are used to connect probe
65+
#
66+
[env:anycubic_mega_zero_melzi_bl_zmin]
67+
extends = anycubic_mega_zero_melzi_dynamic
68+
69+
#
70+
# Anycubic Mega Zero Melzi clone, BLTouch config, EXT-A2 + ZMIN are used to connect probe
71+
#
72+
[env:anycubic_mega_zero_melzi_bl_a2_zmin]
73+
extends = anycubic_mega_zero_melzi_dynamic
74+
75+
#
76+
# Anycubic Mega Zero Melzi clone, BLTouch config
77+
# PIN27 + ZMIN are used to connect probe.
78+
# EXT-A2 used to connect Smart Filament Sensor
79+
#
80+
[env:anycubic_mega_zero_melzi_bl_zmin_sfs]
81+
extends = anycubic_mega_zero_melzi_dynamic
82+
83+
# Same as above, but with bed enabled
84+
[env:anycubic_mega_zero_melzi_bed_bl_zmin_sfs]
85+
extends = anycubic_mega_zero_melzi_dynamic
86+
87+
#
88+
# Anycubic Mega Zero Melzi clone, BLTouch config
89+
# PIN27 + ZMIN are used to connect probe.
90+
# EXT-A2 used to connect simple Filament Sensor
91+
#
92+
[env:anycubic_mega_zero_melzi_bl_zmin_fs]
93+
extends = anycubic_mega_zero_melzi_dynamic
94+
95+
# Same as above, but with bed enabled
96+
[env:anycubic_mega_zero_melzi_bed_bl_zmin_fs]
97+
extends = anycubic_mega_zero_melzi_dynamic
98+
99+
#
100+
# Anycubic Mega Zero Melzi clone, MBL config
101+
# PIN27 used to connect Smart Filament Sensor
102+
#
103+
[env:anycubic_mega_zero_melzi_sfs]
104+
extends = anycubic_mega_zero_melzi_dynamic
105+
106+
#
107+
# Anycubic Mega Zero Melzi clone, MBL config
108+
# PIN27 used to connect simple Filament Sensor
109+
#
110+
[env:anycubic_mega_zero_melzi_fs]
111+
extends = anycubic_mega_zero_melzi_dynamic
112+
113+
#
114+
# Anycubic Mega Zero Melzi clone, MBL config
115+
# EXT-A2 used to connect Smart Filament Sensor
116+
#
117+
[env:anycubic_mega_zero_melzi_sfs_a2]
118+
extends = anycubic_mega_zero_melzi_dynamic
119+
120+
#
121+
# Anycubic Mega Zero Melzi clone, MBL config
122+
# EXT-A2 used to connect simple Filament Sensor
123+
#
124+
[env:anycubic_mega_zero_melzi_fs_a2]
125+
extends = anycubic_mega_zero_melzi_dynamic
126+
127+
#
128+
# Anycubic Mega Zero Melzi clone, BLTouch config, Heated BED
129+
# PIN27 + EXT-A2 are used to connect probe.
130+
#
131+
[env:anycubic_mega_zero_melzi_bed_bl_a2]
132+
extends = anycubic_mega_zero_melzi_dynamic
133+
134+
#
135+
# Anycubic Mega Zero Melzi clone, BLTouch config, Heated BED
136+
# PIN27 + ZMIN are used to connect probe.
137+
#
138+
[env:anycubic_mega_zero_melzi_bed_bl_zmin]
139+
extends = anycubic_mega_zero_melzi_dynamic
140+
141+
#
142+
# Anycubic Mega Zero Melzi clone, BLTouch config, Heated BED
143+
# EXT-A2 + ZMIN are used to connect probe.
144+
#
145+
[env:anycubic_mega_zero_melzi_bed_bl_a2_zmin]
146+
extends = anycubic_mega_zero_melzi_dynamic
147+
148+
# BFPTouch configs
149+
# A2: PIN27 for servo, EXT-A2 for sensor
150+
# A2+ZMIN: EXT-A2 for servo, Zmin for sensor
151+
# ZMIN: PIN27 for servo, zmin for sensor
152+
[env:anycubic_mega_zero_melzi_bfpt_a2]
153+
extends = anycubic_mega_zero_melzi_dynamic
154+
155+
[env:anycubic_mega_zero_melzi_bfpt_a2_zmin]
156+
extends = anycubic_mega_zero_melzi_dynamic
157+
158+
[env:anycubic_mega_zero_melzi_bfpt_zmin]
159+
extends = anycubic_mega_zero_melzi_dynamic
160+
161+
# PINDA inductive sensor
162+
# Default: using PIN27 adapter
163+
# A2: using EXT-A2
164+
# with filament sensors: default to PIN27 and sensor to EXT-A2.
165+
[env:anycubic_mega_zero_melzi_pinda]
166+
extends = anycubic_mega_zero_melzi_dynamic
167+
168+
[env:anycubic_mega_zero_melzi_pinda_a2]
169+
extends = anycubic_mega_zero_melzi_dynamic
170+
171+
[env:anycubic_mega_zero_melzi_pinda_fs]
172+
extends = anycubic_mega_zero_melzi_dynamic
173+
174+
[env:anycubic_mega_zero_melzi_pinda_sfs]
175+
extends = anycubic_mega_zero_melzi_dynamic
176+
177+
[env:anycubic_mega_zero_melzi_pinda_a2_fs]
178+
extends = anycubic_mega_zero_melzi_dynamic
179+
180+
[env:anycubic_mega_zero_melzi_pinda_a2_sfs]
181+
extends = anycubic_mega_zero_melzi_dynamic
182+
183+
# Allen Key Probe
184+
# https://www.thingiverse.com/thing:4574066
185+
# Default: Ext-A2
186+
# option: zmin
187+
[env:anycubic_mega_zero_melzi_akp_a2]
188+
extends = anycubic_mega_zero_melzi_dynamic
189+
190+
[env:anycubic_mega_zero_melzi_akp_zmin]
191+
extends = anycubic_mega_zero_melzi_dynamic

0 commit comments

Comments
 (0)