How To use Linear Advance on Ender 3/5

Linear Advance on an Ender 3 is something that you don’t hear about too often. It’s been noted on quite a few websites, including marlin’s own wiki that the bowden setup may not benefit from a linear advance. I was looking into ways to print faster while still maintaining the print quality of my slower prints; and I come across the linear advance setups that some other guys have posted about with success.

Initially I decided to use Linear Advance by itself, and to enable this option you first need to make sure that you have calibrated your Extruder E-Steps properly, and that the rest of your printer is running in a satisfactory manner. Linear advance will not help issues that are already present, but it can help you speed up your printing and decrease stringing on a well tuned printer.

If you have TH3D Firmware

If you are using TH3D Firmware as suggested on other posts from Print3D.world then enabling the Linear Advance option is quite simple. Open the Arduino IDE in your Firmware Folders, and ensure you have the TH3D configuration open. Open the configuration tab, and either use the “Search/Find Function” or scroll to the bottom of the configuration until you have found ” #define LinearAdvance ” options. You will remove the // in front of the settings, and I recommend leaving the K value at 0.

 

If you have Marlin Bugfix Firmware

Open your Arduino IDE, and choose the Configuration tab. Use the “Search/Find” function and look for “Linear Advance”. You will see an option that looks like “//#define linearadvance” and you will remove the two “//” in front of it. Below this option you will see an area to set your K value/factor. Leave it at 0, we will set this up in the Start GCode later.

 

Upload the firmware

Once you have enabled the firmware, you will need to go through your regular routine of uploading it to the printer. I always make sure I run these two G codes after I upload new firmware to ensure the flash memory has been reset and updated as well. Use your octoprint, or pronterface console and send the following two G-codes from the command line.

M502

M500

Calibrating your Linear Advance K factor

Once you have enabled the linear advance option in your configuration, and uploaded the new firmware you will have to run the K factor calibration tool and find the value at which you will use to print. This tool is helpful, and you may need to run it when you swap material types (PLA to PETG, or ABS etc). Follow the link below, and use the settings that I have listed below for your Ender 3. Don’t forget to choose the Auto Bed Leveling option box if you have ABL, otherwise don’t.

http://marlinfw.org/tools/lin_advance/k-factor.html

Filament Diameter:Diameter of the used filament (mm)Nozzle Diameter:Diameter of the nozzle (mm)Nozzle Temperature:Nozzle Temperature (°C)Bed Temperature:Bed Temperature (°C)Retraction Distance:Retraction distance (mm)Layer Height:Layer Height (mm)Print Bed:Bed Shape:RectangularRoundRectangular or round bed. Round beds will activate Origin Bed CenterBed Size X:Size (mm) of the bed in XBed Size Y:Size (mm) of the bed in YOrigin Bed Center:Set the origin position (X0 Y0) to bed center instead of front-left cornerSpeed:Use mm/s:Use mm/s instead of mm/minSlow Printing Speed:Slow printing speedFast Printing Speed:Fast printing speed. This should differ noticeably from Slow SpeedMovement Speed:Movement speedRetract Speed:Retract Speed of the extruderAcceleration:Set printing acceleration (mm/s^2)Jerk X:Set the Jerk for the X-axis. -1 to use firmware defaultJerk Y:Set the Jerk for the Y-axis. -1 to use firmware defaultJerk Z:Set the Jerk for the Z-axis. -1 to use firmware defaultJerk E:Set the Jerk for the Extruder. -1 to use firmware defaultPattern:Lin Advance Version:1.01.5Select version 1.0 for Marlin 1.1.8 and earlier. Select 1.5 for Marlin 1.1.9 / 2.0 and upPattern Type:StandardAlternateSelect standard or alternate patternStarting Value for K:Starting value for the K-factor. Usually 0 but for bowden setups you might want to start higher, e.g. 30Ending Value for K:Ending value of the K-factor. Bowden setups may be higher than 100K-factor Stepping:Stepping of the K-factor in the test pattern. Needs to be an exact divisor of the K-factor Range (End – Start)Slow Speed Length:Length of the Slow Speed test-line (mm)Fast Speed Length:Length of the Fast Speed test-line (mm)Test Line Spacing:Distance between the test lines. This will impact print sizePrint Anchor Frame:Adds a frame around the start and end points of the test lines. May improve adhesionPrinting Direction:Left to Right (0°)45°Front to Back (90°)135°Right to Left (180°)225°Back to Front (270°)315°Rotates the print in 45° stepsLine Numbering:Prints the K-value besides every second test lineAdvanced:Nozzle Line Ratio:Ratio between extruded line width and nozzle diameter. Should be between 1.05 and 1.2Z-Offset:Offset the Z-axis for manual Layer adjustmentUse Bed Leveling:NoLevel bed (G29)Load UBL mesh 0Load UBL mesh 1Load UBL mesh 2Load UBL mesh 3Level bed or load a saved mesh (i.e. for UBL) before printing. Bed leveling has to be activated in Configuration.h! Loading a mesh requires UBL to be activated!Use FW RetractUse Firmware Retract. Needs to be activated in MarlinExtrusion Multiplier:Usually 1.0Prime Nozzle:Prime the nozzle before starting the test patternPrime Extrusion Multiplier:The default of 2.5 results in roughly 1mm of filament for 10mm line lengthPrime Printing Speed:Speed of the prime moveDwell Time:Inserts a pause of x seconds before starting the test pattern to bleed off any residual nozzle pressure

Determining your best K value

Once you have generated the K factor calibration test, and run the print you will see some of the lines may have printed well, and some may have done bad. The point of this test is to get the most consistent line over the slow and high speeds. You should look over your lines and determine which one is the most consistent. If there is a value that is very close, but could use some more tweaking: modify the linear advance calibration pattern again but change the options to start below the setting you think looked best, and end just after it with a 0.05 increment. (Example: Start @ 0.40 End @ 0.60 with a 0.05 increment). Choose the best K value for your printer and material, and make sure you make a note of it.

Changing your Start G-Code to use K Value

Now that you have your new K value, you will want to use it when you are starting a new print. You will add the following line to your Start G-Code in Cura, where 0.00 should be replaced with your new K value.

M900 K0.00

Increase the Print Speeds incrementally and start testing! It’s time to see if your new linear advance setup will print just as good at a faster rate, later we will talk about getting more speed by increasing firmware default accelerations and max feed rates. With our Ender 3 running on Linear Advance we have successfully printed up to 90mm/s with fairly simple prints. 60mm/s is a walk in the park now!