Linear Advance Information for Marlin Based Firmware
What is Linear Advance?
Linear Advance is a feature in Marlin firmware that allows for the decoupling of the extruder motor movement from the other axis. This can let you get more accurate printing, especially on printers with Bowden tubes, because it works around the “lag” time between the filament pressure in the nozzle and the command to actually extrude or retract that filament. If you want to read up more on Linear Advance see the Marlin documentation links below:
This feature is an advanced feature and not recommended for inexperienced users or for users that do not want to take the hours it will take to understand/setup Linear Advance properly.
This information is provided as-is and TH3D included support does not cover help tuning your machine for use with this feature. This feature is provided in our firmware releases based on community requests. The presence of this feature in our firmware does not mean that using it is covered under our technical support terms for any products.
All the latest TH3D Unified Firmware versions are built on Marlin and have Linear Advance settings available in their configuration files.
In order to set up Linear Advance, you will need to run multiple test prints on your machine to determine what your “K” value is for your particular machine. This value will NOT be the same as other people’s machines and can even vary on printers with the same exact hardware on them.
Before you start going through dialing in the K value you will need to enable the Linear Advance feature in the firmware for your machine. On machines with limited memory (ones that use the 1284p chips) you may lose other features due to memory and space limitations on that board.
- If you are using the TH3D firmware there is a section dedicated for Linear Advance in the Community Features section, enable it in there, and update your firmware.
- If you are using our EZBoard with the EZFirmware site wizard it is located in the “Misc” options, enable it, and update the firmware.
- If you are using Marlin, refer to the Marlin documentation for enabling Linear Advance on your firmware.
Remember to reset your EEPROM after updating your printer firmware.
Trinamic (TMC) Driver Notes: On any board running TMC drivers it is highly recommended to set the E driver mode to SpreadCycle and NOT StealthChop. Linear Advance uses very quick and hard moves on the E motor which can lead to lost steps when using StealthChop. Disable StealthChop for your E driver if you have a board with TMC drivers on it (EZBoard, SKR, etc). Per Trinamics’ own datasheets you should not be using StealthChop on an E motor at all due to the low torque output for that mode. The EZBoard works with Linear Advance in either mode but it is still recommended to use SpreadCycle so you have proper torque for the E motor.
Machine/Board Compatibility Notes: Printers that have Trinamic (aka TMC) drivers that have no firmware control to set the driver chip into SpreadCycle and/or have poor thermal heatsinking will not be able to use Linear Advance. Examples are the CR-10S Pro/Max, CR-10S V2/V3, and all of the Creality “Silent” boards that have TMC drivers on them. These printers and/or boards will not work with Linear Advance due to the limitations of these printers/boards.
Tuning and Setting up Linear Advance Information
Instead of a lengthy write-up that is hard to explain please see the TeachingTech video on setting up Linear Advance.
The Marlin Firmware website has a tool to general the K Factor test patterns and you can access that here: https://marlinfw.org/tools/lin_advance/k-factor.html
Once you have your K Factor you can enter that into your firmware or simply put it into your starting Gcode (M900 Kx.xx – x.xx being your K factor value).
We recommend leaving the K value at 0 in your firmware and set the K value in your slicer starting Gcode instead. Setting the K value in the firmware will cause it to turn back to that value (and enable it) if you reset the EEPROM.
Disabling Linear Advance
If you later decide that you want to not use Linear Advance or you are having issues with it there are multiple ways to disable it.
- Disable it in your firmware and then update the firmware on the printer.
- This is the recommended way to disable it as it ensures that it is 100% disabled and will never come on accidentally again.
- Set the K value to 0 by sending M900 K0 followed by M500.
- If you put it in your slicer also modify your starting code to show M900 K0 as well
- If you disable it with the M900 K0 command and you use older code with a K value other than 0 it will re-enable it for that print until you send M900 K0 again.
Technical Support Disclaimer: This information is provided as-is and TH3D included support does not cover help tuning your machine for use with this feature. This feature is provided in our firmware releases based on community requests. The presence of this feature in our firmware does not mean that using it is covered under our technical support terms for any products.