Gcode for fan PWM speed control



  • Hi
    DOes anybody know the gcode command to control the PWM fan 2 output please.??

    My goal is to have it control a small 30mm fan that cools the Duet board / stepper drivers ( back and front).
    Permanently on is way too noisy . Looking for somewhere between 60% and 40%.

    Could i include the gcode command in the config.g file ?
    Is there any monitoring of the Trinamic 2660's ? If yes could this be used to control/switch a fan ?

    Thanks in advance

    Phil


  • administrators

    First you need to send M106 P1 H-1 to disable thermostatic mode, which is the default mode for FAN1. Then use M106 P1 S### to control the speed.

    Monitoring the TMC2660 temperatures is on the list to be implemented.



  • Thanks DC
    I plan to leave Fan1 at default and use it on the hotend cooling fan ( E3D V6)
    so to set Fan 2 would be
    M106 P2 S40 ( where 40 is fan speed / percentage of full on) correct ?

    Probably because its a cheapy, but the 30mm fan i have makes too much noise ( partly because the machine is now so quiet 🙂 )
    Would be a great if in the future the TMC's could be monitored and trigger a casing fan if/ when needed.
    Thanks
    Phil


  • administrators

    For historical reasons, 40 means a PWM value of 40/255. Or you can use 0.4 which will be interpreted as 40%.

    As a general rule, the smaller the fan is, the higher its RPM and the noisier it is.



  • Ah yes i should have known/remembered "of 255" thing, 0.5 it is then and a lot better is sounds too
    All 3 PWM outputs working just fine now
    Thanks


Locked
 

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