[Solved] Create controller_fan only linked to a heater

Basic Information:

Printer Model: Voron 2.4r1
MCU / Printerboard: BTT Octopus 1.1

Describe your issue:

I have a heater_generic chamber_heater setup and with a controller_fan chamberHeater_fan to preheat the chamber that I wanted to only come on when the heater was active, but instead the fan would also be active when any stepper was active as well.

Turns out this is by design in controller_fan.py so that if a stepper is not specified, it defaults to all. But I want NO steppers.

Solution:

If you don’t want to have it come on with any steppers (as I did) then you need to either modify controller_fan.py or use a workaround…

I created a manual stepper stepper_fake with all the necessary attributes, associated with an unused stepper driver on the BTT Octopus:

## Stepper_Fake to fool the controller_fan.py routine
[manual_stepper stepper_fake]
step_pin: PE2
dir_pin: PE3
enable_pin: !PD4
rotation_distance: 40
gear_ratio: 80:16
microsteps: 16

Then for the controller_fan add the lines:
[controller_fan ChamberHeater_fan]
pin: multi_pin: chamber_heater_fan_pins # multi_pin because it is also used to control underbed fans
max_power: 1.0
off_below: 1
shutdown_speed: 0
kick_start_time: 0.5
idle_timeout: 60 # amount of time the fan runs after the heater is turned off
#idle_speed: 0.5
heater: chamber_heater
stepper: manual_stepper stepper_fake

Now the fan only comes on when the heater is activated and not all the steppers, since I never actually use stepper_fake

And yes, it would be neater to rewrite controller_fan.py, but python is not my strength, and until it got rolled into the main klipper release it would keep triggering notifications that the code was out of date.

Hi,

Might be a stupid question, but why not just use “heater_fan” instead of “controller_fan”?

greetings

Hi. Fair question!
In my case I am using a compact PTC heater with a fan to heat the chamber and I want the chamber heater to turn off once the chamber reaches the desired temperature. Its fan needs to stay on for ~60 sec more to cool it down safely and then stop.

With heater_fan the fan stays on until the temperature of that heater (in this case the actual chamber) falls below a specified value (default: 50C). Therefore it would then stay on until the chamber cooled down at the end of the printing cycle.

If I put another thermistor on the actual PTC heater to check when it had cooled enough, and linked it to the heater_generic definition then the heater would switch on and off with its casing temperature instead of the chamber.

Here is my heater_generic section:

[heater_generic chamber_heater]
gcode_id: CHE
#   The id to use when reporting the temperature in the M105 command.
#   This parameter must be provided.
heater_pin: PB11
max_power: 1.0
sensor_type: 100k3950_airtemp
sensor_pin: EBBCan: PA3
#smooth_time: defaults to 1 sec
control: watermark
max_delta: 0.5
min_temp: 0
max_temp: 70

[verify_heater chamber_heater]
max_error: 120
check_gain_time: 120
hysteresis: 5
heating_gain: 1

My exhaust fan is also linked to the same chamber temperature sensor, so when the PTC heater has done its job and the bed keeps going and starts to get the chamber too hot, it cuts in automatically:

## Chamber temperature control fan - repurpose the exhaust fan
[temperature_fan Exhaust]
pin: PD14
max_power: 1.0
kick_start_time: 0.5
shutdown_speed: 0.0
sensor_type: 100k3950_airtemp
sensor_pin: EBBCan: PA3
target_temp: 35
min_temp: 0
max_temp: 80
max_speed: 1.0
min_speed: 0.2
control: watermark
max_delta: 1.0

If however you have got a way to avoid my kludge of a workaround I would be happy to give it a go.

What about a fan_generic ChamberHeater_fan (I would call it “CHeater_fan”… :laughing: )

Something like:
(in free words)
Whatever command to start the heater
if x° set fan speed x
if target is reached turn off heater
g4 60000
set fan speed 0

I’m currently considering building a chamber heater. However, an SKR Pico is running in my printer, so I probably can’t do anything with the Fake Stepper idea. (?)

I’m a fan of “learning by doing”, but programming is probably “a bit” too much for me.

It would depend upon exactly what type of heater you had…

Mine is a DBK FGC1515.2R CIRRUS 230W Rail 115/230V Heater, chosen because is very compact, uses a PTC element that effectively shuts down over 70C and has a mains voltage supply, so I could use an SSR rather than needing a larger 24V supply.

The downside in one way is that the fan is independently controller 24V - if it came on with the heater and stayed on afterwards for a while (which some fan heaters on eBay do) then it would be very simple and I could just define it as a generic_heater.

Since the two are separate, I needed this work around to automatically switch the fan on and then with a delay off again.

Using your solution I would need to have a loop or delay that finished the chamber heating, cooled the heater, and then moved on. This can take some time and I wanted that process to be autonomous so that the printer could get on with other prep steps like QGL and Meshing.

It also means that the chamber heater can cut in and out during the printing to maintain chamber temperature if required.

Simplest solution would have been to have found a heater with a built in, self-controlled fan. But I couldn’t at the time.

In my case, it’s a fairly small printer. That’s why I don’t buy a heating element, but “build” one from hot end parts.

I’m still waiting for parts I ordered from Ali for testing. Volcano Block, copper threaded rod and two V5 heatsinks.

I see your point with QGL and meshing.

In my case (V0.1) it only needs to start printing when it’s hot enough.
But demand-driven control during printing makes sense.

I like to give food for thought to get closer to a solution (which I can then use myself later), but unfortunately I don’t have THE solution either.