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

    Variable Fan configuration possible?

    Scheduled Pinned Locked Moved Solved
    Tuning and tweaking
    7
    24
    1.8k
    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.
    • TimTomundefined
      TimTom
      last edited by

      Hi,

      first of all happy new year and stay healthy.

      I have a Fan configured for the electronics, controlled by the MCU temperature.

      I came along the guide:
      https://docs.duet3d.com/User_manual/Connecting_hardware/Temperature_configuring_mcu_temp#firmware-configuration

      telling

      M308 S2 Y"drivers" A"DRIVERS"  ; configure sensor 2 as temperature warning and overheat flags on the TMC2660 on Duet
      M308 S3 Y"mcu-temp" A"MCU" ; configure sensor 3 as on-chip MCU temperature sensor
      M950 F2 C"fan2" Q100 ; create fan 2 on pin fan2 and set its frequency
      M106 P2 H2:3 L0.15 X1 B0.3 T40:70 ; set fan 2 value
      

      My question is, I'd like to have a variable/gradiant FAN control:

      e.g.
      30° = Fan 50
      35° = Fan 100
      40° = Fan 150
      50° = Fan 200
      60° = Fan 255

      I'd like to have less noise when temperature is not critical, but high FAN power when necessary.
      Looking up M106 command also did not really help.

      Is this possible, if yes how? And may I suggest to add an example for such a configuration in the documentation? (or I could put one in if desired).

      Phaedruxundefined 1 Reply Last reply Reply Quote 0
      • rjenkinsgbundefined
        rjenkinsgb
        last edited by rjenkinsgb

        From what I can see, the double value T in M106, eg. T40:70, is a gradient range.
        eg. It sets the fan threshold and full speed temperatures.

        So, T30-60 should give something like the range you want, it kicking on at 30' and full power by 60'C.

        Robert J.

        Printers: Overlord pro, Kossel XL+ with Duet 6HC and "Frankentron", TronXY X5SA Pro converted to E3D toolchange with Duet 6HC and 1LC toolboards.

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

          @timtom said in Variable Fan configuration possible?:

          less noise

          The problem for me when setting a range was that the fan speed changing due to hysteresis was more annoying than just setting a fixed speed. I ended up just setting the fan speed to a fixed speed that wasn't obnoxious and enabling it when either heater was powered. This way the heater mosfets are cooled and the drivers will only really be getting much use during a print anyway.

          Z-Bot CoreXY Build | Thingiverse Profile

          TimTomundefined 1 Reply Last reply Reply Quote 0
          • TimTomundefined
            TimTom @Phaedrux
            last edited by

            @rjenkinsgb
            Thanks a lot for your input, but it's not really answering the question.

            T40:70 means the association with the two "Heaters" (drivers warnung and MCU) defined in line 1 and 2

            @phaedrux
            Well that might be your opinion, but as usually at least for my part, I want to learn this by myself and maybe figure out a setting I can live with?
            For me it's super annoying that the fans turn on and off every minute and make a loud noise. I prefer them to gradiantly increase noise. 🙂

            @All
            So I'm still looking for a way to configure a gradiant fan control as described before. The example does not really help.

            alankilianundefined deckingmanundefined 2 Replies Last reply Reply Quote 0
            • TimTomundefined TimTom marked this topic as a question
            • alankilianundefined
              alankilian @TimTom
              last edited by

              @timtom

              I'm not familiar with the object model and all that, but I think you could use daemon.g to write a loop checking the temperature and sending an appropriate fan speed control.

              If you look into this, please report your trials here for the rest of us to learn from.

              SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

              TimTomundefined 1 Reply Last reply Reply Quote 1
              • TimTomundefined
                TimTom @alankilian
                last edited by

                @alankilian

                grml, hmm ok so no easy way out, ok will try on the weekend and post results 🙂

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

                  @timtom said in Variable Fan configuration possible?:

                  @rjenkinsgb
                  Thanks a lot for your input, but it's not really answering the question.

                  T40:70 means the association with the two "Heaters" (drivers warnung and MCU) defined in line 1 and 2

                  Err no - that isn't the case.

                  @All
                  So I'm still looking for a way to configure a gradiant fan control as described before. The example does not really help.

                  I think you are getting a bit confused here. The M106 example you have been given does indeed give you the gradient control you seek - I know that for fact because I use it myself. It's also documented here https://duet3d.dozuki.com/Wiki/M106.

                  Quoting from that linked Wiki .....

                  "In firmware 1.19 and later, the T parameter may be of the form Taaa:bbb where aaa is the temperature at/below which the fan should be fully off and bbb is the temperature at which the fan should be fully on. The PWM will be set proportionally if the temperature is between these limits."...end of quote.

                  You can also use the L and X parameters in conjunction with the Taaa:bbb for even more granular control. I do just that to eliminate an annoying buzz that I get at 10% fan speed or lower. That is to say I set the temperature range but also use the L parameter such that the fan runs at 20% speed as soon as as the minimum temperature threshold is reached and ramps up to full speed at the maximum temperature threshold, and is off when below the low temperature threshold.

                  The driver temperature and overheat flags you mention are simply that - i.e. they are binary flags and either on or off. So while you can have have the fan run proportionally with MCU temperature, you can't do the the same for the overheat flags because they are are simply warning flags which give a binary 1 or 0 and not variable temperature measurements in degrees C.

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

                  TimTomundefined 1 Reply Last reply Reply Quote 2
                  • TimTomundefined
                    TimTom @deckingman
                    last edited by

                    @deckingman

                    Thanks for your input, saved me some time 🙂

                    I just came accross a different issue, maybe you're able to help me with (already reading and trying to understand. Changing the fan to "manual" mode", I figured that I'm only able to set the fan speed to 100% or 0%.

                    M950 F3 C"out3" ; create fan 2 on pin out4 and set its frequency
                    M106 P3 S0 H-1 C"My Fan"

                    Fans are standard 2 wire configurations. Weired is, that the Hotend and Partcooling Fan on out5/6 work just as expected . . .

                    HW is a Duet 3 Mini 5+

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

                      @timtom said in Variable Fan configuration possible?:

                      @deckingman

                      Thanks for your input, saved me some time 🙂

                      I just came accross a different issue, maybe you're able to help me with (already reading and trying to understand. Changing the fan to "manual" mode", I figured that I'm only able to set the fan speed to 100% or 0%.

                      M950 F3 C"out3" ; create fan 2 on pin out4 and set its frequency
                      M106 P3 S0 H-1 C"My Fan"

                      Fans are standard 2 wire configurations. Weired is, that the Hotend and Partcooling Fan on out5/6 work just as expected . . .

                      HW is a Duet 3 Mini 5+

                      Not sure that I fully understand what you mean by ".....I figured that I'm only able to set the fan speed to 100% or 0%". Do you see the fan in the web interface and does it have a slider control? If so, are you saying that the slider only allows for 0 and 100 % speed and that you are unable to set any intermediate speed, or are you saying that you can set the speed but the fan doesn't react to it properly and either runs at full speed or no speed regardless of the demand setting?

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

                      TimTomundefined 1 Reply Last reply Reply Quote 0
                      • TimTomundefined
                        TimTom @deckingman
                        last edited by

                        @deckingman

                        Thanks again for coming back to me.

                        The Fan turns up in the Webfrontend. I can set the value between 0 and 100, the fan only turns on, when I set it to 100. (Any value set below 100 e.g. 70,87 or even 99 leave the fan off). Just when I move the slider to 100, it switches on to full blast.

                        Alex.crundefined deckingmanundefined 2 Replies Last reply Reply Quote 0
                        • Alex.crundefined
                          Alex.cr @TimTom
                          last edited by

                          @timtom

                          This could mean that your fan doesn’t like to be PWM’d. You can try adjusting the Q value on M950 to find a value that works.

                          Or it could mean that your fan needs a “blip” to get started. This can be controlled with the B command under M106.

                          Voron2.4/Duet3 SBC+6HC+3HC+1LC+1HCL(x2) - Delta/Duet2 Wifi - CubePro/Duet2 Wifi+Duex5 - Laser/Duet3 Mini5+ - Cel Robox - U̶p̶3̶0̶0̶+/D̶u̶e̶t̶3̶ ̶6̶H̶C̶+̶LC1̶ - F̶T̶-̶5̶/̶D̶u̶e̶t̶2̶ ̶W̶i̶f̶i̶ - S̶o̶l̶i̶d̶o̶o̶d̶l̶e̶

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

                            @timtom I agree with what @Alex-cr has said. I have some similarly temperamental fans and have found that a really low "Q" value of 10 Hz beats them into submission.

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

                            TimTomundefined 1 Reply Last reply Reply Quote 1
                            • TimTomundefined
                              TimTom @deckingman
                              last edited by

                              @deckingman & @Alex-cr

                              THAT'S IT!
                              Stupid fans, got some SUNON 24V, they work more or less reliable with Q10 (making some noise due to the 10 Hz).

                              They don't turn on on low settings, but with setting the start temperature in M106 to 10°C, I got me expected results:

                              M950 F2 C"out4" Q10
                              M106 P2 H2:3 L0.15 X1 B0.3 T10:50 C"Electronics Bay" B0.5
                              

                              The fans turn slowly in normal operation, providing a nice breeze to the electronics compartment and will speed up with raising temperatures.
                              There is still a notable difference between 99% and 100%, but that should do it for the moment.

                              I added some information on https://duet3d.dozuki.com/Wiki/M950?revisionid=HEAD, maybe that gets accepted and will help others in future.

                              Thanks a lot for your support. For the future I'll experiment with different fans, as DUET allows different voltages on out ports. I assume lower voltage fans might perform better as the operating voltage is not so wide spread.

                              👍 👍 👍

                              Alex.crundefined deckingmanundefined 2 Replies Last reply Reply Quote 0
                              • Alex.crundefined
                                Alex.cr @TimTom
                                last edited by

                                @timtom
                                The biggest thing to look for in fans is a note saying "PWM" capable as a spec. Voltage matters less.

                                Voron2.4/Duet3 SBC+6HC+3HC+1LC+1HCL(x2) - Delta/Duet2 Wifi - CubePro/Duet2 Wifi+Duex5 - Laser/Duet3 Mini5+ - Cel Robox - U̶p̶3̶0̶0̶+/D̶u̶e̶t̶3̶ ̶6̶H̶C̶+̶LC1̶ - F̶T̶-̶5̶/̶D̶u̶e̶t̶2̶ ̶W̶i̶f̶i̶ - S̶o̶l̶i̶d̶o̶o̶d̶l̶e̶

                                TimTomundefined 1 Reply Last reply Reply Quote 0
                                • TimTomundefined
                                  TimTom @Alex.cr
                                  last edited by

                                  @alex-cr
                                  Thanks for the input, mostly followed Voron BOM and the fans are 24 Volt, the selection on "easily" available ones in certain dimensions seem limited.

                                  Even though I might ask dummy questions and keep busy, I'm super thankful for the support, the experience I'm gaining is priceless.
                                  I heavily rely on documentation, and while Duet Documentation is not bad, some more guidance and help on the one or other page would shorten troubleshooting!

                                  Alex.crundefined 1 Reply Last reply Reply Quote 0
                                  • Alex.crundefined
                                    Alex.cr @TimTom
                                    last edited by

                                    @timtom
                                    I am a big fan of my 2.4.
                                    The Voron community has done a good job of putting a lot of components in demand.

                                    Voron2.4/Duet3 SBC+6HC+3HC+1LC+1HCL(x2) - Delta/Duet2 Wifi - CubePro/Duet2 Wifi+Duex5 - Laser/Duet3 Mini5+ - Cel Robox - U̶p̶3̶0̶0̶+/D̶u̶e̶t̶3̶ ̶6̶H̶C̶+̶LC1̶ - F̶T̶-̶5̶/̶D̶u̶e̶t̶2̶ ̶W̶i̶f̶i̶ - S̶o̶l̶i̶d̶o̶o̶d̶l̶e̶

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

                                      @timtom Unless fans actually state that they are PWM compatible, it's largely "pot luck" how well they will work. But I haven't yet come across a fan that I can't get to work reasonably well by playing around with PWM frequency (Q value) and the L, X and B parameters.

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

                                      1 Reply Last reply Reply Quote 0
                                      • TimTomundefined
                                        TimTom @Alex.cr
                                        last edited by

                                        @alex-cr

                                        Yes definitivly, I started with a Tevo Tarantula several years ago, got it working so so.
                                        Still remember my first clogged nozzle (due to bad machinery in hotend) and how long I needed to figure this out. . .

                                        Then I got one of the first Prusa MK3, also here it tooks some iterations until it got that stable to become my workhose since (printed all ABS parts for my Voron with it, in an enclosure).

                                        Now I'm with Voron, beautiful machine.

                                        With each iteration I learned more and more. As I kid I enjoyed Lego Technic, no comparision, what 3D printers bring to the table 🙂

                                        even if it's off this topic, do you have some docu/suggestion/information for Z-Level/print start code? - I'll figure out but would appreciate some hints 🙂

                                        Alex.crundefined 1 Reply Last reply Reply Quote 0
                                        • Alex.crundefined
                                          Alex.cr @TimTom
                                          last edited by

                                          @timtom

                                          Sure can! Let me know if you need any explaining. This will need modified to fit your needs but should give you a place to start.

                                          My slicer(Superslicer) start code looks like this:

                                          ;voron start code
                                          
                                          M104 S180
                                          M190 S[first_layer_bed_temperature]
                                          G10 P0 S[temperature]  R180;
                                          M116 ; wait for tool temp
                                          G32 ; home and level gantry 
                                          
                                          
                                          M207 P0 S0.4 R0.0 F3600 Z1.0; firmware retract defaults
                                          M572 D0 S0.05 ;pressure advance for tool 0
                                          M291 P"Cycle Start" S1 T30
                                          
                                          M98 P"/macros/print_scripts/nozzle_purge_wipe.g"
                                          M98 P"homez.g"  ; home Z using the home Z file
                                          G1 X175 Y175 Z10 F20000
                                          

                                          Homez.g

                                          ; homez.g
                                          ; called to home the Z axis
                                          ;
                                          G90
                                          ;G59.1													;select nozzle height sensor coordinate system
                                          ;G31 K0 													  ; select nozzle hieght sensor
                                          M98 P"/macros/print_scripts/speed_homing.g"   			  ; Setup low speed & accel
                                          G1 Y335.0 F9000
                                          G1 X230.2
                                          G1 X230.2Y349.5 ; probe location
                                          G91
                                          G1 Z-999 F1000 H1
                                          G1 Z5.0 F6000
                                          G1 Z-999 F150 H1
                                          G90
                                          G1 Z1.35 ;set this number to the difference between the bed and nozzle height sensor 
                                          G92 Z0.0  
                                          ;G4 S5
                                          
                                          M98 P"/macros/print_scripts/speed_normal.g"   			  ; Setup normal speed & accel
                                          G01 Z20.0 F60000
                                          G54    ;return coordinates to normal
                                          G4 P250
                                          

                                          Homeall.g

                                          ; homeall.g
                                          ; called to home all axes
                                          ;
                                          
                                          G91 
                                          G54; relative positioning
                                          M561                                                      ; Clear any bed transform
                                          G1 H2 Z10 F2000
                                          M98 P"/macros/print_scripts/speed_homing.g"   			  ; Setup low speed & accel
                                          
                                          G1 Y-5 H2 F9000     ; Move away from the endstops
                                          G1 X600 F2400 H1   ; Coarse home X
                                          G1 X-5 F9000
                                          G1 X600 F360 H1 			 ; Coarse home X
                                          G1 X-5 F9000
                                          G1 Y600 H1 F2400  		 ; Coarse home Y
                                          G1 Y-5 F9000     ; Move away from the endstops
                                          G1 Y600 F360 H1  		 ; Fine home Y
                                          G1 Y-5 F9000     ; Move away from the endstops
                                          G90;
                                          M98 P"homez.g"  ; home Z using the home Z file
                                          M98 P"/macros/print_scripts/speed_normal.g"   			  ; Setup normal speed & accel
                                          
                                          G1 Z20.0
                                          G1 X100.0Y344.5
                                          ;M98 P"/macros/print_scripts/goto_bucket.g"   			  ; Go to park position
                                          G54
                                          ;G29 S1 ; load bed map
                                          

                                          And my G32/bed.g looks like this:

                                          ; bed.g
                                          ; Called to perform automatic bed compensation via G32
                                          
                                          ; If the printer hasn't been homed, home it
                                          if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed
                                          	echo "Homeing"
                                          	G28
                                          else
                                          	M98 P"/sys/homez.g"   			  ; Home Z
                                            
                                          
                                          G54   												      ; normal coordinate system 
                                          M561                                                      ; Clear any bed transform 
                                          ;G31 K1 													  ; select height probe 
                                          M401 ;Deploy Probe
                                          
                                          G1 X310 Y310 Z15.0 F20000                               ; move to an inital location
                                          M98 P"/macros/print_scripts/speed_homing.g"   			  ; Setup low speed & accel
                                          M290 R0 S0 ; clear babystepping
                                          G90;
                                          echo "Leveling"
                                          M558 H6.0 ;dive height for probing
                                          while iterations <=1                                      ; Do minimum of 2 passes
                                          	G30 P0 X320 Y300 Z-99999
                                          	G30 P1 X320 Y50 Z-99999
                                          	G30 P2 X30 Y50 Z-99999
                                          	G30 P3 X30 Y300 Z-99999 S4
                                          
                                          M558 H3.0 ;lower dive height
                                          while move.calibration.initial.deviation >= 0.01         ; perform additional tramming if previous deviation was over 0.01mm 
                                             if iterations = 5                                      ; Perform 5 checks
                                                M300 S3000 P500                                     ; Sound alert, required deviation could not be achieved
                                                abort "!!! ABORTED !!! Failed to achieve < 0.01 deviation within 5 movements. Current deviation is " ^ move.calibration.initial.deviation ^ "mm."
                                             G30 P0 X320 Y300 Z-99999
                                             G30 P1 X320 Y50 Z-99999
                                             G30 P2 X30 Y50 Z-99999
                                             G30 P3 X30 Y300 Z-99999 S4
                                           
                                          echo "Gantry deviation of " ^ move.calibration.initial.deviation ^ "mm obtained."
                                          ;set global.gantrylevel=1 ; set variable to true
                                          G1 Z{sensors.probes[0].diveHeight+10.0}; lift head
                                          
                                          M402     ;Retract probe
                                          M98 P"homez.g"
                                          
                                          
                                          M98 P"/macros/print_scripts/speed_normal.g"   			  ; Setup normal speed & accel
                                          G1 Z20.0
                                          M98 P"/macros/print_scripts/goto_bucket.g"   			  ; Go to park position
                                          G54
                                          G4 P50
                                          ;G29 S1 								; load bed map
                                          

                                          Voron2.4/Duet3 SBC+6HC+3HC+1LC+1HCL(x2) - Delta/Duet2 Wifi - CubePro/Duet2 Wifi+Duex5 - Laser/Duet3 Mini5+ - Cel Robox - U̶p̶3̶0̶0̶+/D̶u̶e̶t̶3̶ ̶6̶H̶C̶+̶LC1̶ - F̶T̶-̶5̶/̶D̶u̶e̶t̶2̶ ̶W̶i̶f̶i̶ - S̶o̶l̶i̶d̶o̶o̶d̶l̶e̶

                                          TimTomundefined 1 Reply Last reply Reply Quote 0
                                          • TimTomundefined TimTom has marked this topic as solved
                                          • TimTomundefined
                                            TimTom @Alex.cr
                                            last edited by

                                            @alex-cr

                                            Thanks a lot for your config, it helped already.

                                            Two more questions.

                                            1. How do you adjust Z-height? I followed the guide https://docs.duet3d.com/User_manual/Connecting_hardware/Z_probe_testing and on 0.0 the nozzle is barely touching the bed (paper test). When starting printing the nozzle moves to 0.2 and the extrusion is to high . . .
                                              Seems like I'm missing something in the concept.
                                            2. How do you handle the two different Z-Sensors (inductive and nozzle tip)? It's still a mystery to me.

                                            Do you prefer inductive or nozzle sensor? Any insights are heavily appeciated!

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