VoronUsers/firmware_configurations/klipper/Mellow/FLY-Gemini/cfg/printer.cfg

353 lines
9.0 KiB
INI

## Voron Design VORON0/VORON0.1 FLY-Gemini TMC2209 UART config
## *** THINGS TO CHANGE/CHECK: ***
## MCU paths [mcu] section
## Thermistor types [extruder] and [heater_bed] sections - See 'sensor types' list at end of file
## Z Endstop Switch location [safe_z_home] section
## Z Endstop Switch offset for Z0 [stepper_z] section
## Probe points [quad_gantry_level] section
## Min & Max gantry corner postions [quad_gantry_level] section
## PID tune [extruder] and [heater_bed] sections
## Fine tune E steps [extruder] section
##========================== Pin Definitions ========================
## UART_PIN = CS_PIN
## X
## Drive_X_STEP_PIN PC13
## Drive_X_DIR_PIN PC1
## Drive_X_ENABLE_PIN PB2
## Drive_X_STOP_PIN PA3 #XSTOP
## Drive_X_UART_PIN PB11
## Y
## Drive_Y_STEP_PIN PC14
## Drive_Y_DIR_PIN PC4
## Drive_Y_ENABLE_PIN PB6
## Drive_Y_STOP_PIN PB1 #YSTOP
## Drive_Y_UART_PIN PB9
## Z
## Drive_Z_STEP_PIN PC15
## Drive_Z_DIR_PIN PC5
## Drive_Z_ENABLE_PIN PB5
## Drive_Z_STOP_PIN PB10 #ZSTOP
## Drive_Z_UART_PIN PB8
## E
## Drive_E_STEP_PIN PC3
## Drive_E_DIR_PIN PC7
## Drive_E_ENABLE_PIN PB4
## Drive_E_UART_PIN PB7
## TMC SPI MODE
## TMC MOSI PA7
## TMC MISO PA6
## TMC SCK PA5
## HEAT0 PA0
## BED PA2
## TH0 (H0 Temp) PC0 #E0 TEMP
## TH1 (H1 Temp) PC2 #BED TEMP
## FAN0 PC6
## CORE-FAN gpiochip0/gpio3
## SERVO PB0 #BLTOUCH
## PROBE PA1 #BLTOUCH
## Accelerometer
## Fly-Gemini's accelerometer interface can
## use Core's spi channel
##########################################
## /dev/spi0.0
##########################################
##===================================================================
## Fly-Gemini's onboard mcu interface defaults to ttyACM0, no need to
## modify it if there is no other USB device
[mcu]
serial: /dev/ttyACM0
[mcu host]
serial: /tmp/klipper_host_mcu
[printer]
kinematics: corexy
max_velocity: 300
max_accel: 2000
max_z_velocity: 5
max_z_accel: 100
#####################################################################
# X/Y Stepper Settings
#####################################################################
[stepper_x]
## Connected to X (B Motor)
step_pin: PC13
dir_pin: PC1
enable_pin: !PB2
microsteps: 16
step_pulse_duration: 0.000004 ## This value of Fly-Gemini is recommended to be greater than or equal to 4us.
rotation_distance: 40
endstop_pin: PA3
position_endstop: 120
position_max: 120 ## VORON0 default
homing_speed: 20
## Make sure to update below for your relevant driver (2208 or 2209)
[tmc2209 stepper_x]
uart_pin: PB11
run_current: 0.800
stealthchop_threshold: 999999
[stepper_y]
## Connected to Y (A Motor)
step_pin: PC14
dir_pin: PC4
enable_pin: !PB6
microsteps: 16
step_pulse_duration: 0.000004
rotation_distance: 40
endstop_pin: PB1
position_endstop: 120
position_max: 120
homing_speed: 20
## Make sure to update below for your relevant driver (2208 or 2209)
[tmc2209 stepper_y]
uart_pin: PB9
run_current: 0.800
stealthchop_threshold: 999999
[stepper_z]
step_pin: PC15
dir_pin: PC5
enable_pin: !PB5
microsteps: 16
step_pulse_duration: 0.0000004
rotation_distance: 8
endstop_pin: PB10
position_endstop: 0.2
position_max: 120
[tmc2209 stepper_z]
## Make sure to update below for your relevant driver (2208 or 2209)
uart_pin: PB8
run_current: 0.600
stealthchop_threshold: 999999
#####################################################################
# Extruder
#####################################################################
# E0 on MCU X/Y
[extruder]
step_pin: PC3
dir_pin: !PC7
enable_pin: !PB4
microsteps: 16
step_pulse_duration: 0.0000004
## Update value below when you perform extruder calibration
## If you ask for 100mm of filament, but in reality it is 98mm:
## rotation_distance = <previous_rotation_distance> * <actual_extrude_distance> / 100
rotation_distance: 22.23 ## VORON0 Mini AB default
gear_ratio: 50:10 ## VORON0 Mini AB default
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA0
sensor_pin: PC0
## Validate the following thermistor type to make sure it is correct
## See https://www.klipper3d.org/Config_Reference.html#common-thermistors for additional options
#sensor_type: PT1000
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 350
## E0 on MCU X/Y
## Make sure to update below for your relevant driver (2208 or 2209)
[tmc2209 extruder]
uart_pin: PB7
run_current: 0.600
stealthchop_threshold: 999999
#####################################################################
# Bed Heater
#####################################################################
[heater_bed]
heater_pin: PA2
sensor_pin: PC2
## Validate the following thermistor type to make sure it is correct
## See https://www.klipper3d.org/Config_Reference.html#common-thermistors for additional options
#sensor_type: ATC Semitec 104GT-2
control: pid
pid_kp: 68.453
pid_ki: 2.749
pid_kd: 426.122
min_temp: 0
max_temp: 200
[heater_fan fan]
pin: PC6
#cycle_time: 0.50
[fan_generic Core_Fan]
pin: host:gpiochip0/gpio3
[temperature_sensor FLY-Gemini]
sensor_type: temperature_host
[temperature_sensor FLY-MCU]
sensor_type: temperature_mcu
########################################
# TMC5160 configuration
########################################
#[tmc5160 stepper_x]
#cs_pin: PB11
##diag1_pin: PA3
#run_current: 0.800
#interpolate: False
#[tmc5160 stepper_y]
#cs_pin: PB9
##diag1_pin: PB1
#run_current: 0.800
#interpolate: False
#[tmc5160 stepper_z]
#cs_pin: PB8
##diag1_pin: PB10
#run_current: 0.650
#interpolate: False
#[tmc5160 extruder]
#cs_pin: PB7
#run_current: 0.800
#interpolate: False
########################################
# BLTouch
########################################
#[bltouch]
#sensor_pin: ^PA1
#control_pin: PB0
#pin_move_time: 0.680
#x_offset: 0.0
#y_offset: 2.3
#z_offset: 2.2
#speed: 70
#[safe_z_home]
#home_xy_position: 105,105
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=<NC>, EXP1_3=PA13, EXP1_5=PA9, EXP1_7=<NC>, EXP1_9=<GND>,
EXP1_2=PA4, EXP1_4=PA10, EXP1_6=PA8, EXP1_8=<NC>, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB14, EXP2_3=PA15, EXP2_5=PA14, EXP2_7=PB3, EXP2_9=<GND>,
EXP2_2=PB13, EXP2_4=PB12, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=<NC>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi2"
# See the sample-lcd.cfg file for definitions of common LCD displays.
#####################################################################
# Macros
#####################################################################
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - please customize for your slicer of choice
gcode:
G28 ; home all axes
G1 Z20 F3000 ; move nozzle away from bed
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customize for your slicer of choice
gcode:
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-4.0 F3600 ; retract filament
G91 ; relative positioning
# Get Boundaries
{% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
{% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
{% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
# Check end position to determine safe direction to move
{% if printer.toolhead.position.x < (max_x - 20) %}
{% set x_safe = 20.0 %}
{% else %}
{% set x_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.y < (max_y - 20) %}
{% set y_safe = 20.0 %}
{% else %}
{% set y_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.z < (max_z - 2) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - printer.toolhead.position.z %}
{% endif %}
G0 Z{z_safe} F3600 ; move nozzle up
G0 X{x_safe} Y{y_safe} F20000 ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
G90 ; absolute positioning
G0 X60 Y{max_y} F3600 ; park nozzle at rear
[gcode_macro LOAD_FILAMENT]
gcode:
M83 ; set extruder to relative
G1 E30 F300 ; load
G1 E15 F150 ; prime nozzle with filament
M82 ; set extruder to absolute
[gcode_macro UNLOAD_FILAMENT]
gcode:
M83 ; set extruder to relative
G1 E10 F300 ; extrude a little to soften tip
G1 E-40 F1800 ; retract some, but not too much or it will jam
M82