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

PWM Fan Toggles on/off on restart

Scheduled Pinned Locked Moved
CNC
5
17
516
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.
  • undefined
    EducatingSavvas
    last edited by 6 Apr 2020, 13:38

    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

    1 Reply Last reply Reply Quote 0
    • ?
      A Former User
      last edited by A Former User 4 Jun 2020, 13:48 6 Apr 2020, 13:43

      @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

      1 Reply Last reply Reply Quote 1
      • ?
        A Former User
        last edited by 6 Apr 2020, 13:58

        @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

        undefined 1 Reply Last reply 6 Apr 2020, 14:35 Reply Quote 0
        • undefined
          EducatingSavvas @A Former User
          last edited by 6 Apr 2020, 14:35

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

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User
            last edited by 6 Apr 2020, 14:50

            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.

            undefined undefined 2 Replies Last reply 24 Apr 2020, 07:42 Reply Quote 0
            • undefined
              EducatingSavvas @A Former User
              last edited by 24 Apr 2020, 07:42

              @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.

              1 Reply Last reply Reply Quote 0
              • undefined
                dc42 administrators @A Former User
                last edited by 24 Apr 2020, 08:53

                @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.

                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

                undefined 1 Reply Last reply 28 Apr 2020, 20:23 Reply Quote 0
                • undefined
                  EducatingSavvas @dc42
                  last edited by 28 Apr 2020, 20:23

                  @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?

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    EducatingSavvas
                    last edited by 26 Oct 2020, 15:59

                    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?

                    undefined 1 Reply Last reply 26 Oct 2020, 19:00 Reply Quote 0
                    • undefined
                      Phaedrux Moderator @EducatingSavvas
                      last edited by 26 Oct 2020, 19:00

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

                      Z-Bot CoreXY Build | Thingiverse Profile

                      undefined 1 Reply Last reply 26 Oct 2020, 19:02 Reply Quote 0
                      • undefined
                        EducatingSavvas @Phaedrux
                        last edited by EducatingSavvas 26 Oct 2020, 19:02

                        @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.

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          dc42 administrators
                          last edited by 26 Oct 2020, 19:25

                          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.

                          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

                          undefined 1 Reply Last reply 29 Oct 2020, 09:02 Reply Quote 0
                          • undefined
                            Phaedrux Moderator
                            last edited by 26 Oct 2020, 19:54

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

                            Z-Bot CoreXY Build | Thingiverse Profile

                            1 Reply Last reply Reply Quote 0
                            • ?
                              A Former User
                              last edited by A Former User 26 Oct 2020, 20:24

                              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.

                              1 Reply Last reply Reply Quote 0
                              • oliofundefined
                                oliof
                                last edited by 26 Oct 2020, 20:57

                                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.

                                <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  EducatingSavvas @dc42
                                  last edited by 29 Oct 2020, 09:02

                                  @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.

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    dc42 administrators
                                    last edited by 29 Oct 2020, 19:35

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

                                    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 0
                                    • First post
                                      Last post
                                    Unless otherwise noted, all forum content is licensed under CC-BY-SA