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

    M106 Maximum Fan Speed Setting

    Scheduled Pinned Locked Moved
    Firmware wishlist
    3
    10
    1.5k
    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.
    • wilrikerundefined
      wilriker
      last edited by

      Request

      I would love to see the possibility to configure a maximum speed for a non-temperature-controlled fan. Basically an upper bound to the already existing Lnnn parameter for the minimum speed.

      Rationale

      I want to move temperature and fan control away from the slicer to be able to print the same part with another material without reslicing it. I will therefore create settings-macros for the different filament types I have and call them in my start-codes. I will move heating-related commands in there. Temperatures in Cura will simply be set to 0 and it will not write any Gcodes that control temperature.

      My problem for now is, that the fan is only turned on at second layer and therefore it is not doable to also control the fan speed in my start-code if I do not want it turned on from the beginning so the slicer still has to insert the command at the start of second layer. If I could specify a maximum speed for the fan I would set fan speed in Cura simply to 100% always and add a setting that limits speed according to material type into my macros.

      Manuel
      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
      with probably always latest firmware/DWC (incl. betas or self-compiled)
      My Tool Collection

      deckingmanundefined 1 Reply Last reply Reply Quote 0
      • deckingmanundefined
        deckingman @wilriker
        last edited by

        @wilriker

        Not sure that I fully understand what it is you want to do but doesn't the "S" parameter do what you want?

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        wilrikerundefined 1 Reply Last reply Reply Quote 0
        • wilrikerundefined
          wilriker @deckingman
          last edited by wilriker

          @deckingman No, the Snnn parameter will set the requested speed. In case e.g. M106 ... L0.2 is defined then any value S <= 0.2 will result in the fan spinning at 20%. What I ask for is something like M106 ... M0.5 so that any value for S >= 0.5 will make the fan spin at only 50%.

          The S parameter is used by the slicer to request the user-defined speed. To make the Gcode material-agnostic I need a way to have the fan spin at 100% for PLA und e.g. 30% for (my current) PET-G. If I keep the speed setting in Cura at 100% it will always put a M106 S255 (equiv. to M106 S1) into the Gcode and with e.g. M106 ... M0.3 I could limit this to 30% if I am printing PET-G but if I print the same part in PLA this limit would be M106 ... M1 and the fan would actually spin at 100%.

          I need this mainly due to the fact that I will turn the fan on only at layer 2 or later and I have no means of injecting any code at this point in time.

          Manuel
          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
          with probably always latest firmware/DWC (incl. betas or self-compiled)
          My Tool Collection

          deckingmanundefined 1 Reply Last reply Reply Quote 0
          • gen2engundefined
            gen2eng
            last edited by

            More or less the same request but additional uses.

            https://forum.duet3d.com/topic/5370/m106-feature-request-limit-max-pwm-parameter

            wilrikerundefined 1 Reply Last reply Reply Quote 0
            • wilrikerundefined
              wilriker @gen2eng
              last edited by

              @gen2eng You are right. I was searching beforehand but I missed it.

              Manuel
              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
              with probably always latest firmware/DWC (incl. betas or self-compiled)
              My Tool Collection

              1 Reply Last reply Reply Quote 0
              • deckingmanundefined
                deckingman @wilriker
                last edited by deckingman

                @wilriker

                OK fair enough. You could look at Slic3R which, from what you say seems to be a little more sophisticated than Cura in this respect as it allows much more control over the fan on a per filament basis. http://manual.slic3r.org/expert-mode/cooling

                Edit. What I mean is that you can define cooling profiles in Slic3R on a per filament basis, including the min and max speeds as well disabling it for the first "n" layers (bit surprised that Cura doesn't allow you to do that).

                Ian
                https://somei3deas.wordpress.com/
                https://www.youtube.com/@deckingman

                wilrikerundefined 1 Reply Last reply Reply Quote 0
                • wilrikerundefined
                  wilriker @deckingman
                  last edited by

                  @deckingman said in M106 Maximum Fan Speed Setting:

                  @wilriker
                  Edit. What I mean is that you can define cooling profiles in Slic3R on a per filament basis, including the min and max speeds as well disabling it for the first "n" layers (bit surprised that Cura doesn't allow you to do that).

                  Cura does allow for the exact same thing. You can define materials and set temperatures, retraction settings and fan speed to them (actually fan speed does not work - that reminds me that I wanted to file a bug report 😉 ). And when you select your material in Cura it will set these settings accordingly in the generated Gcode. But that is exactly what I want to circumvent.

                  Let's make an example: suppose I print a motor mount in PLA because I expect this specific motor not to get even close to warm, so PLA would be fine. I now slice this with 100% fan speed and Cura puts M106 S255 into the Gcode file at layer 2 (that's where Cura starts the fan by default but that is configurable). Also suppose I have implemented my solution that Cura does no longer handle temperatures but my start-code does (as described briefly in first post).

                  Now I find out that the motor gets warmer than expected and warm enough to deform the PLA so I decide to reprint the mount in PET-G. Though I control temperatures separately from Gcode I would still have to re-slice the part because Cura put M106 S255 where layer 2 starts but for PET-G I would need to reduce this to 30%, i.e. M106 S82.

                  Of course I could download the file and do a search an replace. But with what I intend with this request I would simply limit the maximum fan speed in my start-code (which will have a material-specific part) to 30% and then the M106 S255 that would otherwise let fan spin at 100% would be capped at 30% speed. Et voila, I have material-independent Gcode. 🙂

                  Manuel
                  Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                  with probably always latest firmware/DWC (incl. betas or self-compiled)
                  My Tool Collection

                  1 Reply Last reply Reply Quote 0
                  • wilrikerundefined
                    wilriker
                    last edited by

                    As this is an easy change, I just created https://github.com/dc42/RepRapFirmware/pull/179 for it.

                    wilriker opened this pull request in dc42/RepRapFirmware

                    closed Add a maximum fan speed parameter and enforce it #179

                    Manuel
                    Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                    with probably always latest firmware/DWC (incl. betas or self-compiled)
                    My Tool Collection

                    deckingmanundefined 1 Reply Last reply Reply Quote 0
                    • deckingmanundefined
                      deckingman @wilriker
                      last edited by

                      @wilriker Ah OK. Sorry, I didn't quite understand what it was you were trying to do. Now I understand.
                      I'm actually working on a little Python script that will generate start and end gcodes that I can paste into what the slicer generates. In my case, I often use the same basic gcode file but with different tools and mixing ratios, as well as different materials.

                      Ian
                      https://somei3deas.wordpress.com/
                      https://www.youtube.com/@deckingman

                      wilrikerundefined 1 Reply Last reply Reply Quote 0
                      • wilrikerundefined
                        wilriker @deckingman
                        last edited by

                        @deckingman I changed my start- and end-code inserted to the slicer to be only

                        M98 P/sys/print_start.g
                        

                        and

                        M98 P/sys/print_end.g
                        

                        respectively.

                        That already reduced a lot of times where I would otherwise have needed to re-slice something. I can even edit these files while the printer is still heating. 😁

                        I just want to push this some steps further. 🙂

                        Manuel
                        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                        with probably always latest firmware/DWC (incl. betas or self-compiled)
                        My Tool Collection

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