Skip to content

Hardware settings and print quality

repetier edited this page Sep 25, 2011 · 14 revisions

Hardware settings and print quality

Basics

Many people are confused by the many possible hardware settings. The settings are quite easy, if you understand the basics of the firmware and the physics needed for a good print. On this page, I'll try to give an overview over the most important settings and how they may have an effect on print quality.

What the user wants

  • Fast output - no one likes to wait hours for a job to complete.
  • Fine details.
  • No restrictions to shapes, we can print, e.g. unlimited overhangs.
  • Exact copy of the model.

In contrast to our wish list, the real world physics set some limits. Some wishes even contradict each other. A fast print reduces the print quality. The trick is, to find some hardware settings balancing speed and quality.

Physics of printing

The basic concept is very simple. We take some plastic filament, warm it up until it melts and press it to the position, where we want our object. The problem is timing and positioning. When do I need how much pressure and speed, to get the wanted result.

The extruder

The extruder has two parts. The filament driver and the hot end. The driver pushes the filament into the hot end, which creates a pressure

p = E * L_diff / L_ext

with

p = created preesure
E = E-modulo of the filament
L_diff = Length of fileament pushed in - equivalent length printed
L_ext = distance between filament driver and hot end melting zone.

The hot end melts the filament and uses the pressure to push it out with the "desired" speed. A simple approximation of the math behind this is Bernoulli's principle:

v_t^2/2+p_t/rho+gz_t=v_b^2/2+p_b/rho+gz_b+zeta*v_t^2/2

with

v_t = Filament speed at the top of the melting zone.
p_t = Pressure at the top = p from filament + air pressure.
rho = Density of the filament.
g = Gravity.
z_t = Height of the top of the melting zone.
v_b = Speed, the filament leaves the nozzle.
p_b = Pressure at the bottom = air pressure.
z_b = Height of the bottom.
zeta = Friction constant.

The term g * (z_t - z_b) can be omitted for most considerations. I call it the ooze term, because it numbers the gravity on the melted filament, which causes oozing. The simplified version can be reordered, so that we get

v_b = sqrt(v_t^2 * (1-zeta) + 2 * (p_t-p_b)/rho)

Furthermore, we can remove p_b and the ait pressure part of p_t:

v_b = sqrt(v_t^2 * (1 - zeta) + 2 * p / rho)

We see, that the output speed depends on the input speed and on the pressure. As we will see later, the pressure term is the real problem. If we change speed, we need to adjust the pressure, too.

Ooze

There are two reasons for the ooze. If we do not print, but the hot end is on, the filament will melt and slowly flow outside. The other reason is pressure, caused by the filament driver. During the print move, a certain pressure was needed. If we just stop the extruder, the pressure is still there and will force the plastic outside.

Oozing during warm up

  • Always start with your print head over the dump area.
  • Just before the target temperature is reached, remove all plastic hanging from the nozzle.
  • Let the axes home for a clean start.
  • Print a dummy line, long and fat enough to refill the hot end.

A sample code:

M109 S170
G90
G28 X0 Y0 Z0
G92 E0
G1 Z0.38 F80
G1 X100.0 E11 F600
G92 E0

Oozing during print

The standard method, is to tell your G-Code generator to reatract the filament a few (2-3) millimeter for traveling moves and to push it back just before the next print move. If you have a filament driver with backslash, don't forget to tell that, too.

A second method is to use the advance method (Matthew Roberts, see) described later in "Extruder pressure control". This method will update the extruder steps to create the needed pressure.

Trajectory smoothing

Before I start on speed and acceleration, you should understand, how the firmware manages moves. Your print head and extruder are driven by stepper motors. They are ideal for positioning, because you can tell them to rotate a fixed amount. The most common used steppers need 200 full steps for a complete rotation. By controlic the magnetic field, the drivers are able to do 1/2 to 1/16th step resolution. This rotary precision combined with the gear give a fixed length, the head can be moved. Normal resolutions are 1/40 mm or 1/80 mm. Every position is always a multiple of this length. If the printer performs a move from point x0,y0,z0,e0 to x1,y1,z1,e1 it uses the Bresenham algorithm, depicted below.

Bresenham algorithm

In the picture, you see a black grid. Each of these lines are multiple of the stepper resolution and possible positions. The blue line is the ideal move, we want your head to take. The algorithm takes the direction with the most steps needed as driving axis. Then for each position on this line, the optimal position of the three depending axis are computed and taken. This will result in the best approximation for this resolution.

You can see, the timing for the driving axis es perfect. The driven axis is only updated at the primary axis updates, resulting in some imperfections. To reduce this jittering, the Repetier-Firmware takes half steps in the primary direction, if the speed is not too high (until 8000 Hz steprate for 16MHz CPU). That way, the driven axis are updated earlier, reducing the jittering. In the example above, the green dots show earlier updates. Depending on the angle, there max be more or less. You can disable this by setting

#define MAX_HALFSTEP_INTERVAL 16000000

Since there are no negative side effects, disabling is not encouraged.

Initial speed

Can we start a move with some inital speed? Physics says v = a * t, with a = acceleration and t = acceleration time. So no, we can't. But we do it anyway. In your configuration, you see a definition

#define MAX_JERK 40.0

A waiting head is initalized with a speed of 50% MAX_JERK. We can't beat physics, but the timing belt and printer constructions is flexible to some extend. What happens is, that the abrupt move causes a shock and a sudden acceleration. The maximum inital speed is limited by the torque of the motor. If the shock is to harsh, your stepper will make some screaming sounds and stay at its place. For best results, we need a high inital speed. It increases print quality (for explanation see acceleration) and reduces print time. Problems with too high inital speeds are:

  • Lost steps.
  • Timing belt may skip over your pulley tooth (=> put more tension on the belt).
  • Pulley may rotate against your stepper axis (=> better fix your pulley).
  • Increased shaking of your printer.

Jerk constrain

For two consecutive moves with a direction change, the problem is similar to the inital speed problem. If we keep a constant speed and change direction, the direction of the speed vector makes a sudden change. This is shown in the next picture.

Jerk

Look at the red jerk vector, presenting the speed difference. Within this documentation, we call this vector jerk, also it is not the real jerk from physical definitions. The same thing as with the inital speed happens. A shock results in sudden accelerations in the new direction or the motors fail, if MAX_JERK is set to high.

What the firmware does is quite simple. For every corner, it computes the maximum allowed jerk vector and compares it with the jerk, we would have, if we keep our speed. If the jerk is to high, like in example 1, the speed for the corner is reduced to the maximum possible speed.

Acceleration

We want to print fast. We already know, the inital speed is limited to something like 10 - 20 mm/s. Of course we want 100 mm/s and more. We need to accelerate from our inital speed to the desired speed. For safety reasons, we also need to decelerate to inital speed at the end of your print move. That said, what are our limits?

Needed force

For the maximum acceleration, we use the following equation:

a = F/m

with

a = Acceleration/Deceleration F = Motor force - friction forces m = moved mass (printer head, print bed)

Lets take some numbers. Our stepper has 49Ncm holding torque. Lower voltage, rotation and substepping reduce this to, lets say 25Ncm (just a guess). For the mass we take 2kg. The motor has a 8 tooth pulley.

rpulley = 85mm/(23.1415) = 6.37 mm
F = 250 Nmm / 6.37 mm = 39.2 N
a = 39.2 N/2 kg = 19.6 m/s² = 19600 mm/s²

The distance needed to accelerate to a given speed is s = v^2 / (2*a). The following table shows some values:

a [mm/s] d for v=100mm/s d for v=200mm/s
1000 5.00 mm 20.00 mm
2000 2.50 mm 10.00 mm
3000 1.67 mm 6.67 mm
4000 1.25 mm 5.00 mm
5000 1.00 mm 4.00 mm
7500 0.67 mm 2.67 mm
10000 0.50 mm 2.00 mm

Print quality

Path planning

Path planning

Extruder pressure control

Clone this wiki locally