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?



  • Sorry to bring this up on such an old thread - but it felt relevant just to put it in context. I was using fan0 and fan2 to operate relay modules which I plan to use with main powered equipment - such as a dust extractor or air scrubber. Since I updated to RRF 3.2-beta2 the behaviour of fan2 has now changed to be the same as fan1. And momentarily turns on before being pulled down. It was definitely not doing this before in the previous firmware. Is there any way of changing that behaviour as I'm using it for CNC use - and would prefer if the attached equipment to the relay don't turn on start up?


  • Moderator

    @EducatingSavvas What firmware were you using previously? 3.1.1 or a version of RRF2?



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

    3.1.1

    Hi I was using 3.1.1 (2020-05-19b2) which I've also reverted back too. The behaviour has stopped - so I wont be able to use the 3.2 as I'm using pretty much all my spare heat terminals for LED lights or for the laser.


  • administrators

    On the Duet WiFi/Ethernet, Fan 1 defaults to ON until it is configured by firmware. This is deliberate, because we intend Fan 1 to be used for cooling the hot end heatsink. The idea is that if you reset the Duet while the hot end is hot, the fan continues to run so that you don't get a blocked hot end. I make use of this feature a lot, because I frequently install experimental (sometimes buggy) firmware while the hot end is hot.


  • Moderator

    @dc42 but he's saying that in 3.2b2 fan2 behaves the same as fan1.



  • fan2 behaves the same as fan1.

    "similar" as the board can't develop pullups from firmware, and the timing has to be at least slightly different, but possible unperceivable.



  • I see "similar" behavior for the U hotend cooling fan on my IDEX (currently running RRF2.0.5.1), with the U hotend cooling fan being connected to fan3 on the Duex board. I found this to be a good thing, but I can see that it might be undesirable for lasers and stuff.



  • @dc42 Yes I was aware of that - it was that Fan2 is now demonstrating the same behaviour has Fan1 in RRF3.2. I have had to revert back to the previous version of the firmware to carry on as I want to control two relay modules with the PWM fan headers. It would be useful to be able to turn this feature off when in CNC mode as it's likely not a behaviour CNC operators will need.


  • administrators

    Fan 2 is supposed to default to off, until you configure it in config.g.


Log in to reply