Skip to content
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

Configure extruder fan speed in menu #26839

Open
wants to merge 1 commit into
base: bugfix-2.1.x
Choose a base branch
from

Conversation

vovodroid
Copy link
Contributor

@vovodroid vovodroid commented Mar 3, 2024

This PR is draft.

Recently I replaced extruder fan, and new one is much stronger (and noisy) than old one. But it's impossible to change EXTRUDER_AUTO_FAN_SPEED speed without recompiling. and to find comfort noise level several iteration could be needed, as well to adjust per filament or ambient temperature.

So I tried to add it to menu (currently Controller fans).

But with my current changes it's possible to go only down - speed could be reduced each time (i.e. it could be set consequently 90, 80, 70, etc), but it can't be increased back.

Any help appreciated. Thanks.

@vovodroid vovodroid changed the title Configure extruder fan speed Draft: configure extruder fan speed Mar 3, 2024
@thisiskeithb thisiskeithb marked this pull request as draft March 3, 2024 19:23
@wlkmanist
Copy link

There is also may be useful for you: classicrocker883/MRiscoCProUI#125
You can see what parts of the code may be affected when working with fans.

@vovodroid
Copy link
Contributor Author

As I see this PR doesn't adjust extruder fan speed.

@vovodroid vovodroid force-pushed the extruder_fan_cfg_pr branch from d4e104c to 399759a Compare May 10, 2024 19:36
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 37d77d6 to aa44542 Compare September 28, 2024 01:10
@vovodroid
Copy link
Contributor Author

For what it's worth, but in latest Marlin (Bump distribution date (2024-09-25)) it's possible to increase fan speed, besides value 100%, which has no effect. But increasing to 99% works.

@vovodroid vovodroid force-pushed the extruder_fan_cfg_pr branch from 399759a to f43310f Compare October 9, 2024 16:06
@vovodroid
Copy link
Contributor Author

Ok, there is code setting PWM speed:

    #define _UPDATE_AUTO_FAN(P,D,A) do{                   \
      if (PWM_PIN(P##_AUTO_FAN_PIN) && A < 255)           \
        hal.set_pwm_duty(pin_t(P##_AUTO_FAN_PIN), D ? A : 0); \
      else                                                \
        WRITE(P##_AUTO_FAN_PIN, D);                       \
    }while(0)
........
_UPDATE_AUTO_FAN(E##N, fan_on, _AUTOFAN_SPEED());

so when A==255 it calls WRITE(P##_AUTO_FAN_PIN, D); where D is fan_on and resolves to const bool fan_on = TEST(fanState, realFan);

I didn't debug it yet, but I guess that fan_on is evaluated to false. Any ideas?

@vovodroid vovodroid force-pushed the extruder_fan_cfg_pr branch 2 times, most recently from db57177 to 66814d5 Compare December 5, 2024 13:46
@vovodroid vovodroid force-pushed the extruder_fan_cfg_pr branch from 66814d5 to 608b5d1 Compare December 5, 2024 13:48
@vovodroid vovodroid changed the title Draft: configure extruder fan speed Configure extruder fan speed in menu Dec 7, 2024
@vovodroid vovodroid marked this pull request as ready for review December 7, 2024 07:45
@vovodroid
Copy link
Contributor Author

Fixed 100% speed, message moved to language file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Needs: Work More work is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants