Basic Information:
Printer Model: Custom CoreXY
MCU / Printerboard: Octopus V1.1
klippy (1).log (423.2 KB)
I want to have fans turn on when my controller Board reaches a specific temperature. The MCU of the Octopus board reports its temperature and I have three fan drivers available on the board for the fan outputs but for the life of me, I can’t figure out how to (using existing fan types) to do this.
My MCU temperature type is defined as:
[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
and, for one of the pins, I’ve been trying things like:
[temperature_fan controllerFan0]
pin: PA8
max_power: 1.0
fan_speed: 1
kick_start_time: 0
sensor_type: mcu_temp
heater_temp: 25
min_temp: 10
max_temp: 65
With no luck.
The three fans on the Octopus board are marked FAN0, FAN1 & FAN2 with the MCU pins PA8, PE5 & PD12, respectively.
Hopefully it can be done without resorting to a macro…
[temperature_fan controllerFan0]
pin: PA8
sensor_type: temperature_mcu
sensor_mcu: mcu
control: watermark
min_temp: 10
max_temp: 65
target_temp: 25
This is a minimal configuration to do what you want. It will turn the fan on and off at 0% or 100% when the MCU crosses 25C. If you want to use a temperature_fan for this purpose, I would suggest configuring PID. I personally prefer using a controller_fan which turns on when my stepper drivers are running. Those are much more important to cool than the MCU which never reaches dangerous temperatures even under the heaviest loads imposed by Klipper.
Hey Jake,
Thanx for the reply. Actually, I’m looking to cool the stepper drivers but they don’t have temperature sensors built into them so I’m monitoring them indirectly using the MCU’s temperature sensor (assuming if they get hot, the MCU will got hot via heat conduction).
I just tried your suggestion and got:
Which is one of the errors when I tried the different permutations of the fan statements.
Also, sensor_mcu
is not a documented parameter of the [temperature_fan
statement. Where would I find it?
https://www.klipper3d.org/Config_Reference.html#temperature_fan
You need to remove the temperature sensor from your config and only include the temperature_fan. Mainsail will still show the temperature along with the fan percentage.
Also as I noted, if your goal is cooling your stepper drivers this is not the correct way to do it. You should use a controller_fan which will turn on the fan any time the drivers are enabled. Using a temperature_fan will either cause the fan to run even when the printer is idle, or it might turn off at times during a print leading to overheating drivers.
1 Like
So, I converted the fan control to:
[controller_fan controllerFan0]
pin: PA8
max_power: 1.0
fan_speed: 1
kick_start_time: 0
stepper: stepper_x
And it seems to run fine.
Thanx for explaining the situation.
Data point for your interest.
The (Octopus) “mcu_temperature”, after finding its equilibrium point without the steppers (and the connected fans running), is 29C. After turning on the stepper drivers which turns on the fans (ie doing a home operation), the temperature drops down to 24C after a while. Ambient temperature is 22C.
So it appears that the fans are doing what I was hoping for.
Thanx again.
Dear Myke, I’m using an Octopus too, and I use several fan configurations, may be one of my configurations will fit in your needs, my configurations are on my github place: [https://github.com/Escrich/00-Phoenix-SonicPad-00](https://github.com/Escrich/00-Phoenix-SonicPad-00)
please look into the printer.cfg file, to find my fan configurations.
At same time, if you need to use same pin more than once, you can do it, but you must inform to the machine, that this is not an error, the way to do it is as follows:
[duplicate_pin_override]
pins: PG12, # Filament sensor, as an example this time
1 Like
Thanx but I’m following the suggestion @jakep_82 provided and triggering the fans based on power applied to a single stepper (from the printer.cfg
I’m currently using):
[controller_fan controllerFan0]
pin: PA8
max_power: 1.0
fan_speed: 1
kick_start_time: 0
stepper: stepper_x
[controller_fan controllerFan1]
pin: PE5
max_power: 1.0
fan_speed: 1
kick_start_time: 0
stepper: stepper_x
[controller_fan controllerFan2]
pin: PD12
max_power: 1.0
fan_speed: 1
kick_start_time: 0
stepper: stepper_x
Works fine without any issues. Note that I’m triggering on stepper_x
for all three fans.
This was the subject of a change (“enhancement”) idea I put out a few days ago and subsequently deleted cause of a few other issues. But I don’t think ADC_Temperature pins should have to be aliased to use them by default. Like… For some reason if I want to use the fan AND the temp sensor, what’s the harm in that?
Also, Let me know what you think regarding the control scheme of the temp_fan, using a PID for a fan control scheme in regards to a set point based on the temperature fan of something else is… Kind of janky… I personally feel like it needs some rework.
@Meoki
Obviously this thread is already solved and almost one year old.
@TheFuzzyGiggler
Thank you for your input. We may discuss it on the recent Klipper version in a new thread if necessary, ok?
1 Like