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

    Solved: Fan control doesn't work correctly in RRF 3.3

    Scheduled Pinned Locked Moved Solved
    Using Duet Controllers
    3
    23
    2.2k
    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.
    • Gixxerfastundefined
      Gixxerfast @achrn
      last edited by Gixxerfast

      @achrn OK, thanks. How does you fan config look like? Do you have a pullup on the tacho signal ? Should that matter?

      Voron V2.4 (#1317) with Duet 3 Mini5+ Wifi and 1LC v1.1 Toolboard
      Voron V0.1 (#637) with Duet 3 Mini 5+ Wifi and 1LC v1.2 Toolboard
      Ender 3 Pro with BTT SKR-2 + RRF

      achrnundefined 1 Reply Last reply Reply Quote 0
      • achrnundefined
        achrn @Gixxerfast
        last edited by

        @gixxerfast said in Fan control doesn't work correctly in RRF 3.3 and and 3.4:

        @achrn OK, thanks. How does you fan config look like? Do you have a pullup on the tacho signal ? Should that matter?

        My config looks the same as yours: M950 F4 C"!out5+out5.tach" Q25000 (for purpose of this test, at least)

        I don't have any hardware mods - just four-pin fan connector plugged onto four-pin fan header. That is, take fan out of manufacturers packaging, plug it in to duet. Mine is a MB6HC.

        Adding pullup to the tacho shouldn't be relevant, I think. That won't affect how fast the fan spins. (Unless you think your fan is actually spinning as fast as it should be, and it's just reporting low while spinning at the correct speed, but that wasn't the impression I got).

        Pullup on the PWM might help. I hesitate to suggest a value (because I don't want to be responsible for frying your board or your fan) but maybe someone who is more confident about the circuits will chip in - https://forum.duet3d.com/post/251107 suggests an additional pullup of 10k to 5V. (If the fan is following the usual Intel spec 5V is the correct level - the Intel spec says 5.25V max).

        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @Gixxerfast
          last edited by dc42

          @gixxerfast there appear to be three issues here:

          1. The bug with fan temperature control over an interval, which has been fixed in RRF 3,4beta.

          2. The object model browser in DWC always reports the fan PWM frequency as 250. This is because RRF does not report the PWM frequency. It appears that in the absence of receiving the frequency, DWC is displaying the default value instead of not displaying a value. I will change RRF to report the PWM frequency in the next beta.

          3. Your fans do not provide a speed that scales linearly with the commanded PWM. This could be just the way your fans behave, or it could be an issue with PWM generation. To investigate the possibility of incorrect PWM generation, I connected a Noctua PWM fan to OUT3 on a Diet 3 Mini, configured it using m950 f5 c"!out3+out3.tach" q25000 and tried various fan settings. I also checked the PWM frequency, which was 24.999kHz according to my oscilloscope. The RPMs I read are:

          20% 470
          40% 1600
          60% 2730
          80% 3730
          100% 5020

          So it appear to me to be working correctly. This was with firmware 3.4.0beta5.

          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 1
          • dc42undefined
            dc42 administrators
            last edited by

            PS - it's occurred to me that depending on the input circuit of your fan, you may be able to improve the response by connecting a pullup resistor between the PWM input and +5V. 10K would be a good starting point.

            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

            Gixxerfastundefined 2 Replies Last reply Reply Quote 2
            • Gixxerfastundefined
              Gixxerfast @dc42
              last edited by

              @dc42 OK, but the control pulse voltage is already 5V from the Duet? What would a pullup resistor do in this case?

              I'm unfortunately a bit lacking in my knowledge of electronics.

              Voron V2.4 (#1317) with Duet 3 Mini5+ Wifi and 1LC v1.1 Toolboard
              Voron V0.1 (#637) with Duet 3 Mini 5+ Wifi and 1LC v1.2 Toolboard
              Ender 3 Pro with BTT SKR-2 + RRF

              dc42undefined 1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators @Gixxerfast
                last edited by

                @gixxerfast the output is open drain so it relies on there being a pullup resistor in the fan.

                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 1
                • Gixxerfastundefined
                  Gixxerfast @dc42
                  last edited by Gixxerfast

                  @dc42
                  Yes, that was (sorry for choice of words) bloody perfect. I added a pullup resistor as you said 10K and now they scale very well 🙂 I have no gap between 99 - 100 % It won't run until 15% but that's sort of expected and not a problem.

                  Btw, I had 4.87V without the pullup between V- and control.

                  It's crimping time. 🙂

                  I hope I can take the 5v from here without any worries.
                  ca4503d9-53dd-49f4-b9f6-be928ba9fbd9-image.png

                  Big thanks to @dc42 and @achrn

                  Voron V2.4 (#1317) with Duet 3 Mini5+ Wifi and 1LC v1.1 Toolboard
                  Voron V0.1 (#637) with Duet 3 Mini 5+ Wifi and 1LC v1.2 Toolboard
                  Ender 3 Pro with BTT SKR-2 + RRF

                  dc42undefined achrnundefined 2 Replies Last reply Reply Quote 1
                  • dc42undefined
                    dc42 administrators @Gixxerfast
                    last edited by dc42

                    @gixxerfast thanks for confirming that.

                    The Intel specification for PWM fans says in section 2.1.4:

                    The following requirements are measured at the PWM (control) pin of the fan cable connector see Figure 7 and Table 1:
                    PWM Frequency: Target frequency 25 kHz, acceptable operational range 21 kHz to 28 kHz
                    Maximum voltage for logic low: VIL = 0.8 V
                    Absolute maximum current sourced: Imax = 5 mA (short circuit current)
                    Absolute maximum voltage level: VMax = 5.25 V (open circuit voltage)
                    This signal must be pulled up to a maximum of 5.25V within the fan.
                    Note:New fan designs are strongly encouraged to implement a 3.3V pull up for compatibility with buffer design limits on Hardware Monitor Devices e.g. Super IO devices.

                    So the specification requires there to be a pullup resistor inside the fan, although it doesn't specify a maximum value for it (the maximum current sourced implies a minimum value of about 1K). My guess is that your fans have a pullup resistor with a very high value, so that in conjunction with the capacitance of the cable, it slows down the rise time of the PWM signal excessively. If the fan cable is long, that would make this more of a problem, due to the increased capacitance.

                    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 1
                    • achrnundefined
                      achrn @Gixxerfast
                      last edited by

                      @gixxerfast said in Solved: Fan control doesn't work correctly in RRF 3.3:

                      @dc42
                      It won't run until 15% but that's sort of expected and not a problem.

                      The Intel spec says behaviour below 20% is undefined. Some fans stop, and some run at a not-very-predictable rate, and some run at the same rpm for all duty values below 20%. Sometimes a manufacturer specifies what a particular fan does in this region, but not always.

                      Gixxerfastundefined 1 Reply Last reply Reply Quote 0
                      • Gixxerfastundefined
                        Gixxerfast @achrn
                        last edited by Gixxerfast

                        @achrn Yes, and the fan speed is so low it doesn't really matter if they are on on or not. It makes no difference. Estoy muy contento 🙂

                        Voron V2.4 (#1317) with Duet 3 Mini5+ Wifi and 1LC v1.1 Toolboard
                        Voron V0.1 (#637) with Duet 3 Mini 5+ Wifi and 1LC v1.2 Toolboard
                        Ender 3 Pro with BTT SKR-2 + RRF

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