What is Marlin

Marlin is a firmware for the RepRap family of replicating rapid prototypers, also called “3D printers.” Specifically, Marlin runs on those printers that extrude plastic filament using a heated nozzle in a process called Fused Deposition Modeling (FDM) — aka Fused Filament Fabrication (FFF). Marlin is the software at the heart of the machine that controls and coordinates the motors, heaters, sensors, etc. in obedience to your commands.

Derived from Sprinter and grbl, Marlin became a standalone open source project on August 12, 2011 with its Github release. Marlin is licensed under the GPLv3 and is free for personal or commercial use. It stipulates that any vendor who includes Marlin on their printer must make its source code available.

From the start Marlin has been built by and for RepRap enthusiasts to be a straightforward, reliable, and adaptable printer driver that “just works.” As a testament to its robustness, Marlin 1.0.2 has been adopted by many respected makers of commercial 3D printers. Ultimaker, Printrbot, AlephObjects (Lulzbot), Prusa Research, and many others ship their printers with a variant of Marlin installed.

Marlin runs on modest 8-bit Atmel AVR micro-controllers. These are the chips at the center of the popular open source Arduino/Genuino platform. In fact, the reference platform for Marlin is a Arduino Mega2560 with RAMPS 1.4.

As a community product, Marlin aims to be adaptable to as many extant boards and configurations as possible. We want it to be configurable, customizable, extensible, and economical for hobbyists and vendors alike. A Marlin build can be very small, for use on a headless printer with only modest hardware. As the hardware is upgraded, additional features can be enabled to adapt Marlin to the new components.

Main features

  • Optimized, full-featured G-Code dialect
  • Intelligent motion planner with lookahead
  • Fast, interrupt-based movement, linear acceleration
  • Closed-loop PID heater controller
  • Thermal protection / safety features
  • Host-based and SD Card printing, autostart
  • LCD controller driver in more than 20 languages
  • Bed Leveling: Automatic (Plane or Mesh) and Manual (Mesh)
  • Advance extrusion option
  • Volumetric extrusion option
  • Full G-Code movement with lines, arcs, Bézier curves
  • Kinematics: Cartesian, Delta, SCARA, and Core/H-Bot
  • Support for up to 4 hotends and heated bed, with automatic PID tuning
  • Support for mixing and multi-extruders (Cyclops, Chimera, Diamond)
  • Support for Filament Runout/Width Sensors
  • Print job timer / counter

How Marlin Works

Marlin is made for 3D printers which perform additive manufacturing by Fused Deposition Modeling. In this process, a nozzle is heated up and, under computer control, plastic filament is pushed through the nozzle to extrude and cure the plastic in successive layers, each supported by the one below. After several minutes (or many hours) of building up a form in this way, the result is a physical object.

Marlin Firmware resides on the 3D printer’s main board and runs whenever the machine is turned on. Its job is to manage all the realtime activities of the machine. It coordinates the heaters, steppers, sensors, lights, LCD display, buttons, and everything else that needs doing as part of the 3D printing process.

In order make the machine act as an obedient printing device, Marlin monitors the USB port for input and can read files on SD card, interpreting and running each command as it comes in. Marlin takes commands in a very simple language called G-Code. G-Code commands tell the machine to do simple things like “set heater 1 to 180,” or “move to XY at speed F.”

Printing Things


Regardless of your CAD toolchain, as long as a solid model can be exported out of it, one of the FDM slicers will be able to convert the model into G-Code, and Marlin firmware will try its best to print the final result.

Before Marlin can dream of printing, first you’ll need a 3D model of some object. Either download one or model something with one of the many free CAD programs, such as FreeCAD, OpenSCAD, Tinkercad, Autodesk 123D, or SketchUp.

A high degree of knowledge is needed to model complex objects like a T-Rex Skull but other objects can be quite simple to model. To get ideas and test things out, explore sites like Thingiverse and YouMagine and print things for fun.


With a model chosen, next it needs to be “sliced” for 3D printing. A “slicer” prepares the solid 3D model by dividing it up into thin slices (layers). In the process it generates a G-Code file that tells the printer in minute detail how to reproduce the model. There are many slicers to choose from, including:


Once the G-Code is created you’re almost ready to print. Marlin can be controlled entirely from a host or it can print in standalone mode from an LCD controller or SD Card slot.

Host software is available for several platforms, including desktop systems, Raspberry Pi, Android tablets, etc. Any device with a USB port and serial terminal can technically act as a host, but a better printing experience is had with host software designed specifically for 3D printers such as:

  • Pronterface is an open source host by Kliment.
  • OctoPrint is an open source host for Raspberry Pi by Gina Häußge
  • Cura is an open source host by Ultimaker.
  • Repetier Host is a host by Repetier Software.