Skip to content

Linear Advance (LA)

Compare
Choose a tag to compare
@mriscoc mriscoc released this 17 Aug 07:18
· 95 commits to main since this release

Warning

This is a placeholder. Do not download the zipped source code from here, if you want to build your own firmware, download the zip file from the main page of the repository and use the Configurator to create proper configuration files.

This special feature is experimental for the stepper's drivers in standalone mode (Creality 4.2.2, 4.2.7, F1, F4) and is here for your test. It is possible to enable it by editing the configuration file, of course, Linear Advance can be used normally in boards where it used to work. The precompiled binaries for LA have Classic Jerk and S-Curve Acceleration disabled and Junction Deviation enabled.

Background

There was an old problem with the configurations of the drivers that Creality uses on its boards. LA was incompatible with drivers in standalone mode.

 #define E0_DRIVER_TYPE TMC2208_STANDALONE  // Ender Configs 

Some months ago, that was resolved by this: MarlinFirmware/Marlin#24533

Marlin Linear Advance Documentation

Under default conditions, extruder axis movement is treated in the same way as the XYZ linear axes. The extruder motor moves in linear proportion to all the other motors, maintaining exactly the same acceleration profile and start/stop points. But an extruder is not a linear system, so this approach leads, most obviously, to extra material being extruded at the end of each linear movement.

Take the common test-cube as an example. Even with the best tuning the corners are usually not sharp, but bleed out. The top solid infill displays roughness where the print direction changes on perimeters. These problems are minor or even imperceptible at low printing speeds, but they become more noticeable and problematic as print speeds increase.

Tuning the flow can help, but this may lead to under-extrusion when starting new lines. Some slicers include an option to end extrusion early in each move, but this adds more complexity to the G-code and has to be retuned for different temperatures and materials.

Since the root cause is pressure, LIN_ADVANCE de-couples extrusion from the other axes to produce the correct pressure inside the nozzle, adapting to the printing speed. Once Linear Advance is properly tuned, bleeding edges and rough solid infill should be nearly eliminated.

LA Test
From Prusa site. Calibration G-code printed with PLA at 215 °C. Most consistent line achieved with K-value 0.05 (green square).

Advantages

  • Better dimensional precision due to reduced bleeding edges.
  • Higher printing speeds are possible without any loss of print quality - as long as your extruder can handle the needed speed changes.
  • Visible and tangible print quality is increased even at lower printing speeds.
  • No need for high acceleration and jerk values to get sharp edges.

Important

  • Some slicers have options to control the nozzle pressure. Common names are: Pressure advance, Coast at end, extra restart length after retract. Disable these options as they will interfere with Linear Advance.
  • Also disable options like wipe while retract or combing. There should be almost no ooze, once the proper K-Factor is found.
  • Recheck retraction distance, once Linear Advance is calibrated and working well. It may even be as low as 0, since pressure control reduces the material pressure at the end of a line to nearly zero.
  • Don't forget to do the Calibration

Evaluating the Calibration Pattern

The transition between Slow Printing Speed phases and Fast Printing Speed phases are the points of interest to determine the best matching K-Factor. Following illustration shows a magnified view of a line where the K-Factor is too low:

LA

Donations

Thank you for your support, I receive donations through Patreon and Paypal

It will use the following additional configuration:

{
"Configuration.h" : [
  {
    "op": "Disable",
    "searchfor": "CLASSIC_JERK"
  },
  {
    "op": "Disable",
    "searchfor": "S_CURVE_ACCELERATION"
  },
  {
    "op": "CustomVal",
    "searchfor": "JUNCTION_DEVIATION_MM",
    "value": "0.1"
  }  
],
"Configuration_adv.h" : [
  {
    "op": "Enable",
    "searchfor": "LIN_ADVANCE"
  },
  {
    "op": "CustomVal",
    "searchfor": "LIN_ADVANCE_K",
    "value": "0.0"
  }   
],
"Version.h" : [
]   
}

To compile firmware with Linear Advance, enable LA in the features column of the Professional Firmware Configurator to generate the proper configuration files.