Using PG1 or other pins to control E3D fans

Hi All

I’ve recently upgraded my K8400 to run a pair of e3d V6 print heads, and they went well. They’re printing away really nicely. What I want to do next is be able to switch the e3d fans on and off (the permanent cooling fans) so when a print is finished, I don’t have to listen to them bellowing away.

I had the LED controller but removed it which got me to thinking that I could use the programmable pins on the main board, but I don’t really know what I’m doing after that.

I am happy to use a signal from one of the pins (PG1?) to drive a power expander to switch the fans - this way I don’t put any extra load on the main board.

Does anyone know if I’m choosing the right pin, and do I need to make any changes to marlin as well?


The E3D is meant to have the fan running at all times to prevent the filament from melting too high up in the heat break and causing jams. I would be very careful with this kind of modification.

You would, of course, need to modify the Marlin firmware to know about the extra digital out, and also to add logic to control the fan pin whenever the extruder was being used.

A possibly safer/easier way to do this would be to switch the fan from the same output that is switching the extruder heat, so the fan would only be on whenever the E3D heater was being heated. But again, this will change the heat/cool response of the E3D, and you will need to run a new PID calibration on the affected hot end.

The simplest solution is to power the pinter off when it is not in use.


I appreciate the fans need to be on all the time, but I want to use G-Code to turn them on and off. Running them from the extruder heat, but that would require smoothing because the extruder flips on and off a lot.

Do you know what I need to set in marlin to make a pin a logical out that responds to GCode? I think there’s a plugin in Octoprint that lets you make logical decisions. So, I’d turn the fans on when the hot-end was above 35C, and similarly only turn them off again under 35C.