# 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 [include mainsail.conf] [mcu] baud: 250000 serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_btt-octopus-11-if00 [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: 495 position_max: 495 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, 250 # Change coordinates to the center of your print bed speed: 135 speed: 50 z_hop: 10 # Move up 10mm z_hop_speed: 5 [bed_mesh] horizontal_move_z: 5 mesh_min: 15,15 mesh_max:465,460 probe_count: 28,13 fade_start: 10.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=200 {% 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] # 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 # 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: "center" # 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 #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.970 #*# #*# [bed_mesh default] #*# version = 1 #*# points = #*# 0.721562, 0.615625, 0.513437, 0.450625, 0.389375, 0.320937, 0.245625, 0.207187, 0.173437, 0.135000, 0.122812, 0.122187, 0.143750, 0.147500, 0.161875, 0.162812, 0.174375, 0.209375, 0.227500, 0.236562, 0.250312, 0.293125, 0.350312, 0.368750, 0.407187, 0.478750, 0.531562, 0.637500 #*# 0.653750, 0.566250, 0.473125, 0.405000, 0.351875, 0.280937, 0.231875, 0.217500, 0.169375, 0.159062, 0.148750, 0.154062, 0.159062, 0.116875, 0.142187, 0.194375, 0.175000, 0.202187, 0.223750, 0.246250, 0.297500, 0.349062, 0.345000, 0.374687, 0.459687, 0.506562, 0.538125, 0.644375 #*# 0.616875, 0.547500, 0.467187, 0.396562, 0.322187, 0.285312, 0.238437, 0.247812, 0.207500, 0.178125, 0.163437, 0.177812, 0.152500, 0.155625, 0.157812, 0.188750, 0.218437, 0.230312, 0.274375, 0.305312, 0.340000, 0.345000, 0.405000, 0.453437, 0.490937, 0.541875, 0.609062, 0.663750 #*# 0.549687, 0.487812, 0.385625, 0.378125, 0.327500, 0.265312, 0.213437, 0.207187, 0.178750, 0.135937, 0.118437, 0.146250, 0.160937, 0.156250, 0.156562, 0.173125, 0.185937, 0.212500, 0.241875, 0.269687, 0.304062, 0.351562, 0.389062, 0.432812, 0.486250, 0.538437, 0.601562, 0.666875 #*# 0.389375, 0.351250, 0.299375, 0.273750, 0.210625, 0.163750, 0.140937, 0.104687, 0.100625, 0.100625, 0.070000, 0.115000, 0.099687, 0.097500, 0.120937, 0.154062, 0.152500, 0.202187, 0.235937, 0.241875, 0.315312, 0.346875, 0.394062, 0.425000, 0.500625, 0.551250, 0.593750, 0.688437 #*# 0.301875, 0.218750, 0.218750, 0.174375, 0.143125, 0.096250, 0.070000, 0.061562, 0.058125, 0.053125, 0.063750, 0.071250, 0.072500, 0.069375, 0.090000, 0.117187, 0.165625, 0.172500, 0.217812, 0.266250, 0.329375, 0.348125, 0.416875, 0.455625, 0.491562, 0.565625, 0.619375, 0.729687 #*# 0.205937, 0.184687, 0.128750, 0.066250, 0.063437, 0.056562, -0.005938, 0.021250, -0.001875, 0.013125, 0.014687, 0.042500, 0.062500, 0.055625, 0.094375, 0.147187, 0.182500, 0.179375, 0.241875, 0.290937, 0.311875, 0.330625, 0.398750, 0.465625, 0.507500, 0.558437, 0.653437, 0.704687 #*# 0.127812, 0.090312, 0.065625, -0.001250, 0.004375, -0.018438, -0.043750, -0.060625, -0.043750, -0.032500, -0.026250, -0.023125, 0.020625, 0.050937, 0.058125, 0.111875, 0.144375, 0.190625, 0.193125, 0.253437, 0.329687, 0.357812, 0.390937, 0.441250, 0.511562, 0.584687, 0.642500, 0.740000 #*# 0.100312, 0.038125, 0.057500, 0.018750, 0.022187, -0.024063, -0.018438, 0.038437, -0.003125, 0.020937, 0.000312, 0.036250, 0.029687, 0.092500, 0.086250, 0.142812, 0.146875, 0.224687, 0.235625, 0.301562, 0.349062, 0.412812, 0.467812, 0.491250, 0.542187, 0.620000, 0.667500, 0.743125 #*# 0.146875, 0.090000, 0.054687, 0.055000, 0.016562, 0.036250, 0.025000, 0.025000, 0.011875, 0.055937, 0.024375, 0.067187, 0.101562, 0.120312, 0.173125, 0.180937, 0.231562, 0.252187, 0.334375, 0.347500, 0.437187, 0.506875, 0.519375, 0.569062, 0.618437, 0.668750, 0.751562, 0.837187 #*# 0.189062, 0.142500, 0.082187, 0.109062, 0.112812, 0.081562, 0.094062, 0.110625, 0.102500, 0.106562, 0.117812, 0.137187, 0.193750, 0.183437, 0.239375, 0.251562, 0.281562, 0.355000, 0.408437, 0.421250, 0.490312, 0.527187, 0.572812, 0.648125, 0.704062, 0.733437, 0.801875, 0.895000 #*# 0.272812, 0.225625, 0.244375, 0.210000, 0.195937, 0.208437, 0.162812, 0.178125, 0.196250, 0.213125, 0.286562, 0.272500, 0.266875, 0.317812, 0.349687, 0.424687, 0.424687, 0.441562, 0.506875, 0.533125, 0.610625, 0.640937, 0.680937, 0.705937, 0.798750, 0.790312, 0.886250, 0.943750 #*# 0.388125, 0.347812, 0.317500, 0.309062, 0.368125, 0.313125, 0.298750, 0.337187, 0.309062, 0.346562, 0.369375, 0.401250, 0.438125, 0.433125, 0.468437, 0.480625, 0.515000, 0.524687, 0.618750, 0.643750, 0.695312, 0.706562, 0.772812, 0.795312, 0.872812, 0.901875, 0.991875, 1.105312 #*# 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