Skip to content

feat(bed-fans): Add chamber-temperature-driven bed fan control - #795

Draft
mjonuschat wants to merge 1 commit into
Frix-x:developfrom
mjonuschat:feature/bed-fans-display-template
Draft

feat(bed-fans): Add chamber-temperature-driven bed fan control#795
mjonuschat wants to merge 1 commit into
Frix-x:developfrom
mjonuschat:feature/bed-fans-display-template

Conversation

@mjonuschat

Copy link
Copy Markdown
Collaborator

Summary

  • Adds an optional bed_fans hardware component (fan_generic + display_template) that drives dedicated bed fans off a chamber-temperature taper, replacing the "fake chamber heater" hack (heater_generic/verify_heater spoofing a fan as a heater) that's been circulating in the Klipper community.
  • Speed clamps down while the bed heater's PWM duty cycle is high (so the fans don't fight the bed heater during heatup) and is gated to only run while the bed heater has an actual target, with a PARAM_FORCE override for manual/console testing.
  • Auto-engages from _MODULE_HEATSOAK_BED and shuts down from END_PRINT/CANCEL_PRINT, following the same enabled-flag pattern as the existing recirculating filter support. Tunables are sourced from _USER_VARIABLES with defaults shipped in user_templates/variables.cfg.

Test plan

  • Validated live via Moonraker console commands on a real printer (dual-fan hardware via multi_pin): gate on/off, PARAM_FORCE bypass, chamber-temperature taper, and the bed-heatup-power clamp all produced the expected fan speeds.
  • Confirmed FIRMWARE_RESTART loads cleanly with the new hardware file included.
  • No automated tests added (pure Klipper config/macro change, no Python).

Adds an optional bed_fans hardware component that drives dedicated bed fans
via a fan_generic + display_template, replacing the "fake chamber heater"
hack (a heater_generic/verify_heater pair spoofing a fan as a heater) that
has been circulating in the Klipper community to get proportional,
temperature-driven fan behavior.

Speed is a taper based on how far the chamber sensor is from the per-print
target, clamped down while the bed heater's PWM duty cycle is high so the
fans don't fight the bed heater during heatup, and gated to only run while
the bed heater actually has a target (with a PARAM_FORCE override for
manual/console testing). Auto-engages from _MODULE_HEATSOAK_BED and shuts
down from END_PRINT/CANCEL_PRINT, following the same enabled-flag pattern
as the existing recirculating filter support. Tunables are sourced from
_USER_VARIABLES with defaults shipped in user_templates/variables.cfg.

Validated live via Moonraker console commands on a real printer before
landing: gate on/off, PARAM_FORCE bypass, chamber-temperature taper, and
the bed-heatup clamp all produced the expected fan speeds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant