M106 Maximum Fan Speed Setting - unproportional
-
@dc42 said in M106 Maximum Fan Speed Setting - unproportional:
have specified L0.25 H0.7, and now you send S0.3
i agree with @dragonn scaling should be up to the range, not to the maximum. in such a case everything works.
@dc42 said in M106 Maximum Fan Speed Setting - unproportional:
always scaling the requested PWM...
in discussion i see 3 trends \ use cases
(1) handling hardware limitations of the fan (i.e. low end controls minimum speed and high end sets limit for over-powered fan or noise level
(2) linking fan speed with printing speed that for me is logical
(3) linking fan speed with extrusion volumewe can start with (1) and than see if it is sufficient. if not, decide other add-on depending on complexity. somehow (2) and (3) are linked: faster printing means more extrusion volume.
lets start with (1)
-
@dc42 said in M106 Maximum Fan Speed Setting - unproportional:
The question to address is: what is the M106 PWM limit for? Is it:
Since I have introduced this feature originally I think I need to answer what my intentions were: I wanted a measure to make GCode more material-independent. At that time I was planning (and since realized) to move heater control out of the slicer and into filament configuration on the Duet. What is still left in the slicer is fan control. For PLA it is set to e.g. 100% fan speed and for PETG to 30%.
With the max PWM I intended to have the slicer simply set to 100% fan speed for all materials and configure a lower maximum in firmware if that is too much for the loaded filament.
Originally I did not think of using variable fan speed and all the tricks that slicers now have up their sleeves (like intensively increasing fan speed for bridges, etc.) so I also did not think of scaling.
As an outcome of this thread I do actually like the idea of scaling. The defaults for min and max are 10% and 100% respectively so the average user won't see any real difference if scaling is enabled. Only if one is already actively modifying min and/or max this can have tremendous effects. So it is kind of a hard decision based on not-breaking-anything.
-
Based on this discussion, I've decided to implement scaling so that the X parameter represents full speed. This will be in the next 2.03 beta release.
-
@dc42 OK. Then just reject my PR. Or should I close it myself?
-
@dc42 said in M106 Maximum Fan Speed Setting - unproportional:
Based on this discussion, I've decided to implement scaling so that the X parameter represents full speed. This will be in the next 2.03 beta release.
does it mean that L parameter will be "almost 0%" ? and 1...100% will fit in between L and X ?
in other words, X and L determine hardware limits and DWC controlled range will completely fit in between?in practical terms setting 50% speed in DWC will mean (X-L)/2 of real speed?
-
@c310 said in M106 Maximum Fan Speed Setting - unproportional:
in practical terms setting 50% speed in DWC will mean (X-L)/2 of real speed?
I think the real PWM value will be rather
L + (X - L) * S
whereS
is the commanded speed in percent. But only forS > 0
.S=0
will still mean off.
But that is only how I implemented it in my PR. Not sure how @dc42 will handle it. -
The L values doesn't mean you get zero airflow at that value, it it the minimum PWM value at which the fan will continue turning once started. So I implemented the PWM value as max(L, X * S) when S is nonzero.
-
@dc42 said in M106 Maximum Fan Speed Setting - unproportional:
So I implemented the PWM value as max(L, X * S) when S is nonzero.
Which makes a lot more sense than what I had.
-
@wilriker said in M106 Maximum Fan Speed Setting - unproportional:
Which makes a lot more sense than what I had.
why? lets say
(1) i limit fan with L50 (does not work with lower figures) and X200 (will blow model off the table )
(2) pull fan control to 50% in DWCproposed formula max(50, 200*50%) will give 100 , but on the real physical scale it should be 75 (all scale is 150, so middle will be 75)
in other words, this formula caps the top values and eats lower end until it grows over L ? -
@c310 said in M106 Maximum Fan Speed Setting - unproportional:
@wilriker said in M106 Maximum Fan Speed Setting - unproportional:
Which makes a lot more sense than what I had.
why?
Mainly because I was confused at the time of writing.
I think both approaches have their places. Mine was actually scaling fully in betweenL
andX
whereas David's approach scales byX
and ensures a physical limit. Thinking about it I do again like my approach better but I can live with how it is implemented now as well.