-
-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Add spindle acceleration #27759
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
Add spindle acceleration #27759
Conversation
80aa324
to
e2b3412
Compare
e2b3412
to
3391e9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your implementation. Unfortunately it does not work like that, the most problematic part is the while loop inside _set_ocr()
which blocks the whole firmware. Maybe something like the planner is needed to perform periodic update of the spindle speed.
4354891
to
efa1758
Compare
5c444b8
to
51af38a
Compare
740236e
to
6429897
Compare
be7d395
to
a6baca6
Compare
Thanks for the help with this one, guys. I will keep this in draft mode until it was tested on hardware. |
1ea905d
to
c8824f5
Compare
034ed5d
to
23eb1c8
Compare
Description
Instantaneous changes to the spindle PWM duty cycle during M3/M4 commands can cause voltage fluctuations and reconfiguration of stepper drivers. This PR adds the setting
DEFAULT_ACCELERATION_SPINDLE
. When this option is enabled together with SPINDLE_LASER_USE_PWM, the spindle is accelerated slowly.Changes that would allow setting spindle acceleration at runtime via
M201 T0
are not part of this PR because that would require merging of PR #27614Requirements
SPINDLE_FEATURE
,SPINDLE_LASER_USE_PWM
Benefits
linear spindle acceleration instead of instantaneous PWM duty cycle changes.
fixes #27727
Configurations
This PR contains a seperate commit that updates the config. Default behaviour remainsunchanged (instantaneous PWM change). For testing the new behaviour, enable and set
DEFAULT_ACCELERATION_SPINDLE
. Also enableSPINDLE_FEATURE
,SPINDLE_LASER_USE_PWM
Related Issues
#27727