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

Enable correction for non-linear extrusion (just GUI) #4538

Closed Rickthebig closed 2 months ago

Rickthebig commented 5 months ago

Is there an existing issue for this feature request?

Is your feature request related to a problem?

When a wide range of speeds is used in the same print, the higher speeds are prone to underextrusion because at those higher speeds the flow rate is not linear.

This feature request tackles under-/overextrusion in regions of a part that is printed using a wide range of speeds (which happens when the part has long straight walls but also small details, overhanging walls etc.). If the flow rate is calibrated for the fast tracks, slower paths will be overrextruded. If the flow rate is calibrated for the slow paths, the fast paths will be underextruded.

For example, at 100 mm/s the flow rate is not twice as large as at 50 mm/s. This happens even when the speed does not hit the volumetric extrusion limit and is due to subtle slippage of the extruder gears due to a higher back pressure at higher speeds. In other words, at higher and higher speeds the resistance against filament advance grows exponentially.

Near the volumetric extrusion limit of the nozzle, the additional factor of insufficient melting capacity of the heat block comes into play, which is in nature a different cause, but shows the same effect of gradually reducing the flow rate.

Which printers will be beneficial to this feature?

All

Describe the solution you'd like

This is a well known phenomenom and there is a G command to correct speed dependent flow variation, also called non-linear extrusion: M592. Example for Marlin: M592 [A] [B] [C] Entering this command is very simple, but Orca lacks an interface to do it. This command needs an interface, because it defines several values as coefficients in a polynomial equation which describes the speed/flow dependency and these values must be determined prior to be used. Entering values blindly would definitely lead to severe extrusion problems.

Describe alternatives you've considered

  1. Add a non-linear extrusion test to the calibration menu. This involves commanding the extrusion of the same amount of material at different volumetric speeds (the nozzle needs not to be moved during each extrusion act) and weighing the extruded quantity (which will be different). Doing this 6 times for example yields 6 speed/extrusion coordinates that can be used to calculate the coefficients for the M592 command. image See how such a test would take place: https://forum.prusa3d.com/forum/original-prusa-i3-mk3s-mk3-general-discussion-announcements-and-releases/automated-method-from-cnc-kitchen-to-evalute-the-maximum-volumetric-speed/
  2. Create an interface or additional input fields for the corresponding values speed/weight. Orca would calculate the polynomial coefficients to be used in the M592 command based on the equation ax + bx2 - c
  3. Visualize the resulting non-linear extrusion based on the calculated coefficients. For example, if the values are a=0.0058 b=0.0038 c=0.0016 following graphic illustrates the result: image As a consequence, the degree of compensation due to high speed related underextrusion can be immediately asserted.

Additional context

The change expected is to issue an additional line to the gcode file containing the M592 command, for example (Reprap version): M592 D0 A0.0058 B0.0038 Just that simple (the actual flow correction is done by the firmware). Orca needs a suitable interface though. Implementing the calibration test is just an option, but a very desirable one. Let the user input the coefficients that he determined by any other means, if there is no built-in calibration procedure.

Please note: Non-linear extrusion is not a replacement for Pressure Advance. Pressure Advance deals with changing pressure. Non-Linear extrusion is related to a static dependency, and whatever the depencency of extrusion rate on speed is, pressure advance does not care about that.

The values entered in the interface should be valid for a given extrusion temperature. Changing the extrusion temperature in the filament profile should either invalidate/deactivate the values or allow to adapt them somehow (higher extrusion temperature means lower resistance to flow, therefore the non-linearity flattens a bit and the correction should be smaller). Take a look at following case: image As you can see, changing the extrusion temperature of PETG from 220 to 210 will decrease flow rate by 15%, that is a lot! Furthermore, if the non-linear extrusion is not corrected properly, even at a constant temperature of 210 degrees C, relative flow rate will drop dramatically by almost 20% if the commanded volumetric speed is changed from 6 to 8 mm3/s.

EDIT: If Orca developers were really ambitious: It is even possible to implement a temperature independent non-linear flow compensation by introducing a correction to the polynom (i.e., a correction of the correction) in form of a "fudge" factor. The "fudge" factor would just shift the polynom to fit the behaviour shown above and could be determined by doing a similar flow rate calibration at different temperatures (but less coordinates needed). There is nothing scientific about this but this is rather an empirical solution that would allow to apply the result of the non-linear flow test to different temperatures, assuming that Orca would automatically adapt the "fudge" factor accordingly (since the extrusion temperature is known to Orca).

This is just a suggestion that would make the Orca slicer really unique. No slicer is known to me which would implement such a feature, diverting unpretentious users to use the same constant extrusion speed for the whole print piece (a well known wisdom), which then would be quite low.

I have non-linear compensation enabled via M592 in my Bowden 60 cm setup, a DIY BLV Cube (RRF) after doing my own extrusion tests: geared BMG clone noname steppers E3D V6 with a compatible CHT nozzle (clone)

Just as an example of the effect of this setting, I did the built-in MaxFlow calibration test.

Result: The MaxFlow test runs up to 20 mm3/s without any signs of deterioration, and then the stepper starts to skip. This is in contrast with the usually expected behaviour, where due to the uncompensated decreasing frow rate, the wall gets thinner and thinner, until it is noticeable deteriorated. So effectively, this non-linear compensation pushes the max extrusion limit and improves quality at high speeds. A prove of the usefullness of this feature cannot be clearer and more manifest.

For the calibration test (which is ready ie does not be to be developed), see: https://www.cnckitchen.com/blog/extrusion-system-benchmark-tool-for-fast-prints For the explanation about non-linear extrusion: https://marlinfw.org/docs/gcode/M592.html See also: https://klipper.discourse.group/t/extrusion-correct-at-various-flowrates/1104

vgdh commented 5 months ago

That's a great idea, worth to implement. 👍 Though for klipper users it may requires to implement calculation of extrusion correction at the slicer side.

github-actions[bot] commented 2 months ago

Orca bot: this issue is stale because it has been open for 90 days with no activity.

github-actions[bot] commented 2 months ago

Orca bot: This issue was closed because it has been inactive for 7 days since being marked as stale.