Fan0 wont turn off.



  • This seems odd. I have Fan1 working when over 45 degrees, and Fan0 is on all the time. I took the M106 line about P0 out of my config.g file. And yet Fan0 keeps on spinning. I tried to use M107 to turn it off, and M106 P0 S0 which i thought would turn it off. Nope..... The fan is a cheap little blower fan that will be my parts cooling fan. Its a DC fan, I dont know if its PWM or not.
    This fan
    https://www.amazon.com/gp/product/B071WMHNG5/ref=oh_aui_search_detailpage?ie=UTF8&psc=1

    And here is the text of my Config.G file. At one point I added "F0" to my M563 tool command. is that wrong?


    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Wed Dec 19 2018 19:52:47 GMT-0600 (Central Standard Time)

    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    ; Network
    M550 P"AM8" ; Set machine name
    M552 S1 ; Enable network
    M587 S"Awesome Sauce!" P"1q2w3e4r" I10.0.42.195 J10.0.42.1 K255.255.255.0 ; Configure access point and IP addresses. You can delete this line once connected
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
    M92 X100.00 Y100.00 Z2560.00 E415.00 ; Set steps per mm
    M566 X900.00 Y900.00 Z12.00 E120.00 ; Set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; Set maximum speeds (mm/min)
    M201 X500.00 Y20.00 Z250.00 E250.00 ; Set accelerations (mm/s^2)
    M906 X800.00 Y800.00 Z800.00 E800.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X230 Y230 Z280 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 S0 ; Set active low and disabled endstops

    ; Z-Probe
    M574 Z1 S2 ; Set endstops controlled by probe
    M558 P1 H5 F120 T6000 ; Set Z probe type to unmodulated and the dive height + speeds
    G31 P500 X10 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
    M557 X30:200 Y30:200 S20 ; Define mesh grid

    ; Heaters
    M305 P0 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; Set temperature limit for heater 0 to 120C
    M305 P1 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 1
    M143 H1 S280 ; Set temperature limit for heater 1 to 280C

    ; Fans
    M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
    M106 P2 S1 I0 F500 H1 T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on

    ; Tools
    M563 P0 D0 H1 F0 ; Define tool 0
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

    ; Automatic saving after power loss is not enabled

    ; Custom settings are not configured


  • Moderator

    Are you sure you're connected to Fan0 and not one of the always on fan connectors?



  • yeah i keep checking that over and over. i swapped Fan1 and Fan0, and the behavior stays with the one plugged into the Fan0 pins. Fan1 is the one that comes on at 45 degrees.


  • Moderator

    If you add back a normal Fan0 config can you control it using the slider in the DWC?



  • the slider says Fan1 on it? I didnt know i was supposed to control Fan0 with that slider. How do I add it?


  • Moderator

    Well Fan0 is typically used as the part cooling fan and is Gcode controlled with M106 commands by the slicer. The DWC slider can control it as well, and you can pin it to a set speed to override whatever the slicer has set.

    Your config.g should have something like this:
    M106 P0 S0 H-1 C"Part Cooling" ; Set fan 0 (Part cooling blower) G-code controlled. Thermostatic control is turned off

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

    If it's still running all the time and the DWC slider can't control it, then I'm not sure what could be wrong.



  • Oh, interesting side fact.
    Fan0 is still running, but only at a fraction of its speed. This whole time i didnt realize that it was turning well below top speed. when i hook it to Fan1 it revs up all the way (assuming the temp is up).
    I tried something else based on a tip that DC42 gave somebody else, that is to remove all the M106 commands from the config.g

    still running!
    and Fan1 still kicks on at 45 degrees like it should.

    This is weird


  • Moderator

    If you send M106 P0 to the console, what does it send back?



  • my output from the M106 P0 command:
    Fan 0 pin: F0; frequency 250hz; speed: 0%; min: 10%; max: 100%; blip: 0.10; inverted: no


  • Moderator

    Well if the min speed is set to 10% that would explain why it won't turn off.

    Are you using the M106 command I posted above? Do you have another M106 P0 command in config.g or elsewhere that would be overriding it?



  • So I am trolling thru these files looking for a stray M106 command. What is the priority of the code being executed? what files get run first, or which ones supercede others?


  • Moderator

    gcodes are purely sequencial, so whatever was executed last gets applied and stays applied until a new command is sent to replace it.

    Config.g gets run at startup. If you have M501 at the end of config.g it will then load config-override.g. Which acts kind of like EEPROM on 8-bit boards.

    Then any macro that gets called. Like the homing files, or bed.g, start.g, stop.g, pause.g, cancel.g, etc.

    Can you post the M106 P0 command you have in config.g and the result of sending M106 P0 in the console right after a startup. They should correspond.



  • I dont have an M106 command in my config.g They are all removed at this point.

    the output from the M106 P0 command is:
    1:17:55 PMM106 P0
    Fan 0 pin: F0, frequency: 250Hz, speed: 0%, min: 10%, max: 100%, blip: 0.10, inverted: no

    I have been looking for an M106 that i missed. I have not found it yet.


  • Moderator

    @jkaechler add the m106 command I posted above to your config and try again.


  • administrators

    @jkaechler said in Fan0 wont turn off.:

    I dont have an M106 command in my config.g They are all removed at this point.

    the output from the M106 P0 command is:
    1:17:55 PMM106 P0
    Fan 0 pin: F0, frequency: 250Hz, speed: 0%, min: 10%, max: 100%, blip: 0.10, inverted: no

    I have been looking for an M106 that i missed. I have not found it yet.

    If Fan0 was running when M106 P0 returned that message, then I suspect that the Fan0 mosfet on your board is blown.



  • @dc42

    Thats a bummer. This board has been in a mounted in a project on hold for a few months, not in use but also way past a warranty exchange.

    So, can I reprogram things to use the Fan2 output for the parts fan? I bet there is a guide on how to do that somewhere. I will start searching.


  • Moderator



  • Just for grins, i moved my part fan to the Fan2 header. its off. when i send M106 P2 i get:

    Fan 2 pin: F2, frequency: 250Hz, speed: 0%, min: 10%, max: 100%, blip: 0.10, inverted: no

    When i send M106 P2 S255, i happily spins up to full speed.
    When i send M106 P2 S0, it comes to a full stop.

    This is the expected behavior, and probably also a confirmation of what dc42 says about a blown mosfet. =(

    Thats not something that can be fixed by the end user is it?
    I bought my Duet Wifi from Filastruder quite some time ago.

    I just need to tell my slicer that Fan2 is the part fan and i should be fine.


  • administrators

    You can also use the F2 parameter in your M563 tool definition command to tell the firmware that the print cooling fan is fan 2 when that tool is selected.


Log in to reply