Back fan not automatically turning on during print

Basic Information:

Printer Model: K1 max

printer.cfg (9.1 KB)
klippy (1).log (356.6 KB)

Describe your issue:

Hi all, I can’t seem to work out why my back fan won’t turn on during my print to the specified percent that I set in orca slicer, it’s always off when it should be on, I can manually turn it on during the print. I’ve checked the g-code before I send it through fluid, and the command is definitely there. I assume it’s been overrided somewhere in the configuration files but I am not sure where. I have attached my printer.cfg and klippy.log. Thankyou in advance.

Not enough data provided.
Your klippy.log file don’t have printing log, it have just startup log and config.
You didn’t specify which command is used by slicer to enable it.
You didn’t specify how you enabling it during the print.

In slicer I set the back fan to 30% during the print and 90% on final of the print. The commands are M106 P3 S76 for the start and M106 P3 S229 for the end. During the print I will manually enable it either through the printer interface or on fluid by sliding the fan 2 (back fan) bar across.

Ok, now try to execute same M106 commands in fluidd
do they make you fan to work ?

Interestingly, the M106 P3 and P1 both change the first fan and not the back fan ? More to that, M106 with P10294 also changed the first fan, which is probably due to a conditional code somewhere in the files I imagine, so I assume the variable for P3 is undefined for some reason.

Yes, your [gcode_macro M106] is processing them not as you expected.
I don’t know where you get it - but maybe they have new version.

As i can se you should be able to control that fan with “M141S…”
S - represent target temperature
or You can use direct command SET_TEMPERATURE_FAN_TARGET
Manual link

And additional note
you have that Fan configured as temperature_fan
this kind of configuration is designed for cooling FAN, it should automatically start when it’s sensor report higher temp than target_temp+max_delta, so if you configure it correctly - you don’t need to drive it with a slicer.

Thanks for your help. So is there a way I can change the configuration so that I don’t need to hardcode anything in and it will listen to the M106 P3 command from the slicer?

klipper can control that fan automatically by using temperature from a defined sensor.

About M106 P3 - i’m not sure here
as i can see fan3 is not defined and M106 is handling it as Fan0

{% if params.P is defined %}|
{% set tmp = params.P|int %}|
{% if tmp < fans %}|
{% set fan = tmp %}|
{% endif %}|
{% endif %}|

Value for variable “fans” is taken from this:

[gcode_macro PRINTER_PARAM]

variable_fans = 3

In general as i can see your config have fan0,fan1,fan2, chamber_fan

Your custom M106 command can drive only fan0, fan1, fan2

So your forth “chamber_fan” is ignored by M106, and actually it’s correct, because it’s defined as automatic fan.

I’m not telling that you can redefine “chamber_fan” as “fan3” and then you can use it - your M106 don’t have any code for Fan3.

Sorry If I didn’t specify, but the chamber fan and the fan 1 are the same, they are both the back fan, the M106 P3 should turn the back fan on

By your config you have 4 of them

[output_pin fan0]
pin = !nozzle_mcu: PB8

[output_pin fan1]
pin = PC0

[output_pin fan2]
pin = PB1

[temperature_fan chamber_fan]
pin = PC0

As we can see fan1 and chamber_fan sharing same pin which is actually wrong setup. Your custom M106 code can control only Fan0,Fan1,Fan2.
Without M106 code change it can’t drive Fan3.

Okay I understand now, but I thought that configuration was written on purpose and had something to do with the duplicate_pin_overide code. So there isn’t a way for them to share the same pin, one controls for temperature and one is turned on during a print?

This logic is weird, Why you want to have 2 different controls for signle Fan ?
Each control can turn it on, why not to use single control ?

One of the controls is so it doesn’t reach a certain temperature, and the other control is to have sufficient exhaust ventilation during the print

In saying that I’d rather fix this problem and have the control during the print, set by the slicer code, I have deleted the section of temperature_fan chamber_fan, but still the M106 P3 doesn’t work

M106P3 - will never work because it’s code can’t handle P3
your M106 custom code can handle only P0, P1, P2 - Fan0, Fan1, Fan2

If you want to control your fan thru Slicer - change setting in slicer to use fan1 as a chamber fan (M106P1).

Now about your goal:

This is faulty logic, imagine that you will have following state: temperature will start your fan, but slicer will order it to stop - question: what will be the result ?

To achieve your goal correctly you should remove Fan1 and reconfigure [temperature_fan chamber_fan] to be always On on some sufficient minimal level, when TempSensor will report that we crossed threshold - it should speed-up fan to maximum, when TempSensor will report that we are below a threshold - fan should go to minimal sufficient level.

Thankyou heaps for your help

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.