Marlin Custom Fan Pins can be designated in the Marlin Firmware by setting the override pins. This is very useful when adding part cooling fans or additional extruders. This is one of the many great new features since the release of Marlin 1.1.x.
Marlin Custom Fan Pins (configuration_adv.h)
Setting a custom marlin fan pin for Extruder Cooling Fans
These instructions assume you already know how to program Marlin on your 3D Printer. If you are just starting out and are not sure how to customize the marlin firmware check out our article: Marlin 1.1 Beginner Guide for 3D Printer Firmware
First, open the configuration_adv.h tab in the Arduino IDE.
Then scroll down to line 203. You should see the information to set the Marlin Custom Fan Pins for the extruder fans.
Change the -1 (which stands for disabled) to the digital pin number you want to use on your board. In this example, I have set pin 11 and pin 6 for the MKS Gen 1.4 Mainboard.
Leave all other settings to -1 default.
Set a Custom Fan Pin for Part Cooling Fans
Now, scroll down to line 223. Here you should see the information to set the Marlin Custom Fan Pins for the part cooling fans.
Change the -1 (which stands for disabled) to the digital pin number you want to use on your board. In this example, I have set pin 9 for the MKS Gen 1.4 Mainboard.
Leave all other settings to -1 default.
It’s that simple to program Marlin Custom Fan Pins
These settings will override the fan pins no matter what board you are using. This makes it really easy to add and designate fans to operate the way you want in the Marlin Firmware. The Marlin contributors are making Marlin Firmware better and more user-friendly each day. It’s open source and has tons of advanced features we will soon cover in upcoming articles, so stay tuned.