Last active
June 7, 2023 14:11
-
-
Save drandarov-io/5096a966972f9bb5e1657711d5d55614 to your computer and use it in GitHub Desktop.
Klipper configuration for a heavily modified CR-10 Max
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file contains pin mappings for the Creality CR-10 Max. To use | |
# this config, the firmware should be compiled for the AVR atmega2560. | |
# See docs/Config_Reference.md for a description of parameters. | |
# https://gist.github.com/drandarov-io/5096a966972f9bb5e1657711d5d55614 | |
[include mainsail.cfg] | |
[mcu] | |
serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AR0JQJQ1-if00-port0 | |
############################################ | |
# Kinematics | |
############################################ | |
[printer] | |
kinematics: cartesian | |
max_velocity: 200 | |
max_accel: 4000 | |
max_z_velocity: 30 | |
max_z_accel: 150 | |
square_corner_velocity: 6.0 | |
[input_shaper] | |
shaper_freq_x: 67.2 | |
shaper_type_x: mzv | |
shaper_freq_y: 32.8 | |
shaper_type_y: zv | |
[stepper_x] | |
step_pin: PF0 | |
dir_pin: PF1 | |
enable_pin: !PD7 | |
microsteps: 16 | |
rotation_distance: 40 | |
endstop_pin: ^PE5 | |
position_endstop: 0 | |
position_min: 0 | |
position_max: 450 | |
homing_speed: 75 | |
[stepper_y] | |
step_pin: PF6 | |
dir_pin: !PF7 | |
enable_pin: !PF2 | |
microsteps: 16 | |
rotation_distance: 40 | |
endstop_pin: ^PJ1 | |
position_endstop: 0 | |
position_min: 0 | |
position_max: 300 | |
homing_speed: 50 | |
[stepper_z] | |
step_pin: PL3 | |
dir_pin: !PL1 | |
enable_pin: !PK0 | |
microsteps: 16 | |
rotation_distance: 8 | |
endstop_pin: probe:z_virtual_endstop | |
position_min: 0.0 | |
position_max: 450 | |
homing_speed: 15 | |
[bltouch] | |
sensor_pin: ^PD2 | |
control_pin: PB5 | |
probe_with_touch_mode: True | |
stow_on_each_sample: False | |
x_offset: -39.0 | |
y_offset: -2.0 | |
z_offset: 2.9 | |
speed: 8.0 | |
samples: 2 | |
sample_retract_dist: 3.0 | |
############################################ | |
# Homing & Leveling | |
############################################ | |
[safe_z_home] | |
home_xy_position: 225,150 | |
speed: 85.0 | |
z_hop: 10.0 | |
z_hop_speed: 100 | |
[bed_mesh] | |
speed: 170 | |
horizontal_move_z: 8 | |
mesh_min: 5,0 | |
mesh_max: 410,280 | |
probe_count: 5,5 | |
fade_start: 1 | |
fade_end: 10 | |
[bed_screws] | |
screw1: 10,0 | |
screw2: 440,0 | |
screw3: 10,300 | |
screw4: 440,300 | |
[screws_tilt_adjust] | |
screw4: 60,30 | |
screw4_name: front left screw | |
screw3: 440,30 | |
screw3_name: front right screw | |
screw2: 60,300 | |
screw2_name: rear left screw | |
screw1: 440,300 | |
screw1_name: rear right screw | |
horizontal_move_z: 10.0 | |
speed: 100.0 | |
screw_thread: CCW-M4 | |
############################################ | |
# Heating | |
############################################ | |
[extruder] | |
step_pin: PA4 | |
dir_pin: PA6 | |
enable_pin: !PA2 | |
microsteps: 16 | |
rotation_distance: 8.2 | |
nozzle_diameter: 0.600 | |
filament_diameter: 1.750 | |
max_extrude_only_distance: 500.0 | |
max_extrude_only_velocity: 100.0 | |
max_extrude_only_accel: 1000.0 | |
heater_pin: PB4 | |
sensor_type: EPCOS 100K B57560G104F | |
sensor_pin: PK5 | |
control: pid | |
pid_kp: 21.865 | |
pid_ki: 1.869 | |
pid_kd: 63.955 | |
min_extrude_temp: 180 | |
min_temp: 0 | |
max_temp: 280 | |
[heater_bed] | |
heater_pin: PH5 | |
sensor_type: EPCOS 100K B57560G104F | |
sensor_pin: PK6 | |
control: pid | |
pid_Kp: 67.826 | |
pid_Ki: 1.178 | |
pid_Kd: 976.697 | |
min_temp: 0 | |
max_temp: 100 | |
[fan] | |
pin: PH6 | |
############################################ | |
# Accelerometer measurement | |
############################################ | |
[mcu rpi] | |
serial: /tmp/klipper_host_mcu | |
[adxl345] | |
cs_pin: rpi:None | |
[resonance_tester] | |
accel_chip: adxl345 | |
probe_points: | |
225,150,30 | |
[respond] | |
default_type: echo | |
############################################ | |
# Filament change / runout | |
############################################ | |
[pause_resume] | |
[gcode_macro M600] | |
gcode: | |
{% set X = params.X|default(50)|float %} | |
{% set Y = params.Y|default(0)|float %} | |
{% set Z = params.Z|default(10)|float %} | |
SAVE_GCODE_STATE NAME=M600_state | |
PAUSE | |
G91 | |
G1 E-.8 F2700 | |
G1 Z{Z} | |
G90 | |
G1 X{X} Y{Y} F3000 | |
G91 | |
G1 E-50 F1000 | |
RESTORE_GCODE_STATE NAME=M600_state | |
#[filament_switch_sensor e0_sensor] | |
#switch_pin: PE4 | |
#pause_on_runout: False | |
#runout_gcode: | |
# M600 | |
############################################ | |
# Quality of life | |
############################################ | |
#[exclude_object] | |
############################################ | |
# LCD Screen setup | |
############################################ | |
[t5uid1] | |
firmware: dgus_reloaded | |
# This controls how Klipper interacts with the touchscreen. The only possible | |
# value is "dgus_reloaded" at the moment. This parameter must be provided. | |
#update_interval: 2 | |
# How often to send data updates to the touchscreen. | |
volume: 20 | |
# The volume for the touchscreen speaker (as a value from 0 to 100). | |
brightness: 100 | |
# The brightness for the touchscreen (as a value from 0 to 100). | |
machine_name: CR-10 Maxxed | |
# The machine name shown on the information page. | |
x_min_inset: 30.0 | |
# The distance (in mm) from the minimum X position used by the manual leveling | |
# screen. | |
x_max_inset: 30.0 | |
# The distance (in mm) from the maximum X position used by the manual leveling | |
# screen. | |
y_min_inset: 30.0 | |
# The distance (in mm) from the minimum Y position used by the manual leveling | |
# screen. | |
y_max_inset: 30.0 | |
# The distance (in mm) from the maximum Y position used by the manual leveling | |
# screen. | |
#x_min: | |
# This can be used to provide a lower limit (in mm) to X moves done using the | |
# touschreen. Movements will still be limited by your [stepper_x] | |
# configuration values. | |
#x_max: | |
# This can be used to provide an upper limit (in mm) to X moves done using the | |
# touschreen. Movements will still be limited by your [stepper_x] | |
# configuration values. | |
#y_min: | |
# Same as x_min for the Y axis. | |
#y_max: | |
# Same as x_max for the Y axis. | |
#z_min: 0 | |
# Same as x_min for the Z axis. | |
#z_max: 450 | |
# Same as x_max for the Z axis. | |
############################################ | |
# Macros | |
############################################ | |
[delayed_gcode bed_mesh_init] | |
initial_duration: .01 | |
gcode: | |
BED_MESH_PROFILE LOAD=default | |
[gcode_macro WIPE_LINE] | |
gcode: | |
{% if printer.toolhead.homed_axes != "xyz" %} | |
{action_respond_info("Please home XYZ first")} | |
{% elif printer.extruder.temperature < 170 %} | |
{action_respond_info("Extruder temperature too low")} | |
{% else %} | |
SAVE_GCODE_STATE NAME=WIPE_LINE_state | |
M82 | |
G90 | |
# Move Origin | |
G1 X1 Y1 Z5 F3000 | |
# Drop nozzle to Z0.15 | |
G1 Z0.15 F3000 | |
# 1: Up-Right | |
G92 E0 | |
G1 X10 Y200 F1000 E25 | |
# 2: Left | |
G92 E0 | |
G1 X1 F5000 E1 | |
# 3: Down-Right | |
G92 E0 | |
G1 X15 Y140 F1000 E10 | |
# 4: Left | |
G92 E0 | |
G1 X1 F2000 E1 | |
# 5: Down-Right | |
G92 E0 | |
G1 X20 Y10 F1000 E5 | |
# Quickly retract and wipe away | |
G92 E0 | |
G1 E-1 F500 | |
G1 X150 Y150 F6000 | |
G1 Z0.5 F3000 | |
RESTORE_GCODE_STATE NAME=WIPE_LINE_state MOVE=0 | |
{% endif %} | |
[gcode_macro START_PRINT] | |
gcode: | |
{% set BED_TEMP = params.BED_TEMP|default(60)|float %} | |
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %} | |
# Start LED Print Status | |
{% if 't5uid1' in printer %} | |
DGUS_PRINT_START | |
{% endif %} | |
# Start bed heating | |
M140 S{BED_TEMP} | |
# Use absolute coordinates | |
G90 | |
# Reset the G-Code Z offset (adjust Z offset if needed) | |
SET_GCODE_OFFSET Z=0.0 | |
# Home the printer | |
G28 | |
# Bed calibrate | |
#G29 | |
# Move the nozzle near the bed | |
G1 Z5 F3000 | |
# Move the nozzle very close to the bed | |
#G1 Z0.15 F300 | |
# Wait for bed to reach temperature | |
M190 S{BED_TEMP} | |
# Set and wait for nozzle to reach temperature | |
M109 S{EXTRUDER_TEMP} | |
# Wipe Nozzle | |
#WIPE_LINE | |
[gcode_macro END_PRINT] | |
gcode: | |
# Turn off bed, extruder, and fan | |
M140 S0 | |
M104 S0 | |
M106 S0 | |
# Move nozzle away from print while retracting | |
G91 | |
G1 X-2 Y-2 E-3 F300 | |
# Raise nozzle by 10mm | |
G1 Z10 F3000 | |
G90 | |
# Disable steppers | |
M84 | |
# End LED Print Status | |
{% if 't5uid1' in printer %} | |
DGUS_PRINT_END | |
{% endif %} | |
[gcode_macro POWEROFF] | |
gcode: | |
RESPOND TYPE=command MSG=action:poweroff | |
#*# <---------------------- SAVE_CONFIG ----------------------> | |
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. | |
#*# | |
#*# [extruder] | |
#*# | |
#*# [bed_mesh default] | |
#*# version = 1 | |
#*# points = | |
#*# 0.173750, 0.160000, 0.186250, 0.142500, 0.213750 | |
#*# 0.037500, 0.075000, 0.100000, 0.012500, 0.017500 | |
#*# -0.108750, -0.027500, -0.022500, -0.142500, -0.151250 | |
#*# -0.136250, -0.005000, 0.020000, -0.077500, -0.126250 | |
#*# 0.165000, 0.295000, 0.310000, 0.167500, 0.166250 | |
#*# x_count = 5 | |
#*# y_count = 5 | |
#*# mesh_x_pps = 2 | |
#*# mesh_y_pps = 2 | |
#*# algo = lagrange | |
#*# tension = 0.2 | |
#*# min_x = 5.0 | |
#*# max_x = 410.0 | |
#*# min_y = 0.0 | |
#*# max_y = 280.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment