Untitled

mail@pastecode.io avatar
unknown
batchfile
2 years ago
5.2 kB
3
Indexable
Never
# Kingroon KP5L Klipper compile settings:

# [*] Enable extra low-level configuration options
#     Micro-controller Architecture (STMicroelectronics STM32)  --->
#     Processor model (STM32F103)  --->
# [*] Disable SWD at startup (for GigaDevice stm32f103 clones)
#     Bootloader offset (28KiB bootloader)  --->
#     Clock Reference (8 MHz crystal)  --->
#     Communication interface (Serial (on USART3 PB11/PB10))  --->
# (115200) Baud rate for serial port
# (!PC6,!PD13) GPIO pins to set at micro-controller startup

# Settings were trial-and-errored from the KP3S config (which itself 
# appears to have been modified from the robin nano config) to work 
# with the KP5L.  Some stuff may or may not function properly.  There 
# may be extra/unnecessary features present, but they don't seem to 
# affect operation.  In any case, this .cfg works with a stock KP5L.

# Initially I had frequent failures due to intermittant MCU 
# communication dropouts, but lowering the port speed to 115.2kbps 
# seems to have resolved that.  You can bump it back up to the default 
# 250kbps if you're feeling brave.

[virtual_sdcard]
path: ~/gcode_files

[stepper_x]
step_pin: PE3
dir_pin: PE2
enable_pin: !PE4
rotation_distance: 40
microsteps: 32
endstop_pin: ^!PA15
position_endstop: 0
position_max: 310
homing_speed: 50

[stepper_y]
step_pin: PE0
dir_pin: !PB9
enable_pin: !PE1
rotation_distance: 40
full_steps_per_rotation: 200
microsteps: 32
endstop_pin: ^!PA12
position_endstop: 0
position_max: 310
homing_speed: 50

[stepper_z]
step_pin: PB5
dir_pin: PB4
enable_pin: !PB8
rotation_distance: 8
full_steps_per_rotation: 200
microsteps: 32
endstop_pin: probe:z_virtual_endstop      #defines the Z endstop as the BLtouch
position_min: -2                          #lets us go lower to adjust the Z offset
position_max: 180
homing_speed: 10
homing_retract_dist: 3.0

[probe]
pin: ^!PA11
x_offset: -40
y_offset: 0
z_offset: 0
speed: 20

[bed_mesh]
speed: 150
horizontal_move_z: 5
mesh_min: 20,20
mesh_max: 290,290
probe_count: 5,5 #performs a 5x5 bed leveling test 

[extruder]
step_pin: PD6
dir_pin: PD3
enable_pin: !PB3
rotation_distance: 7.64342   # old value 7.86522
full_steps_per_rotation: 200
microsteps: 32
max_extrude_only_distance: 150.0
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC3
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC1
#control: pid
#pid_Kp: 14.669
#pid_Ki: 0.572
#pid_Kd: 94.068
min_extrude_temp: 170
min_temp: 0
max_temp: 280
# Inland ABS
pressure_advance: 0.0361

[input_shaper]
shaper_freq_x: 61.6570 # old 30.303
shaper_freq_y: 47.3372 # old 45.045
shaper_type: mzv

[heater_fan my_nozzle_fan]
pin: PB0
heater: extruder
heater_temp: 50.0
fan_speed: 1.0

[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
#control: pid
#pid_Kp: 325.10
#pid_Ki: 63.35
#pid_Kd: 417.10
min_temp: 0
max_temp: 130

[fan]
pin: PB1

[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command

[printer]
kinematics: cartesian
max_velocity: 250
max_accel: 1500
max_accel_to_decel: 1500
max_z_velocity: 30
max_z_accel: 200
square_corner_velocity: 10

[static_digital_output display_reset]
pins: !PC6, !PD13

[pause_resume]
recover_velocity: 50

[gcode_arcs]
resolution: 0.1

[display_status]
[pause_resume]

[gcode_macro START_PRINT]
gcode:
    G28 ; home all axes
    M117 Purge extruder
    G92 E0 ; reset extruder
    G1 Z1.0 F3000 ; move z up little to prevent scratching of surface
    G1 X2 Y20 Z0.3 F5000.0 ; move to start-line position
    G1 X2 Y175.0 Z0.3 F1500.0 E15 ; draw 1st line
    G1 X2 Y175.0 Z0.4 F5000.0 ; move to side a little
    G1 X2 Y20 Z0.4 F1500.0 E30 ; draw 2nd line
    G92 E0 ; reset extruder
    G1 Z1.0 F3000 ; move z up little to prevent scratching of surface

[gcode_macro END_PRINT]
gcode:
    G91; relative positioning
    G1 Z1.0 F3000 ; move z up little to prevent scratching of print
    G90; absolute positioning
    M104 S0; turn off extruder
    M140 S0 ; turn off bed
    G1 X0 Y175 F1000 ; prepare for part removal
    M84 ; disable motors
    M106 S0 ; turn off fan

[gcode_macro PAUSE]
rename_existing: BASE_PAUSE

gcode:
    {% set X = params.X|default(5)|float %}
    {% set Y = params.Y|default(5)|float %}
    {% set Z = params.Z|default(10)|float %}
    {% set E = params.E|default(0.5)|float %}
    SAVE_GCODE_STATE NAME=PAUSE_state
    BASE_PAUSE
    G91
    G1 E-{E} F2100
    G1 Z{Z}
    G90
    G1 X{X} Y{Y} F6000

[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
    {% set E = params.E|default(0.5)|float %}
    G91
    G1 E{E} F2100
    G90
    RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
    BASE_RESUME
    
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
    TURN_OFF_HEATERS
    CLEAR_PAUSE
    SDCARD_RESET_FILE
    BASE_CANCEL_PRINT
    M18

[gcode_macro m205]
gcode:

#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 18.451
#*# pid_ki = 0.954
#*# pid_kd = 89.259
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 74.216
#*# pid_ki = 0.891
#*# pid_kd = 1544.615