mirror of
https://github.com/bassamanator/Sovol-SV06-firmware.git
synced 2025-11-08 21:41:15 +00:00
Adjusted master branch with safe limits, and notes, to accomodate beginner user.
This commit is contained in:
@@ -1,110 +0,0 @@
|
||||
# Home, get position, throw around toolhead, home again.
|
||||
# If MCU stepper positions (first line in GET_POSITION) are greater than a full step different (your number of microsteps), then skipping occured.
|
||||
# We only measure to a full step to accomodate for endstop variance.
|
||||
# Example: TEST_SPEED SPEED=300 ACCEL=5000 ITERATIONS=10
|
||||
|
||||
[gcode_macro TEST_SPEED]
|
||||
gcode:
|
||||
# Speed
|
||||
{% set speed = params.SPEED|default(printer.configfile.settings.printer.max_velocity)|int %}
|
||||
# Iterations
|
||||
{% set iterations = params.ITERATIONS|default(5)|int %}
|
||||
# Acceleration
|
||||
{% set accel = params.ACCEL|default(printer.configfile.settings.printer.max_accel)|int %}
|
||||
# Bounding inset for large pattern (helps prevent slamming the toolhead into the sides after small skips, and helps to account for machines with imperfectly set dimensions)
|
||||
{% set bound = params.BOUND|default(20)|int %}
|
||||
# Size for small pattern box
|
||||
{% set smallpatternsize = SMALLPATTERNSIZE|default(20)|int %}
|
||||
|
||||
# Large pattern
|
||||
# Max positions, inset by BOUND
|
||||
{% set x_min = printer.toolhead.axis_minimum.x + bound %}
|
||||
{% set x_max = printer.toolhead.axis_maximum.x - bound %}
|
||||
{% set y_min = printer.toolhead.axis_minimum.y + bound %}
|
||||
{% set y_max = printer.toolhead.axis_maximum.y - bound %}
|
||||
|
||||
# Small pattern at center
|
||||
# Find X/Y center point
|
||||
{% set x_center = (printer.toolhead.axis_minimum.x|float + printer.toolhead.axis_maximum.x|float ) / 2 %}
|
||||
{% set y_center = (printer.toolhead.axis_minimum.y|float + printer.toolhead.axis_maximum.y|float ) / 2 %}
|
||||
|
||||
# Set small pattern box around center point
|
||||
{% set x_center_min = x_center - (smallpatternsize/2) %}
|
||||
{% set x_center_max = x_center + (smallpatternsize/2) %}
|
||||
{% set y_center_min = y_center - (smallpatternsize/2) %}
|
||||
{% set y_center_max = y_center + (smallpatternsize/2) %}
|
||||
|
||||
# Save current gcode state (absolute/relative, etc)
|
||||
SAVE_GCODE_STATE NAME=TEST_SPEED
|
||||
|
||||
# Output parameters to g-code terminal
|
||||
{ action_respond_info("TEST_SPEED: starting %d iterations at speed %d, accel %d" % (iterations, speed, accel)) }
|
||||
|
||||
# Home and get position for comparison later:
|
||||
G28
|
||||
# QGL if not already QGLd (only if QGL section exists in config)
|
||||
{% if printer.configfile.settings.quad_gantry_level %}
|
||||
{% if printer.quad_gantry_level.applied == False %}
|
||||
QUAD_GANTRY_LEVEL
|
||||
G28 Z
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
# Move 50mm away from max position and home again (to help with hall effect endstop accuracy - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/24)
|
||||
G90
|
||||
G1 X{printer.toolhead.axis_maximum.x-50} Y{printer.toolhead.axis_maximum.y-50} F{30*60}
|
||||
G28 X Y
|
||||
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
|
||||
G4 P1000
|
||||
GET_POSITION
|
||||
|
||||
# Go to starting position
|
||||
G0 X{x_min} Y{y_min} Z{bound + 10} F{speed*60}
|
||||
|
||||
# Set new limits
|
||||
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2}
|
||||
|
||||
{% for i in range(iterations) %}
|
||||
# Large pattern
|
||||
# Diagonals
|
||||
G0 X{x_min} Y{y_min} F{speed*60}
|
||||
G0 X{x_max} Y{y_max} F{speed*60}
|
||||
G0 X{x_min} Y{y_min} F{speed*60}
|
||||
G0 X{x_max} Y{y_min} F{speed*60}
|
||||
G0 X{x_min} Y{y_max} F{speed*60}
|
||||
G0 X{x_max} Y{y_min} F{speed*60}
|
||||
|
||||
# Box
|
||||
G0 X{x_min} Y{y_min} F{speed*60}
|
||||
G0 X{x_min} Y{y_max} F{speed*60}
|
||||
G0 X{x_max} Y{y_max} F{speed*60}
|
||||
G0 X{x_max} Y{y_min} F{speed*60}
|
||||
|
||||
# Small pattern
|
||||
# Small diagonals
|
||||
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
||||
G0 X{x_center_max} Y{y_center_max} F{speed*60}
|
||||
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
||||
G0 X{x_center_max} Y{y_center_min} F{speed*60}
|
||||
G0 X{x_center_min} Y{y_center_max} F{speed*60}
|
||||
G0 X{x_center_max} Y{y_center_min} F{speed*60}
|
||||
|
||||
# Small box
|
||||
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
||||
G0 X{x_center_min} Y{y_center_max} F{speed*60}
|
||||
G0 X{x_center_max} Y{y_center_max} F{speed*60}
|
||||
G0 X{x_center_max} Y{y_center_min} F{speed*60}
|
||||
{% endfor %}
|
||||
|
||||
# Restore max speed/accel/accel_to_decel to their configured values
|
||||
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel}
|
||||
|
||||
# Re-home and get position again for comparison:
|
||||
G28
|
||||
# Go to XY home positions (in case your homing override leaves it elsewhere)
|
||||
G90
|
||||
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
|
||||
G4 P1000
|
||||
GET_POSITION
|
||||
|
||||
# Restore previous gcode state (absolute/relative, etc)
|
||||
RESTORE_GCODE_STATE NAME=TEST_SPEED
|
||||
100
printer.cfg
100
printer.cfg
@@ -1,23 +1,20 @@
|
||||
# This file contains pin mappings for the stock Sovol SV06
|
||||
# To use this config, during "make menuconfig" select the
|
||||
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9) communication.
|
||||
# Also, since it is using the GD32F103, please select Disable SWD at startup
|
||||
|
||||
# Flash this firmware by copying "out/klipper.bin" to a SD card and
|
||||
# turning on the printer with the card inserted. The firmware
|
||||
# filename must end in ".bin" and must not match the last filename
|
||||
# that was flashed.
|
||||
|
||||
# See docs/Config_Reference.md for a description of parameters.
|
||||
# This file contains pin mappings for the stock Sovol SV06.
|
||||
#
|
||||
# Using the wrong firmware, or wrong configuration, has the potential to destroy
|
||||
# your 3D printer.
|
||||
#
|
||||
# USE AT YOUR OWN RISK! YOU HAVE BEEN WARNED!
|
||||
#
|
||||
# See https://www.klipper3d.org/Config_Reference.html for configuration reference.
|
||||
|
||||
[include ./macros/macros.cfg]
|
||||
[include ./macros/TEST_SPEED.cfg]
|
||||
[include ./macros/PARKING.cfg]
|
||||
[include ./macros/MECHANICAL_GANTRY_CALIBRATION.cfg]
|
||||
[include ./macros/beeper.cfg]
|
||||
# Uncomment the ONE of the following lines if you're using an adxl345
|
||||
# [include ./marcros/adxl-rp2040.cfg]
|
||||
# [include ./macros/adxl-direct.cfg]
|
||||
[include ./macros/beeper.cfg] # NOTE Comment out this line if you want to silenct your printer.
|
||||
|
||||
# NOTE Uncomment ONE of the following lines if you're using an adxl345.
|
||||
# [include ./marcros/adxl-rp2040.cfg] # ADXL345 connection via RPi Pico.
|
||||
# [include ./macros/adxl-direct.cfg] # ADXL345 directly connected to the host RPi.
|
||||
|
||||
[mcu]
|
||||
# Obtain definition by "ls -l /dev/serial/by-id/"
|
||||
@@ -26,15 +23,10 @@ restart_method: command
|
||||
|
||||
[printer]
|
||||
kinematics: cartesian
|
||||
max_velocity: 300
|
||||
max_accel: 3000
|
||||
max_accel_to_decel: 1500
|
||||
max_z_velocity: 15
|
||||
max_z_accel: 45
|
||||
# square_corner_velocity: 6.0
|
||||
|
||||
[force_move]
|
||||
enable_force_move: True
|
||||
max_velocity: 200 # NOTE On my printer, I have this set to 300.
|
||||
max_accel: 2000 # NOTE On my printer, I have this set to 3000.
|
||||
max_z_velocity: 10 # NOTE On my printer, I have this set to 15.
|
||||
max_z_accel: 30 # NOTE On my printer, I have this set to 45.
|
||||
|
||||
[stepper_x]
|
||||
step_pin: PC2
|
||||
@@ -143,14 +135,14 @@ pin: PA0
|
||||
pin: PB1
|
||||
x_offset: 27
|
||||
y_offset: -20
|
||||
# z_offset: 0
|
||||
z_offset: 0
|
||||
samples: 5
|
||||
samples_result: median
|
||||
samples_tolerance: 0.01
|
||||
samples_tolerance_retries: 5
|
||||
|
||||
[safe_z_home]
|
||||
home_xy_position: 0, 223 # NOTE 111.50,111.50
|
||||
home_xy_position: 111.50,111.50
|
||||
speed: 100.0
|
||||
z_hop: 10
|
||||
z_hop_speed: 15
|
||||
@@ -158,13 +150,12 @@ z_hop_speed: 15
|
||||
[bed_mesh]
|
||||
speed: 150
|
||||
mesh_min: 27, 5
|
||||
mesh_max: 222, 203 # 196, 203
|
||||
mesh_max: 222, 203
|
||||
probe_count: 5,5
|
||||
algorithm: bicubic
|
||||
fade_start: 1
|
||||
fade_end: 10
|
||||
# NOTE fade_target: 0
|
||||
relative_reference_index: 20 # NOTE
|
||||
fade_target: 0
|
||||
|
||||
[virtual_sdcard]
|
||||
path: /home/pi/printer_data/gcodes
|
||||
@@ -177,13 +168,7 @@ sid_pin: PB15
|
||||
encoder_pins: ^PB14, ^PB10
|
||||
click_pin: ^!PB2
|
||||
|
||||
[input_shaper]
|
||||
shaper_freq_x = 56.0
|
||||
shaper_type_x: mzv
|
||||
shaper_freq_y = 59.0
|
||||
shaper_type_y: 3hump_ei
|
||||
|
||||
# // NOTE this is the pin for the filament switch, if you have one
|
||||
# NOTE this is the pin for the filament switch. Uncomment next 2 lines if you're using one.
|
||||
# [filament_switch_sensor fil_sensor]
|
||||
# switch_pin: PA4
|
||||
|
||||
@@ -205,44 +190,3 @@ shaper_type_y: 3hump_ei
|
||||
#*# pid_kp = 71.224
|
||||
#*# pid_ki = 1.341
|
||||
#*# pid_kd = 945.503
|
||||
#*#
|
||||
#*# [probe]
|
||||
#*# z_offset = 1.550
|
||||
#*#
|
||||
#*# [bed_mesh default]
|
||||
#*# version = 1
|
||||
#*# points =
|
||||
#*# 0.227500, 0.317500, 0.359375, 0.323125, 0.245000
|
||||
#*# 0.207500, 0.327500, 0.398125, 0.376875, 0.298125
|
||||
#*# 0.170625, 0.326250, 0.414375, 0.420625, 0.367500
|
||||
#*# 0.093750, 0.266250, 0.387500, 0.415000, 0.390625
|
||||
#*# 0.000000, 0.213750, 0.365000, 0.426875, 0.421250
|
||||
#*# x_count = 5
|
||||
#*# y_count = 5
|
||||
#*# mesh_x_pps = 2
|
||||
#*# mesh_y_pps = 2
|
||||
#*# algo = bicubic
|
||||
#*# tension = 0.2
|
||||
#*# min_x = 27.0
|
||||
#*# max_x = 222.0
|
||||
#*# min_y = 5.0
|
||||
#*# max_y = 203.0
|
||||
#*#
|
||||
#*# [bed_mesh default1]
|
||||
#*# version = 1
|
||||
#*# points =
|
||||
#*# -0.290000, -0.178125, -0.134375, -0.185625, -0.292500
|
||||
#*# -0.275000, -0.152500, -0.086250, -0.121250, -0.213125
|
||||
#*# -0.301250, -0.151875, -0.066250, -0.077500, -0.137500
|
||||
#*# -0.393750, -0.231875, -0.118125, -0.110000, -0.125625
|
||||
#*# -0.500000, -0.297500, -0.160625, -0.113125, -0.076875
|
||||
#*# x_count = 5
|
||||
#*# y_count = 5
|
||||
#*# mesh_x_pps = 2
|
||||
#*# mesh_y_pps = 2
|
||||
#*# algo = bicubic
|
||||
#*# tension = 0.2
|
||||
#*# min_x = 27.0
|
||||
#*# max_x = 222.0
|
||||
#*# min_y = 5.0
|
||||
#*# max_y = 203.0
|
||||
|
||||
Reference in New Issue
Block a user