Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Why no PWM on hotend fan output?

    General Discussion
    4
    13
    284
    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.
    • zapta
      zapta last edited by

      I have the config below for the fan of the hotend/heatsinc. The PWM signal is 0% when the hotend is cold but it goes to 100% instead of 50% when the temperature > 50c. That is, no PWM, just DC, when viewed with an osciloscope.

      Any idea what can be the problem?

      M950 F1 C"out6" Q50000   ; 50Khz
      M106 P1 S0.5 H1 T50 C"Heatsink Fan"   ; 50% when T > 50c.
      

      Firmware: RepRapFirmware for Duet 3 Mini 5+ 3.4.0beta5 (2021-10-12)

      fcwilt Phaedrux 2 Replies Last reply Reply Quote 0
      • fcwilt
        fcwilt @zapta last edited by

        @zapta

        Did you try a lower frequency as a test?

        Frederick

        Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

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

          @zapta said in Why no PWM on hotend fan output?:

          T50

          I think you may need to give it a temperature range to get any PWM scaling. With a single temp I think all you'll get is on or off. But I could be wrong about that.

          Also, seeing your frequency now, I think fcwilt is right. Try a lower freq.

          Z-Bot CoreXY Build | Thingiverse Profile

          zapta 1 Reply Last reply Reply Quote 1
          • zapta
            zapta @Phaedrux last edited by

            @fcwilt, I tried Q250 instead of Q50000 but no change.

            @phaedrux, M106 example suggests a single temperature. "The second example sets the second fan to a thermostatic fan for sensors 1 and 2 (e.g. the extruder heaters in a dual-nozzle machine) such that the fan will be on at 70% PWM when either hot end is at or above 45C. "

            M106 P1 T45 S0.7 H1:2
            

            Any suggestion? Is it possible that I am using a bad RRF version?

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

              Can you try the same settings with a different fan?

              There are a few possibilities like the fan itself just not like PWM.

              Z-Bot CoreXY Build | Thingiverse Profile

              1 Reply Last reply Reply Quote 0
              • fcwilt
                fcwilt @zapta last edited by

                @zapta said in Why no PWM on hotend fan output?:

                Any suggestion? Is it possible that I am using a bad RRF version?

                How are you connecting the scope?

                Is the fan connected during your tests?

                Remember that out6 is being switched not V_OUTLC2.

                Frederick

                Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

                zapta 1 Reply Last reply Reply Quote 0
                • zapta
                  zapta @fcwilt last edited by

                  @fcwilt, I am connecting the osciloscope between ground and out5 and out6 with load for pullup. With the code below, I see 50Khz PWM on out5 but not out6. Out5 just changes on/of as the heater crosses 50C.

                  ; Material fan
                  ; ------------
                  M950 F0 C"out5" Q50000   ; 50Khz for the Fan Smoother              
                  M106 P0 S0 H-1 C"Material Fan"   
                  
                  ; Heatshink fan.
                  ; --------------
                  M950 F1 C"out6" Q50000   ; 50khz for the Fan Smoother.    
                  M106 P1 S0.5 H1 T50 C"Heatsink Fan"  ; Set hot-end fan 50% (thermostatically)
                  

                  If I swap the ports out5/6 with the code below I get PWM on out6 but not out5. Out5 just changes on/of as the heater crosses 50C.

                  ; Material fan
                  ; ------------
                  M950 F0 C"out6" Q50000   ; 50Khz for the Fan Smoother              
                  M106 P0 S0 H-1 C"Material Fan"   
                  
                  ; Heatshink fan.
                  ; --------------
                  M950 F1 C"out5" Q50000   ; 50khz for the Fan Smoother.    
                  M106 P1 S0.5 H1 T50 C"Heatsink Fan"  ; Set hot-end fan 50% (thermostatically)
                  

                  It's seems that the PWM goes with the function, not with the hardware port.

                  @Phaedrux, I think that the above experiment covers the 'fan doesn't like pwm' case since either fan gets PWM when it acts as a material fan and doesn't see PWM when it acts as a heatsink fan. It seems that something with the the heatsink configuration or firmware is wrong and that this is not an hardware issue.

                  fcwilt 1 Reply Last reply Reply Quote 0
                  • fcwilt
                    fcwilt @zapta last edited by

                    @zapta

                    It could be just a mistake in the documentation.

                    Not all pins on the processor chip can generate PWM signals.

                    Frederick

                    Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

                    zapta 1 Reply Last reply Reply Quote 0
                    • zapta
                      zapta @fcwilt last edited by

                      @fcwilt said in Why no PWM on hotend fan output?:

                      Not all pins on the processor chip can generate PWM signals.

                      I do get PWM on pins out5 and on out6 when I set each one of them as material cooling fan. However, I can't get PWM on them when configured as heatshink fan with themostatic control. This leads me to believe that this is not a hardware limitation or malfunction.

                      zapta 1 Reply Last reply Reply Quote 1
                      • zapta
                        zapta @zapta last edited by

                        Ok, found a fix/workaround. The heatsink fan PWM should be specified using parameter X rather than S.

                        M950 F1 C"out6" Q50000   ; 50khz for the Fan Smoother.    
                        M106 P1 X0.5 H1 T50 C"Heatsink Fan"  ; Max 50% PWM.
                        
                        1 Reply Last reply Reply Quote 1
                        • Phaedrux
                          Phaedrux Moderator last edited by

                          I wonder if this is on purpose for the heatsink fan to prevent setting it too low and causing jams. Will see what DC42 says.

                          Z-Bot CoreXY Build | Thingiverse Profile

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

                            @phaedrux I don't think it's related to what the fan is allocated to. My MB6HC+SBC does the same for fan 4 monitoring heater 2, using firmware 3.4.0:

                            Heater 2 is at 21.6C, and if I set it to come on at 20 with 0.6 PWM it comes on full (I can hear the fan is near full speed, and the object model says it is full):
                            184a389a-7b4e-4fad-9582-94f2fb78b8ed-image.png

                            It also ignores S if I specify it in the 1-255 range:
                            43b9c5b3-5dc1-411f-9f4e-892961d34924-image.png

                            The output is capable of PWM and the fan is OK because if I use a range of temperatures the object model reports a less-than-full value, and I can hear that the fan runs slower:
                            74f3ec8f-30a2-43c3-9073-5f84367cc3d2-image.png

                            All this is with a noctua 4-wire fan on out5: M950 F4 C"!out5" Q25000
                            Board: Duet 3 MB6HC (MB6HC)
                            DSF Version: 3.4.0
                            Firmware: RepRapFirmware for Duet 3 MB6HC 3.4.0 (2022-03-15)
                            SBC: Pi4

                            zapta 1 Reply Last reply Reply Quote 0
                            • zapta
                              zapta @achrn last edited by

                              @achrn, you can also gain some insight from the fan's object model display in DWC. You will see the fractional requested value and then the actual value is 1 when the heater is hot.

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