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

    Temperature controlled always on fan

    Scheduled Pinned Locked Moved
    General Discussion
    5
    14
    444
    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.
    • Aurimasundefined
      Aurimas @o_lampe
      last edited by

      @o_lampe ok so I think I got some idea how it works.
      just need a bit of huidance

      2 issues:
      can't this to work
      while get boards[0].state = "running"
      what am doing wrong.

      as a test i got this, but the fan runs 100% all the time 😞

      white state.status = "idle"
      if sensors.analog[4].lastReading<65
      M106 P5 S0.2
      else
      M106 P5 S1

      the result is that P5 is 100% all the time

      OwenDundefined 1 Reply Last reply Reply Quote 0
      • OwenDundefined
        OwenD @Aurimas
        last edited by

        @Aurimas said in Temperature controlled always on fan:

        @o_lampe ok so I think I got some idea how it works.
        just need a bit of huidance

        2 issues:
        can't this to work
        while get boards[0].state = "running"
        what am doing wrong.

        Which board are you running?
        On my Duet 2, this is showing as "unknown" so I suspect it's not supported on all boards.
        It may even only be for toolboards. @DC42 may confirm

        as a test i got this, but the fan runs 100% all the time 😞

        white state.status = "idle"
        if sensors.analog[4].lastReading<65
        M106 P5 S0.2
        else
        M106 P5 S1

        the result is that P5 is 100% all the time

        Apart from the type on "while" , I'm not sure your indenting is correct for the else.

        while state.status = "idle"
           if sensors.analog[4].lastReading<65
              M106 P5 S0.2
           else 
              M106 P5 S1
        

        Should work if in fact the board is in the idle state.
        If you're doing this in daemon.g then it would be better to not enter such a closed loop
        By default daemon.g runs every 10 seconds. If that is often enough for your purposes then simply do your check.

        if sensors.analog[4].lastReading<65
           M106 P5 S0.2
        else 
           M106 P5 S1
        

        If you want it to run more often the use a while loop, but make sure you add a G4 command so that control is returned to the main process regularly.

        while true
           if sensors.analog[4].lastReading<65
              M106 P5 S0.2
           else 
              M106 P5 S1
           G4 S2
        

        If you want to have it happen only when idle, or any other state then you can use that as well, but still use a delay in your loop.

        Aurimasundefined 1 Reply Last reply Reply Quote 1
        • dc42undefined
          dc42 administrators @Aurimas
          last edited by dc42

          @Aurimas said in Temperature controlled always on fan:

          I want to have temperature controlled fan that is always at minimum 20% speed.

          What's the reason for wanting 20% minimum speed, instead of Off when the temperature is low enough?

          The solution proposed by @o_lampe looks good to me, in principle.

          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

          Aurimasundefined 1 Reply Last reply Reply Quote 0
          • Aurimasundefined
            Aurimas @dc42
            last edited by

            @dc42 I have a fan on the enclosure - I want it to suck the air out of enclosure and through the HEPA filter. that would create slight negative pressure in the enclosure.
            then I want the fan to flip to full power if the enclosure gets over certain temp so that it cools down and prevents overheating.

            1 Reply Last reply Reply Quote 0
            • Aurimasundefined
              Aurimas @OwenD
              last edited by

              @OwenD thank you. I am just learning these things and the syntax is a bit of a mystery for me 😞
              like your statement: "while true" - where do i find this info?

              OwenDundefined 1 Reply Last reply Reply Quote 0
              • OwenDundefined
                OwenD @Aurimas
                last edited by

                @Aurimas said in Temperature controlled always on fan:

                @OwenD thank you. I am just learning these things and the syntax is a bit of a mystery for me 😞
                like your statement: "while true" - where do i find this info?

                Information on meta commands can be found here

                while creates a loop that is typically limited by a boolean expression
                while iterations < 10 or as you had while state.status = "idle"

                while true will always resolve to true in a similar way to using while 1=1 would, so it creates an endless loop
                When you do so, you have to ensure that you hand control back to the CPU (G4) or have a mechanism to break out or the machine will be unresponsive.

                Aurimasundefined 1 Reply Last reply Reply Quote 0
                • Aurimasundefined
                  Aurimas @OwenD
                  last edited by

                  @OwenD thank you

                  1 Reply Last reply Reply Quote 0
                  • CaiJonasundefined
                    CaiJonas
                    last edited by

                    Hello everyone,

                    I think I have the same wish.

                    I would like to connect three 4 pin pwm fans to fan output 4.

                    It is an always running fan for my water cooling system.

                    That means it has to run when the nozzle is around 45C. This is already working. But the fans are too loud and too strong. I would therefore like to reduce the fan speed to 30%.

                    The fans are connected via a 3-way splitter and this is important for me to have some kind of redundancy if one is faling.

                    How can I achieve this? @dc42

                    Best Regards
                    Cai

                    dc42undefined Aurimasundefined 2 Replies Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators @CaiJonas
                      last edited by dc42

                      @CaiJonas you can connect multiple PWM fans to the same 4-pin output, provided you don't exceed the total current limit. The fans should all be of the same type so that they run at the same speed. Connect the positive, negative and PWM wires of all 3 fans to the corresponding pins on the Duet. I suggest you connect just one of the fan tacho wires to the tacho input on the Duet 4-pin connector.

                      You can use the X parameter in the M106 command to set the maximum PWM.

                      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

                      CaiJonasundefined 1 Reply Last reply Reply Quote 0
                      • Aurimasundefined
                        Aurimas @CaiJonas
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • CaiJonasundefined
                          CaiJonas @dc42
                          last edited by

                          @dc42 thanks, that was the thing I was looking for

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA