Chapter 2. Introduction

Table of Contents

G codes
Compiling Marlin
Customizing Marlin
Printing SW

FFF (fused filament fabrication) is the most spread technology for low end 3D printers. They work like glue gun.

The stl data format is well supported for 3D printers and 3D printing software. The stl format is converted in CNC machine instructions the G codes by a slicer program. In this process the 3D model is converted into a set of 2D slices. The G codes finally tell the machine how to move within a slice. This conversion also allows to decide how the inside of a figure is structured as make honeycomb to save material and increase plotting speed.

To be flexible 3D printers as from the open source community have everything openly published and therefore open to evolution and improvements. They do not sell directly products but they provide many links.

3D printing PC SW is mainly used to convert the stl format to G-code. It is not recommended to have the printer doing this, since this quite complex task and the PC is a much better platform to have SW updates for it and fine tune the parameters.

Certain quite obvious things need to be kept in mind when printing in 3D. A good slicer program helps here:

When designing an object it is not enough to just have something that looks good. The mesh must be error free otherwise the slicer refuses it or even worse what you see is not what you get in 3D. Blender has a Print3D add-on that shows the bugs (when in edit mode). Bugs are:

To fix bad stl there are different tools:

Usually the 3D printer SW takes care about everything, but it comes with many parameters. So when the result does not satisfy, the parameters can be adjusted.


It is a common habit that there is a z-axis offset between printing software and printer. Moving the extruder home means moving it to 0 and nobody wants that it scratched and damages the bed while doing this. A good adjustment makes that a small distance between bed and nozzle can be seen and a feeler gauge of 0.1mm does not pass. This means the z-axis offset is between 0 and minus 0.1mm. Add then -0.1mm to the slicer software for the z-axis offset. Since the real distance is smaller than 0.1mm it gives a bit fatter first ayer and compensated leveling tolerances. Since the printer can not go below that, the fist layer must be equal or thicker than this offset.

Figure 2.1. Important parameters

3d printer

Extruder diameter (b) has a secondary role in printing. More important is (c) the height the nozzle is above the bed (for the first layer). Therefore it is important that the bed is flat and leveled. Automatic leveling can help here. Obviously (b) and (c) have some relation ship. (c) should be around half (b), so for a 0.35mm nozzle the layer height should be around 0.15, and this give also a requirement on the flatness of the bed and its leveling.

A good fat first layer or automatic bed leveling are therefor vital to get good results.

The filament volume per second that runs through the extruder (what goes in comes out, so it is the same on both sides). The parameters that determine that are:

The volume per second is a2*pi/4*v

The filament volume per second will then be squeezed onto the surface. The profile has the height of the extruder above the surface (c = layer height) and the width (d) results out of the volume per second and the speed the surface moves below extruder (vs).


Squeezing the material onto the surface results in some force between surface and material and results into a rather rectangular string. The final result is that the material attaches well on the surface.

Putting material in a rather circle shape on the surface will not produce any force between surface and the material and might therefore not attach.

Considering the shape rectangular (d >> c), the volume per second on the surface is c*d*vs. This is the same as what coming from the extruder. Therefore the width (d) is d=(a2*pi*v)/(c*vs).


The extruder diameter (b) does not appear in the formula. The width (d) can be smaller or larger than the extruder diameter (b). However extruder diameter (b) defines the maximum layer height (c). As example, a 0.35mm extruder has a maximum layer height of 0.2mm


Reducing the layer height gives better results but also increases the time to print. It is therefore a good parameter to be modified. Example: Cut the printing time to approximately half increasing the layer height from 0.1mm to 0.2mm and accept a minor print quality.

Filament diameter 1.75mm that is used on the more modern printers and 3mm is one option. This is more an extruder issue. Material goes to the extrude and needs to be melted. 3mm has therefore less speed but needs to melt a higher diameter it is therefore slower and needs more extruder force. 1.75mm is faster and has a better response time.

Since printing speed is an issue the mass to be accelerated is tried to be minimized by the printer designs. Simple designs have one of the x/y motors to be accelerated. To avoid that some designs have both motors stationary. Examples are: Core XY, H-bot

Linurs Hosttech startpage