Bug: Cooling fan not working correctly

Hi,

I believe there might be a bug in Klipper.

I was calibrating a new extruder and noticed that the part cooling fan is turned off even though it should be running based on my slicer settings. I checked the gcode file and the M106 commands were there, the slicer didn’t “forget” them.

After looking around I found out that the problem was the maximum value. I can use any value with M106 Sxxx above 25, which seems to be the minimum for my fan to start, and the fan is running perfectly fine. But M106 S255, which should be 100%, doesn’t start or speed up the fan.

I can start the fan with M106 S254 as expected, but using S255 on a running fan (no matter it’s current speed) actually turns it off! So it’s shouldn’t be a problem of my fan drawing to much power and 255 being to much for my board (which would be weird anyway).

It looks like there something like a <255 instead of a <=255 for the value check as the behaviour is the same for any other value of 256 and above, as the range is 0-255 for this value, and values that are to high are treated as turn off command instead.

I updated klipper a few days ago, so it’s not an old version. And I do not see how any other component could cause this behaviour.

Hello @Arctorus !

Can yo attach the klippy.log to your next post?

klippy.log (4.4 MB)

Here is the log file.

Works for me (latest git)

The most likely problem is in your wiring. Is there any chance the fan wiring has gotten pinched?

What happens if you turn the fan on to 100% and wiggle the fan wire?

If I wiggle the wire nothing happens.

I think it’s almost impossible to be a wiring issue if this happens only ever with the value 255, never with 254

1 Like

What kind of fan do you use: 2 wire, 3 wire, 4 wire?

Standard 2 wire 5015 fan, 2 12V fans in serial for 24V operation connected to the board’s (skr 1.4 turbo) standard cnc fan header

For the electronic point of view, it is not recommended to put two active loads in serial, particularly when they are driven by a PCM signal. This is not like two resistors powered by a DC current.

Results can not been foreseen.

It’s recommended to use dedicated 24V fans for PCM.

1 Like

Im having a similar problem… the hotend fan and part cooling fan works when I activate it normally, but they both stop as soon as the hotend heater is at full power

For the age of this thread I recommend to start a new one with all requested informations.

Thank you.