Stepper driver cooling fan control
Is there an already made option in RATOS for controlling a cooling fan depending on the Octopus / Pi / steppers temperature ?
22 Replies
Unfortunately there is no way currently to get the stepper driver temp. There is already the controller fan that only turns on when the stepper drivers are on. If you specifically want other fans to only turn on when MCU or PI is at a certain temp you can create that with https://www.klipper3d.org/Config_Reference.html#temperature_fan
tnx a lot mate, i'll look into that .
i think i've managed to get the temps and also added a fan
the code is crude, i'm no expert, but it seems to work
[temperature_sensor tmc2209_stepper_x]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
[temperature_sensor tmc2209_stepper_y]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
[temperature_sensor tmc2209_stepper_z]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
[temperature_sensor tmc2209_stepper_z1]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
[temperature_sensor tmc2209_stepper_z2]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
[temperature_fan stepper_driver]
pin: PA8
max_power: 1.0
shutdown_speed: 0.0
cycle_time: 0.0001 #10 kHz PWM signal
hardware_pwm: False
kick_start_time: 0
sensor_type: temperature_host
min_temp: 0
max_temp: 70
target_temp: 50
max_speed: 0.7
min_speed: 0.0
control: pid
pid_Kp: 2.0 ;40
pid_Ki: 5.0 ;0.2
pid_Kd: 0.5 ;0.1
pid_deriv_time: 2.0
needs proper devlopment ...............
Show us the code! 😄
it's above..........but i could be very wrong as well, but the temperatures do match with my thermal camera
Oh, so you're saying: 
sensor_type: temperature_host
actually works, with no klipper modifications? 🤨yup, it's running right now............the only problem is defining which temperature_host is used
it shouldn't be valid in that section
temperature_host is the pi
i guess it's the last one
it's the raspberry pi
LOL
I've got no idea why that config doesn't result in an error though
sensor_type shouldn't be valid in [tmc2209] sections.
i'll try cooling the pi only , see if it differs from the other temps
I was very curious because as far as i know, you can't read the temperature out of the tmc2209
All you get is an error state and a warning state that you've gotta monitor.
i'm reading the datasheet atl, got 3 temp trigger points, correst
That's not a klipper limitation, it's a TMC driver limitation
Yeah
well, that's sad............at least i can cool the pi
i'll add a sensor in the cooling duct exit's for the drivers.......
for the moment i changed it to temperature_mcu to cool complete board
and that does not work, so why does the temperature_host work and not temperature_mcu ???
might wanna ask that on the klipper discourse
I'm not really sure why you're going through all that trouble though when the default controller_fan will do
because i did not think it through.........and you're right i'll go with the default controller fan
is it with a pwm to modulate the speed ?
yes, you've got
fan_speed
, shutdown_speed
and idle_speed
(you can't change it dynamically)excellent, tnx a lot