PWM Fan Toggles on/off on restart



  • Hi - I'm using pwm fan headers 0,1 and 2 to control LED lights. I want to use these lights to practice conditional g-code but have noticed fan 1 temporarily toggles during reset. Is this normal and is there a way to turn that off? This might be a problem for me as my LED are powered by >12v and this seems to toggle to 24v.

    In my config file is:
    ;LED Strip
    M950 P3 C"fan0" Q500 ; Assign warm white LED to P3
    M950 P4 C"fan1" Q500 ; Assign yellow LED to P4
    M950 P5 C"fan2" Q500 ; Assign red LED to P5
    M42 P3 S0 ; Turn white LED off
    M42 P4 S0 ; Turn red LED off
    M42 P5 S0 ; Turn yellow LED off


    This is my first conditional g-code which I've written into a file called condition1.g. I call this with a M98 command in my config.g file and after all the homing files, to check whether axes are homed and to power relevant LED light colour.

    if {!move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed || !move.axes[3].homed} ; check if the machine is homed
    M42 P4 S0.1
    else
    M42 P3 S0.1



  • @EducatingSavvas said in PWM Fan Toggles on/off on restart:

    have noticed fan 1 temporarily toggles during reset.

    normal, but just for fan 1, needs change to hardware to prevent it (which will void your warranty if thats an issue)

    edit: add 10k resistor between these two points (or any other gnd spot)
    05d610e1-1f0d-40dd-a99f-d6bbb30820de-image.png



  • @EducatingSavvas said in PWM Fan Toggles on/off on restart:

    This might be a problem for me as my LED are powered by >12v and this seems to toggle to 24v.

    Missed that bit; the fan outputs will always be 24v if Vin is 24v and the jumper is set to provide Vin to the fans; so if your leds need 12v you should probably check out

    https://duet3d.dozuki.com/Wiki/Connecting_and_configuring_fans#Section_Using_12V_fans_when_VIN_is_24V



  • @bearer Thanks for that! I hope hoping this was a bootloader setup issue - like the D13 pin toggle on an Arduino.



  • I suspect the idea is to ensure fan 1, normally the hotend fan, will cool the hotend if the system is reset and somehow prevented to read the config or something.

    The two other fans have pull down resistors on the gates to ensure they remain off unless driven. The arrow indicate where to add such a resistor for fan 1.



  • @bearer One work around I've thought of is to use a timer delay relay module to essentially hiding the flash of light. I'm a bit reluctant to do any soldering work on the board as I'm worried I'll mess it up.

    I also got my hands on a Duex expansion board to play around with, and all the PWM fan headers demonstrate the same behaviour. I haven't had time to try the heater pins to see if they are the same.


  • administrators

    @bearer said in PWM Fan Toggles on/off on restart:

    I suspect the idea is to ensure fan 1, normally the hotend fan, will cool the hotend if the system is reset and somehow prevented to read the config or something.

    Yes, that's why we designed it to behave that way.



  • @dc42 Interesting - so it's a safety feature. How is that achieved? Pull up resistor which opens the gates and a bootfile which closes it when the config file is read?


Log in to reply