-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smooth Linear Advance with extruder synchronisation #27710
Open
dbuezas
wants to merge
19
commits into
MarlinFirmware:bugfix-2.1.x
Choose a base branch
from
dbuezas:dbuezas/smooth-linear-advance
base: bugfix-2.1.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Smooth Linear Advance with extruder synchronisation #27710
dbuezas
wants to merge
19
commits into
MarlinFirmware:bugfix-2.1.x
from
dbuezas:dbuezas/smooth-linear-advance
+424
−65
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit 29720dc)
(cherry picked from commit 28300f8)
jonocen
approved these changes
Feb 24, 2025
First thought: what about a name change at this point? "Linear advance" isn't as good name as "pressure advance" and everyone knows "smooth pressure advance" from Klipper, so just the name would communicate a lot if we changed "linear" to "pressure". @thinkyhead |
tombrazier
reviewed
Feb 25, 2025
tombrazier
reviewed
Feb 25, 2025
tombrazier
reviewed
Feb 25, 2025
tombrazier
reviewed
Feb 25, 2025
tombrazier
reviewed
Feb 26, 2025
tombrazier
reviewed
Feb 26, 2025
tombrazier
reviewed
Feb 26, 2025
tombrazier
reviewed
Feb 26, 2025
tombrazier
reviewed
Feb 26, 2025
tombrazier
reviewed
Feb 26, 2025
tombrazier
reviewed
Feb 26, 2025
(cherry picked from commit 3722520)
(cherry picked from commit 17ec816)
(cherry picked from commit 3b5a4a6baffa31e1f92d7ed93b7911bc8a15f1e4)
narno2202
reviewed
Feb 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Introduces a new smooth linear advance method that decouples extrusion from motion constraints, improving print speed and quality without acceleration limits. (comparable to Klipper's approach).
pressure_advance_smooth_time
and can be configured in the LCD or via GCODE. The lower the better, as long as the extruder stepper doesn't skip steps.Enabling SMOOTH_LIN_ADV results in faster and higher quality prints in 32 bit MCUs
The new ISR allows for a second second feature,
INPUT_SHAPING_E_SYNCH
, which synchronises the extruder with the input shaped x and y axes. This results in very accurate extrusion during acceleration phases. Synchronizing E to input shaping improves seams and top surfaces significantly, even at high accelerations (e.g nice seams and top surfaces at 15k mm/s^2).Requirements
32 bit MCU
Benefits
Enables higher acceleration without extrusion artifacts
Configurations
Related Issues
This is a further evolution of- and closes #27352. Now with more solid mathematical foundations and improved precision.
Misc
I have a fast 32 bit MCU with FPU so I made liberal use of floats. Further optimisations (e.g. fixed-point arithmetic, planner pre-computations) are possible. However, given the significant speed and quality improvements, I propose addressing those in a follow-up PR after merging this foundational implementation. I'm getting the speed and quality of a Voron or bambulab in my Ultimaker 2 with a direct drive extruder.
@tombrazier mentioned that, at least in theory, extrusion synchronisation could be done at step level. If implemented, it would replace my version of INPUT_SHAPING_E_SYNCH.
Validation of this approach
Analysed stepper control signals with a logic analyzer and performed extensive testing (>1kg of prints)
Thanks @oliof and @tombrazier for the early feedback and discussions in discord.