Skip to main content
Version: 2.1.x

Chamber Filter Control

RatOS includes built-in chamber filter control functionality.

Prerequisites

To use the chamber control feature, you only need to configure a generic fan named filter:

[fan_generic filter]

Configuration

This feature is enabled by default and requires no additional configuration. However, you can customize the settings in your printer.cfg if desired:

[gcode_macro RatOS]
variable_chamber_filter_enable: True # True|False = enable chamber filter control
variable_chamber_filter_speed: 1.0 # float = chamber filter fan speed.
variable_chamber_filter_disable_speed: 1.0 # float = chamber filter fan speed after the print has finished.
variable_chamber_filter_enable_at: "after_print_start" # before_print_start|after_print_start|print_end = when to enable the filter
variable_chamber_filter_disable_period: 300 # int = disable fan after X seconds after the print ends
variable_chamber_filter_disable_bed_temp: 0 # int = wait for X°C bed temp after the print ends before disabling the filter

Macro Hooks

The chamber filter control includes two customizable macro hooks:

[gcode_macro _CHAMBER_FILTER_TURN_ON]
gcode:
# parameters
{% set at = params.AT|default('')|lower %}

# config
{% set chamber_filter_speed = printer["gcode_macro RatOS"].chamber_filter_speed|default(0)|float %}
{% if at == "print_end" %}
{% set chamber_filter_speed = printer["gcode_macro RatOS"].chamber_filter_disable_speed|default(0)|float %}
{% endif %}

# reset timer
UPDATE_DELAYED_GCODE ID=_CHAMBER_FILTER_OFF_TIMER DURATION=0

# turn filter fan on
SET_FAN_SPEED FAN=filter SPEED={chamber_filter_speed}
[gcode_macro _CHAMBER_FILTER_TURN_OFF]
gcode:
# Turn filter fan off
SET_FAN_SPEED FAN=filter SPEED=0