Adding and Controlling Extra Fans


I'd like to add one or two stationary fans but I'd like them to be controllable from OctoPrint. I'd like this control to be based on the layer height similar to the way slicers use M106 now. I'm not real keen on attaching the fans to the printer controller board (if it even has pins for additional fans) but I am willing to attach them to the Raspberry Pi. Is this doable?


The good news is you can add fans to the pi. The bad news is it's a little complicated because the pins on the pi are low-power and low-voltage. So you have to have, at a minimum, a transistor to bring it up. The easiest way is to use an add-on board like this.

Not sure if there's a plugin for sniffing layer height to control it.

I've been unhappy with the 'expansion' hats available for 3d printing purposes, so I'm actually fiddling with my own 8-channel FET design now, as I want to switch enclosure heat, lights, power supplies, etc directly from my Pi.


@tedder42 : Thanks for the pointer to the Adafruit DC and Stepper Motor Hat. That's most likely how I'll connect the extra fan(s). Typical 12V fans for desktop computers, 120 mm to 80mm draw around .25a so the 1.2a maximum on that board should be well within range.


Want to do the same thing, did you ever get this going? Plugin to set start layer?


I did. I'm using the Adafruit DC and stepper motor hat. I wrote a couple of Python scripts and modified a copy of the Fan Speed Control plugin to call the scripts passing the value of M106 (and M107) gcode commands to them.

My external fans now mirror the settings in the gcode file. I can also call the scripts directly from an SSH terminal session.

I submitted my modifications to the author of the Fan Speed Control plugin, but he declined to include them in the plugin. I was going to write my own plugin, but I haven't gotten around to it since my local copy with the modifications works perfectly.

You could also use the GCODE System commands plugin to call my scripts but that requires some tweaking of the slicer gcode output to insert the commands at the right place(s).

I'm willing to make my scripts available and if we can figure out any licensing issues, the modifications to the plugin as well.