[controller_fan] using raspi temp as input

hi guys,

i saw in the fans section there are 2 fan types that support board cooling.
[controller_fan]
[temperature_fan]

my build is a voron 2.4 and i like to enable the board cooling fans when one of the following is true:

  1. my raspi pi is above a certain temp
  2. when my steppers are active
  3. when my heated bed is turned on.

now 2 and 3 is supported by the [controller_fan]. 1 doesn’t
is it possible to do so?

No, there is no config section that will do all of the above.

It may be possible to define a temperature_fan and use macros to enable the fan manually on stepper activate and bed activation (via SET_TEMPERATURE_FAN).

-Kevin

thanks koconnor
i tried the methode and got it working

today i saw in klipper u can use [duplicate_pin_override] the same output pin to multiple configs

now im testing it with both defining a [controller_fan] and [temperature_fan] using the same pin with [duplicate_pin_override]

for now it works

How did you get this working? I want to do this exact thing

How did you get this working? Can you post what you did?

first i had this, but this will give very jerky motion to the fans because they dont know wich signal to take

#[duplicate_pin_override]
#pins: PC8

#[controller_fan board_fans]
#pin: PC8
#kick_start_time: 0.500
#max_power: 1.0
#fan_speed: 0.6
#heater: heater_bed 

[temperature_fan board_fans]
pin: PC8
kick_start_time: 0.8
#shutdown_speed: 0
off_below: 0.1
max_power: 1.0
#fan_speed: 0.6
sensor_type: temperature_host
control: pid
min_temp: -40
max_temp: 85
#max_delta: 5.0
pid_kp: 1.0
pid_ki: 0.5
pid_kd: 2.0
min_speed: 0.1
max_speed: 0.6
target_temp: 38

i changed it now with a custom macro.
i have a voron so i have print_start and print_end macro’s, but should work also for other printers
i have added at print_start macro
SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN=board_fans TARGET=20
this will ramp up the fans because my room never goes below 20

i didnt add anything to the print end macro, instead i added it to the idle_timout macro

[idle_timeout]
timeout: 1800
gcode:
    SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN=board_fans TARGET=38
1 Like