####################################################################################
# 3D MELLOW /Fly-Super5 #
####################################################################################
## Fly-Super5-PRO Documentation Website:
## Fly-Super5-PRO Schematic Website:
## FLY Official Taobao Store: https://shop126791347.taobao.com/shop/view_shop.htm?spm=a230r.1.14.4.1a4840a8hyvpPJ&user_number_id=2464680006
## For after-sales service, please contact Taobao customer service
## FLY After-sales Technical Support Group: 621032883
## FLY-RRF Firmware Discussion Group: 786561979
#####################################################################
# Notes #
#####################################################################
##***Items to change/check:***
## MCU path [mcu]
## Printer movement range xyz position
## Thermistor type [extruder] and [heater_bed]
## Z endstop stop position [safe_z_home]
## Z endstop offset position [stepper_z]
## PID tuning [extruder] and [heater_bed]
## Fine-tune extruder motor steps [extruder]
#####################################################################
# File Includes #
#####################################################################
#[include fluidd.cfg] # FLUIDD include file.
#[include mainsail.cfg] # MAINSAIL include file.
#Determine which file to use yourself
#####################################################################
# Mainboard Configuration #
#####################################################################
[mcu] # FLY board ID
serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_XXXXXXXXXXXXXXXXXXXXX
### To query USB firmware id: ls -l /dev/serial/by-id/
### Replace /dev/serial/by-id/usb-Klipper_stm32f407xx_XXXXXXXXXXXXXXXXXXXXX with the queried id
#canbus_uuid: e51d5c71a901
### To query CAN firmware id: ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
### For CAN id, replace serial with canbus_uuid: and add the id
#####################################################################
# Printer and Acceleration #
#####################################################################
[printer] # Printer settings
kinematics: corexy
max_velocity: 300 # Max printer speed
max_accel: 3000 # Max acceleration, up to 3000
max_z_velocity: 15 # Max Z axis speed
max_z_accel: 100 # Max Z axis acceleration
square_corner_velocity: 5.0 # Square corner velocity, lower values help reduce inertia from heavy beds
#####################################################################
# Temperature Monitoring #
#####################################################################
[temperature_sensor Fly-Super5-PRO] # FLY board temperature
sensor_type: temperature_mcu mcu
#--------------------------------------------------------------------
[temperature_sensor FLY-π] # Host temperature
sensor_type: temperature_host
#--------------------------------------------------------------------
# [temperature_sensor Box] # Enclosure temperature
# sensor_type: ATC Semitec 104GT-2 # Sensor model
# sensor_pin: PA4 # Signal pin
#####################################################################
# Bed Mesh Calibration #
#####################################################################
[bed_mesh]
speed: 50 # Calibration speed
horizontal_move_z: 5 # Z lift before moving to next probe point
mesh_min: 30,30 # Min calibration point coordinates x, y
mesh_max: 270, 270 # Max calibration point coordinates x, y
probe_count: 4,4 # Number of sample points
mesh_pps: 2,2 # Additional sample points
algorithm: bicubic
bicubic_tension: 0.2 # Do not change
#####################################################################
# X/Y Stepper Motor Settings #
#####################################################################
# B Motor ---- Motor A
# | |
# |------Extruder----|
# | |
# | |
# Front
#####################################################################
# X Stepper Motor DRIVER0 #
#####################################################################
#Note: Test running direction after wiring
[stepper_x]
step_pin: PE14 # X stepper pulse pin
dir_pin: PE15 # X stepper direction pin, add ! to reverse
enable_pin: !PB11 # X stepper enable pin, must add ! or motor won't work
rotation_distance: 40 # Pulley circumference mm
microsteps: 16 # Microstepping, higher = better quality, more load
full_steps_per_rotation: 200 # Steps per revolution
endstop_pin: PB7 # Endstop pin, recommend normally closed
### Add ! to reverse state if needed, prevents crashes if wire breaks
position_min: 0 # Min soft limit
position_endstop: 120 # Max soft limit
position_max: 120 # Max mechanical limit
homing_speed: 50 # Homing speed, max 100
homing_retract_dist: 5 # Retract distance after first endstop trigger
step_pulse_duration: 0.000004
#--------------------------------------------------------------------
## Ensure correct driver model
[tmc2209 stepper_x] # X driver config - TMC2209
uart_pin: PB10 # UART pin
#interpolate: False # 256 microstep interpolation
run_current: 0.8 # Motor run current
sense_resistor: 0.110 # Do not change
stealthchop_threshold: 500 # StealthChop threshold
#--------------------------------------------------------------------
#[tmc5160 stepper_x] # Extruder driver config - TMC5160
#cs_pin: PB10 # SPI CS pin
#spi_bus: spi1 # SPI bus
#run_current: 1.0 # Motor run current
#interpolate: False # 256 microstep interpolation
#sense_resistor: 0.075 # Do not change
#stealthchop_threshold: 500 # StealthChop threshold
#####################################################################
# Y Stepper Motor DRIVER01 #
#####################################################################
#Note: Test running direction after wiring
[stepper_y]
step_pin: PE11 # Y stepper pulse pin
dir_pin: PE12 # Y stepper direction pin, add ! to reverse
enable_pin: !PE13 # Y stepper enable pin, must add ! or motor won't work
rotation_distance: 40 # Pulley circumference mm
microsteps: 16 # Microstepping, higher = better quality, more load
full_steps_per_rotation: 200 # Steps per revolution
endstop_pin: PC7 # Endstop pin, recommend normally closed and add ! to reverse
### Add ! to reverse state if needed, prevents crashes if wire breaks
position_min: 0 # Min soft limit
position_endstop: 120 # Max soft limit
position_max: 120 # Max mechanical limit
homing_speed: 50 # Homing speed, max 100
homing_retract_dist: 5 # Retract distance after first endstop trigger
step_pulse_duration: 0.000004
#--------------------------------------------------------------------
## Ensure correct driver model
[tmc2209 stepper_y] # Y driver config - TMC2209
uart_pin: PE10 # UART pin
#interpolate: False # 256 microstep interpolation
run_current: 0.8 # Motor run current
sense_resistor: 0.110 # Do not change
stealthchop_threshold: 500 # StealthChop threshold
#--------------------------------------------------------------------
#[tmc5160 stepper_y] # Extruder driver config - TMC5160
#cs_pin: PE10 # SPI CS pin
#spi_bus: spi1 # SPI bus
#run_current: 1.0 # Motor run current
#interpolate: False # 256 microstep interpolation
#sense_resistor: 0.075 # Do not change
#stealthchop_threshold: 500 # StealthChop threshold
#####################################################################
# Z Stepper Motor #
#####################################################################
# |------Z1------|
# | |
# | |
# | |
# |-----LCD------|
#####################################################################
# Z Stepper Motor DRIVER02 #
#####################################################################
#Note: Test running direction after wiring
[stepper_z]
step_pin: PE7 # Z stepper pulse pin
dir_pin: !PE8 # Z stepper direction pin, add ! to reverse
enable_pin: !PE9 # Z stepper enable pin, must add ! or motor won't work
### T8x4 leadscrew. One turn moves bed 4mm
### Modify according to your leadscrew
rotation_distance: 4 # Leadscrew pitch
full_steps_per_rotation: 200 # Steps per revolution
microsteps: 16 # Microstepping, higher = better quality, more load
endstop_pin: PC6 # Endstop pin, recommend normally closed and add ! to reverse
## position_endstop is the position from nozzle to bed at endstop trigger
## Positive = above bed, negative = below bed
## Increasing position_endstop brings nozzle closer to bed
## After running Z_ENDSTOP_CALIBRATE, position_endstop is stored at end of config
position_min: -15 # For nozzle cleaning, set to about -5
position_endstop: 120 # Max soft limit
position_max: 120 # Max mechanical limit
homing_speed: 5 # Homing speed, max 20
second_homing_speed: 3 # Second homing speed, max 10
homing_retract_dist: 0 # Retract distance
step_pulse_duration: 0.000004
#--------------------------------------------------------------------
[tmc2209 stepper_z]
uart_pin: PA4 # UART pin
interpolate: false # 256 microstep interpolation
run_current: 0.8 # Run current
sense_resistor: 0.110 # Do not change
stealthchop_threshold: 500 # StealthChop threshold
#--------------------------------------------------------------------
#[tmc5160 stepper_z] # Extruder driver config - TMC5160
#cs_pin: PA4 # SPI CS pin
#spi_bus: spi3 # SPI bus
#run_current: 1.0 # Motor run current
#interpolate: False # 256 microstep interpolation
#sense_resistor: 0.075 # Do not change
#stealthchop_threshold: 500 # StealthChop threshold
#####################################################################
# E0 Extruder Settings #
#####################################################################
#DRIVER03
[extruder] # Extruder
step_pin: PE4 # Extruder step pin
dir_pin: PE5 # Extruder direction pin
enable_pin: !PC1 # Extruder enable pin
## Update the following value after extruder calibration
## For example, if you request 100mm but actually get 98mm:
## New value = old value x
## Calibrated step value: 23.1325301 = old value 22.6789511 *
rotation_distance: 22.6789511 # Step value - Bondtech 5mm drive gear
gear_ratio: 50:17 # Gear ratio
microsteps: 16 # Microstepping, higher = better quality, more load
full_steps_per_rotation: 200 # Steps per revolution
nozzle_diameter: 0.400 # Nozzle diameter
filament_diameter: 1.75 # Filament diameter
heater_pin: PD12 # Heater pin, connect to HETA0
sensor_type: ATC Semitec 104GT-2 # Sensor model
pullup_resistor:2200 # Pull-up resistor
sensor_pin: PC4 # Sensor pin, connect to ADC-1
min_temp: 10 # Min temp
max_temp: 350 # Max temp
max_power: 1.0 # Max power
min_extrude_temp: 170 # Min extrusion temp
pressure_advance: 0.05 # Pressure advance
#Pressure advance tuning: https://www.klipper3d.org/Pressure_Advance.html
pressure_advance_smooth_time: 0.040 # Smoothing time, default 0.040
#max_extrude_only_distance: 200.0 # Comment out to disable extrusion flow error, but re-slice recommended
#Nozzle PID tuning: "PID_CALIBRATE HEATER=extruder TARGET=245"
control = pid # PID nozzle temp auto-tuning
pid_kp = 26.213 # PID nozzle temp auto-tuning
pid_ki = 1.304 # PID nozzle temp auto-tuning
pid_kd = 131.721 # PID nozzle temp auto-tuning
step_pulse_duration: 0.000004
#--------------------------------------------------------------------
[tmc2209 extruder] # Extruder driver config - TMC2209
uart_pin: PC0 # UART pin
#interpolate: False # 256 microstep interpolation
run_current: 0.8 # Motor run current
sense_resistor: 0.110 # Do not change
stealthchop_threshold: 500 # StealthChop threshold
#--------------------------------------------------------------------
#[tmc5160 extruder] # Extruder driver config - TMC5160
#cs_pin: PC0 # SPI CS pin
#spi_bus: spi1 # SPI bus
#run_current: 1.0 # Motor run current
#interpolate: False # 256 microstep interpolation
#sense_resistor: 0.075 # Do not change
#stealthchop_threshold: 500 # StealthChop threshold
#####################################################################
# Heated Bed Configuration #
#####################################################################
[heater_bed]
heater_pin: PB0 # Bed heater pin, connect to HETA1
sensor_type: Generic 3950 # Sensor model
sensor_pin: PB1 # Bed sensor pin
pullup_resistor:2200
max_power: 1.0 # Bed power
min_temp: 0 # Min temp
max_temp: 120 # Max temp
# Bed PID tuning: "PID_CALIBRATE HEATER=heater_bed TARGET=100"
control: pid # PID bed temp auto-tuning
pid_kp: 58.437 # PID bed temp auto-tuning
pid_ki: 2.347 # PID bed temp auto-tuning
pid_kd: 363.769 # PID bed temp auto-tuning
#####################################################################
# Fan Configuration #
#####################################################################
[fan] # Model cooling fan
pin: PA0 # Signal pin
kick_start_time: 0.5 # Startup time
off_below: 0.10 # Do not change
#--------------------------------------------------------------------
[heater_fan hotend_fan] # Hotend cooling fan
pin: PA1 # Signal pin
max_power: 1.0 # Max speed
kick_start_time: 0.5 # Startup time
heater: extruder # Linked device: extruder
heater_temp: 50 # Fan turns on when extruder reaches this temp
fan_speed: 1.0 # Fan speed
#--------------------------------------------------------------------
[heater_fan controller_fan] # Electronics bay fan
pin: PA2 # Signal pin
max_power: 1.0 # Max speed
kick_start_time: 0.5 # Startup time
heater: heater_bed # Linked device: bed
heater_temp: 50 # Fan turns on when bed reaches this temp
fan_speed: 1.0 # Fan speed
#--------------------------------------------------------------------
[heater_fan exhaust_fan] # Exhaust fan
pin: PA3 # Signal pin
max_power: 1.0 # Max speed
kick_start_time: 0.5 # Startup time
heater: heater_bed # Linked device: bed
heater_temp: 70 # Fan turns on when bed reaches this temp
fan_speed: 1.0 # Fan speed
#####################################################################
# Idle Timeout #
#####################################################################
[idle_timeout]
timeout: 1800 # Turn off bed after 30 minutes idle
#####################################################################
# PL08N Probe #
#####################################################################
# PL08N probe should not be lower than nozzle height, only for leveling.
# If your PL08N is NO , add ! to pin.
#[probe]
#pin: # Signal pin
#x_offset: 0 # X offset from nozzle
#y_offset: 25.0 # Y offset from nozzle
#z_offset: 0 # Z offset from nozzle
#speed: 10.0 # Leveling speed
#samples: 3 # Number of samples
#samples_result: median # Sampling method
#sample_retract_dist: 4.0 # Probe retract distance
#samples_tolerance: 0.006 # Sampling tolerance
#samples_tolerance_retries: 3 # Retry count for out-of-tolerance
#--------------------------------------------------------------------
#[bltoch]
#sensor_pin: ^PC2 # Signal pin
#control_pin: PE6 # Servo pin
#x_offset: 0 # X offset from nozzle
#y_offset: 25.0 # Y offset from nozzle
#z_offset: 0 # Z offset from nozzle
#####################################################################
# FLY-Mini 12864 LCD #
#####################################################################
[board_pins]
aliases:
XP1 header
EXP1_1=PA8, EXP1_3=PA15, EXP1_5=PD0, EXP1_7=PD4, EXP1_9=<GND>,
EXP1_2=PA13, EXP1_4=PA14,EXP1_6=PD1, EXP1_8=PD3, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB4, EXP2_3=PD7, EXP2_5=PD6, EXP2_7=PD5, EXP2_9=<GND>,
EXP2_2=PB3, EXP2_4=PB6, EXP2_6=PB5, EXP2_8=<RST>, EXP2_10=<5V>
#--------------------------------------------------------------------
#[display]
#lcd_type: uc1701 # LCD driver type
#cs_pin: EXP1_3 # LCD CS pin
#a0_pin: EXP1_4 # LCD A0 pin
#rst_pin: EXP1_5 # LCD reset pin
#contrast: 63 # Contrast
#encoder_pins: ^EXP2_5, ^!EXP2_3 # Rotary encoder pins
#click_pin: ^!EXP1_2 # Encoder click pin
#spi_bus: spi1a # SPI bus
#--------------------------------------------------------------------
##### For FLY Mini12864
#[neopixel fly_mini12864]
#pin: EXP1_6 # LCD backlight pin
#chain_count: 3
#initial_RED: 0.5 # Red LED brightness
#initial_GREEN: 0.5 # Green LED brightness
#initial_BLUE: 0.5 # Blue LED brightness
#color_order: RGB # Color order
#####################################################################
# Custom gcode Macros #
#####################################################################
[gcode_macro PRINT_START] # Macro for print start, customize pre-print actions
gcode:
G92 E0 # Reset extruder
G28 # Home all axes
G1 Z20 F3000 # Raise gantry
#SET_LED LED=LEDlight RED=0.2 GREEN=0.2 BLUE=0.5 # LED control
#M117 Printing # Send text to screen
#--------------------------------------------------------------------
[gcode_macro PRINT_HUAXIAN] # Macro for PRINT_HUAXIAN after PRINT_START, customize pre-print actions
gcode:
G1 Z5 F3000
G92 E0
G90 # Set absolute coordinates
G0 X5 Y1 F6000 # Move to x5 y1 at 100mm/s
G0 Z0.4 # Move Z to 0.4
G91 # Set to relative coordinates
G1 X100 E20 F1200
G1 Y1 # Move Y 1mm
G1 X-100 E20 F1200
G0 z5 # Raise Z 5mm
G1 E-5.0 F3600 # Retract filament
G92 E0
G90 # Set absolute coordinates
#--------------------------------------------------------------------
[gcode_macro PRINT_END] # Macro for print end, customize post-print actions
gcode:
{% 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 directions to move
{% if printer.toolhead.position.x < %}
{% set x_safe = 20.0 %}
{% else %}
{% set x_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.y < %}
{% set y_safe = 20.0 %}
{% else %}
{% set y_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.z < %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - printer.toolhead.position.z %}
{% endif %}
M400 # Wait for buffer to clear
G92 E0 # Reset extruder
G1 E-10.0 F3600 # Retract filament
G91 # Relative positioning
G0 Z{z_safe} F3600 # Raise gantry
G0 X{x_safe} Y{y_safe} F20000 # Move nozzle to remove stringing
M104 S0 # Turn off hotend
M140 S0 # Turn off bed
M106 S0 # Turn off model fan
G90 # Set absolute coordinates
G0 X{max_x / 2} Y{max_y} F3600 # Move nozzle to rear
BED_MESH_CLEAR # Unload bed mesh