Jump to content

Fan confusion


kharrisma

Recommended Posts

 

Hi Forum Folke!

Bit of confusion around fans; I'm running five: one on the power supply, a second in the control card enclosure, a third cooling the hot-end heat sink, and two centrifugal fans, and Klipper / Mainsail as my printer OS.  

All but the two centrifugal fans are 12-volt Noctua.  I installed a secondary dedicated 12-volt power supply to run those and any other future accessory that might want 12 volts; grounds from the 12 and 24 volt power supplies are tied, so I can supply power to the fans from the 12-volt PS and turn them on or off via the control card ground pin for that fan.  Works great, no issues with any of those.  Machine is nearly dead-silent using those!  All of which is likely neither here nor there, but since I can't say with any certainty what IS going on, I also can't say what ISN'T going on, and in the event this might be relevant, I included it.

My problem is with the two centrifugal part-cooling fans; they're 24-volt, so the hookup would seem to be pretty straightforward.  I used DuPont connectors to turn the two fan wires into four (so I can replace them independently without soldering.)  At this point, they don't come on ever for any reason.  I tried entering "M160 heater_fan part_fan S1.0" (I understand some control software uses 0 - 255, but the Klipper documentation says 0.0 - 1.0.)  All I get is "Unrecognized command."  Everything I can find says the M106 command IS supported by Klipper, so I'm at a loss to understand what's happening.  Likely I have the fan section of my printer.cfg file misconfigured, so I'm including it below:

    [heater_fan heatbreak_cooling_fan]
    pin: PC7
    # (FAN_1 on card.)

    [heater_fan controller_fan]
    pin: PB15
    # (FAN_2 on card.)

    [heater_fan part_fan]
    pin: PC6
    # (FAN_0 on card.)
    max_power: 1.0
    shutdown_speed: 0.0
    cycle_time: 0.010
    hardware_pwm: false
    kick_start_time: 0.100
    off_below: 0.0

Will (or should) M106 work on any of these fans, for purposes verify they're functioning properly?  It's absolutely not working for the part cooling fans.  Any direction gratefully received!!

 

Link to comment
Share on other sites

I would change 

 [heater_fan part_fan]
    pin: PC6
    # (FAN_0 on card.)
    max_power: 1.0
    shutdown_speed: 0.0
    cycle_time: 0.010
    hardware_pwm: false
    kick_start_time: 0.100
    off_below: 0.0

to

 [fan]
    pin: PC6
    # (FAN_0 on card.)
    max_power: 1.0
    shutdown_speed: 0.0
    cycle_time: 0.010
    hardware_pwm: False
    kick_start_time: 0.100
    off_below: 0.0

The reason being... There are multiple fan types you can address. "[fan]" is literally reserved for the part cooling fan. Heater fan requires a reference temperature and heater device and that's why you might not get any response from the fans.

Klipper reference, fans

Link to comment
Share on other sites

In your Mainsail interface, there should be a Miscellaneous section with a slider bar that controls the part cooling fans.

2024-11-13-181119_440x275_scrot.png.97927c883a1e183b79e00b594da575be.png

On mine, it is at the bottom of the page. You can enter a number in or move the slider.

In your command "M160 M106 heater_fan part_fan S1.0", the 'heater_fan' part is unnecessary. You should be able get away with just "M106 part_fan S1.0". I can't test the S255 vs S1.0 because my system is out of date and the S1.0 doesn't work for me.

  • Like 1
Link to comment
Share on other sites

Just wanted to add...

You need to go thru all of the fans you have listed. You can't use [heater_fan] for all of your fans.

Use [controller_fan <fan_desc>] for your chassis fans that cool your electronics bay

Use [heater_fan <fan_desc>] for your hotend fan and also add temp for "extruder" and speed settings

Any other fans you want to control can be [fan_generic <fan_desc>]

  • Like 2
Link to comment
Share on other sites

4 minutes ago, Penatr8tor said:

@atrushing  I think he needs to revisit his fan code for all his fans. Do you agree?

True, they could use a little cleanup. Mine are labeled as you describe. But the "M106 part_fan S255" command still worked.

 

[fan] ##  Print Cooling Fan
[heater_fan hotend_fan] ##  Hotend Fan
[controller_fan controller_fan] ##  Controller fan

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, atrushing said:

True, they could use a little cleanup. Mine are labeled as you describe. But the "M106 part_fan S255" command still worked.

[fan] ##  Print Cooling Fan
[heater_fan hotend_fan] ##  Hotend Fan
[controller_fan controller_fan] ##  Controller fan

Agree, His problem is that he is using "heater_fan" to define every fan. 

image.thumb.png.6eadb86b460ab4fa9b040d354ead8f6e.png

@kharrisma Sorry, I don't mean to speak behind your back. Just discussing your issue with @atrushing who is very knowledgeable. 

Link to comment
Share on other sites

@kharrisma I just realized what your issue is and it's this...

From the hear fan description above they state, "By default, a heater_fan has a shutdown_speed equal to max_power". That's because a min temp must be defined in order for the fan to turn on in the first place. So you could just add heater: extruder and heater_temp_10.0 which would turn the fan on as long as the hotend is at least 10C or 50F but... that's not really the right way to do it. You want to use [fan]... that command was specifically created for the part fan.

😎👍

 

 

Link to comment
Share on other sites

7 minutes ago, Penatr8tor said:

His problem is that he is using "heater_fan" to define every fan

Yep, these are the dangers of copy-paste in configurations. There is just so much background reading needed in creating a new configuration from pieces.

  • Like 2
Link to comment
Share on other sites

Per your recommendation, Penatr8tor,  a careful re-read of the Klipper reference re: fans got me this:  "heater_fan" "controller_fan", and "temperature_fan" are all fans controlled by or associated with a heater or some other component like a stepper; they turn on or off based on input from other parts of the machine according to parameters set in printer.cfg.  The "fan" or "fan_generic" is dedicated to part-cooling only, and is controlled manually (or by the slicer-generated gcode) and is not dependent on input from thermistors or other components.  Apparently "fan" responds to "M106" (sorry... the M160 was a typo) and "fan-generic" responds to "set_fan_speed."  IF I'm correctly understanding what I read.  So no, the heat sink and card fans wouldn't turn on via a M106 command (not without tinkering with parameters, at least), but the part-cooling fan(s) *should.*  Unless that's not right either?

I re-did the entry for the part cooling fans to read " [fan], saved/restarted, and tried the "M106 S1.0," and still get the unrecognized command error.  Changing the "S1.0" to "S255" made no difference.  "M106 fan S1.0" didn't work either.  Doesn't help that I'm not certain about the correct 'syntax' for the command with regard to specifying the fan.  When that got me nowhere, I renamed the part cool fan to [fan_generic], saved/restarted, then tried "set_fan_speed S1.0" and got unrecognized command again.  Tried "set_fan_speed fan S1.0 with the same result.

The part cooling fans DO spin up if powered directly from 24V, so the wiring and fans are good.  The control card's an SKR Mini E3, and was working perfectly in Marlin; this issue cropped up in switching over to Klipper.   I am using the "save and restart" button atop the config editor.  Read something recently in the Klipper discord that someone was having issues with changes to the config file not changing anything, and he had to just save the changes, the go back to the dashboard and do a "firmware restart" before the changes showed up in the machine's behavior.  Maybe that's where I'm going wrong?

@atrushing:  I appreciate your jumping in here!  I did try using the 'slider' control (it was the first thing I tried), and it did nothing, which led me to trying to use M106 or 'set_fan_speed.'  Does Klipper return an "unrecognized command" if the fan (or something else) is incorrectly configured?  I started with 'copy/paste' and have been changing things as I discover more in the Klipper documentation, which I find to be a bit obscure in some areas and crystal clear in others (far more likely ME than the documentation!)

Okay, looks like I've got my homework assignment.  I'll take everyghing you've said here and try making some changes in an orderly fashion until those fans come on.  I very much appreciate your willingness to help out a Klipper newbie!

 

 

  • Like 3
Link to comment
Share on other sites

@kharrisma Good to see you're on the right track.

Have you tried hooking up one of the 24v centrifugal part-cooling fans directly to the board to see if you might have a wiring issue? I mean any 24v fan would work. I'm just thinking that you might have a short or disconnect somewhere.

 

Link to comment
Share on other sites

@kharrisma I would suggest setting the config for your part cooling fan as @Penatr8tor described in his first post as it is a known good syntax. If you would like to simplify it a little until you get it working, my config is as follows:

[fan]
##  Print Cooling Fan - FAN0
pin: PC6 #verify the pin number
kick_start_time: 0.5
off_below: 0.10

Then the command M106 S255 should work. When you issue the command, the slider should move to the right and it should say 100% in the fan speed box. If this happens but the fans don't spin, then it is most likely a hardware/wiring/pin# problem.

2024-11-14-183656_607x180_scrot.png.a4faf389e9f7a8447abe4c8c0533cf92.png

Link to comment
Share on other sites

Pulled parts fan connector from card and applied 24 volts from a benchtop power supply; fans run correctly, no fan or wiring issues.  Well, with the minor exception of one issue: I've basically rewired this thing entirely, and managed to switch the positive and negative wires in the socket (worked with the bench power supply because I went with color, not position.) DUUUHHH. I appreciate all the help you guys have provided... it managed to funnel me in the right direction.

Initially, once I switched the wires to the way they should have been, it spun up to 100%, D10 (LED for that fan) brightly lit (it was still operating with the M106 S1.0, fans screamed up to full speed.) Tried reducing speed to 0.5, and they just stopped spinning. Couldn't get them to spin up again. Firmware reboot, now it spins up briefly with an M106 command, then stops. Won't run full speed even with the S1.0, and won't spin up at all again without a restart.
 
So it's half-fixed (by it's half-a$$ed builder...) I think this thing is haunted...
Link to comment
Share on other sites

18 minutes ago, kharrisma said:
 
So it's half-fixed (by it's half-a$$ed builder...) I think this thing is haunted...

Try a different fan port on the board and see if it fixes the problem.

 

Link to comment
Share on other sites

Thanks for the suggestion, mvdveer; switched pin assignment to that of what was a useless fan socket, as the control cooling card is powered directly from a separate 12-volt power supply, and isn't being controlled by the board - - always on.  It was set up to use pin PB15, so I commented out the control fan and assigned PB15 to the print cooling fans. 

Doesn't matter whether PC6 or PB15 is assigned to [fan], acts the same either way: LED associated with that pin lights 100% briefly (.25 seconds?), then drops to about 50% brightness; the fans start spinning instantly when the LED is bright, but when it drops to 50%-ish, the fans maintain a slow spin for a second or two, then stop spinning.  The LED remains on at 50%.

I did try assigning additional parameters to [fan], but it makes no difference.  The extra gobbldegook  under the header is so I can troubleshoot without bouncing back and forth between the print and the card; it looks better in the config file than it does here.

Current fans section:

 

##########   SECTION   #########################################################
##########    FANS     #########################################################

# ON MCU     PIN     LED     ON CARD
#   |         |       |         |
#   V         V       V         V
# FAN PWM    PC7      D3      FAN1
# FAN0 PWM   PC6      D10     FAN0
# FAN1 PWM   PB15     D6      FAN2

[heater_fan heatbreak]
pin: PC7
max_power: 1.0
shutdown_speed: 0.0
kick_start_time: 0.10
off_below: 0.0
#tachometer_pin:
#tachometer_ppr:
#tachometer_poll_interval:
#enable_pin: PC7
heater: extruder
heater_temp: 45.0
fan_speed: 1.0

#[controller_fan] omitted as it's powered from a separate 12V power supply; always on.

[fan]
#print cooling fan
pin: PC6
max_power: 1.0
shutdown_speed: 0.0
kick_start_time: 0.10
off_below: 0.0

Not sure where to take this next; not so sure it's looking like a Klipper issue anymore as far as I can tell.  I'm going to try a test print and set the print cooling fans to 100% in the slicer and see what happens, but I'm not tremendously hopeful.  If I get any joy there, I'll post it here.

 

Link to comment
Share on other sites

Not that this is Klipper-related anymore (I think...), but I'm pretty sure I know what's going on.

Of the three fan sockets, one is "dedicated" to the heat-break cooler; the other two "float" and can be used for either of the other two fan functions.  The MCU doesn't drive the fan MOSFETs directly; it drives a secondary IC.  Two, actually; one drives the heatbreak cooler fan, while the other drives the other two fans.  Both of the two sockets I tried using to get the print cooling fans to spin up are driven from this secondary IC.  Based on it's current behavior and on my (admittedly limited) knowledge of electronics, I think a zener diode took a hit from me trying to drive a mis-wired fan (reversed polarity), and it's failure (when the full-brightness LED drops to about a third of full brightness) causes the slow spin, and who knows why it won't respond at all to subsequent M106 commands?   Pretty sure I'm looking at replacing the control card at this point.  I appreciate the time taken and suggestions!

Edited by kharrisma
  • Like 1
Link to comment
Share on other sites

That's half the fun!  I got this thing to have something to do that would use my work skills after I retired; this whole 3D printing thing is doing all that and more!  This is actually the second board I fried; first one I wanted to upgrade to a PT1000 thermistor to up the temp range, and a couple of writeups suggested changing a resistor on the control board to increase the sensitivity... which is where I stopped reading.  Didn't really need to do that, since the accuracy was more than good enough without doing that, but that's not how I'm wired; so I replaced the teeny-weenie SMD resistor... and got instant thermal runaway errors.  That was a lesson in when good enough IS good enough, and an excuse to upgrade the board.  😉    Fortunately this hobby isn't one that's prohibitively expensive, even for a geezer on fixed income!  ;-)j

 

  • Like 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...