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

    Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    6
    27
    4.6k
    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.
    • SnowCrashundefined
      SnowCrash
      last edited by SnowCrash

      Very cool, guys! thank you very much! great job and upvotes all around 🙂

      I'll test both the modified M106 formulation and fan naming tonight on my machine so as to (hopefully) add a nice 'solved' to the title of this tread.

      p.s. this has been nagging at me for a while now so have to ask: what do the little pin buttons next to each fan name in DWC actually do?

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

        @snowcrash The pins let you lock the fan speed. Useful for gcode controlled fans if you set the speed too high or too low in the slicer.

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 1
        • SnowCrashundefined
          SnowCrash
          last edited by SnowCrash

          Thanks, @Phaedrux 🙂

          I can also happily confirm @wilriker's solution (T-1:100) works great (Thanks @wilriker!)

          (though obviously I can only affirm this for the initial 50% speed and not the jump to 100% if temps go above 100°C - unless someone knows of a way to do this?)

          However, a final snag remains as the fan's naming still eludes me.

          I added double-quotes to the fan's name in the C parameter as instructed:

          M106 P2 S0.5 I1 F25000 L0.5 B4 H101 T-1:100 C"DuetFan"
          

          Reset the Duet and re-loaded DWC, But the name remains 'FAN2' like before.

          That's my M115 data:

          M115
          FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 1.21 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2018-03-2

          So my firmware is 1.21, but perhaps my specific version of that release isn't up-to-date enough?

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

            @snowcrash to get the renaming to work you would need to use the DWC version 1.22.1 v2 and the special firmware version 2.01 (b1.5?) from here https://forum.duet3d.com/topic/5485/duet-web-control-wishlist-notes-and-priorities/25

            But at this point it might just be worth waiting for the next official release of 2.01 and associated DWC version.

            Z-Bot CoreXY Build | Thingiverse Profile

            1 Reply Last reply Reply Quote 0
            • JoergS5undefined
              JoergS5
              last edited by

              If the TMC chip does not report temperatures correctly, isn't it better to measure the temperatures with a sensor yourself (e.g. at the heat sink of the controller which is under max load, so X or Y controller) and take this temperature to decide how to handle fan speed?

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

                @joergs5 said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                If the TMC chip does not report temperatures correctly, isn't it better to measure the temperatures with a sensor yourself (e.g. at the heat sink of the controller which is under max load, so X or Y controller) and take this temperature to decide how to handle fan speed?

                If the drivers get hot, they will heat the CPU through the PCB. So you could use a combination of the CPU temperature and the driver warning to handle fan speed.

                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

                deckingmanundefined 1 Reply Last reply Reply Quote 1
                • SnowCrashundefined
                  SnowCrash
                  last edited by SnowCrash

                  @phaedrux said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                  @snowcrash to get the renaming to work you would need to use the DWC version 1.22.1 v2 and the special firmware version 2.01 (b1.5?) from here https://forum.duet3d.com/topic/5485/duet-web-control-wishlist-notes-and-priorities/25

                  But at this point it might just be worth waiting for the next official release of 2.01 and associated DWC version.

                  Yeah, I think you're absolutely right. It's just a convenience anyway, so I'll wait with this.

                  @joergs5 said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                  If the TMC chip does not report temperatures correctly, isn't it better to measure the temperatures with a sensor yourself (e.g. at the heat sink of the controller which is under max load, so X or Y controller) and take this temperature to decide how to handle fan speed?

                  Excellent suggestion, @JoergS5, thanks.

                  Whenever possible I prefer to use the internal circuitry, but in this case external sensor/s do seem like the best solution. The downside would be the need to devise suitable hardware to interface with the Duet (either ready-made or custom) and the additional wiring & clutter.

                  I'll look into this more closely when I get some free time 🙂

                  @dc42 said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                  @joergs5 said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                  If the TMC chip does not report temperatures correctly, isn't it better to measure the temperatures with a sensor yourself (e.g. at the heat sink of the controller which is under max load, so X or Y controller) and take this temperature to decide how to handle fan speed?

                  If the drivers get hot, they will heat the CPU through the PCB. So you could use a combination of the CPU temperature and the driver warning to handle fan speed.

                  Thanks, @dc42! Sounds great. Could you please give an example of how to accomplish this?

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

                    @dc42 said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                    @joergs5 said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                    If the TMC chip does not report temperatures correctly, isn't it better to measure the temperatures with a sensor yourself (e.g. at the heat sink of the controller which is under max load, so X or Y controller) and take this temperature to decide how to handle fan speed?

                    If the drivers get hot, they will heat the CPU through the PCB. So you could use a combination of the CPU temperature and the driver warning to handle fan speed.

                    For info, using a thermistor stuck to a driver chip controlling a fan to blow air onto the back of the boards, after an hour or more of printing, I typically see the driver temperature reporting about 15 degrees higher than the CPU temperature. More specifically, with the fan running in thermostatic mode between 40 and 50 deg C, I might see 47 degrees on the driver but only 32 being reported for the CPU. I did calibrate the cpu temperature by using M912 so they both read the same at an ambient of about 22 deg C.

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

                    SnowCrashundefined 1 Reply Last reply Reply Quote 1
                    • SnowCrashundefined
                      SnowCrash @deckingman
                      last edited by SnowCrash

                      @deckingman said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                      @dc42 said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                      @joergs5 said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                      If the TMC chip does not report temperatures correctly, isn't it better to measure the temperatures with a sensor yourself (e.g. at the heat sink of the controller which is under max load, so X or Y controller) and take this temperature to decide how to handle fan speed?

                      If the drivers get hot, they will heat the CPU through the PCB. So you could use a combination of the CPU temperature and the driver warning to handle fan speed.

                      For info, using a thermistor stuck to a driver chip controlling a fan to blow air onto the back of the boards, after an hour or more of printing, I typically see the driver temperature reporting about 15 degrees higher than the CPU temperature. More specifically, with the fan running in thermostatic mode between 40 and 50 deg C, I might see 47 degrees on the driver but only 32 being reported for the CPU. I did calibrate the cpu temperature by using M912 so they both read the same at an ambient of about 22 deg C.

                      Awesome, @deckingman, thanks!

                      In that case, I might switch to monitoring the cpu temp instead of the drivers as it would give me the gradual fan speed ramp up I'm looking for.

                      How do you monitor that particular temp? (virtual heater number?)

                      And could you please tell me how you calibrated the cpu temp?

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

                        https://duet3d.dozuki.com/Wiki/Calibrating_the_CPU_temperature

                        M106 P2 F100 L0.2 B0.5 T35:40 H100:101:102	; Set fan 2 Duet case fan. Turns on when the MCU temperature (virtual heater 100)
                        ; reaches 45C and reaches full speed when the MCU temperature reaches 65C or if any TMC2660 
                        ; drivers (virtual heaters 101 and 102) report that they are over-temperature
                        

                        This is what I use to control the dual case fans for my enclosure. Works quite well. You can modify the set point to keep the cpu relatively cool and be confident the drivers are fairly close.

                        Z-Bot CoreXY Build | Thingiverse Profile

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

                          @snowcrash said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                          @deckingman said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                          @dc42 said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                          @joergs5 said in Help Configuring PWM Fan in Thermostatic Mode for Duet Drivers:

                          If the TMC chip does not report temperatures correctly, isn't it better to measure the temperatures with a sensor yourself (e.g. at the heat sink of the controller which is under max load, so X or Y controller) and take this temperature to decide how to handle fan speed?

                          If the drivers get hot, they will heat the CPU through the PCB. So you could use a combination of the CPU temperature and the driver warning to handle fan speed.

                          For info, using a thermistor stuck to a driver chip controlling a fan to blow air onto the back of the boards, after an hour or more of printing, I typically see the driver temperature reporting about 15 degrees higher than the CPU temperature. More specifically, with the fan running in thermostatic mode between 40 and 50 deg C, I might see 47 degrees on the driver but only 32 being reported for the CPU. I did calibrate the cpu temperature by using M912 so they both read the same at an ambient of about 22 deg C.

                          Awesome, @deckingman, thanks!

                          In that case, I might switch to monitoring the cpu temp instead of the drivers as it would give me the gradual fan speed ramp up I'm looking for.

                          How do you monitor that particular temp? (virtual heater number?)

                          And could you please tell me how you calibrated the cpu temp?

                          What I do is stick a thermistor onto whatever it is want to monitor with a dab of epoxy adhesive - in this case a driver chip. I did a bit of a write up on my blog but it's a little out of date with current firmware. https://somei3deas.wordpress.com/2017/04/18/stepper-motor-and-electronics-cooling/

                          The relevant lines from my current config.g are:

                          M305 P103 X2 S"Duet\Duex" T100000 B4725 R4700; Set thermistor + ADC parameters for "heater" 2 - this is used to measure stepper chip temperature on Duet

                          and

                          M106 P2 S255 I0 F100 H103 T40:50 L125; Set fan 2 value (Duet and Duex fans), PWM signal inversion and frequency. Thermostatic control is turned on

                          The fan is set to start when then chip temperature is 40 deg C rising to fully on at 50 deg C. However, at very low speeds, the buzzing sound was bit distracting so I added the "L" parameter to inhibit really slow fan speeds. Essentially it comes on at half speed at 40 deg c and ramps up to full speed between 45 and 50. That and PWM frequency are just some things that you have to play around with to suit your particular fan(s).

                          The calibration of cpu temperature is just applying an offset. The quick and easy way is to you leave the printer say overnight, after which time all temperatures should be more or less at ambient. Turn the printer on and very quickly note the bed temperature, the hot end temperature and the cpu temperature - do it quickly before the cpu starts to warm up. The bed and hot end should be more or less the same - if not, one or other thermistors isn't calibrated correctly. Compare these temperatures with the cpu temperature. Then simply add a positive or negative offset to M912 P0. In may case, the cpu was reading 9.1 degrees high I use M912 P0 S-9.1. (not the minus sign). Now when I first turn the printer on, all temperatures read the same ambient value (within a degree or so).

                          HTH

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

                          1 Reply Last reply Reply Quote 1
                          • SnowCrashundefined
                            SnowCrash
                            last edited by

                            Thank you very much, @Phaedrux & @deckingman!

                            Definitely something I'd like to try out, but it's a lot to chew on (at least at a glance), so I'll add it to my TODO list and report back once I've had a chance to study it carefully and test it out 🙂

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