From 9d296d8060f33b0490978b4cdb521243ddc4042a Mon Sep 17 00:00:00 2001 From: Lieven Vanhercke Date: Mon, 9 Sep 2024 23:47:33 +0200 Subject: [PATCH 1/7] Added board config for Mellow Fly E3 v2 --- config/generic-mellow-fly-e3-v2.cfg | 230 ++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 config/generic-mellow-fly-e3-v2.cfg diff --git a/config/generic-mellow-fly-e3-v2.cfg b/config/generic-mellow-fly-e3-v2.cfg new file mode 100644 index 000000000000..89d36cdb60ea --- /dev/null +++ b/config/generic-mellow-fly-e3-v2.cfg @@ -0,0 +1,230 @@ +# This file contains common pin mappings for the Mellow Fly-E3-v2. +# To use this config, the firmware should be compiled for the +# STM32F407 with a "32KiB bootloader". + +# The "make flash" command does not work on the Fly-E3-v2. Instead, +# after running "make", copy the generated "out/klipper.bin" file to a +# file named "firmware.bin" or "klipper.bin" on an SD card and then restart the Fly-E3-v2 +# with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +[mcu] +serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_27004A001851323333353137-if00 + +[stepper_x] +step_pin: PE5 +dir_pin: PC0 +enable_pin: !PC1 +microsteps: 16 +rotation_distance: 30 +full_steps_per_rotation: 200 +endstop_pin: PE7 #X-STOP +position_endstop: 0 +position_max: 200 +homing_speed: 50 +second_homing_speed: 10 +homing_retract_dist: 5.0 +homing_positive_dir: false +step_pulse_duration: 0.000004 + +[stepper_y] +step_pin: PE4 +dir_pin: !PC13 +enable_pin: !PC14 +microsteps: 16 +rotation_distance: 30 +full_steps_per_rotation: 200 +endstop_pin: PE8 #Y-STOP +position_endstop: 0 +position_max: 200 +homing_speed: 50 +second_homing_speed: 10 +homing_retract_dist: 5.0 +homing_positive_dir: false +step_pulse_duration: 0.000004 + +[stepper_z] +step_pin: PE1 +dir_pin: !PB7 +enable_pin: !PE3 +microsteps: 16 +rotation_distance: 30 +full_steps_per_rotation: 200 +endstop_pin: PE9 #Z-STOP +position_min: 0 +position_endstop: 0 +position_max: 200 +homing_speed: 5 +second_homing_speed: 3 +homing_retract_dist: 5.0 +homing_positive_dir: false +step_pulse_duration: 0.000004 + +[extruder] +step_pin: PE2 +dir_pin: PD5 +enable_pin: !PD6 +microsteps: 16 +rotation_distance: 33.500 +nozzle_diameter: 0.400 +filament_diameter: 1.750 +heater_pin: PC6 #E0 + +######################################## +# Extruder 100K thermistor configuration +######################################## +sensor_type: ATC Semitec 104GT-2 +sensor_pin: PC4 #T0 TEMP +######################################## +# Extruder MAX31865 PT100 2 wire config +######################################## +# sensor_type: MAX31865 +# sensor_pin: PD15 #PT-100 +# spi_speed: 4000000 +# spi_software_sclk_pin: PD12 +# spi_software_mosi_pin: PD11 +# spi_software_miso_pin: PD13 +# rtd_nominal_r: 100 +# rtd_reference_r: 430 +# rtd_num_of_wires: 2 +# rtd_use_50Hz_filter: True +min_temp: 0 +max_temp: 300 + +#[extruder1] +#step_pin: PE0 +#dir_pin: PD1 +#enable_pin: !PD3 +#microsteps: 16 +#heater_pin: PC7 #E1 +#sensor_pin: PC5 #T1 TEMP + +######################################## +# TMC2209 configuration +######################################## + +[tmc2209 stepper_x] +uart_pin: PC15 +interpolate: False +run_current: 0.3 +sense_resistor: 0.110 +stealthchop_threshold: 500 + +[tmc2209 stepper_y] +uart_pin: PB6 +interpolate: False +run_current: 0.3 +sense_resistor: 0.110 +stealthchop_threshold: 500 + +[tmc2209 stepper_z] +uart_pin: PD7 +interpolate: False +run_current: 0.4 +sense_resistor: 0.110 +stealthchop_threshold: 500 + +[tmc2209 extruder] +uart_pin: PD4 +interpolate: False +run_current: 0.27 +sense_resistor: 0.075 +stealthchop_threshold: 500 + +[tmc2209 extruder1] +uart_pin: PD0 +interpolate: False +run_current: 0.27 +sense_resistor: 0.075 +stealthchop_threshold: 500 + + +####################################### +# Heated Bed +####################################### + +[heater_bed] +heater_pin: PB0 #BED +sensor_type: Generic 3950 +sensor_pin: PB1 #B-TEMP +max_power: 1.0 +min_temp: 0 +max_temp: 120 + +####################################### +# LIGHTING +####################################### + +[led Toolhead] +white_pin: PA2 #FAN2 +cycle_time: 0.010 +initial_white: 0 + +####################################### +# COOLING +####################################### + +[heater_fan hotend_fan] +pin: PA1 #FAN1 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50 +fan_speed: 1.0 + +[controller_fan controller_fan] +pin: PA0 #FAN0 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +stepper: stepper_x, stepper_y, stepper_z +fan_speed: 1.0 +idle_timeout: 60 + +[fan] +pin: PA3 #FAN3 +max_power: 1.0 +off_below: 0.2 + +[temperature_sensor Mellow_Fly_E3_V2] +sensor_type: temperature_mcu +min_temp: 5 +max_temp: 80 + +[printer] +kinematics: cartesian +max_velocity: 300 +max_accel: 3000 +max_z_velocity: 50 +max_z_accel: 100 + +[safe_z_home] +home_xy_position:0,0 +speed:10 +z_hop:0 + +[idle_timeout] +timeout: 1800 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## +[board_pins] +aliases: + EXP1_1=PD10, EXP1_3=PA8, EXP1_5=PE15, EXP1_7=PA14, EXP1_9=, + EXP1_2=PA9, EXP1_4=PA10, EXP1_6=PE14, EXP1_8=PA13, EXP1_10=<5V>, + # EXP2 header + EXP2_1=PA6, EXP2_3=PB11, EXP2_5=PB10, EXP2_7=PE13, EXP2_9=, + EXP2_2=PA5, EXP2_4=PA4, EXP2_6=PA7, EXP2_8=, EXP2_10=, + +# See the sample-lcd.cfg file for definitions of common LCD displays. + +####################################### +# BL-Touch +####################################### + +#[bltouch] +#sensor_pin: PC2 +#control_pin: PE6 +#z_offset: 0 \ No newline at end of file From e0e9007247bb69ba40ec9aba90a57db044fae8ba Mon Sep 17 00:00:00 2001 From: Lieven Vanhercke Date: Tue, 10 Sep 2024 22:48:11 +0200 Subject: [PATCH 2/7] fixed tabs and whitespaces in generic-mellow-fly-e3-v2.cfg --- config/generic-mellow-fly-e3-v2.cfg | 130 ++++++++++++++-------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/config/generic-mellow-fly-e3-v2.cfg b/config/generic-mellow-fly-e3-v2.cfg index 89d36cdb60ea..039b2ad4a84b 100644 --- a/config/generic-mellow-fly-e3-v2.cfg +++ b/config/generic-mellow-fly-e3-v2.cfg @@ -6,7 +6,7 @@ # after running "make", copy the generated "out/klipper.bin" file to a # file named "firmware.bin" or "klipper.bin" on an SD card and then restart the Fly-E3-v2 # with that SD card. - + # See docs/Config_Reference.md for a description of parameters. [mcu] @@ -40,8 +40,8 @@ position_endstop: 0 position_max: 200 homing_speed: 50 second_homing_speed: 10 -homing_retract_dist: 5.0 -homing_positive_dir: false +homing_retract_dist: 5.0 +homing_positive_dir: false step_pulse_duration: 0.000004 [stepper_z] @@ -52,11 +52,11 @@ microsteps: 16 rotation_distance: 30 full_steps_per_rotation: 200 endstop_pin: PE9 #Z-STOP -position_min: 0 -position_endstop: 0 -position_max: 200 -homing_speed: 5 -second_homing_speed: 3 +position_min: 0 +position_endstop: 0 +position_max: 200 +homing_speed: 5 +second_homing_speed: 3 homing_retract_dist: 5.0 homing_positive_dir: false step_pulse_duration: 0.000004 @@ -104,40 +104,40 @@ max_temp: 300 # TMC2209 configuration ######################################## -[tmc2209 stepper_x] -uart_pin: PC15 -interpolate: False -run_current: 0.3 -sense_resistor: 0.110 -stealthchop_threshold: 500 - -[tmc2209 stepper_y] -uart_pin: PB6 -interpolate: False -run_current: 0.3 -sense_resistor: 0.110 -stealthchop_threshold: 500 - -[tmc2209 stepper_z] -uart_pin: PD7 -interpolate: False -run_current: 0.4 -sense_resistor: 0.110 -stealthchop_threshold: 500 - -[tmc2209 extruder] -uart_pin: PD4 -interpolate: False -run_current: 0.27 -sense_resistor: 0.075 -stealthchop_threshold: 500 - -[tmc2209 extruder1] -uart_pin: PD0 -interpolate: False -run_current: 0.27 -sense_resistor: 0.075 -stealthchop_threshold: 500 +[tmc2209 stepper_x] +uart_pin: PC15 +interpolate: False +run_current: 0.3 +sense_resistor: 0.110 +stealthchop_threshold: 500 + +[tmc2209 stepper_y] +uart_pin: PB6 +interpolate: False +run_current: 0.3 +sense_resistor: 0.110 +stealthchop_threshold: 500 + +[tmc2209 stepper_z] +uart_pin: PD7 +interpolate: False +run_current: 0.4 +sense_resistor: 0.110 +stealthchop_threshold: 500 + +[tmc2209 extruder] +uart_pin: PD4 +interpolate: False +run_current: 0.27 +sense_resistor: 0.075 +stealthchop_threshold: 500 + +[tmc2209 extruder1] +uart_pin: PD0 +interpolate: False +run_current: 0.27 +sense_resistor: 0.075 +stealthchop_threshold: 500 ####################################### @@ -148,9 +148,9 @@ stealthchop_threshold: 500 heater_pin: PB0 #BED sensor_type: Generic 3950 sensor_pin: PB1 #B-TEMP -max_power: 1.0 -min_temp: 0 -max_temp: 120 +max_power: 1.0 +min_temp: 0 +max_temp: 120 ####################################### # LIGHTING @@ -165,21 +165,21 @@ initial_white: 0 # COOLING ####################################### -[heater_fan hotend_fan] -pin: PA1 #FAN1 -max_power: 1.0 -kick_start_time: 0.5 -heater: extruder -heater_temp: 50 -fan_speed: 1.0 - -[controller_fan controller_fan] -pin: PA0 #FAN0 -max_power: 1.0 +[heater_fan hotend_fan] +pin: PA1 #FAN1 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50 +fan_speed: 1.0 + +[controller_fan controller_fan] +pin: PA0 #FAN0 +max_power: 1.0 kick_start_time: 0.5 heater: extruder stepper: stepper_x, stepper_y, stepper_z -fan_speed: 1.0 +fan_speed: 1.0 idle_timeout: 60 [fan] @@ -187,9 +187,9 @@ pin: PA3 #FAN3 max_power: 1.0 off_below: 0.2 -[temperature_sensor Mellow_Fly_E3_V2] -sensor_type: temperature_mcu -min_temp: 5 +[temperature_sensor Mellow_Fly_E3_V2] +sensor_type: temperature_mcu +min_temp: 5 max_temp: 80 [printer] @@ -199,13 +199,13 @@ max_accel: 3000 max_z_velocity: 50 max_z_accel: 100 -[safe_z_home] +[safe_z_home] home_xy_position:0,0 -speed:10 -z_hop:0 +speed:10 +z_hop:0 [idle_timeout] -timeout: 1800 +timeout: 1800 ######################################## # EXP1 / EXP2 (display) pins @@ -227,4 +227,4 @@ aliases: #[bltouch] #sensor_pin: PC2 #control_pin: PE6 -#z_offset: 0 \ No newline at end of file +#z_offset: 0 From 6108958b515aa01aebadad952dccec7d1e62124f Mon Sep 17 00:00:00 2001 From: Lieven Vanhercke Date: Fri, 13 Sep 2024 21:35:59 +0200 Subject: [PATCH 3/7] Added generic-mellow-fly-e3-v2.cfg to printers.test Included the new board file in the printers.test file. Added copyright info in the board file Signed-off-by: Lieven Vanhercke --- config/generic-mellow-fly-e3-v2.cfg | 4 ++++ test/klippy/printers.test | 1 + 2 files changed, 5 insertions(+) diff --git a/config/generic-mellow-fly-e3-v2.cfg b/config/generic-mellow-fly-e3-v2.cfg index 039b2ad4a84b..4aa0a13beedc 100644 --- a/config/generic-mellow-fly-e3-v2.cfg +++ b/config/generic-mellow-fly-e3-v2.cfg @@ -1,3 +1,7 @@ +# Copyright (C) 2024 Lieven Vanhercke + +# This file may be distributed under the terms of the GNU GPLv3 license. + # This file contains common pin mappings for the Mellow Fly-E3-v2. # To use this config, the firmware should be compiled for the # STM32F407 with a "32KiB bootloader". diff --git a/test/klippy/printers.test b/test/klippy/printers.test index 9f7ab3c20f38..40a6118c0eeb 100644 --- a/test/klippy/printers.test +++ b/test/klippy/printers.test @@ -224,6 +224,7 @@ CONFIG ../../config/generic-bigtreetech-skr-2.cfg CONFIG ../../config/generic-flyboard.cfg CONFIG ../../config/generic-I3DBEEZ9.cfg CONFIG ../../config/generic-mellow-fly-cdy-v3.cfg +CONFIG ../../config/generic-mellow-fly-e3-v2.cfg CONFIG ../../config/generic-mellow-super-infinty-hv.cfg CONFIG ../../config/generic-mks-monster8.cfg CONFIG ../../config/generic-mks-robin-nano-v3.cfg From 128cc2a3b30e88c8ed8fca8fa11b368f59f79cec Mon Sep 17 00:00:00 2001 From: Lieven Vanhercke Date: Fri, 13 Sep 2024 21:59:41 +0200 Subject: [PATCH 4/7] Fixed commenting references to extruder1 I had commented [extruder1] but had left the [tmc2209 extruder1] section active. Fixed now Signed-off-by: Lieven Vanhercke --- config/generic-mellow-fly-e3-v2.cfg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/generic-mellow-fly-e3-v2.cfg b/config/generic-mellow-fly-e3-v2.cfg index 4aa0a13beedc..2973f99780b1 100644 --- a/config/generic-mellow-fly-e3-v2.cfg +++ b/config/generic-mellow-fly-e3-v2.cfg @@ -136,12 +136,12 @@ run_current: 0.27 sense_resistor: 0.075 stealthchop_threshold: 500 -[tmc2209 extruder1] -uart_pin: PD0 -interpolate: False -run_current: 0.27 -sense_resistor: 0.075 -stealthchop_threshold: 500 +#[tmc2209 extruder1] +#uart_pin: PD0 +#interpolate: False +#run_current: 0.27 +#sense_resistor: 0.075 +#stealthchop_threshold: 500 ####################################### From ab51505c38f67345d679995e960ecf3bd0aab7fe Mon Sep 17 00:00:00 2001 From: Lieven Vanhercke Date: Fri, 13 Sep 2024 22:11:17 +0200 Subject: [PATCH 5/7] Update pid control on mellow-fly-e3-v2.cfg Added pid control to extruder and heated bed Signed-off-by: Lieven Vanhercke --- config/generic-mellow-fly-e3-v2.cfg | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/generic-mellow-fly-e3-v2.cfg b/config/generic-mellow-fly-e3-v2.cfg index 2973f99780b1..ff34199e05f7 100644 --- a/config/generic-mellow-fly-e3-v2.cfg +++ b/config/generic-mellow-fly-e3-v2.cfg @@ -80,6 +80,12 @@ heater_pin: PC6 #E0 ######################################## sensor_type: ATC Semitec 104GT-2 sensor_pin: PC4 #T0 TEMP +control: pid +pid_Kp: 22.2 +pid_Ki: 1.08 +pid_Kd: 114 +min_temp: 0 +max_temp: 275 ######################################## # Extruder MAX31865 PT100 2 wire config ######################################## @@ -155,6 +161,10 @@ sensor_pin: PB1 #B-TEMP max_power: 1.0 min_temp: 0 max_temp: 120 +control: pid +pid_kp: 58.437 +pid_ki: 2.347 +pid_kd: 363.769 ####################################### # LIGHTING From b6e14ba7b0ebad05dd8a0f6430b1356fcc47882e Mon Sep 17 00:00:00 2001 From: Lieven Vanhercke Date: Sat, 14 Sep 2024 18:53:05 +0200 Subject: [PATCH 6/7] Update mellow-fly-e3-v2.cfg as per comments Removed safety adaptations that are non-standard, fixed stealthchop_threshold values to valid ones, commented toolhead lighting section Signed-off-by: Lieven Vanhercke --- config/generic-mellow-fly-e3-v2.cfg | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/config/generic-mellow-fly-e3-v2.cfg b/config/generic-mellow-fly-e3-v2.cfg index ff34199e05f7..7ebc33e87074 100644 --- a/config/generic-mellow-fly-e3-v2.cfg +++ b/config/generic-mellow-fly-e3-v2.cfg @@ -1,5 +1,3 @@ -# Copyright (C) 2024 Lieven Vanhercke - # This file may be distributed under the terms of the GNU GPLv3 license. # This file contains common pin mappings for the Mellow Fly-E3-v2. @@ -119,35 +117,35 @@ uart_pin: PC15 interpolate: False run_current: 0.3 sense_resistor: 0.110 -stealthchop_threshold: 500 +stealthchop_threshold: 999999 [tmc2209 stepper_y] uart_pin: PB6 interpolate: False run_current: 0.3 sense_resistor: 0.110 -stealthchop_threshold: 500 +stealthchop_threshold: 999999 [tmc2209 stepper_z] uart_pin: PD7 interpolate: False run_current: 0.4 sense_resistor: 0.110 -stealthchop_threshold: 500 +stealthchop_threshold: 999999 [tmc2209 extruder] uart_pin: PD4 interpolate: False run_current: 0.27 sense_resistor: 0.075 -stealthchop_threshold: 500 +stealthchop_threshold: 999999 #[tmc2209 extruder1] #uart_pin: PD0 #interpolate: False #run_current: 0.27 #sense_resistor: 0.075 -#stealthchop_threshold: 500 +#stealthchop_threshold: 999999 ####################################### @@ -170,10 +168,10 @@ pid_kd: 363.769 # LIGHTING ####################################### -[led Toolhead] -white_pin: PA2 #FAN2 -cycle_time: 0.010 -initial_white: 0 +#[led Toolhead] +#white_pin: PA2 #FAN2 +#cycle_time: 0.010 +#initial_white: 0 ####################################### # COOLING @@ -213,14 +211,6 @@ max_accel: 3000 max_z_velocity: 50 max_z_accel: 100 -[safe_z_home] -home_xy_position:0,0 -speed:10 -z_hop:0 - -[idle_timeout] -timeout: 1800 - ######################################## # EXP1 / EXP2 (display) pins ######################################## From b42d2c6a9197644a7fe81799aca19f1dbc4d24be Mon Sep 17 00:00:00 2001 From: Lieven Vanhercke Date: Mon, 4 Nov 2024 14:48:35 +0100 Subject: [PATCH 7/7] Update generic-mellow-fly-e3-v2.cfg Removed extra copyright in config file Signed-off-by: Lieven Vanhercke --- config/generic-mellow-fly-e3-v2.cfg | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/generic-mellow-fly-e3-v2.cfg b/config/generic-mellow-fly-e3-v2.cfg index 7ebc33e87074..6836ea328a0a 100644 --- a/config/generic-mellow-fly-e3-v2.cfg +++ b/config/generic-mellow-fly-e3-v2.cfg @@ -1,5 +1,3 @@ -# This file may be distributed under the terms of the GNU GPLv3 license. - # This file contains common pin mappings for the Mellow Fly-E3-v2. # To use this config, the firmware should be compiled for the # STM32F407 with a "32KiB bootloader".