Skip to content

Instantly share code, notes, and snippets.

@maz3max
Last active November 17, 2023 09:13
Show Gist options
  • Save maz3max/d327d20b4d0e4a22bbb24e11721c2665 to your computer and use it in GitHub Desktop.
Save maz3max/d327d20b4d0e4a22bbb24e11721c2665 to your computer and use it in GitHub Desktop.
Klipper config for my extended Anycubic Linear Kossel Plus
# Anycubic delta kossel Plus klipper config file (copy it to ~/printer.cfg)
# correct USB port
# DO NOT COPY THIS FILE WITHOUT CAREFULLY READING AND UPDATING IT
# FIRST. Incorrectly configured parameters may cause damage.
# Z height probe. One may define this section to enable Z height
# probing hardware. When this section is enabled, PROBE and
# QUERY_PROBE extended g-code commands become available. The probe
# section also creates a virtual probe:z_virtual_endstop pin. One may
# set the stepper_z endstop_pin to this virtual pin on cartesian style
# printers that use the probe in place of a z endstop.
[probe]
pin: ^ar18
# Probe detection pin. This parameter must be provided.
z_offset: 15.50
# The distance (in mm) between the bed and the nozzle when the probe
# triggers. This parameter must be provided.
#speed: 5.0
# Speed (in mm/s) of the Z axis when probing. The default is 5mm/s.
#activate_gcode:
# A list of G-Code commands (one per line) to execute prior to each
# probe attempt. This may be useful if the probe needs to be
# activated in some way. The default is to not run any special
# G-Code commands on activation.
#deactivate_gcode:
# A list of G-Code commands (one per line) to execute after each
# probe attempt completes. The default is to not run any special
# G-Code commands on deactivation.
[stepper_a]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_distance: .0125
endstop_pin: ^ar2
homing_speed: 50
position_endstop: 295.092444
# Distance (in mm) between the nozzle and the bed when the nozzle is
# in the center of the build area and the endstop triggers. This
# parameter must be provided for stepper_a; for stepper_b and
# stepper_c this parameter defaults to the value specified for
# stepper_a.
arm_length: 271
# Length (in mm) of the diagonal rod that connects this tower to the
# print head. This parameter must be provided for stepper_a; for
# stepper_b and stepper_c this parameter defaults to the value
# specified for stepper_a.
angle: 209.639493
# This option specifies the angle (in degrees) that the tower is
# at. The default is 210 for stepper_a, 330 for stepper_b, and 90
# for stepper_c.
# The stepper_b section describes the stepper controlling the front
# right tower (at 330 degrees).
[stepper_b]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_distance: .0125
endstop_pin: ^ar15
position_endstop: 294.319854
angle: 329.790787
# The stepper_c section describes the stepper controlling the rear
# tower (at 90 degrees).
[stepper_c]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_distance: .0125
endstop_pin: ^ar19
position_endstop: 295.119723
angle: 90.000000
#DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 80, 96 }
# step distance is 1/STEP_PER_MM
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_distance: .010416666666666666
nozzle_diameter: 0.400
filament_diameter: 1.750
#pressure_advance: 0.0
# The amount of raw filament to push into the extruder during
# extruder acceleration. An equal amount of filament is retracted
# during deceleration. It is measured in millimeters per
# millimeter/second. The default is 0, which disables pressure
# advance.
#pressure_advance_lookahead_time: 0.010
# A time (in seconds) to "look ahead" at future extrusion moves when
# calculating pressure advance. This is used to reduce the
# application of pressure advance during cornering moves that would
# otherwise cause retraction followed immediately by pressure
# buildup. This setting only applies if pressure_advance is
# non-zero. The default is 0.010 (10 milliseconds).
heater_pin: ar10
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
control: pid
pid_Kp: 16.032
pid_Ki: 0.703
pid_Kd: 91.383
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
control: watermark
#max_delta: 2.0
# On 'watermark' controlled heaters this is the number of degrees in
# Celsius above the target temperature before disabling the heater
# as well as the number of degrees below the target before
# re-enabling the heater. The default is 2 degrees Celsius.
min_temp: 0
max_temp: 130
# Print cooling fan (omit section if fan not present).
[fan]
pin: ar9
[heater_fan hotend_fan]
# See the "fan" section for fan configuration parameters.
pin: ar44
# The remaining variables are specific to heater_fan.
heater: extruder
# Name of the config section defining the heater that this fan is
# associated with. The default is "extruder".
heater_temp: 50.0
# A temperature (in Celsius) that the heater must drop below before
# the fan is disabled. The default is 50 Celsius.
fan_speed: 1.0
# The fan speed (expressed as a value from 0.0 to 1.0) that the fan
# will be set to when its associated heater is enabled. The default
# is max_power.
[heater_fan board_fan]
# See the "fan" section for fan configuration parameters.
pin: ar7
# The remaining variables are specific to heater_fan.
heater: heater_bed
# Name of the config section defining the heater that this fan is
# associated with. The default is "extruder".
heater_temp: 50.0
# A temperature (in Celsius) that the heater must drop below before
# the fan is disabled. The default is 50 Celsius.
fan_speed: 1.0
# The fan speed (expressed as a value from 0.0 to 1.0) that the fan
# will be set to when its associated heater is enabled. The default
# is max_power.
# Panel buttons
#[buttons]
#pins = ^!ar31, ^!ar33, ^!ar35, ^!ar41
# Reprap "2004" display
[display]
lcd_type: hd44780
rs_pin: ar16
e_pin: ar17
d4_pin: ar23
d5_pin: ar25
d6_pin: ar27
d7_pin: ar29
#X_CS_PIN 4
#Y_CS_PIN 5
#Z_CS_PIN 6
#E0_CS_PIN 11
# Configure a TMC2130 stepper motor driver via SPI bus. To use this
# feature, define a config section with a "tmc2130" prefix followed by
# the name of the corresponding stepper config section (for example,
# "[tmc2130 stepper_x]").
#[tmc2130 stepper_x]
#cs_pin:
# The pin corresponding to the TMC2130 chip select line. This pin
# will be set to low at the start of SPI messages and raised to high
# after the message completes. This parameter must be provided.
#microsteps:
# The number of microsteps to configure the driver to use. Valid
# values are 1, 2, 4, 8, 16, 32, 64, 128, 256. This parameter must
# be provided.
#interpolate: True
# If true, enable TMC2130 step interpolation (the driver will
# interally step at a rate of 256 micro-steps). The default is True.
#run_current:
# The amount of current (in amps) to configure the driver to use
# during stepper movement. This parameter must be provided.
#hold_current:
# The amount of current (in amps) to configure the driver to use
# when the stepper is not moving. The default is to use the same
# value as run_current.
#sense_resistor: 0.110
# The resistance (in ohms) of the motor sense resistor. The default
# is 0.110 ohms.
#stealthchop_threshold: 0
# The velocity (in mm/s) to set the "stealthChop" threshold to. When
# set, "stealthChop" mode will be enabled if the stepper motor
# velocity is below this value. The default is 0, which disables
# "stealthChop" mode.
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 0
#driver_BLANK_TIME_SELECT: 1
#driver_TOFF: 4
#driver_HEND: 7
#driver_HSTRT: 0
#driver_PWM_AUTOSCALE: True
#driver_PWM_FREQ: 1
#driver_PWM_GRAD: 4
#driver_PWM_AMPL: 128
#driver_SGT: 0
# Set the given register during the configuration of the TMC2130
# chip. This may be used to set custom motor parameters. The
# defaults for each parameter are next to the parameter name in the
# above list.
#diag1_pin:
# The micro-controller pin attached to the DIAG1 line of the TMC2130
# chip. Setting this creates a "tmc2130_stepper_x:virtual_endstop"
# virtual pin which may be used as the stepper's endstop_pin. Doing
# this enables "sensorless homing". (Be sure to also set driver_SGT
# to an appropriate sensitivity value.) The default is to not enable
# sensorless homing.
[tmc2130 stepper_a]
cs_pin: ar4
microsteps: 16
interpolate: True
run_current: 0.8
hold_current: 0.4
sense_resistor: 0.110
stealthchop_threshold: 80
[tmc2130 stepper_b]
cs_pin: ar5
microsteps: 16
interpolate: True
run_current: 0.8
hold_current: 0.4
sense_resistor: 0.110
stealthchop_threshold: 80
[tmc2130 stepper_c]
cs_pin: ar6
microsteps: 16
interpolate: True
run_current: 0.8
hold_current: 0.4
sense_resistor: 0.110
stealthchop_threshold: 80
[tmc2130 extruder]
cs_pin: ar11
microsteps: 16
interpolate: True
run_current: 1
hold_current: 1
sense_resistor: 0.110
stealthchop_threshold: 80
[mcu]
# /dev/ttyUSB0 ...
serial: /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0
# The serial port to connect to the MCU. If unsure (or if it
# changes) see the "Where's my serial port?" section of the FAQ. The
# default is /dev/ttyS0
baud: 125000
# The baud rate to use. The default is 250000.
pin_map: arduino
# This option may be used to enable Arduino pin name aliases. The
# default is to not enable the aliases.
#restart_method:
# This controls the mechanism the host will use to reset the
# micro-controller. The choices are 'arduino', 'rpi_usb', and
# 'command'. The 'arduino' method (toggle DTR) is common on Arduino
# boards and clones. The 'rpi_usb' method is useful on Raspberry Pi
# boards with micro-controllers powered over USB - it briefly
# disables power to all USB ports to accomplish a micro-controller
# reset. The 'command' method involves sending a Klipper command to
# the micro-controller so that it can reset itself. The default is
# 'arduino' if the micro-controller communicates over a serial port,
# 'command' otherwise.
[printer]
kinematics: delta
# This option must be "delta" for linear delta printers.
max_velocity: 120
# Maximum velocity (in mm/s) of the toolhead relative to the
# print. This parameter must be specified.
max_accel: 2000
# Maximum acceleration (in mm/s^2) of the toolhead relative to the
# print. This parameter must be specified.
max_z_velocity: 120
# For delta printers this limits the maximum velocity (in mm/s) of
# moves with z axis movement. This setting can be used to reduce the
# maximum speed of up/down moves (which require a higher step rate
# than other moves on a delta printer). The default is to use
# max_velocity for max_z_velocity.
delta_radius: 133.931184
# Radius (in mm) of the horizontal circle formed by the three linear
# axis towers. This parameter may also be calculated as:
# delta_radius = smooth_rod_offset - effector_offset - carriage_offset
# This parameter must be provided.
#buffer_time_high=15
# Bed tilt compensation. One may define a [bed_tilt] config section to
# enable move transformations that account for a tilted bed.
[bed_tilt]
x_adjust: 0.000118
# The amount to add to each move's Z height for each mm on the X
# axis. The default is 0.
y_adjust: -0.000281
# The amount to add to each move's Z height for each mm on the Y
# axis. The default is 0.
# The remaining parameters control a BED_TILT_CALIBRATE extended
# g-code command that may be used to calibrate appropriate x and y
# adjustment parameters.
points:
100.0,0.0
97.81476007338057,20.79116908177593
91.35454576426008,40.67366430758001
80.90169943749474,58.778525229247315
66.91306063588583,74.31448254773942
50.000000000000014,86.60254037844386
30.901699437494745,95.10565162951535
10.452846326765346,99.45218953682733
-10.452846326765334,99.45218953682733
-30.901699437494734,95.10565162951536
-49.99999999999998,86.60254037844388
-66.91306063588578,74.31448254773944
-80.90169943749473,58.77852522924732
-91.3545457642601,40.673664307580005
-97.81476007338057,20.79116908177593
-100.0,0
-97.81476007338057,-20.791169081775905
-91.35454576426011,-40.67366430757998
-80.90169943749476,-58.7785252292473
-66.91306063588584,-74.3144825477394
-50.00000000000004,-86.60254037844383
-30.901699437494756,-95.10565162951535
-10.452846326765423,-99.45218953682733
10.452846326765387,-99.45218953682733
30.901699437494724,-95.10565162951536
50.000000000000014,-86.60254037844386
66.91306063588584,-74.3144825477394
80.90169943749473,-58.778525229247336
91.3545457642601,-40.67366430758001
97.81476007338055,-20.791169081775987
# A newline separated list of X,Y points that should be probed
# during a BED_TILT_CALIBRATE command. The default is to not enable
# the command.
speed: 50
# The speed (in mm/s) of non-probing moves during the
# calibration. The default is 50.
horizontal_move_z: 20
# The height (in mm) that the head should be commanded to move to
# just prior to starting a probe operation. The default is 5.
#manual_probe:
# If true, then BED_TILT_CALIBRATE will perform manual probing. If
# false, then a PROBE command will be run at each probe
# point. Manual probing is accomplished by manually jogging the Z
# position of the print head at each probe point and then issuing a
# NEXT extended g-code command to record the position at that
# point. The default is false if a [probe] config section is present
# and true otherwise.
# The stepper_a section describes the stepper controlling the front
# left tower (at 210 degrees). This section also controls the homing
# parameters (homing_speed, homing_retract_dist) for all towers.
[delta_calibrate]
radius: 105
# Radius (in mm) of the area that may be probed. This is typically
# the size of the printer bed. This parameter must be provided.
speed: 50
# The speed (in mm/s) of non-probing moves during the
# calibration. The default is 50.
horizontal_move_z: 20
# The height (in mm) that the head should be commanded to move to
# just prior to starting a probe operation. The default is 5.
#manual_probe:
# If true, then DELTA_CALIBRATE will perform manual probing. If
# false, then a PROBE command will be run at each probe
# point. Manual probing is accomplished by manually jogging the Z
# position of the print head at each probe point and then issuing a
# NEXT extended g-code command to record the position at that
# point. The default is false if a [probe] config section is present
# and true otherwise.
# A virtual sdcard may be useful if the host machine is not fast
# enough to run OctoPrint well. It allows the Klipper host software to
# directly print gcode files stored in a directory on the host using
# standard sdcard G-Code commands (eg, M24).
[virtual_sdcard]
path: ~/.octoprint/uploads/
# The path of the local directory on the host machine to look for
# g-code files. This is a read-only directory (sdcard file writes
# are not supported). One may point this to OctoPrint's upload
# directory (generally ~/.octoprint/uploads/ ). This parameter must
# be provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment