Maximum Frequency of PWM Fans



  • Hi,

    I understand the frequency of the PWM fans can be changed via the F parameter of the M106 command.

    I've seen a comment by @dc42 here suggesting this frequency be set to 25KHz, however, I'd like to know what's the maximum frequency the hardware & firmware allow the user to set?

    Btw, this seems like a good place to offer my 2-cents on this subject. Although I'm a newbie to the DuetWifi, I've been working with PWM fans and pumps for a long time and there are two things I find baffling about the DuetWifi's setup in this context:

    (1) The default frequency for the PWM fan outputs seems to be 500Hz. That may suitable for LEDs, but certainly doesn't even come close to what PWM fans typically need to to work efficiently (and quietly!).

    Although there isn't an agreed industry standard on the suitable frequency for PWM fans, many applications use a 25KHz signal, while the recommended frequency in many of the more reputable sources I came across over the years set the value even higher at 31.5KHz. My experience has been that the latter works very well in most cases.

    On the other hand, a 500Hz frequency will almost invariably drive PWM fans very poorly as indicated by a particularly annoying whining sound most of them would generate at this frequency.

    I therefore think it would be a very good idea to change the default frequency value to something along these lines so that people who aren't aware of this setting would still be operating their PWM fans at a reasonable frequency.

    (2) The DuetWifi has only 2 pins per fan connector, hence no dedicated PWM line. Consequently, I'm assuming the so-called 'PWM control' of the fans via the DuetWifi is achieved by pulsating their input voltage.

    If this is indeed the case, this isn't a great idea. Non-PWM fans aren't designed for this method of operation and operate much better (and quieter) when their speed is varied through voltage control.

    Don't get me wrong, I think PWM is phenomenal and I certainly use it wherever possible. Also, there are ways to implement voltage variation on the basis of a PWM signal, but unless I'm completely off, this isn't how it's implemented in the DuetWifi.


  • administrators

    It is my understanding that the ground is actually pulsated, while achieving the same effect (pulsating the input voltage) it is an important note all the same.


  • administrators

    I agree, ordinary 2-wire PWM fans are not designed to work with PWM. But the fact is, that's what almost everyone uses in 3D printers. So that's what we support. The PWM frequency needs to be kept low using this mode of operation. Some fans need it to be as low as 100Hz.

    You can use a 4-wire PWM-controllable fan by connecting the red and black wires to an always-on fan connector, and the PWM control wire to the FAN- terminal of your chosen controlled fan output. Use the I1 parameter in the M106 command to invert the PWM sense, and set the PWM frequency to 25kHz with F25000.

    Note that some 4-wire PWM-controlled fans can't be turned completely off. The Intel PWM fan specification only requires that they can be controlled down to 30% of full speed. I have been told that Noctua 4-wire fans do allow you to turn them right off using the PWM input.

    The maximum PWM frequency supported is 65535Hz.



  • @msquared said in Maximum Frequency of PWM Fans:

    It is my understanding that the ground is actually pulsated, while achieving the same effect (pulsating the input voltage)

    Had another look at the official pinout and I think you're absolutely right 🙂

    it is an important note all the same.

    Thanks @MSquared!

    @dc42 said in Maximum Frequency of PWM Fans:

    I agree, ordinary 2-wire PWM fans are not designed to work with PWM.

    I assume you meant 2-wire non- PWM fans?

    But the fact is, that's what almost everyone uses in 3D printers. So that's what we support.

    Yep, so it seems. I'm using them too 🙂

    However, as I noted in the original post, there are better ways of controlling the voltage to non-PWM fans with a PWM signal other than by pulsating the ground/vcc line (although they do require a sightly more sophisticated circuitry to achieve that purpuse).

    The PWM frequency needs to be kept low using this mode of operation. Some fans need it to be as low as 100Hz.

    That could very well be, but that's precisely the problem I'm talking about. To pulsate the voltage to a non-PWM fan (either on the VCC- or the GND-side) at this slow rate isn't good for the fan. It causes excess heating and reduces the fan's life. Not to mention the noise... In other words, it's a poor solution.

    Varying the voltage for the fan on the basis of a PWM signal doesn't require a slow signal and, in my view, is the optimal solution.

    However, I do appreciate it may be problematic in terms of cost and/or PCB real-estate. If that's the case, I think dropping the PWM approach altogether and going with direct voltage control would still be much better than the current implementation.

    You can use a 4-wire PWM-controllable fan by connecting the red and black wires to an always-on fan connector, and the PWM control wire to the FAN- terminal of your chosen controlled fan output. Use the I1 parameter in the M106 command to invert the PWM sense, and set the PWM frequency to 25kHz with F25000.

    ...and now I understand why there's a need to invert the PWM signal in this hookup 🙂

    But, like you say, almost nobody uses PWM fans - at least not for the small effector fans where speed control is crucial - as they are very hard (if not impossible) to find. Incredibly hard to believe no company in the market realized yet that such fans would be an instant hit with consumers.

    Note that some 4-wire PWM-controlled fans can't be turned completely off. The Intel PWM fan specification only requires that they can be controlled down to 30% of full speed. I have been told that Noctua 4-wire fans do allow you to turn them right off using the PWM input.

    Yep, I'm aware of this.

    The maximum PWM frequency supported is 65535Hz.

    Excellent, thanks for the info!


  • administrators

    @snowcrash said in Maximum Frequency of PWM Fans:

    @dc42 said in Maximum Frequency of PWM Fans:

    I agree, ordinary 2-wire PWM fans are not designed to work with PWM.

    I assume you meant 2-wire non- PWM fans?

    I just meant 2-wire fans.

    Varying the voltage for the fan on the basis of a PWM signal doesn't require a slow signal and, in my view, is the optimal solution.

    However, I do appreciate it may be problematic in terms of cost and/or PCB real-estate. If that's the case, I think dropping the PWM approach altogether and going with direct voltage control would still be much better than the current implementation.

    Direct voltage control also requires a lot of PCB real estate. You need large inductors and capacitors to smooth the PWM to something approaching DC, then probably more inductors and capacitors to keep the EMI under control.

    But, like you say, almost nobody uses PWM fans - at least not for the small effector fans where speed control is crucial - as they are very hard (if not impossible) to find. Incredibly hard to believe no company in the market realized yet that such fans would be an instant hit with consumers.

    Noctua has informed me that they will be bringing out a range of smaller PWM-controllable fans, in both 12V and 24V versions. So I think they will become more common. In the next generation Duets we will probably provide at least one 4-pin fan connector.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.