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
![No description](https://cdn.answeroverflow.com/1062664804126441512/Capture_decran_2023-01-11_133001.jpg)
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.