Marlin 1.1 Beginner Guide for 3D Printer Firmware

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.

If you are new to 3D Printing and have been seeing the keyword Marlin thrown around on forums, social media and well everywhere you might be asking yourself well what’s this? Marlin is a FREE open source firmware that was starting in 2011 for 3D Printing. The amazing thing about Marlin Firmware is it is maintained, updated and improved by the maker community on Github. This is incredible and the firmware improves and evolves dynamically as many people contribute on a daily basis. So if you want to upgrade your 3D Printer Firmware but have never tired or don’t know how to do it, here is a marlin beginner guide to get you going.

Arduino IDE

Marlin is configured using a free developing software Arduino which is an open-source electronic prototyping platform. You can download the latest version of the software here.

Install the software on your computer.

There are some Libraries (drivers) I like to install to eliminate possible compilation errors. Think of these like drivers for a computer part, it will tell the software how to communicate with the hardware. These are for various display screens.

To do this open the Arduino software and go to Sketch -> Include Libraries -> Manage Libraries…

Arduino Library Manager

This will open the Arduino Library Manager.

The two libraries I recommend installing are;

  • u8glib
  • LiquidCrystal

Arduino Library installation

Type the library name in the search window and the click the install button. After you install the two libraries you are ready to open Marlin and start configuring the firmware to work with your 3D printer.

[xyz-ihs snippet=”AZNative1″]

Marlin Beginner Firmware

Downloading Marlin Firmware

First download the Marlin Firmware here: https://github.com/MarlinFirmware/Marlin

Download the ZIP file by pressing the Green Button on the top right.

Marlin Firmware Download

Open the Marlin-1.1.x.zip file and extract the folder to where you want to keep the file.

Rename the folder from Marlin-1.1.x to the Stable Build Number that can be found on the github download page seen below.

Marlin 1.1.4

In the above example the new folder name will be Marlin-1.1.4 this will help you keep track of your version and updates while also being best practices.

Best 3D Printers Amazon

Configuring Marlin Firmware

Example Configurations

Before we navigate to the Marlin.ino file there are some pre-configured files that are often overlooked when starting with Marlin.

See the \Marlin-1.1.4\Marlin\example_configurations folder in your directory. Here you will see quite a list of example configurations. Let’s pretend we are configuring a Delta Kossel Mini. Go to the example configuration folder \example_configurations\delta\kossel_mini

Here you can see 2 files that have been pre-configured for this 3D Printer;

Delta Kossel Mini configuration

Select and copy these 2 files into the main directory (\Marlin-1.1.4\Marlin\) and overwrite the existing files.

This is just an example and should only be done if you know this is your 3D Printer Model.

Opening the Marlin.ino file

In the main Marlin Directory /Marlin-1.14/Marlin scroll down and search for the file named Marlin.ino

Marlin file Arduino

You can either double click to open the file or you can open the Arduino IDE software and open it from there.

You should now see a bunch of text and a lot of tabs.

3D Printing Build Surface with 3M Tape

Arduino Board Settings

The first thing you should to is set the correct Board, processor and Port for your 3D Printer Mainboard. The most common type of board uses a Mega 2560 processor like the RAMPS, RAMBO and other arduino based chips.

To configure these options go to Tools -> Board -> and select Arduino/Genuino Mega or Mega 2560

Marlin Board 3D Printer

Ensure that Processor ATmega2560 is also selected.

Next you will need to specify the port that your 3D Printer is connected to your computer. Assuming you have your 3D Printer Connected to your computer you can find the port in your computers Device Manager.

For windows PC’s you can search and open Device Manager and look under the ports drop-down menu;

windows device manager

In the image above we can see that my printer is connected to COM4 so under the Port, I will select COM4

Arduino Port Selection

If you are unsure which one is your 3D Printer simple unplug you 3D Printer and see which port disappears. Then plug it back in and you know that is now your port number.

Nozzle Change Tool

Configuration.h File

Now we can finally start getting into configuring marlin for your 3D Printer. You’ll notice a bunch of Tabs at the top, the main one we will be working with as a beginner is the Configuration.h file. So click that tab and we’ll start getting into it.

Marlin Configuration h

@section info

Please note this is for beginners so I will just be touching base on some of the main items to configure and get you familair with the layout of the Firmware. So I will be highlighting specific lines and areas that are just the basics.

Scroll down to line 113

Here we need to set the Baudrate that we will connect to the MainBoard with. This is important so be sure to check your Mainboards data sheet or google it. in this example we will keep the baudrate at 250000

Marlin Board Baudrate

Line 121 – #define MOTHERBOARD

Here we will need to tell the firmware what MainBoard we will be using.

The firmware defaults to the RAMPS 1.4 board and to change this you need to know the “code” for the board you will be using on your 3D Printer.

To find this find the little dropdown arrow at the far right of the tabs and click on boards.h

Marlin boards.h

Here you will see a list of board and “codes” let’s say we will be using a RAMBO mainboard. Highlight BOARD_RAMBO and copy this “code”

Now go back to the Configuration.h tab and paste this code where the default BOARD_RAMPS_14_EFB is.

Marlin RAMBO board

You have now correctly set your mainboard in Marlin.

Line 126 – #define CUSTOM_MACHINE_NAME

Here you can selection the name for your 3D Printer. In the image below I have set the printer name to be RAMBO Printer.

Mrlin printer name

Make sure you delete the backslashes a.k.a comments “//” deleting the comments enables the line in the firmware.

Line 136 – #define EXTRUDERS

Here specify the number of extruders or hotends that your printer has. In this guide we will use 1.

how many extruders

@section temperature

Line 270 – #define TEMP_SENSOR

Here you will need to tell the firmware what thermistors your 3D Printer uses and how many you have. In the example below we will use the most common 100k thermistor with the “code” 1 from the list in the above lines under Thermal Settings.

Thermisotr settings marlin

In the above image I have entered the “code” for 1 hotend and for a heated bed.

@section homing

Line 475 – #define ENDSTOP_INVERTING

This section is for your EndStop also know as limit switch. Only change these settings if you are having homing issues.

Sometimes the limit switch will need to be inverted to be normally open and closed when triggered. Typically this is only needed on the MIN lines as most printers to not have MAX switches. Toggle these settings with a true or false to change how the switches trigger.

ENDSTOP_INVERTING

@section motion

Line 512 – #define DEFAULT_AXIS_STEPS_PER_UNIT

This is a really important line and you should take the time to learn how to properly calibrate this setting.

DEFAULT_AXIS_STEPS_PER_UNIT

I recommend watching these explainer video by Dustin Corbin

How To Calibrate 3D Printer Steps Per MM

How to Calibrate a 3D Printer Extruder Steps Per MM

Best Caliper

@section probes

Line 610 – #define FIX_MOUNTED_PROBE

To keep this simple let’s assume you will be using a fixed mounted probe and will be manually adjusting your print surface.

Un-Comment the “//” to enable

FIX_MOUNTED_PROBE

This tell the firmware you have a fix endstop in a static location for the Z-homing command.

I will cover auto-bed leveling and other probe related features in another article.

@section machine

Line 729 – #define INVERT_DIR

This section gives you control of which direction your stepper motors will turn. Change these from true and false to change the direction each motor moves.

INVERT_X_DIR

The same thing can be done for the extruder motor in the @section extruder where INVERT_E0 is the one to change if you have 1 extruder.

@section homing

Line 759 – Travel limits after homing

These settings tell the printer where the carriage is after the homing command and where the carriage can travel. To find these settings perform the home command and then measure how far your hotend nozzle is from the print bed and measure how far it can go.

Here is an example of the measurements from the center of the hotend nozzle to the build area. Units are in mm always.

Measure build area

And here is an example how the modified settings would look.

Marlin travel limits

Whereas in the X-Axis direction the Hotend is outside of the build area the Y-Axis is located inside the build area therefore the values will be as follows.

X_MIN = -5

Y_MIN = 10

X_MAX = 205

Y-MAX = 210-10=200

@section lcd

Line 1206 – #define SDSUPPORT

If your board had an SD Card slot Un-Comment this to enable that feature.

Marlin SD Card Support

Line 1277 – #define SPEAKER

Un-Comment this if your LCD or Board has an onboard speaker/buzzer

SPEAKER/BUZZER

Line 1290 and under – CONTROLLER TYPE 

There are a ton of different LCD and TFT controllers to choose from.

Locate your model of display and Un-Comment in this example we will use a RepRapDiscount FULL GRAPHIC Smart Controller

REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

Installing the previous libraries we talked about in the beginning of this guide will help prevent compile errors and be sure to only choose one display.

Best 3D Printer Top Rated

Compile Marlin Firmware

We have now set the minimal information needed for Marlin to run on your Mainboard.

But before we just try and upload it first verify your settings are set correctly by clicking the checkmark on the top left of the software.

Checkbox verify marlin

This will compile the sketch and verify that it’s ready to upload to your Mainboard’s chip.

If everything is correct you will see a Done compiling. message in the bottom command window.

Marlin compile error

If you get errors do your best to google the error or try to try some different settings to correct the issue.

In this error example I had enabled 2 LCD displays which are in conflict with each other;

marlin compile error

Once you have a successful compiled version of Marlin hit the upload button and flash your board with your new firmware!

Marlin Firmware Config

If you don’t want to read this guide there is a great video tutorial by Thomas Sanladerer that I highly recommend watching.

How to set up the Marlin firmware

I hope you found this guide helpful and that it gets you started with the Marlin Firmware. If you found this article of interest please share and comment below. Feel free to post any questions and ideas you have on Marlin Firmware. Happy Printing!

Looking for Marlin 2.0? Check out this new post!

Marlin 2.0 Beginner Guide to 3D Printer Firmware

12 thoughts on “Marlin 1.1 Beginner Guide for 3D Printer Firmware”

  1. As a beginner this was very helpful. I use a MAC so when it came to selecting a port and serial speed I got lost. I will have to figure what and where Mac uses for a port list.

  2. The main issue, I have I am unable to access the board, my board has Chip ATMEGA1284P they called it Sanguino.
    This is the only information I know about the printer as I don’t have other information.
    I need to flash the board using Arduino Uno, I am familiar with Arduino as I have done in the past a UV sensor and gas sensor, etc.
    my Arduino Uno used as a programmer to program the printer, the issue whatever I do or change Buad rate unable to assess the printer board.
    can you help?
    Regards

Comments are closed.