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

    M106 for cooling board with a fan

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    5
    13
    1.2k
    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.
    • mwintermundefined
      mwinterm
      last edited by

      Hello,

      I'm using a DuetWifi and have a housing with a fan specifically to keep the TMC2660 from overheating. In my config.g file I configuered the fan with

      M106 P0 F25000 L0.5 B4 H101 T50:100 C"DuetFan"

      Like that the fans turns on every few seconds for maybe a second or two. Like that I still get every now and then a

      Warning: high temperature reported by driver(s) 1

      My understanding is that the TMC2660 does only report when it gets two hot and does not provide a specific temperature and therefore the Fan only turn on shortly at full speed and then turn off again until the next warning comes in. I think without a temperature reported back from the TMC2660 there is not much more it can do. However it would be helpful to set at least a minimum run-time of of the fan for e.g. 5seconds. Is there a way to achieve this?

      dc42undefined 1 Reply Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by Phaedrux

        The easiest way to get consistent fan control for a Duet case fan is to use the MCU temp as a proxy for the driver temps. We can assume that when you're printing the MCU will be getting hot as well as the drivers. They are in the same environment, and in close proximity to each other. Since the MCU has detailed real time temp sensor, and a dedicated temp channel already defined, it makes sense to use it to control the case fan. You can then tune the thermostistc fan control temperature range to have the fan run as much or as little as you feel comfortable with.

        M106 P2 F30000 L0.0 X0.05 B0.5 T45:70 H100:101:102 C"Duet Fans"

        This is the command I use, but you may need to adjust it for your particular fan.
        Min speed off, max speed 50%, short blip at startup to ensure it spins up since my fans need full power to overcome the standstill. It monitors the MCU and the two driver warnings. It targets 45c and will spin fast enough to maintain that. During long prints it's usually spinning slowly and you can feel a steady air draw through the case.

        In order for this to work, the MCU temperature must be somewhat accurate. This will require a one time calibration step to set the MCU temp offset. See here: https://duet3d.dozuki.com/Wiki/Calibrating_the_CPU_temperature

        Another approach is to mount a thermistor directly to the driver chip and using that to control the fan. See here: https://somei3deas.wordpress.com/2017/04/18/stepper-motor-and-electronics-cooling/

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @mwinterm
          last edited by

          @mwinterm said in M106 for cooling board with a fan:

          Hello,

          I'm using a DuetWifi and have a housing with a fan specifically to keep the TMC2660 from overheating. In my config.g file I configuered the fan with

          M106 P0 F25000 L0.5 B4 H101 T50:100 C"DuetFan"

          Like that the fans turns on every few seconds for maybe a second or two. Like that I still get every now and then a

          Warning: high temperature reported by driver(s) 1

          My understanding is that the TMC2660 does only report when it gets two hot and does not provide a specific temperature and therefore the Fan only turn on shortly at full speed and then turn off again until the next warning comes in. I think without a temperature reported back from the TMC2660 there is not much more it can do. However it would be helpful to set at least a minimum run-time of of the fan for e.g. 5seconds. Is there a way to achieve this?

          There is code to delay warning about high driver temperatures if a fan was turned on in response to a driver temperature warning. I guess that code isn't working perfectly. Try the suggestions made by @Phaedrux.

          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
          • mwintermundefined
            mwinterm
            last edited by

            @dc42 : Could you point me to that code i.e. which file?

            dc42undefined 1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @mwinterm
              last edited by

              @mwinterm said in M106 for cooling board with a fan:

              @dc42 : Could you point me to that code i.e. which file?

              It's the block of code starting around line 1566 in Platform.cpp. It relies on Fan::Check being called before this at line 1538, after the driver warning status has been fetched. Also see line 315 of Fan.cpp.

              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
              • mrehorstdmdundefined
                mrehorstdmd
                last edited by

                Dumb question: if your controller needs to be cooled with a fan to prevent overheating, why not just connect the fan to the power supply and be done with it? I know DC42 writes great code, but if the board has a problem for any reason (component failure, maybe overheat?), "protection" schemes that depend on the controller working properly may not "protect" anything. ' An ounce of prevention is worth a pound of cure.'

                I know a fan makes a little bit of noise, and we all want silent printers, but you don't need a lot of air movement to keep the board cool. If you have a 12V power supply you can connect a 24V fan and it will turn slowly and quietly. You can always use a cheap (about $1) DC-DC converter to run a 12V or 24V fan at lower-than-rated voltage. My printer has a 5", 230VAC fan connected to the switched 117V power input and I cannot hear it running, even in a silent room. Yes, it does run, and yes it moves air.

                https://drmrehorst.blogspot.com/

                PlasticMetalundefined 1 Reply Last reply Reply Quote 0
                • PlasticMetalundefined
                  PlasticMetal @mrehorstdmd
                  last edited by

                  @mrehorstdmd said in M106 for cooling board with a fan:

                  Dumb question: if your controller needs to be cooled with a fan to prevent overheating, why not just connect the fan to the power supply and be done with it?

                  My thoughts exactly, and it's simpler, too. I use a 40mm Noctua 12V fan run off a cheapo buck converter from my 24V supply. Whisper quiet and holds the board at about 25C all day long.

                  Heat kills electronics, and I don't want my $180 board going through cool-warm-cool-warm cycles. The fan runs constantly any time the printer is on, keeping the board at a constant temperature.

                  Phaedruxundefined 1 Reply Last reply Reply Quote 0
                  • Phaedruxundefined
                    Phaedrux Moderator @PlasticMetal
                    last edited by

                    @plasticmetal @mrehorstdmd My main reason for not wanting the fan to run all the time is dust. When the printer is sitting idle, there's no need to actively cool the electronics. In most cases the board itself is perfectly fine running passively cooled anyway.

                    Z-Bot CoreXY Build | Thingiverse Profile

                    1 Reply Last reply Reply Quote 0
                    • PlasticMetalundefined
                      PlasticMetal
                      last edited by

                      Both good points. Ironically, running a fan can cause dust to build up and act as an insulator, thereby increasing the heat, thereby needing a fan. Kind of a "chicken before the egg" scenario.

                      1 Reply Last reply Reply Quote 0
                      • mrehorstdmdundefined
                        mrehorstdmd
                        last edited by

                        Years ago I saw an article in Electronic Design magazine about fan controllers. The traditional method was to do what you're trying to do- measure the temperature and when it gets to some point, switch on the fan. The article described a different approach- switch on the fan based on current drain. Current is instantaneous and current is what leads to heating. If you wait for something to heat up before you turn on the fan it may already be too late.

                        https://drmrehorst.blogspot.com/

                        1 Reply Last reply Reply Quote 0
                        • mwintermundefined
                          mwinterm
                          last edited by mwinterm

                          Agreed with all of you, and I could as well use one of the two always on fans. I just like it to be quite. Especially at the moment where I'm still optimizing the set-up and the firmware my duet is constantly switched on even though nothing is machining.

                          Btw does anyone know what the TMC2660 do when they overheat. Do they switch themselves off at a certain point or do they go on and die heroically?

                          dc42undefined 1 Reply Last reply Reply Quote 0
                          • dc42undefined
                            dc42 administrators @mwinterm
                            last edited by dc42

                            @mwinterm said in M106 for cooling board with a fan:

                            Btw does anyone know what the TMC2660 do when they overheat. Do they switch themselves off at a certain point or do they go on and die heroically?

                            They report over-temperature warning at about 100C. If the temperature rises further to about 130C, they go into shutdown and turn the output mosfets off. RRF doesn't provide a facility to reset them via SPI, so to reset them you would need to remove and re-apply VIN power.

                            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
                            • mwintermundefined
                              mwinterm
                              last edited by

                              @dc42 : Thanks a lot for the info!

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