Marlin icon indicating copy to clipboard operation
Marlin copied to clipboard

Fan override and multiplier

Open dbuezas opened this issue 1 year ago • 10 comments

Description

I recently installed cpap style remote cooling, and found I often wished to reduce or force the fan speed mid print, independent of what gcode calls to M106 are done.

This PR adds:

  • Fan Lock: inhibits setting the fan speed via gcode. Useful to override the slicer fan settings, particularly when using different speeds for overhangs, layer times, bridges, etc.
  • Fan Multiplier: responds to gcode but multiplies by a factor (0 to 10) before applying. I find this very useful when trying new materials that require a lot more/less fan than my default preset, particularly tweaking it mid print.

~~Obviously the PR is still missing configuration.h options, but I'd like to get early feedback or save myself the hassle if the feature is not considered good to merge (I use it and find it useful myself)~~

Requirements

Part cooling fan.

Benefits

Avoid having to re-slice and restart a print when I find the current settings are not good mid-print.

Configurations

Related Issues

dbuezas avatar Jun 21 '24 19:06 dbuezas

This potentially adds another layer of complexity / possible points of confusion for users (bug reports and/or support requests) when a fan is "locked" since they won't know why standard fan commands aren't working.

thisiskeithb avatar Jun 21 '24 20:06 thisiskeithb

~~Absolutely, this would definitely be behind a configuration_adv.h flag.~~ done

dbuezas avatar Jun 21 '24 20:06 dbuezas

Do you consider these features worthy?

If so I'll add configuration flags and maybe avoid the float operation in the multiplayer for slower boards.

dbuezas avatar Jun 23 '24 09:06 dbuezas

~~Maybe setting them via gcode is a bad idea, i now use it exclusively from the UI (i only added them for completeness)~~ behind a configuration_adv.h flag

dbuezas avatar Jun 24 '24 10:06 dbuezas

This potentially adds another layer of complexity / possible points of confusion for users (bug reports and/or support requests) when a fan is "locked" since they won't know why standard fan commands aren't working.

They now have to first enable the option in configuration_adv.h and then explicitly lock it from either UI or gcode. It is not persisted to eeprom either so I don't think this would be a problem anymore.

dbuezas avatar Jul 06 '24 08:07 dbuezas

Hi. I created a similar functionality. Perhaps joint work is possible. #27280 Mine :

  • Use of percentage (simpler/intuitive)
  • Use of two thresholds to target “normal fan speed” in the case of 3D printing for example
  • Don't immediately update the current fan speed and wait for an M106, in "sleep temperature mode" the values ​​are stored and I didn't want to check if something was going to break somewhere.
  • Do not block the M106. Because only one M106 applies full power, rejecting an M106 without an 'S' is equal to disabling a marlin feature
  • Can also lock/unlock, applying a value of +-100%

I don't know if other uses of robotics (laser, cnc, or other), prefer percentage or decimal. That's why I will be really happy to have these two possibilities. For my personal case, I wrote this just because sometimes I slice without checking and the printing cannot be stopped just for fan speed. If you have the time to mix it all together and create one awesome feature I'm definitely all for having two in one. I don't have time and my job will never be more than that

Very good work Sincerely

Note: I made this thing without knowing that you had already done the same , I only found out afterwards, too bad because I would have adopted it (with a few modifications, of course :-))

studiodyne avatar Jul 17 '24 22:07 studiodyne

Let's find the minimum options that get the job done :)

  • I definitely use the multiplier often (both to increase and reduce power).
  • I seldom use the fan lock, mostly for tests. Maybe this could be replaced with your offsets?

dbuezas avatar Jul 18 '24 06:07 dbuezas

By the way, I didn't use percentage for the multiplier because the existing types use uint8_t so the max possible would be 255%. And they're most likely limited to 100% anyway

dbuezas avatar Jul 18 '24 13:07 dbuezas

The project is for you, I don't have time. You have two blocks of 'work', you can feel free to make what seems the best for you and all. I'm impatient to have this in my cfg advance ! 😃. If you need french translation, I can help ! 🇫🇷 Cordially

studiodyne avatar Jul 18 '24 18:07 studiodyne

This PR is ready for review then

dbuezas avatar Jul 18 '24 19:07 dbuezas