• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Thermostatic controlled fan coming on at 50%

Scheduled Pinned Locked Moved
General Discussion
7
37
2.3k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    gtj0
    last edited by 18 Mar 2020, 12:53

    The PWM frequency is pretty low for a 4-wire PWM fan. Try Q25000

    undefined 1 Reply Last reply 18 Mar 2020, 12:55 Reply Quote 1
    • undefined
      richardmckenna @gtj0
      last edited by 18 Mar 2020, 12:55

      @gtj0 yeah I read about higher frequencies, I did have it set to 5000 but there didn't seem to be any difference with 500.

      I did not go as high as 25000 though, so will give it a go 🙂

      1 Reply Last reply Reply Quote 0
      • undefined
        richardmckenna @Danal
        last edited by 18 Mar 2020, 17:56

        @Danal said in Thermostatic controlled fan coming on at 50%:

        L100

        Adding L1 seems to have done the trick L100 sets it to 39% 🙂

        And I've changed Q to 25000 for good measure.

        Thanks!

        1 Reply Last reply Reply Quote 0
        • undefined
          gtj0
          last edited by gtj0 18 Mar 2020, 18:42

          Yeah for most PWM settings, a number between 0 and 1 inclusive is treated as a percentage and anything above that is treated as the 8-bit absolute PWM so 100 out of 255 would be... wait for it ... 39.2% 🙂 I always forget about that.

          undefined 1 Reply Last reply 18 Mar 2020, 18:47 Reply Quote 0
          • undefined
            richardmckenna @gtj0
            last edited by 18 Mar 2020, 18:47

            @gtj0 aye I checked the gcode documentation when I saw it was 39% and saw it was similar to other percentage settings.

            Now I’ve fixed the issue? Any idea why it was starting at 50% without the minimum speed option?

            1 Reply Last reply Reply Quote 0
            • undefined
              deckingman
              last edited by deckingman 18 Mar 2020, 19:05

              Actually, this is all a bit strange. The OP had an "S" values of 1 which is (should be) the same as 255 so the fan should switch to fully on when the heater temperature exceeds the set point of (in this case) 45 deg C.
              PWM should only come into play if he had set a temperature range - e.g. 40:80 and in that case, the speed would be proportional to the temperature between 40 and 80. At 41 deg C the fan would just start to turn unless the OP used the L parameter. If he had used say L125, with that 40:80 range, then the fan would run at 50% speed for all temperatures between 40 and 60, then ramp up from 50% speed to full speed between 60 and 80.
              So it looks like there may be a problem using S1 and setting the L parameter to 1 or 255 is merely masking that problem. I use a very similar M106 setting to the OP which works fine, the difference being that I use S255 instead of S1. My machine is in bits so I can't test this but it might be worth checking on a working machine if there is a difference between using S1 and S255.

              EDIT @richardmckenna Try setting S255 instead of S1 and take out the "L" parameter.

              Ian
              https://somei3deas.wordpress.com/
              https://www.youtube.com/@deckingman

              undefined 1 Reply Last reply 18 Mar 2020, 19:20 Reply Quote 1
              • undefined
                richardmckenna @deckingman
                last edited by 18 Mar 2020, 19:20

                @deckingman just started another print but will try it before starting the next one

                undefined 1 Reply Last reply 18 Mar 2020, 20:09 Reply Quote 0
                • undefined
                  deckingman @richardmckenna
                  last edited by deckingman 18 Mar 2020, 20:09

                  @richardmckenna The other thing that doesn't make sense to me is why changing the PWM frequency would make any difference. My understanding is that the PWM value determines the on-off (or mark-space) ratio and that either setting it to 1 (in the range 0 to 1) or 255 (in the range 0 to 255) means that the on period is 100% of the time and the off period is 0 % of the time. So why would it matter what the frequency (which is the time period) is? Or to put it another way, if the PWM value is 100% so it it never switches off, why does it matter how quickly or slowly it never switches off?

                  Ian
                  https://somei3deas.wordpress.com/
                  https://www.youtube.com/@deckingman

                  undefined 1 Reply Last reply 18 Mar 2020, 20:14 Reply Quote 0
                  • undefined
                    richardmckenna @deckingman
                    last edited by 18 Mar 2020, 20:14

                    @deckingman changing the frequency (Q value) didn’t make any difference in my case. Only adding the L1 made the fan come on at 100%.

                    undefined 1 Reply Last reply 18 Mar 2020, 20:54 Reply Quote 0
                    • undefined
                      deckingman @richardmckenna
                      last edited by 18 Mar 2020, 20:54

                      @richardmckenna I was just being curious as to why people were recommending that you change the Q value (PWM frequency), in case my understanding of how PWM works is incorrect.

                      Ian
                      https://somei3deas.wordpress.com/
                      https://www.youtube.com/@deckingman

                      undefined 1 Reply Last reply 18 Mar 2020, 22:35 Reply Quote 0
                      • undefined
                        gtj0 @deckingman
                        last edited by gtj0 18 Mar 2020, 22:35

                        @deckingman Intel's specification for 4-wire PWM fans specified a nominal pwm frequency of 25kHz with an acceptable operational range 21 kHz to 28 kHz. Many fans simply won't behave correctly with a PWM frequency outside that range. It's the duty cycle of that pulse train that controls the speed of the fan.

                        Oh... For 3 or 2 wire fans, it's the actual motor driving current that's modulated to control speed. The frequency can also play a part there as well.

                        undefined 1 Reply Last reply 19 Mar 2020, 07:30 Reply Quote -1
                        • undefined
                          richardmckenna
                          last edited by 18 Mar 2020, 22:44

                          On that note I’ve just found this https://noctua.at/media/wysiwyg/Noctua_PWM_specifications_white_paper.pdf page 6

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            deckingman @gtj0
                            last edited by 19 Mar 2020, 07:30

                            @gtj0 Yes, I appreciate that but the bit that I can't get my head around is that, in this case, the OP doesn't want to vary the speed. He wants the fan to run at full speed. Which means that PWM will always be high and never switch to low doesn't it? In which case, why does it matter what frequency that never switching to low occurs at?

                            Ian
                            https://somei3deas.wordpress.com/
                            https://www.youtube.com/@deckingman

                            undefined 1 Reply Last reply 19 Mar 2020, 07:33 Reply Quote 0
                            • undefined
                              richardmckenna @deckingman
                              last edited by richardmckenna 19 Mar 2020, 07:33

                              @deckingman it doesn’t I think @gtj0 was just letting me know that my original Q value was quite low for a PWM fan.

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                richardmckenna
                                last edited by 19 Mar 2020, 09:14

                                Ok now I am confused!

                                So I set Q back to 500 just to rule out any other changes. I set S255

                                M106 P1 S255 H1 T45 C"Hemera"

                                Under 45ºC i get

                                Fan 1 (Hemera), speed: 100%, min: 10%, max: 100%, blip: 0.10, temperature: 45.0:45.0C, sensors: 1, current speed: 0%:
                                

                                Over 45ºC i get

                                Fan 1 (Hemera), speed: 100%, min: 10%, max: 100%, blip: 0.10, temperature: 45.0:45.0C, sensors: 1, current speed: 100%:
                                

                                So all good 🙂 In order to verify this I set it back to S1, let the printer cool below 45ºC and restarted the printer
                                M106 P1 S1 H1 T45 C"Hemera"

                                Under 45ºC I now get

                                Fan 1 (Hemera), speed: 100%, min: 10%, max: 100%, blip: 0.10, temperature: 45.0:45.0C, sensors: 1, current speed: 0%:
                                

                                instead of what I was originally getting

                                Fan 1 (Hemera), speed: 0%, min: 10%, max: 100%, blip: 0.10, temperature: 45.0:45.0C, sensors: 1, current speed: 50%:
                                

                                And over I get

                                Fan 1 (Hemera), speed: 100%, min: 10%, max: 100%, blip: 0.10, temperature: 45.0:45.0C, sensors: 1, current speed: 100%:
                                

                                Why am I now seeing different results when changing S back to 1 as in my original settings?

                                Board: Duet 3 MB6HC
                                Firmware: RepRapFirmware for Duet 3 MB6HC v0.6 or 1.0 3.01-RC2 (2020-02-18b1)
                                Running in standalone mode.

                                undefined 1 Reply Last reply 19 Mar 2020, 09:41 Reply Quote 0
                                • undefined
                                  dc42 administrators @richardmckenna
                                  last edited by 19 Mar 2020, 09:41

                                  @richardmckenna said in Thermostatic controlled fan coming on at 50%:

                                  Why am I now seeing different results when changing S back to 1 as in my original settings?

                                  My guess is that there was an error in your original line so that instead of S1 you had Sl (lowercase L instead of 1) or S<space>1 or S<invisible character>1. In each case it would have been treated as S0; however the firmware enforces a minimum 50% PWM for thermostatic fans.

                                  Duet WiFi hardware designer and firmware engineer
                                  Please do not ask me for Duet support via PM or email, use the forum
                                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                                  undefined 1 Reply Last reply 19 Mar 2020, 10:15 Reply Quote 0
                                  • undefined
                                    richardmckenna @dc42
                                    last edited by 19 Mar 2020, 10:15

                                    @dc42 hmmm that may be it just strange as that line was from the original output from the configuration tool I just added the name parameter to the end.

                                    Anyway, at least it is behaving now 🙂

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      richardmckenna
                                      last edited by 20 Mar 2020, 23:17

                                      @dc42 ok nope. turned the printer on this evening this is the fan config I have at the moment, copy and pasted from the DWC editor, so there definitely isn't a lower case L

                                      M950 F1 C"!out4" Q500
                                      M106 P1 S1 H1 T45 C"Hemera"

                                      and the fan came on at 50%

                                      Fan 1 (Hemera), speed: 0%, min: 10%, max: 100%, blip: 0.10, temperature: 45.0:45.0C, sensors: 1, current speed: 50%:
                                      
                                      undefined 1 Reply Last reply 21 Mar 2020, 07:17 Reply Quote 0
                                      • undefined
                                        Phaedrux Moderator
                                        last edited by 21 Mar 2020, 01:08

                                        Can you test S255 instead of S1?

                                        Z-Bot CoreXY Build | Thingiverse Profile

                                        undefined 1 Reply Last reply 21 Mar 2020, 08:18 Reply Quote 0
                                        • undefined
                                          dc42 administrators @richardmckenna
                                          last edited by 21 Mar 2020, 07:17

                                          @richardmckenna, I think you have a M106 P1 S0 command somewhere, or possibly you have a F1 parameter in one of your M563 commands and a M107 command in the file you are printing.

                                          Duet WiFi hardware designer and firmware engineer
                                          Please do not ask me for Duet support via PM or email, use the forum
                                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                                          1 Reply Last reply Reply Quote 0
                                          13 out of 37
                                          • First post
                                            13/37
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA