Re: Klipper ender 3 Raspberry pi.
Postat: 7 augusti 2025, 21:52:18
Här är hela min kod, skratta inte, en del är fle, mycket ska fixas....
Kod: Markera allt
# This file contains common pin mappings for the BIGTREETECH Kraken.
# To use this config, the firmware should be compiled for the
# STM32H723 with a "128KiB bootloader" "25 MHz crystal"
# and "USB (on PA11/PA12)" or "CAN bus (on PD0/PD1)".
# See docs/Config_Reference.md for a description of parameters.
# This file contains common pin mappings for the BIGTREETECH Kraken.
# To use this config, the firmware should be compiled for the
# STM32H723 with a "128KiB bootloader" "25 MHz crystal"
# and "USB (on PA11/PA12)" or "CAN bus (on PD0/PD1)".
# See docs/Config_Reference.md for a description of parameters.
[include mainsail.cfg]
[include timelapse.cfg]
[include Exclude_Object.cfg]
[include Speed.cfg]
[display_status]
[exclude_object]
[pause_resume]
[include macros.cfg]
[include RGB_LEDs.cfg]
[include fans.cfg]
#[include part-cooling.cfg]
##### VzBoT############
#######################
[printer]
kinematics: corexy
max_velocity: 1000
max_accel: 5000
#max_accel_to_decel: 0.5
max_z_velocity: 20
max_z_accel:500
square_corner_velocity: 10
########################
########################
# Kraken motherboard
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32h723xx_250015001351313338343730-if00 # put your own Serial here.
#restart_method: command
#####################################################################
# X axis
#####################################################################
# X
[stepper_x]
step_pin: PC14
dir_pin: PC13
enable_pin: !PE6
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: PF0 #make sure to set the correct pin here.
#homing_positive_dir: false
position_endstop: 0
position_min: 0
position_max: 270
homing_speed: 30
second_homing_speed: 2.5
homing_retract_dist: 5.0
# X1
[stepper_x1]
step_pin: PE5
dir_pin: PE4
enable_pin: !PE3
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 200
#####################################################################
# Y Axis
#####################################################################
# Y
[stepper_y]
step_pin: PE2
dir_pin: PE1
enable_pin: !PE0
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: PC15 #make sure to set the correct pin here.
#homing_positive_dir: false
position_endstop: 0
position_min: 0
position_max: 290
homing_speed: 30
second_homing_speed: 2.5
homing_retract_dist: 5.0
# Y1
[stepper_y1]
step_pin: PB9
dir_pin: PB8
enable_pin: !PB7
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 200
#####################################################################
# Z axis
#####################################################################
# Z
[stepper_z]
step_pin: PG9
dir_pin: PG10
enable_pin: !PG13
microsteps: 16
rotation_distance: 8
endstop_pin: PF1 #make sure to set the correct pin here.
position_endstop: 0
position_max: 330
full_steps_per_rotation: 200
homing_retract_dist: 5.0
homing_positive_dir: false
homing_speed: 5.0
second_homing_speed: 2.5
# Z1
[stepper_z1]
step_pin: PG11
dir_pin: PD7
enable_pin: !PG12
microsteps: 16
rotation_distance: 8
endstop_pin: PF2 #make sure to set the correct pin here.
# Extruder
[extruder]
step_pin: PB4
dir_pin: PB3
enable_pin: !PB5
microsteps: 32
rotation_distance: 4.660444672
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PF6 # HE0
full_steps_per_rotation: 200
max_extrude_only_distance: 1000.0
max_extrude_cross_section: 500
max_extrude_only_velocity: 200
max_extrude_only_accel: 10000
min_extrude_temp: 200
pressure_advance: 0.02
pressure_advance_smooth_time: 0.03
#Thermistor PT1000
sensor_type: PT1000
sensor_pin: PB1 # T0
heater_pin: PF6 # HE0
#control: pid
#pid_Kp: 22.2
#pid_Ki: 1.08
#pid_Kd: 114
min_temp: 0
max_temp: 450
# PT100
#sensor_type:MAX31865
# sensor_pin: PC9
#spi_bus: spi3a
#rtd_nominal_r: 100
#rtd_reference_r: 430
#rtd_num_of_wires: 3
#control: pid
#pid_Kp: 22.2
#pid_Ki: 1.08
#pid_Kd: 114
#min_temp: 0
#max_temp: 450
#####################################################################
# Heating and humidity
#####################################################################
[temperature_sensor Chamber]
sensor_type: BME280
i2c_address: 118
i2c_mcu: mcu
i2c_bus: i2c2_PB10_PB11
[temperature_sensor Cabinett]
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC5
min_temp: 0
max_temp: 100
gcode_id: C
[temperature_sensor Coolant]
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC4
min_temp: 0
max_temp: 100
gcode_id: D
[temperature_sensor KRAKEN]
sensor_type: temperature_mcu
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
[heater_bed]
heater_pin: PF5
sensor_pin: PB0 # TB
sensor_type: ATC Semitec 104GT-2
#control: watermark
min_temp: 0
max_temp: 130
#####################################################################
# FANS
#####################################################################
#[fan_generic Waterfan]
#pin: PA1
#[fan_generic Waterpump]
#pin: PA0
#[fan_generic CPAP]
#pin: PA2
#[fan_generic Housing]
#pin: PA4
#[fan_generic fan4]
#pin: PA3
#[fan_generic fan5]
#pin: PA5
#[fan_generic fan6]
#pin: PA6
#tachometer_pin: PC1
#[fan_generic fan7]
#pin: PE8
#tachometer_pin: PG0
#####################################################################
# Filament switch
#####################################################################
[filament_switch_sensor material_0]
switch_pin: PF3
########################################
# TMC2160 configuration
########################################
[tmc5160 stepper_x]
cs_pin: PD6
spi_software_sclk_pin: PC6
spi_software_mosi_pin: PC8
spi_software_miso_pin: PC7
#diag1_pin: PC15
run_current: 2.800
sense_resistor: 0.022
stealthchop_threshold: 50
interpolate: true #false
[tmc5160 stepper_x1]
cs_pin: PD5
spi_software_sclk_pin: PC6
spi_software_mosi_pin: PC8
spi_software_miso_pin: PC7
#diag1_pin: PC15
run_current: 2.800
sense_resistor: 0.022
stealthchop_threshold: 50
interpolate: true #false
[tmc5160 stepper_y]
cs_pin: PD4
spi_software_sclk_pin: PC6
spi_software_mosi_pin: PC8
spi_software_miso_pin: PC7
#diag1_pin: PF0
run_current: 2.800
sense_resistor: 0.022
stealthchop_threshold: 50
interpolate: true #false
[tmc5160 stepper_y1]
cs_pin: PD3
spi_software_sclk_pin: PC6
spi_software_mosi_pin: PC8
spi_software_miso_pin: PC7
#diag1_pin: PF0
run_current: 2.800
sense_resistor: 0.022
stealthchop_threshold: 50
interpolate: true #false
[tmc5160 stepper_z]
cs_pin: PD2
spi_software_sclk_pin: PC6
spi_software_mosi_pin: PC8
spi_software_miso_pin: PC7
#diag1_pin: PF1
run_current: 1.2
sense_resistor: 0.075
stealthchop_threshold: 50
[tmc5160 stepper_z1]
cs_pin: PA15
spi_software_sclk_pin: PC6
spi_software_mosi_pin: PC8
spi_software_miso_pin: PC7
#diag1_pin: PF1
run_current: 1.2
sense_resistor: 0.075
stealthchop_threshold: 50
[tmc5160 extruder]
cs_pin: PA9
spi_software_sclk_pin: PC6
spi_software_mosi_pin: PC8
spi_software_miso_pin: PC7
#diag1_pin: PF1
sense_resistor: 0.075
interpolate: true
run_current: 0.85 #run_current: 1.2
hold_current: 0.100
stealthchop_threshold: 0 #stealthchop_threshold: 999999
#driver_TBL: 0
#driver_HEND: 6
#driver_HSTRT: 7
#driver_TOFF: 4
#####################################################################
# Extra
#####################################################################
[idle_timeout]
timeout: 1800
gcode =
{% if printer.pause_resume.is_paused %}
M104 S0
{% else %}
TURN_OFF_HEATERS
#M84
{% endif %}
[board_pins]
aliases:
# FPC header, Aliases EXP1 & EXP2 for mini12864
EXP1_1=PG5, EXP1_2=PG4,
EXP1_3=PG3, EXP1_4=PG2,
EXP1_5=PD15, EXP1_6=PD14,
EXP1_7=PD13, EXP1_8=PD12,
EXP1_9=<GND>, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PE13, EXP2_2=PE12,
EXP2_3=PG8, EXP2_4=PE11,
EXP2_5=PG7, EXP2_6=PE14,
EXP2_7=PG6, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=<NC>
# INPUT SHAPER############################################
#[include sample-bigtreetech-lis2dw-v1.0.cfg]
[input_shaper]
#shaper_type_x = mzv
#shaper_freq_x = 0
#shaper_type_y = mzv
#shaper_freq_y = 0
######################
# See the sample-lcd.cfg file for definitions of common LCD displays.
#[bltouch]
#sensor_pin: ^PG1
#control_pin: PE9
# Proximity switch
#[probe]
#pin: PD11
#[output_pin ps_on_pin]
#pin: PD10
#[neopixel my_neopixel_1]
#pin: PF12
#[neopixel my_neopixel_2]
#pin: PF11
#[hall_filament_width_sensor]
#adc1: PC2
#adc2: PC3
#[adxl345]
#cs_pin: PE10
#spi_bus: spi4
#[servo servo_motor]
#pin: PE7
#i2c_bus:i2c2_PB10_PB11
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 39.213
#*# pid_ki = 7.262
#*# pid_kd = 52.938
#*#
#*# [input_shaper]
#*# shaper_type_x = mzv
#*# shaper_freq_x = 91.8
#*# shaper_type_y = mzv
#*# shaper_freq_y = 65.6
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 75.656
#*# pid_ki = 1.109
#*# pid_kd = 1290.882