vcore/printer.cfg
2023-01-30 15:48:05 +02:00

437 lines
14 KiB
INI

# Rat Rig V-core 3 Klipper Config
# Documentation: https://os.ratrig.com
# 0) Sanity check and PID Tuning: https://www.klipper3d.org/Config_checks.html
# 1) Pressure Advance: https://www.klipper3d.org/Pressure_Advance.html
# 2) Skew Correction: https://www.klipper3d.org/Skew_Correction.html
# 3) Resonance Compensation: https://www.klipper3d.org/Resonance_Compensation.html
# Read more about klipper here: https://www.klipper3d.org/Overview.html
[mcu]
baud: 250000
serial: /dev/btt-octopus-11
[temperature_sensor Octopus]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
[adxl345]
spi_bus: spi3
cs_pin: PA15
#############################################################################################################
### BASE SETUP
#############################################################################################################
[idle_timeout]
gcode:
{% if printer.webhooks.state|lower == 'ready' %}
{% if printer.pause_resume.is_paused|lower == 'false' %}
M117 Idle timeout reached
TURN_OFF_HEATERS
M84
{% endif %}
{% endif %}
# 2 hour timeout
timeout: 7200
[skew_correction]
[input_shaper]
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[force_move]
enable_force_move: True
[respond]
[heater_bed]
heater_pin: PA1
sensor_pin: PF3
sensor_type: Generic 3950
min_temp: 0
max_temp: 120
pwm_cycle_time: 0.02 # 50hz for european AC, to avoid flickering lights.
[fan]
pin: PA8
shutdown_speed: 1.0
[heater_fan toolhead_cooling_fan]
pin: PE5
fan_speed: 1
[controller_fan controller_fan]
pin: PD12
# These are only safeguards for first time users
# Modify printer.cfg to tune acceleration.
[printer]
kinematics: corexy
max_velocity: 150
max_accel: 500
max_accel_to_decel: 750
max_z_velocity: 15
max_z_accel: 20
#############################################################################################################
### STEPPER MOTORS, DRIVERS & SPEED LIMITS
### Pick the drivers and stepper motors you're using. See the RatOS documentation for custom combinations.
#############################################################################################################
[stepper_x]
enable_pin: !PF14
dir_pin: PF12
step_pin: PF13
endstop_pin: PG6
position_endstop: 0 # Adjust this to your setup
position_max: 500
rotation_distance: 40
microsteps: 64
homing_speed: 50
homing_retract_dist: 5.0
[stepper_y]
enable_pin: !PF15
step_pin: PG0
endstop_pin: PG9
dir_pin: PG1
position_min: 5
position_endstop: 480
position_max: 500
rotation_distance: 40
microsteps: 64
homing_speed: 50
homing_positive_dir: true
homing_retract_dist: 5.0
[stepper_z]
endstop_pin: probe:z_virtual_endstop
enable_pin: !PF1
step_pin: PC13
dir_pin: !PF0 # Add ! in front of pin name to reverse Z stepper direction
rotation_distance: 4
microsteps: 64
position_min: -5 # Needed for z-offset calibration and tilt_adjust.
homing_speed: 10
position_max: 500
[stepper_z1]
endstop_pin: probe: z_virtual_endstop
enable_pin: !PD4
step_pin: PE2
dir_pin: !PE3 # Add ! in front of pin name to reverse Z1 direction
rotation_distance: 4
microsteps: 64
[stepper_z2]
endstop_pin: probe: z_virtual_endstop
enable_pin: !PE0
step_pin: PE6
dir_pin: !PA14 # Add ! in front of pin name to reverse Z2 direction
rotation_distance: 4
microsteps: 64
rotation_distance: 4 # 4 for TR8*4 lead screws
[z_tilt]
speed: 200
[printer]
max_velocity: 200
max_accel: 1500
max_accel_to_decel: 750
max_z_velocity: 15
max_z_accel: 30
square_corner_velocity: 5
# Backwards compatibility
[tmc2209 stepper_x]
uart_pin: PC4
run_current: 1.1
stealthchop_threshold: 1
driver_TBL: 1
driver_TOFF: 3
driver_HEND: 0
driver_HSTRT: 0
[tmc2209 stepper_y]
uart_pin: PD11
run_current: 1.1
stealthchop_threshold: 1
driver_TBL: 1
driver_TOFF: 3
driver_HEND: 0
driver_HSTRT: 0
[tmc2209 stepper_z]
uart_pin: PE4
run_current: 1.0
stealthchop_threshold: 1
driver_TBL: 1
driver_TOFF: 3
driver_HEND: 0
driver_HSTRT: 0
[tmc2209 stepper_z1]
uart_pin: PE1
run_current: 1.1
stealthchop_threshold: 1
driver_TBL: 1
driver_TOFF: 3
driver_HEND: 0
driver_HSTRT: 0
[tmc2209 stepper_z2]
uart_pin: PD3
run_current: 1.0
stealthchop_threshold: 1
driver_TBL: 1
driver_TOFF: 3
driver_HEND: 0
driver_HSTRT: 0
[tmc2209 extruder]
uart_pin: PC6
run_current: 0.35
stealthchop_threshold: 0
#############################################################################################################
### HOMING
### Pick your probe and endstops
#############################################################################################################
# BL Touch
[bltouch]
sensor_pin: ^PB7
control_pin: PB6
speed: 7
pin_move_time: 0.675
sample_retract_dist: 10
pin_move_time: 0.8
pin_up_reports_not_triggered: True
pin_up_touch_mode_reports_triggered: True
x_offset: -28
y_offset: -13
[safe_z_home]
home_xy_position: 150,150
speed: 135
z_hop: 12
#############################################################################################################
### PHYSICAL DIMENSIONS
### Pick your printer size
#############################################################################################################
[bed_mesh]
horizontal_move_z: 5
mesh_min: 15,15
mesh_max:465,460
probe_count: 28,13
fade_start: 1.0
fade_end: 100.0
mesh_pps: 2,2
algorithm: bicubic
bicubic_tension: .2
[z_tilt]
z_positions:
0,0
250,500
500,0
points:
60,60
285,470
460,60
horizontal_move_z: 12
retries: 10
retry_tolerance: 0.02
#############################################################################################################
### extruder and hotend
#############################################################################################################
[extruder]
step_pin: PF11
dir_pin: !PG3
enable_pin: !PG5
microsteps: 64
rotation_distance: 4.63
full_steps_per_rotation: 200
filament_diameter: 1.750
max_extrude_only_velocity: 60
max_extrude_only_distance: 200
nozzle_diameter: 0.4
heater_pin: PA2
sensor_type: ATC Semitec 104GT-2
sensor_pin: PF4
min_extrude_temp: 170
min_temp: 0
max_temp: 400
pressure_advance: 0.05
[firmware_retraction]
retract_speed: 60
unretract_extra_length: 0
unretract_speed: 60
retract_length: 0.5
#############################################################################################################
### MACROS
#############################################################################################################
[include macros.cfg]
[include shell-macros.cfg]
# Print macros. Call these from your slicer (custom g-code).
# You can copy these to printer.cfg and modify them to your liking, or just use them as is.
# Read more here: https://rat-rig.github.io/V-CoreOS/#/slicers
[gcode_macro _START_PRINT_AFTER_HEATING_BED]
gcode:
{% if printer["gcode_macro RatOS"].preheat_extruder|lower == 'true' %}
M117 Pre-heating extruder...
# Wait for extruder to reach 150 so an inductive probe (if present) is at a predictable temp.
# Also allows the bed heat to spread a little, and softens any plastic that might be stuck to the nozzle.
M104 S150
TEMPERATURE_WAIT SENSOR=extruder MINIMUM=150
{% endif %}
M117 Adjusting for tilt...
# Adjust bed tilt
Z_TILT_ADJUST
M117 Rehoming after tilt adjustment...
# Home again as Z will have changed after tilt adjustment and bed heating.
G28 Z
#############################################################################################################
### MACRO CONFIGURATION
### Configure the behavior of RatOS macros
#############################################################################################################
[gcode_macro RatOS]
# Use absolute extrusion mode
# Set to True to use relative extrusion mode
variable_relative_extrusion: False
# Wait for extruder to reach 150 so an inductive probe (if present) is at a predictable temp.
# Also allows the bed heat to spread a little, and softens any plastic that might be stuck to the nozzle.
# Set to False to disable
variable_preheat_extruder: True
# Calibrate the bed mesh in the START_PRINT macro.
# Set to false to skip BED_MESH_CALIBRATE, it will still load the BED_MESH
# with the name "ratos", be sure to save your bed_mesh profile with that name.
# or override the _START_PRINT_BED_MESH macro to implement your own mesh handling logic.
variable_calibrate_bed_mesh: True
# Print a prime line or blob at the end of the START_PRINT macro
# set to "primeline" or "primeblob", or False to disable nozzle_priming.
variable_nozzle_priming: "false"
# Park in the back when waiting for the extruder to heat up
# set to "front" to park in the front, or "center" to park in the center.
variable_start_print_park_in: "back"
# Height to park it when waiting for extruder to heat.
variable_start_print_park_z_height: 50
# Skew profile to load before starting the print
# uncomment this to use your calibrated skew correction profile.
#variable_skew_profile: "my_skew_profile"
# Park in the back after the print has ended or was cancelled.
# set to "front" to park in the front, or "center" to park in the center.
variable_end_print_park_in: "back"
# Park in the back when the print is paused.
# set to "front" to park in the front, or "center" to park in the center.
variable_pause_print_park_in: "back"
# Set the speed for travel moves in RatOS Macros in mm/s.
variable_macro_travel_speed: 100
# Safe Z Home (Physical endstops only)
[safe_z_home]
home_xy_position: 250, 250 # Change coordinates to the center of your print bed
speed: 50
z_hop: 10 # Move up 10mm
z_hop_speed: 5
#ORIGINAL
#home_xy_position: 150,150 # 300mm printer
#home_xy_position: 200,200 # 400mm printer
#home_xy_position: 250,250 # 500mm printer
#############################################################################################################
### INPUT SHAPER
### Enable/disable input shaper calibration
#############################################################################################################
# Uncomment this next line if you have an ADXL345 connected to your control board
#[include config/printers/v-core-3/input-shaper.cfg]
# ADXL345 resonance testing configuration
#[resonance_tester]
#probe_points:
# 150,150,20 # 300mm printer
# 200,200,20 # 400mm printer
# 250,250,20 # 500mm printer
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bltouch]
#*# z_offset = 2.800
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.597812, 0.536562, 0.424687, 0.351562, 0.310625, 0.250000, 0.161250, 0.175000, 0.139687, 0.100937, 0.089062, 0.089375, 0.097500, 0.103437, 0.137500, 0.129687, 0.138750, 0.175937, 0.192187, 0.213750, 0.258437, 0.309375, 0.330312, 0.414062, 0.428437, 0.475312, 0.529375, 0.615937
#*# 0.576875, 0.480625, 0.390312, 0.336875, 0.281562, 0.253437, 0.220312, 0.160000, 0.169062, 0.126562, 0.124687, 0.115312, 0.127187, 0.131875, 0.123437, 0.159687, 0.166250, 0.181250, 0.236250, 0.287500, 0.282500, 0.339062, 0.372187, 0.409687, 0.482812, 0.523125, 0.561562, 0.651875
#*# 0.552812, 0.459687, 0.380000, 0.334375, 0.269062, 0.223437, 0.195625, 0.176250, 0.141250, 0.135625, 0.150312, 0.125000, 0.117187, 0.126875, 0.145312, 0.151562, 0.208125, 0.211562, 0.227500, 0.261250, 0.313437, 0.342500, 0.386562, 0.445625, 0.508437, 0.585312, 0.585937, 0.670312
#*# 0.437812, 0.351562, 0.293437, 0.276250, 0.195937, 0.145312, 0.130625, 0.136250, 0.100937, 0.088437, 0.088437, 0.070937, 0.105000, 0.100312, 0.130937, 0.159687, 0.154687, 0.199687, 0.238437, 0.250625, 0.329062, 0.345312, 0.411875, 0.429375, 0.481875, 0.529687, 0.585000, 0.670312
#*# 0.305312, 0.222500, 0.192812, 0.152187, 0.121875, 0.077812, 0.027500, 0.026250, 0.029375, 0.045937, 0.036875, 0.036250, 0.071562, 0.049687, 0.090937, 0.134687, 0.152812, 0.181562, 0.225000, 0.253125, 0.291875, 0.335312, 0.393750, 0.450937, 0.490000, 0.570625, 0.595312, 0.691250
#*# 0.179375, 0.160625, 0.101562, 0.081875, 0.090312, 0.012812, -0.020938, -0.031563, -0.010000, 0.001875, 0.008750, 0.040937, 0.042187, 0.054687, 0.093125, 0.130937, 0.130625, 0.185937, 0.217812, 0.252187, 0.300937, 0.330312, 0.388125, 0.463125, 0.512812, 0.574687, 0.634687, 0.712500
#*# 0.095312, 0.050312, 0.020625, -0.003125, -0.008125, -0.033438, -0.064375, -0.063438, -0.080313, -0.065313, -0.029063, -0.022188, 0.027500, 0.042812, 0.067500, 0.098437, 0.124687, 0.168750, 0.194687, 0.258750, 0.290312, 0.354375, 0.376562, 0.432500, 0.498437, 0.561875, 0.649062, 0.760312
#*# 0.046562, 0.026250, -0.049688, -0.056563, -0.045625, -0.078125, -0.063125, -0.073750, -0.068750, -0.054688, -0.020313, -0.020625, 0.002812, 0.038125, 0.047500, 0.080312, 0.131875, 0.195625, 0.211562, 0.285937, 0.299375, 0.345937, 0.398750, 0.446875, 0.538750, 0.584062, 0.672187, 0.762187
#*# 0.051562, 0.038750, 0.001250, -0.007188, -0.023438, -0.031875, -0.031875, -0.039688, -0.035000, -0.037500, 0.001875, 0.018750, 0.037500, 0.072187, 0.114062, 0.140625, 0.162500, 0.251875, 0.293750, 0.334375, 0.378437, 0.436875, 0.482812, 0.554375, 0.603125, 0.660625, 0.710625, 0.785625
#*# 0.085937, 0.048437, 0.022812, 0.022187, 0.055937, 0.037500, 0.033437, 0.008437, 0.028437, 0.031562, 0.057500, 0.079687, 0.090625, 0.128125, 0.184687, 0.205000, 0.264687, 0.288437, 0.359375, 0.409062, 0.452187, 0.499062, 0.567500, 0.626250, 0.657500, 0.759375, 0.786562, 0.875937
#*# 0.171250, 0.144062, 0.096562, 0.143437, 0.144375, 0.119375, 0.104687, 0.105937, 0.099375, 0.115937, 0.154687, 0.191875, 0.215937, 0.240625, 0.277500, 0.313750, 0.327812, 0.369687, 0.438750, 0.480625, 0.534375, 0.582812, 0.636250, 0.692812, 0.767812, 0.784687, 0.863437, 0.961562
#*# 0.261562, 0.211562, 0.241250, 0.212500, 0.206875, 0.214687, 0.200937, 0.195937, 0.206875, 0.237812, 0.292500, 0.305937, 0.351250, 0.404375, 0.392812, 0.450625, 0.485312, 0.481875, 0.568750, 0.622812, 0.684062, 0.696250, 0.746875, 0.787500, 0.832812, 0.880000, 0.960937, 1.015625
#*# 0.379375, 0.362500, 0.344062, 0.341562, 0.349062, 0.344375, 0.314062, 0.352187, 0.362187, 0.385625, 0.407812, 0.419062, 0.438125, 0.468437, 0.546562, 0.559062, 0.569375, 0.650312, 0.688125, 0.696875, 0.785312, 0.830000, 0.851250, 0.911875, 0.940312, 1.023125, 1.062812, 1.158437
#*# tension = 0.2
#*# min_x = 15.0
#*# algo = bicubic
#*# y_count = 13
#*# mesh_y_pps = 2
#*# min_y = 15.0
#*# x_count = 28
#*# max_y = 459.96
#*# mesh_x_pps = 2
#*# max_x = 464.82
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 19.661
#*# pid_ki = 0.819
#*# pid_kd = 117.969
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 64.455
#*# pid_ki = 1.659
#*# pid_kd = 626.020