fbpx

How to Move a cooling fan pin in Marlin Firmware (for 3D printing)

Updated on:

We participate in the Amazon affiliate program and may earn a commission if you make a purchase through links on our site. We also participate in other affiliate programs.

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.

marlin firmware configuration_adv

Then scroll down to line 203. You should see the information to set the Marlin Custom Fan Pins for the extruder fans.

marlin custom fan pins

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.

marlin mks extruder pins

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.

marlin cooling fan pin

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.

marlin part cooling fan

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.

Photo of author

Garrett Dunham

A trained Mechanical Engineer and lifelong tinker, Garrett chose to attend Cal Poly San Luis Obispo's engineering proram because they had a 3D printer... back when they were called "rapid prototypers". "The first time I held something I designed and 3D printed, my mind exploded. Just hours earlier my idea was just a thought - and now it's a thing I'm holding." Now, years later, Garrett brings his love of tinkering, inventing, engineering, and 3D printing to the Makershop community.