-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config for Geeetech A series printers: A10, A10M, A10T and
A20, A20M, A20T. Based on all configs found on the discourse forum and facebook groups, and official schematics from: https://www.geeetech.com/download.html https://github.com/Geeetech3D/Diagram/files/8199212/GT2560V4.1BSCHA20T.pdf In addition, contains macros for filament mixing based on: https://klipper.discourse.group/t/mixing-color-support/2246/12 https://klipper.discourse.group/t/mixing-hotend-m163-emulation/11423/2 Signed-off-by: Alexander Bazarov <[email protected]>
- Loading branch information
1 parent
383b83d
commit b9fbe8c
Showing
1 changed file
with
267 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,267 @@ | ||
# This file contains common pin mappings for the Geeetech GT2560 v4.0 and v4.1b | ||
# boards. These boards use a firmware compiled for the AVR atmega2560. | ||
# For default Geeetech A10/A20 (1 extruder), | ||
# A10M/A20M (mixing 2 in 1 out), | ||
# A10T/A20T (mixing 3 in 1 out) printers | ||
# Installation: https://www.klipper3d.org/Installation.html | ||
# Always read for first start: https://www.klipper3d.org/Config_checks.html | ||
|
||
[mcu] | ||
# Might need to be changed: https://www.klipper3d.org/Installation.html | ||
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 | ||
baud: 250000 | ||
|
||
[printer] | ||
kinematics: cartesian | ||
max_velocity: 200 | ||
max_accel: 1500 | ||
max_z_velocity: 20 | ||
max_z_accel: 500 | ||
|
||
# # uncomment for BLTouch/3DTouch | ||
# [bltouch] | ||
# sensor_pin: PC7 # there is an external pull up so no need in ^ | ||
# control_pin: PB5 | ||
# speed: 3.0 | ||
# samples: 2 | ||
# x_offset: -42.0 | ||
# y_offset: -1.0 | ||
# z_offset: 1.0 # during calibration this line is commented out and new record added at the end of file | ||
|
||
[safe_z_home] | ||
home_xy_position: 100, 100 # Change coordinates to the center of your print bed | ||
speed: 50 | ||
z_hop: 10 # Move up 10mm | ||
z_hop_speed: 5 | ||
|
||
[stepper_x] | ||
enable_pin: !PC2 | ||
dir_pin: !PG2 | ||
step_pin: PC0 | ||
microsteps: 16 | ||
rotation_distance: 40 | ||
endstop_pin: !PA2 # there are external pull ups | ||
position_endstop: 0 | ||
position_max: 220 | ||
homing_speed: 40 | ||
|
||
[stepper_y] | ||
enable_pin: !PA7 | ||
dir_pin: !PC4 | ||
step_pin: PC6 | ||
microsteps: 16 | ||
rotation_distance: 40 | ||
endstop_pin: !PA6 # there are external pull ups | ||
position_endstop: 0 | ||
position_max: 220 | ||
homing_speed: 40 | ||
|
||
[stepper_z] | ||
enable_pin: !PA5 | ||
dir_pin: PA1 | ||
step_pin: PA3 | ||
microsteps: 16 | ||
rotation_distance: 8 | ||
#endstop_pin: probe:z_virtual_endstop # uncomment for BLTouch/3DTouch | ||
endstop_pin: !PC7 # comment for BLTouch/3DTouch | ||
position_endstop: 0 # comment for BLTouch/3DTouch | ||
position_max: 230 | ||
position_min: -5 | ||
homing_speed: 20 | ||
|
||
[extruder] | ||
enable_pin: !PB6 | ||
dir_pin: PL5 | ||
step_pin: PL3 | ||
microsteps: 16 | ||
rotation_distance: 34.4 # Needs to be optimized: https://www.klipper3d.org/Rotation_Distance.html#calibrating-rotation_distance-on-extruders | ||
nozzle_diameter: 0.4 | ||
filament_diameter: 1.750 | ||
heater_pin: PB4 | ||
sensor_type: EPCOS 100K B57560G104F | ||
sensor_pin: PK3 | ||
min_temp: 0 | ||
max_temp: 250 | ||
max_extrude_only_distance: 200.0 | ||
|
||
[extruder_stepper extruder_1] | ||
extruder: | ||
enable_pin: !PL1 | ||
dir_pin: PL2 | ||
step_pin: PL0 | ||
microsteps: 16 | ||
rotation_distance: 34.4 # Needs to be optimized: https://www.klipper3d.org/Rotation_Distance.html#calibrating-rotation_distance-on-extruders | ||
|
||
[extruder_stepper extruder_2] | ||
extruder: | ||
enable_pin: !PG0 | ||
dir_pin: PL4 | ||
step_pin: PL6 | ||
microsteps: 16 | ||
rotation_distance: 34.4 # Needs to be optimized: https://www.klipper3d.org/Rotation_Distance.html#calibrating-rotation_distance-on-extruders | ||
|
||
[heater_bed] | ||
heater_pin: PG5 | ||
sensor_type: EPCOS 100K B57560G104F | ||
sensor_pin: PK2 | ||
min_temp: 0 | ||
max_temp: 120 | ||
|
||
[fan] | ||
pin: PH6 | ||
cycle_time: 0.150 | ||
kick_start_time: 0.300 | ||
|
||
# # for GT2560V4.0 with 20pin flat cable toward the display | ||
# [display] | ||
# lcd_type: hd44780 | ||
# hd44780_protocol_init: True | ||
# rs_pin: PD1 | ||
# e_pin: PH0 | ||
# d4_pin: PH1 | ||
# d5_pin: PD0 | ||
# d6_pin: PE3 | ||
# d7_pin: PC1 | ||
# encoder_pins: ^PG1, ^PL7 | ||
# click_pin: ^!PD2 | ||
|
||
|
||
# for GT2560V4.1B with 12pin flat cable toward the display YHCB2004-06 ver3.0 | ||
# the aip31068_spi driver was added to Klipper on 2024-12-02, commit aecb29d2 | ||
[display] | ||
lcd_type: aip31068_spi | ||
latch_pin: PE3 | ||
spi_software_sclk_pin: PD0 | ||
spi_software_mosi_pin: PC1 | ||
spi_software_miso_pin: PH7 # any unused pin | ||
encoder_pins: ^PH0, ^PH1 | ||
click_pin: ^!PD2 | ||
|
||
|
||
[filament_switch_sensor sensor_e0] | ||
pause_on_runout: True | ||
switch_pin: !PK4 | ||
runout_gcode: | ||
PAUSE_MACRO | ||
insert_gcode: | ||
RESUME_MACRO | ||
|
||
[filament_switch_sensor sensor_e1] | ||
pause_on_runout: True | ||
switch_pin: !PK5 | ||
runout_gcode: | ||
PAUSE_MACRO | ||
insert_gcode: | ||
RESUME_MACRO | ||
|
||
[filament_switch_sensor sensor_e2] | ||
pause_on_runout: True | ||
# switch_pin: !PE2 # for GT2560V4.0 | ||
switch_pin: !PF0 # for GT2560V4.1B | ||
runout_gcode: | ||
PAUSE_MACRO | ||
insert_gcode: | ||
RESUME_MACRO | ||
|
||
|
||
[gcode_macro T0] | ||
gcode: | ||
# Deactivate stepper in my_extruder_stepper | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_1 MOTION_QUEUE= | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_2 MOTION_QUEUE= | ||
# Activate stepper in extruder | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder | ||
|
||
[gcode_macro T1] | ||
gcode: | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE= | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_2 MOTION_QUEUE= | ||
# Activate stepper in my_extruder_stepper | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_1 MOTION_QUEUE=extruder | ||
|
||
[gcode_macro T2] | ||
gcode: | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE= | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_1 MOTION_QUEUE= | ||
# Activate stepper in extruder | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_2 MOTION_QUEUE=extruder | ||
|
||
|
||
[gcode_macro ACTIVATE_EXTRUDER] | ||
description: Replaces built-in macro for a X-in, 1-out extruder | ||
rename_existing: ACTIVATE_EXTRUDER_BASE | ||
gcode: | ||
{% if 'EXTRUDER' in params %} | ||
{% set ext = params.EXTRUDER|default(EXTRUDER) %} | ||
{% if ext == "extruder"%} | ||
{action_respond_info("Switching to extruder.")} | ||
T0 | ||
{% elif ext == "extruder_1" %} | ||
{action_respond_info("Switching to extruder_1.")} | ||
T1 | ||
{% elif ext == "extruder_2" %} | ||
{action_respond_info("Switching to extruder_2.")} | ||
T2 | ||
{% else %} | ||
{action_respond_info("EXTRUDER value being passed.")} | ||
ACTIVATE_EXTRUDER_BASE EXTRUDER={ext} | ||
{% endif %} | ||
{% endif %} | ||
|
||
[delayed_gcode activate_default_extruder] | ||
initial_duration: 1 | ||
gcode: | ||
ACTIVATE_EXTRUDER EXTRUDER=extruder | ||
|
||
# to enable M118 echo command | ||
[respond] | ||
|
||
# Specific macros for mixing colors. | ||
# Add in slicer new filament color and in filament start G-Code add desired mixing factor: | ||
# M163 S0 P50 ; set extruder 0 to 50% | ||
# M163 S1 P40 ; set extruder 1 to 40% | ||
# M163 S2 P10 ; set extruder 2 to 10% | ||
# M164 ; commit the mix factors | ||
[gcode_macro M163] | ||
description: M163 [P<factor>] [S<index>] Set a single mix factor (in proportion to the sum total of all mix factors). The mix must be committed to a virtual tool by M164 before it takes effect. | ||
gcode: | ||
{% if 'P' in params %} | ||
{% set s = params.S|default(0)| int %} | ||
{% if s == 0 %} | ||
SET_GCODE_VARIABLE MACRO=M164 VARIABLE=e0_parts VALUE={params.P|default(0)|float} | ||
M118 Set Mixing factor for extruder 0 to {params.P|default(0)|float} | ||
{% elif s == 1 %} | ||
SET_GCODE_VARIABLE MACRO=M164 VARIABLE=e1_parts VALUE={params.P|default(0)|float} | ||
M118 Set Mixing factor for extruder 1 to {params.P|default(0)|float} | ||
{% elif s == 2 %} | ||
SET_GCODE_VARIABLE MACRO=M164 VARIABLE=e2_parts VALUE={params.P|default(0)|float} | ||
M118 Set Mixing factor for extruder 2 to {params.P|default(0)|float} | ||
{% endif %} | ||
{% else %} | ||
M118 No Mixing factor set, missing value for P | ||
{% endif %} | ||
M118 {e0_parts} {e1_parts} {e2_parts} | ||
|
||
|
||
[gcode_macro M164] | ||
description: Applies the set mixing factors to the extruders | ||
# default values: | ||
variable_e0_parts : 100 | ||
variable_e1_parts : 0 | ||
variable_e2_parts : 0 | ||
gcode: | ||
# normalize the parts to sum of 1 | ||
{% set e0 = e0_parts / (e0_parts + e1_parts + e2_parts) | float %} | ||
{% set e1 = e1_parts / (e0_parts + e1_parts + e2_parts) | float %} | ||
{% set e2 = e2_parts / (e0_parts + e1_parts + e2_parts) | float %} | ||
M118 scaled rot-dist_e0 { printer.configfile.settings.extruder.rotation_distance / (e0 + 0.000001) | float } | ||
M118 scaled rot-dist_e1 { printer.configfile.settings['extruder_stepper extruder_1'].rotation_distance / (e1 + 0.000001) | float } | ||
M118 scaled rot-dist_e2 { printer.configfile.settings['extruder_stepper extruder_2'].rotation_distance / (e2 + 0.000001) |float } | ||
# activate stepper percentages | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_1 MOTION_QUEUE=extruder | ||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_2 MOTION_QUEUE=extruder | ||
SET_EXTRUDER_ROTATION_DISTANCE EXTRUDER=extruder DISTANCE={ printer.configfile.settings.extruder.rotation_distance / (e0+0.000001)|float } | ||
SET_EXTRUDER_ROTATION_DISTANCE EXTRUDER=extruder_1 DISTANCE={ printer.configfile.settings['extruder_stepper extruder_1'].rotation_distance / (e1+0.000001)|float } | ||
SET_EXTRUDER_ROTATION_DISTANCE EXTRUDER=extruder_2 DISTANCE={ printer.configfile.settings['extruder_stepper extruder_2'].rotation_distance / (e2+0.000001)|float } | ||
M118 Mixing factors {e0} {e1} {e2} are activated |