26

Re: Soliprint V1.1

android78 wrote:
wardjr wrote:

... "Extrusion multiplier" affects more than just steps per mm.

Can you explain what else it effects?  I'm a noob.

Jagowilson will be posting up a detailed explanation of the extrusion calculation in the source code later this evening.
I will let him post the facts publicly so that everyone can learn from it.  In the mean time if you have questions send me a PM I will be happy to explain.

Printit Industries Model 8.10 fully enclosed CoreXY, Chamber heat
3-SD3's & a Workbench all fully enclosed, RH-Slic3r Win7pro, E3D V6, Volcano & Cyclops Hot End
SSR/500W AC Heated Glass Bed, Linear bearings on SS rods. Direct Drive Y-axis, BulldogXL
Thanks to all for your contributions

27 (edited by redbarret 2015-02-04 21:27:20)

Re: Soliprint V1.1

Meh, that's what I've been told by several people and it makes sense.
The manual just says

The Extrusion multiplier setting allows the fine tuning of the extrusion flow rate, and is is given as a factor, e.g. 1 means 100%, 1.5 would mean 150%. Whilst the value should ideally be set in the firmware it can be useful to test slight changes to the rate by altering this value. It varies the amount of plastic proportionally and should be changed in very small steps (e.g. +/- 0.05) as the effects are very visible.

And Solidoodle wiki just says

Extrusion Multiplier should be set to 1.  This is where you make adjustments in case the flow calculations are not quite correct.

As an alternative to changing the steps/mm in firmware, you can use a fudge factor in the Slic3r settings called Extrusion Multiplier. If you have determined that your extruder pulls 25% more plastic than it is supposed to, you can set the multiplier to .75 to compensate, telling Slic3r to scale back its computations by 25%. However that setting is really there to adjust for the differences between plastics. If you did your calibration using ABS, you might need to adjust a little for PLA due to the difference in how far the gear teeth cut into it. It's best to start from a point where you know everything is calibrated correctly, then go from there.

Always glad to learn correct info. Looking forward to what jagowilson will find in the sourcecode.

Solidoodle 4

28

Re: Soliprint V1.1

redbarret wrote:

Meh, that's what I've been told by several people and it makes sense.
The manual just says

The Extrusion multiplier setting allows the fine tuning of the extrusion flow rate, and is is given as a factor, e.g. 1 means 100%, 1.5 would mean 150%. Whilst the value should ideally be set in the firmware it can be useful to test slight changes to the rate by altering this value. It varies the amount of plastic proportionally and should be changed in very small steps (e.g. +/- 0.05) as the effects are very visible.

And Solidoodle wiki just says

Extrusion Multiplier should be set to 1.  This is where you make adjustments in case the flow calculations are not quite correct.

As an alternative to changing the steps/mm in firmware, you can use a fudge factor in the Slic3r settings called Extrusion Multiplier. If you have determined that your extruder pulls 25% more plastic than it is supposed to, you can set the multiplier to .75 to compensate, telling Slic3r to scale back its computations by 25%. However that setting is really there to adjust for the differences between plastics. If you did your calibration using ABS, you might need to adjust a little for PLA due to the difference in how far the gear teeth cut into it. It's best to start from a point where you know everything is calibrated correctly, then go from there.

Always glad to learn correct info. Looking forward to what jagowilson will find in the sourcecode.

It's just too bad in their effort to simplify a complex process they used misinformation.  The main thing is that it isn't a linear calculation like those statements would have you believe.

Printit Industries Model 8.10 fully enclosed CoreXY, Chamber heat
3-SD3's & a Workbench all fully enclosed, RH-Slic3r Win7pro, E3D V6, Volcano & Cyclops Hot End
SSR/500W AC Heated Glass Bed, Linear bearings on SS rods. Direct Drive Y-axis, BulldogXL
Thanks to all for your contributions

29

Re: Soliprint V1.1

Okay, then waiting for correct info.

Solidoodle 4

30 (edited by jagowilson 2015-02-05 03:12:39)

Re: Soliprint V1.1

So I've been working on a project related to Slic3r this semester for a 700 level Computer Science Ph.D. course I'm in. Essentially what this means is I've been forced to dive into a few parts of Slic3r in order to gain a deeper understanding of how exactly it works and generates GCode. GCode, if you aren't familiar, is the binary code that drives all of the axes in your printer. Your printer has four axes: X, Y, Z (bed), and E (extruder). Any slicer is responsible for every single step that occurs in this GCode, and this GCode is ultimately what brings your digital model into the real world. The process of converting an STL to GCode is incredibly complex (I refrain from saying "complicated," because "complex" implies it is hard, but not needlessly difficult). For the sake of this discussion we will be skipping the whole process of decoding an STL and switch straight to how Slic3r does the math responsible for making your printer work.

What is a Slicer?
As mentioned above, it's a program that takes an STL as input and generates GCode as output. More specifically, though, a slicer really has two responsibilities: toolpath generation and extrusion calculation. A toolpath is the path the hotend follows on any one layer to create your object.

What factors affect the toolpath?
The toolpath is affected by several factors, including: i) your model, ii) the nozzle diameter on your machine, and iii) the extrusion width settings you specify in Slic3r. We'll ignore the first factor and work with just a cube. Below, I have taken a screenshot the toolpath--it is the perimeters and infill that make up your object. In other words, the GCode preview in Repetier Host. In this example, I am using a 0.6 nozzle with a 0.78 extrusion width (I made it thick for the sake of illustration):

http://i.imgur.com/pQLPxNI.png

Now, toolpath generation can be considered the first phase of slicing your object. Before anything else can really happen, the slicer needs to know where it is going, and how far it is going for any given part of the model. This phase MUST occur first, because the toolpath is critical in doing the math for the next phase, which above I called extrusion calculation.

How extrusion calculation works
Bear in mind that I am still diving into the depths of the Slic3r source code. It is a massive project, with thousands of line of code and high levels of what we call indirection in Computer Science. Tracking down where the magic actually happens is difficult, but I've finally begun to find out where the math for all of this is taking place. Fantastic news, though: the Slic3r manual page on flow mathematics is still relatively up to date! For that reason, this section of the discussion is a significant paraphrase of what they discuss there.

To successfully write a slicer that actually works, you're going to need to know how much material to tell your E axis (extruder) to move at all times. At first, this seems like a pretty daunting task--after all, a lot of real world factors can influence whether or not your calculations are actually correct! When writing a slicer, assuming you want wide adoption, it needs to work well on a variety of machines and have a lot of room for fudge factors. So using factors such as nozzle geometries or filament properties simply isn't acceptable. Instead, we turn to a theoretical model of extrusion.

Slic3r's theoretical extrusion model
As mentioned above, extrusion calculations are not quite linear. In that sense, I mean they are not one-dimensional, which is technically an abuse of the word linear. Regardless...

Instead, extrusion calculations are done on a volumetric basis. This means a geometric mathematical model is involved in doing the calculations. Sounds scary, but it isn't. Slic3r uses a model of rounded rectangles to make its calculations. A picture will help:
http://i.imgur.com/8L9bLzh.png
(source: Flow Math documentation from Slic3r)

In this model, the variables are defined as follows:
h = layer height (mm)
w = extrusion width (mm)

To reiterate the equation in the picture, the area of this cross section is the summation of the areas of the two circles and the rectangle:
A = rectangle + circle
= (w - h/2 - h/2)*h + pi*(h/2)^2
= (w - h)*h + (h^2/4)*pi
= wh - h^2 + (h^2/4)*pi

I expanded this out just to demonstrate that we are currently working with the units of mm^2. Of course, that makes this a 2-dimensional approximation, so we extend it along the third dimension by multiplying by the length of filament we want on the bed (from the model), to obtain:
V = L*A
= L*(wh - h^2 + (h^2/4)*pi)
= Lwh - Lh^2 + L*pi*(h^2/4)

Again, I expanded this out just to demonstrate the units: we are now working with mm^3, which is a volume. (Note that pi is unitless because it is a ratio of mm to mm).

But how does Slic3r use this volume? That's where the filament diameter comes into play. If we assume filament is perfectly round, then we can approximate the volume of a given piece of filament as a cylinder, with the radius equal to half the filament diameter:
Rfil = Dfil/2 (Dfil being the diameter of filament)
Vfil = Rfil^2*pi*Len, where Len is the length of filament we need.

Now this answers precisely WHY it is ABSOLUTELY CRUCIAL that, when your the slicer calls for one millimeter of filament, YOUR EXTRUDER NEEDS TO PROVIDE ONE MILLIMETER. If your extruder is not correctly calibrated, all of the math the Slic3r developers worked so hard on breaks down, and there is no predicting the behavior of your machine, or the accuracy of your model!

But then, it all goes horribly wrong...
So we have this very simple geometric model which allows us to turn a requested amount of extruded filament into a volume, and we can use this volume to go back and forth between lengths of filament and extruded length, and ensure the plastic is laid down correctly and doesn't bump too much with the toolpath we generated earlier. But here's the rub: these are all theoretical approximations, and the real world frequently spits in the face of theory. There are a few factors which make this model inadequate as it stands:

1. Squish: As we (well, the Press is different I guess) adjust the Z-stop limit with a screw, and level the bed using our eyes, sheets of paper, or more advanced tools like feeler and dial gauges, a layer height of 0.3mm is not actually 0.3mm, because the bed doesn't move down from a position directly squished on the nozzle. So, the model is already inaccurate because the 'h' variable we described above is not exactly correct (it is off by a constant value, always).
2. Die swell: My understanding of this is not perfect. I have not read any books on polymer extrusion and do not understand internal geometries of nozzles. Regardless, it does exist, and it messes up the calculations above. The general rule of thumb I've always heard is 120% of nozzle diameter, but it really depends. For the e3d, I've actually seen it is a tad larger. Now, the 'w' variable in our model above is all messed up too!

Is this model useless? Nope. Not in the slightest. We can rebuild him, we have the fudge factors.

Fudge factors of extrusion calculation
This long post all leads up to what the extrusion multiplier is, and why it is so important that you dial it in correctly. In the internals of Slic3r, any extrusion calculation not related to bridging (more on that later) goes through ONE function. This function has four inputs:

1. Extrusion width
2. Layer height
3. Length you wish to extrude (this comes from the model you're printing)
4. Extrusion multiplier

Before this function returns the volume of filament to be extruded for any one section, it multiplies the result of the theoretical model by the extrusion multiplier. This internal fudging of the model allows us to ensure that the theoretical calculations actually align with what happens in the real world. Slic3r is liberal in its estimates, and it often over-extrudes if you don't set this value correctly, particularly with ABS. Bad things happen when you over extrude: the plastic bumps into itself, the bed shakes, you experience poor adhesion, and worst of all, your parts look bad and don't fit. It's O.K. that the model isn't perfect, though, because we can perform calibrations to ensure it is correct.

BUT... you can calibrate incorrectly!
In the Slic3r manual, they make the mistake of telling you to fudge the extruder steps per mm to make your wall thicknesses come out to the appropriate nozzle diameter. This actually isn't what they mean, and I have to question who actually wrote that (an open source equivalent of an intern, I guess). If you do this, several bad things happen:

1. The theoretical model is once again, broken. Your extruder is not pulling in the amount of plastic requested by the slicer, but you have fudged it in such a way that it works. That's fine, except....
2. You mess up retraction calculations. When you ask for, say, 1.5 mm of raw filament retraction, that's not what you get anymore. You will either under-retract or over-retract, and get strings/blobs or holes, respectively. Additionally,
3. You mess up bridging. I have so far left bridging out of the discussion, so let's talk about it now.

Bridging is different in Slic3r
All of the stuff I mentioned above is null and void entirely when it comes to bridging. The reason is, bridging is extrusion over free air. The model above doesn't work because there is no 'h' variable to consider. Instead, Slic3r uses a different model, which, if you look at all of the issue tracking on GitHub, seems to have been mostly determined through experimentation rather than theoretical means. In fact, bridging has its own extrusion multiplier entirely. This is called the bridge flow ratio, and it is under the Advanced pane of the Print settings tab in slic3r. A lot of folks think they have trouble with bridging because they don't have a fan, but... Slic3r makes approximations that once again need to be corrected. Slic3r assumes free air extrusions are equal to the nozzle diameter, and this is almost never true due to die swell. Remember the 120% rule mentioned above. Therefore, your bridge typically fails because one extrusion of the bridge bumps into another extrusion, and without a fan, the bridge is still molten, so when other filament bumps into it, this leads to sagging. You will have a lot of luck with bridging if you adjust the bridge flow ratio to control how much plastic is extruded.

So, what is the takeaway from all this?
The takeaway is that you should calibrate your extruder's steps per mm as perfectly as you can. On the Solidoodle 2, 3, and 4, this has been 105. I don't know about the press. This value will be the same for ANY filament, ALWAYS. If it isn't, your drive gear is slipping, or some other gremlin is going on. After you calibrate this, you should calibrate your wall thicknesses correctly using a cube, and adjust the extrusion multiplier appropriately.

Before you calibrate with a cube, measure your filament carefully. Remember how I said the filament diameter plays a critical role in how much filament Slic3r requests? If you don't have this as close to your actual filament diameter as possible, you will never get your extrusion dialed in perfectly.

To correctly calibrate with a cube, set all extrusion widths to 120% of your nozzle diameter (0.48 for a 0.4 nozzle, 0.42 for a 0.35 nozzle, and 0.72 for a 0.6 nozzle), request 1 perimeter, 2-3 bottom solid layers and no top layer. Measure the thickness of all 4 walls with as few layers in the calipers as you can manage. I prefer to discard the largest, and then take the average of the other 3. The thing is, this is somewhat of an art, because you may not get it perfectly. You have to experiment. You might find you're still over-extruding, so back off the extrusion multiplier some more. If you see gaps, you are under-extruding, so bump it up. It takes time to get this right, but it is worth the effort. After you calibrate, you can use whatever extrusion widths you want, assuming they are reasonable. I switch this up all the time depending on the print, so it's up to you.

If you do these things, your prints will look fantastic, and they will fit quite well. If you don't believe me, try it. I promise you will get good results.

31

Re: Soliprint V1.1

Thank You
Maybe this info should make it into the WIKI.

Printit Industries Model 8.10 fully enclosed CoreXY, Chamber heat
3-SD3's & a Workbench all fully enclosed, RH-Slic3r Win7pro, E3D V6, Volcano & Cyclops Hot End
SSR/500W AC Heated Glass Bed, Linear bearings on SS rods. Direct Drive Y-axis, BulldogXL
Thanks to all for your contributions

32 (edited by redbarret 2015-02-05 08:14:55)

Re: Soliprint V1.1

That is very informative and thanks for sharing.

However, aside from me completely forgetting about the filament diameter value and extrusion width value, my statement still seems true that extrusion multiplier still is just a number that is multiplied to the final calculated value (not just steps_per_mm, as I wrongly said before), used for fine tuning. And that is the same thing Slic3r and Solidoodle documentation says.

I think all this info should be in the wiki, but only in some advanced page. It answers in more detail why you would need to fine tune the results. I think for a regular user just saying there are tiny differences in different filament rolls should be enough.
So I personally think the info I quoted for Slic3r manual and Solidoodle's website is fine and not wrong, just doesn't tell the whole story because it's too long.

This got me wonder, though I've asked this question before, is the extrusion multiplier dependent on the layer height then? I've been told everything is automatically recalculated for the new layer height you choose, but they could have been wrong.

Solidoodle 4

33 (edited by jagowilson 2015-02-05 18:10:12)

Re: Soliprint V1.1

If you print at a different layer height I would recommend re-calibrating your extrusion multiplier, yes, because it changes the 'h' input of the equation. If you adjust your Z stop, recalibration is also recommended for best results. The constant factor added to 'h' is relatively small, but whether or not it matters will have to be determined empirically. As layer height gets smaller and smaller (in calculus terms the limit approaches 0), the constant factor added by the Z stop becomes increasingly more significant, theoretically of course.

In my opinion Slic3r's configuration panel setup is a mess and puts several things in the wrong place (i.e., since extrusion multiplier is dependent on layer height, it makes more sense for these two variables to be in the same category). But that's a whole different issue--in my opinion Slic3r will be facing another rewrite, or a significant refactor, if they want to take things like dual extrusion more seriously. Who wants to print something with nylon bushings in an ABS part and be forced to print it all at nylon speeds? As the configuration stands now, you really need to be able to set the "print settings" tab for every extruder, not the overall print. Simplify3D solved this problem by abstracting away the settings and calling then "Processes," which can be configured in infinitely many ways.

All that said, Alex and his team do fantastic work and even though they'll never read this, here's a big THANK YOU for all the hard work!

34

Re: Soliprint V1.1

I don't think I understand why you'll need to recalculate when you change the z stop position. if you'll move it up, the hotend will just squish the first layer some more, so the next layer will still be printed the same amount high from the first layer as before. The only thing affected will be the first layer, which will be squished (shorter).
And if you move it down, the first layer will just print mid air and/or not stick so you'll know it's not right anyway.
What am I missing?

Solidoodle 4

35 (edited by jagowilson 2015-02-05 18:46:34)

Re: Soliprint V1.1

I had a post here but I didn't like the assumptions I was making. The reality is I don't know that it matters and you will just have to experiment. Theoretically it seems like it would but empirical evidence is the important thing.

36

Re: Soliprint V1.1

I haven't done many experiments, but I've done a heck of a lot prints.
As far as I can see, if the nozzle from the bed distance is 0.1mm, the first layer will be printed at 0.1mm height, even if you set it to be 0.3mm. It will just squish more and be wider.

Solidoodle 4

37 (edited by heisenburgers 2015-02-25 05:17:03)

Re: Soliprint V1.1

Should the steps per mm for the extruder be 105 and the extruder mult be 1.0? I noticed with the latest version they dropped the steps to 105, but left the mult at 0.7? I've read a bunch of people calibrated their flows for the Press and got 100 steps per mm (at 1.0 mult I assume). It's a little hard to know what the correct settings should be.

38

Re: Soliprint V1.1

VERY cool info! hope I can use it to rid my prints of gaps between extrusions. my test cube comes out perfect though so dont understand why I get gaps mostly in top layers too on inside/fill on solid layers which is very evident on thin or top layers

Solidoodle 2 with Deluxe kit cover & glass bed with heater. and 2nd board SD2 used not 3rd and alum platform not installed yet still wood. also need cooling fan installed to board. use Repetier Host couple vers. Slic3r also have all free ware STL programs

39 (edited by heartless 2015-07-23 19:36:39)

Re: Soliprint V1.1

heisenburgers wrote:

Should the steps per mm for the extruder be 105 and the extruder mult be 1.0? I noticed with the latest version they dropped the steps to 105, but left the mult at 0.7? I've read a bunch of people calibrated their flows for the Press and got 100 steps per mm (at 1.0 mult I assume). It's a little hard to know what the correct settings should be.

the feed rate (extruder steps/mm) is calculated by marking 100mms on your filament, line up the bottom mark with the top of the extruder housing and then manually ask for/extrude 100mms. Does it feed exactly that 100mms? or does it feed more? or less?
The exact mms of filament actually fed through the extruder is used to calculate what the steps/mm should be.

(expected length* x current steps per mm) / actual length = new steps per mm.
[*expected length is the 100mm you asked for]

This is just one of several calibrations that should be done to get consistent good quality prints

BTW: Jagowilson - that is one heck of a write up about how the whole thing works. My hat off to you for taking the time to do so!

SD4 #1 & #2 - Lawsy carriages, E3D v6, Rumba controller board, mirror bed plate, X motor fan, upgraded PSU & Mica bed heater
SD4 #3 - in the works ~ Folgertech FT-5, rev 1
Printit Industries Beta Tester - Horizon H1