Fan Reference Configuration
This page organizes common fan configuration methods, including driver fans, 7040 fans, and multiple fans sharing pins. The pins in the examples need to be modified according to the actual motherboard.
Driver Fans
There are two common methods for driving fans:
| Method | Applicable Scenario | Description |
|---|---|---|
[output_pin] | Needs to be always on after power-on or Klipper connection | Simple configuration, does not auto-start/stop based on motor status |
[controller_fan] | Wants automatic activation when motor or heater is working | More suitable for driving cooling fans |
Always-On Fan
value: 1 indicates that the output is automatically turned on after Klipper connects.
[output_pin driver_fan]
pin: <driver_fan_pin>
value: 1
Automatically Driven Fan
[controller_fan driver_fan]
pin:
cycle_time: 0.00003
max_power: 1.0
shutdown_speed: 0.0
fan_speed: 0.9
idle_timeout: 90
idle_speed: 0.4
stepper: stepper_x,stepper_y
Parameter Description:
fan_speed: Fan speed when the motor or heater is working.idle_timeout: Duration in seconds for the fan to continue running after the motor stops.idle_speed: Fan speed during the idle waiting period.stepper: Associated motor name(s), multiple can be specified.
7040 Fan
Some 7040 fans may spin up immediately upon power-on or boot. The PWM initial state needs to be set during firmware compilation.
Fill in !<fan_pin> in the firmware compilation option GPIO pins to set at micro-controller startup to keep the corresponding fan output off at startup. Modify according to the actual PWM pin, and use an English exclamation mark !.
[fan]
pin:
max_power: 0.9
cycle_time: 0.002
hardware_pwm: false
shutdown_speed: 0
Multi-Fan Shared Pin Configuration
When multiple fans need to be controlled simultaneously, use [multi_pin]. This method is not applicable to stepper motor pins.
[multi_pin my_fan]
pins: PA1,PA2,PA3,PA4
[fan]
pin: multi_pin:my_fan
Before sharing pins among multiple fans, confirm that the corresponding MOS tubes and power supply lines can handle the total current.