SoftFever / OrcaSlicer

G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
https://discord.gg/P4VE9UY9gJ
GNU Affero General Public License v3.0
6.6k stars 773 forks source link

Calibration tool for Klipper Square Corner Velocity #4220

Open chrisheib opened 6 months ago

chrisheib commented 6 months ago

Is there an existing issue for this feature request?

Is your feature request related to a problem?

There is no tool and very little information online about tuning Klipper Square Corner Velocity and the results in printing quality.

Which printers will be beneficial to this feature?

Klipper

Describe the solution you'd like

Not really sure where I'm going with this issue, but I wrote a small klipper macro to allow me to tune Square Corner Velocity, the Klipper equivalent of Jerk, from Orca.

It prints a reference object and increases SCV by a certain amount each layer, like a lot of the other calibration towers.

This isn't really a final version, just some thoughts that I would love to be searchable online, therefor the ticket. Where would be most appropriate to post this?

Klipper Macro:

[gcode_macro SET_SQV]
gcode:
  {% set multiplier = params.MULTIPLIER|default(0.01)|float %}
  {% set layer = params.LAYER|default(1)|float %}
  {% set sqv = multiplier * layer %}
  {% if layer <= 1 %}
    {% set sqv = 2 %}
  {% endif %}
  RESPOND TYPE=echo MSG='{"set sqv: multi: %f, layer: %f, final sqv: %f" % (multiplier, layer, sqv) }'
  SET_DISPLAY_TEXT MSG='{"S%.1f M%.2f L%.0f " % (sqv, multiplier, layer) }'
  SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={ sqv }

Orca Layer Change GCODE:

SET_SQV MULTIPLIER=0.2 LAYER=[layer_num]

Use a small calibration geometry file like this.

Old model

Scale the model height according to the layer amount you want to test and set a reasonable multiplier in the layer change gcode.

I recommend to draw a seam on the flat face in the back to prevent Orca from putting it into a circle: image

Slice with 2 or 3 walls, no top and bottom layers, add mouse ear brims, and let it rip.

To find your best value, keep an eye on the print, your printer and the screen. The current SCV is shown as 'S7.5' for example. You can also use calipers like with most other calibration tower prints.

My findings:

The biggest gains in quality as well as speed are found in the low numbers, especially in circles around 2 to 5 mm radius, as those are rendered as many small lines with quite sharp angles. Because the extrusion is really staggered with many pauses in the curves at SCV of under 1 I could see a noticeable different, shiny material look, which faded at higher SCVs.

I don't think I see any difference in printer behavior or layer speed above 10, so I think I will set mine to 10 and call it a day. I found some posts online saying 'your printer will jump off of your table at values higher than 10', which disappointingly didn't happen in my experiment. For now I'm only driving my printer at 250 mm/s and 1500mm²/s until I get my accelerometer and can set up input shaping.

I guess CSV tuning should be done as a final step, after all other calibrations have been done, especially input shaping, extruder step calibration, flow ratio, and pressure advance.

image

image

image

I think setting a starting value in the macro could be nice, as well as printing the first layer with a safe CSV value like 3, because printing the mouse ears with 0 CSV is so darn painfully slow.

dstulken commented 6 months ago

I found some posts online saying 'your printer will jump off of your table at values higher than 10', which disappointingly didn't happen in my experiment.

It's not going to jump because your test print is a smooth part with infrequent sharp corners.

A shape with a wall resembling a triangle wave when viewed from above - effectively a rapid chain of alternating 90-degree corners - might be a better test. You would then be able to see the effects on the motion system, whether the extrusion deposits could keep up under rapid direction changes, etc. Bonus points if the amplitude of the triangle wave shape increases/decreases on alternating sides so that you can see the effects at differing entry/exit speeds.

chrisheib commented 6 months ago

@dstulken Gotcha, great input, thanks for the feedback.

Not sure if I have the patience right now to model something with varying amplitudes, but this should be a lot better already, right?

image

chrisheib commented 6 months ago

I like this one a lot more, but results have been the same. I'll try again with the diagonal edge being 90° to stress test x-y-transitions.

image

Next attempt: image

chrisheib commented 6 months ago

Still no perceivable difference in quality, even at 15 SCV. Layers get printed quite a bit faster, so i guess thats a win.

I'm not entirely sure what this tells me yet. I think it shows my printer has a lot more headroom to increase speeds, even without input shaping, which is... unexpected, it being a quite cheap Geetech A20M thats modded to smithereens. Even without properly tensioned belts and a noobishly wonky direct extruder setup.

I'll try scaling up the model to see if longer faces -> higher speeds lead to different results. EDIT: Cant get the model to stick currently, need to fix my BLTouch-Mount, so this is on hold for the moment. But the model scaled by 200% should be a bit more telling.

tkunchick commented 6 months ago

I think you need longer straight runs in the model to let the printer get to full speed before trying to slow for the turn.

SoftFever commented 4 months ago

Nice one! I like the first test model as it allows the printhead to reach max speed before the turn.

The biggest gains in quality as well as speed are found in the low numbers, especially in circles around 2 to 5 mm radius, as those are rendered as many small lines with quite sharp angles. Because the extrusion is really staggered with many pauses in the curves at SCV of under 1 I could see a noticeable different, shiny material look, which faded at higher SCVs.

This is consistent with my observation too. I have investigated cases where users report that curves are not smooth. The root cause is they accidentally set jerk to 1, which creates a lot of artifacts when printing curved surfaces.

I will do some test when I got time