Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

Solving for skeinforge flow rate

by DaveD Dec 26, 2010
Download All Files

Thing Apps Enabled

Please Login to Comment

awesome little thing you have done..

I am trying to do the Ditto on some small objects, and have problems. need some help please.

I have a MB 2x dual heads, and have been trying to use replicator-g and salifish to do the Ditto, would you have any tips on that..??

Thank You

I'm using a TOM Mk6

OK here are my calculations so far

layer height=0.29mm
w/t 1.5
I'd like feed rate somewhere between 30-35 lets say 30 for now
I'd like flow rate
gt;1.4 solve for this

r gear 10.58/2=5.29mm

r filament=1.5mm

Volume of ABS emitted/minute=(layer height^2)x(w/t)xfeed ratex60=227.07mm^3/min

Volume entering extruder/min=(pi)(r of filament)^2x(2)(pi)(rgear)x(flow rate in rpm)

=234.9459328x(flow rate)?!?!?

I have flow rate setting (float) how do I calculate flow rate in rpm from that value

what other cal
culations do I need to incorporate?

(scratches head)

Er.. I haven't thought about this stuff in a while but that layer height^2 doesn't looks right.. I think "layer height thread wdith feed rate" equals mm^3 extruded per second where thread width is layer height * w/t (0.435 with the numbers you have).

On the other side, it should be "pi * (r
of filament^2)" for filament cross section.

Hopefully that helps!

I am using (r of filament^2)

so you're saying thread width is layer height w/t 0.435? Where do you get 0.435 from?

I was thinking cross sectional area of thread = layer height layer height w/t is that not right?

gt; so you're saying thread width is layer height w/t 0.435? Where do you get 0.435 from?

Nope. Thread width = layer height "width over thickness". You listed 0.29mm as layer height and 1.5 for w/t... 0.29mm 1.5 = 0.435mm.

That gives you a thread cross section area of 0.29mm * 0.435mm = 0.126mm^2.

Factor in a feed rate of 30mm/s and the volume needed is 0.126mm^2 * 30mm/s = 3.78m

From there, the flow rate needed is what gets you 3.78 cubic mm per second for whatever size filament
amp; gears you're using. (definitely double-check my math.. the idea's right but I've been known to lose decimals on weekends..)

Hi Dave, thanks for sharing, a quick question please if you dont mind, I have a cupcake CNC printer and im struggling to produce decent prints with the profiles i put together, how easy is it to adapt this tool to my printer pls and what do I need to measure first so the tool would work? Thanks

Hi lahcene,

The thing that matters is the kind of extruder you have, not what kind of machine you have. If you've got something like a MakerGear stepper extruder on your Cupcake, you shouldn't have to do much adaptation at all - that's what I had on my cupcake when I wrote this stuff..

if you've got the sto
ck DC extruder Cupcakes came with, things can be tricky. Look through the other comments here for notes on how to get this working with a DC extruder...

Dave - Bit of a long shot here, but any recommendations on what settings to use for the Makergear stepper extruder with 1.75mm filament and the .35 nozzle? The big issue for me is the gear diameter. I know that the pitch diameter is 10mm, but it has rather deep teeth. I'm pretty sure I read somewhere that you have this gear (among others), so I thought I'd ask.

The gear I have can be seen in the 3rd picture of http://www.makergear.com/pages/stepper-plastruder-instructions-cupcake-mounthttp://www.makergear.com/pages... . I suspect that's not the one you have, though.

I'd measure your gear as accurately as you can, run some filament through it, back it out and measure the depth of the teeth marks. Subtract that depth from the diamater and use that value as your gear diameter.

I just have to come by and say thanks again: I get such good results with the profilinator that I often generate profiles with it and use them to directly print large, complex objects with every expectation that the results will be good.

Here's how I use it:

  1. Measure everything: Gear diameter, filament diameter, gear swell (via a timed extrusion, even easier with RepG 24) and "fudge flow factor" (which you measure by timing the RPM of your DC motor and dividing into 255, unless you have a stepper extruder). Currently my blue
    plastic is down to 2.8mm and 0.77 "gear swell"). If you have a DC motor, take that measured RPM and put it in "flow rate max". Put something very close to that in "min" because you don't want to go much below 255 PWM.

  2. Set reasonable thread height and width ranges. For a 0.5mm nozzle it's ab
    out 0.3-0.4mm height and maybe 0.5-1mm width. Probably this setting should be min/max W/T because that's the true physical property: Plastic can only spread so much.

  3. Choose a reasonable min/max feed rate. No need to go super slow (say below about 20) but watch the top end: I can go 50mm/s w
    ithout losing steps but maybe only 35mm/s without rounding off squared corners.

  4. Pick a profile. When using PWM I go for the ones closest to 255 because that's the fastest your print will go (flow rate is most of what determines print time). With a stepper you can just choose the highest flow
    rate for the other settings you like (mostly traded off against feed rate).

  5. Plug in layer height, w/t, feed rate and flow rate to skeinforge. When replicating w/t on "fill" I reduce the value to about 90% of the "carve" w/t to get nice closed tops.

Right now I'm printing a Prusa X-Idler. I m
easured the wall thickness of the channel that goes around the Z smooth rod as 2.5mm. In order to get a double-double wall thickness for that "tower" I chose a thread width of 2.5/4=0.625mm width (which I just put in min/max to keep the results manageable). I hit "go" and copied the fastest 0.4mm
profile into skeinforge as in step 5 above and now the idler is printing. Looks perfect so far!

whats the best way to figure out gear diameter?

mine is bigger than the MK5

Calipers are good!

Hey guys, I can't run this software on a new windows XP install. Does it require a support program?


It shouldn't require anything except the .exe from the zip file (the rest is source code, which you can ignore) and .NET 2.0, which is pretty old
amp; ubiquitous.

Does it give you an error message?

Had problem when pressing GO. Always showing an error box telling that I need to fill blank space...

I found that changing all "." (dot) by "," (comma) make it working for me.

Surely related to my French-Canadian Keyboard ;-)

By chance, I only need to do that one time since every data are saved :D

Weird but now that you mention it, I'm not surprised.. This is .NET being helpful and convering strings to numbers via using your "culture-specific" settings. I'll see if I can make the next version default to the right format.

is there any way to get these math calibrating solutions to work on a mac? i am still stuck in the dark ages of test cube madness

I'm thinking of porting it to OSX or as a web application.

Hmm, isn't there windows emulation like Wine on MacOS? I am sure this program could easily be ported to MacOS. In fact, someone should code it as a java applet and put a version on a website some where. Of course none of this helps you currently, I guess I'll shut up now.

Thanks for this awesome program. I have gotten much better results out of my ToM by using this tool.

I do have a question.

I did this:


Which I am sure many are familiar with. I have found my mk5 to extrude 100 mm in 3.4 seconds.

How can apply I apply this figure into your program to get an even more accurat
e profile? Every time I mess with the flow rate figure and change it to 3.2 and 3.6, and then change fudge factor to .1, no figures come out? Am I using the program wrong??

Figure the feedrate by dividing 100 by 3.4, which gives you 29.41176470588235.

You seem to have a very fast extruder. =-O

If it is a stepper extruder, set flow fudge factor to 1. Then set flow min to 0.5 and flow max to 5.0.

If it is a DC extruder (Round motor, not stepper motor), then you should start by putting 127.5 in flow fudge factor, 1.5 for flowrate min, 2.0 for flowrate max.

Then insert 29.41176470588235 i
nto feedrate min and feedrate max box. Then enter .3 for layer height min and .4 for layer height max. Finally enter .4 for thread width min and .8 for thread width max. Then click go. If your prints are blobby, turn up gear swell mod a bit. If they are thin, turn down gear swell mod a bit.

Flow Fu
dge Factor is a multiplier on flowrate. It should be set to 1.0 if you have a stepper extruder, otherwise set it to 127.5 to make a PWM value.

Wow! Thorough! Thanks a bunch! I will have to try all this out tomorrow. I have the DC motor, but I am pretty certain it won't let me set a different PWM value. It is either 255 or no go with the firmware I am using (latest ToM).

Thanks again!

I went for the gusto with a 0.15 layer height despite the W/T of 8! Needless to say I didn't get that much spread. Is it even possible? With much higher temps maybe? Perhaps the thing to do is make a test gcode of a parameter set and extrude one line to verify W/T.

Also I measured my own DC motor speed: 2.1 RPM (when setting flow fudge remember to set flow rate max also to 2.1).

I measured my blue filament at 2.84mm, extruded for 1 minute and got 1260mm of 0.575mm dia thread which gives me a "gear swell" of 0.74. I assume this is due to the filament having air trapped in it (like bread).

With measured values I took one of the 0.30mm layer height results and it prints pr
etty well. The shell layers actually touch without any tweaks, which I couldn't get before I had the RPM and fudge right. I guess the moral is that all the math in the world won't help if you use the wrong inputs!

I'm surprised at the 0.74 value - most people have been reporting very close to 0.85 for ABS. I've heard one that's very close to 1.0 and another at 0.9 but most are 0.85. Also, this value isn't something I've measured/calculated before - unless you include the RPM and gear diameter in your math, it's not something I would measure. It's more of a tweak value that people will have to tune to get prints correct on their particular machine/filament.

Can you say what kind of nozzle are you using? Also, which color ABS are you using and where did you get it from?

As for w/t = 8, that's a thread 1.2mm wide! An old MK4 nozzle might, might!, be able to pull that off but I don't think a MK5 or MakerGear one will be able to do it - there's just not
enough of a flat spot around the nozzle hole to tame a thread that wide.

To figure out the max usable width of your nozzle (which should be same for all nozzles of a particular brand/size), I'd start at a thread width around 0.7mm then go up by 0.1mm at a time and see how the prints look. There w
ill be a point where the prints very obviously start getting a lot worse - that's the point just over the max usable thread width.

If you (or anybody!) figures out a max thread width for a particular nozzle brande/size, please post them! My MakerGear 1-piece 0.35mm hot end is good to about 0.75, m
aybe a little more.

The "gear swell 0.74" was measured with Makerbot blue ABS (from a 5lb spool). I double checked all my measurements when I got that result, but the fact is that the configurations coming out with that setting are very good right out of the box. Last night before bed I literally typed in one of the 0.40mm layer height options with no modifications and printed the core of a "heart gears" and the quality is as good as any hand tuned profile I produced (which is to say I still get some "cupping" on the overhanging faces but the surface finish is fine).

I don't think there's any magic here: I think the filament is just "fluffy". It's certainly softer (as filament) than anything I print with it. Some enterprising soul could measure the length of a 1lb or 5lb spool and see what THAT says. Or just cut off a foot or so and measure it on a good sc

BTW the final realization for me in terms of getting good results from this tool was that there's a difference between feed speeds I can do (with no lost steps) and ones that have the precision necessary for good results. At feed speeds of 45+ (I do rapids at 50mm with no lost steps) the bo
t rounds off the corners of things, causing plastic buildup in those corners, causing warping. Simply using a much slower speed fixes those lifting corner problems like magic. There might be a skeinforge plugin somewhere to slow down in the corners.

Hm.. The person reported using a gear swell near 1.0 was using MBI Yellow ABS. There's other evidence that different colors behave in different ways - it's no news that different colors like different temps - and I strongly suspect that different nozzle designs will also make things behave differently. I wonder if a good upgrade to this program (or some other, future program) would be to have multiple tweaks
amp; presets for various things. Like, say, a filament profile that lets you select from a preset list or add your own. And a similar thing for nozzles. Maybe other factors too. That does add a ton of complexity though, which I'm sorta trying to avoid, but it's worth keeping in mind.

I do know that my math isn't quite right yet. It seems to do high-rez stuff quite well on my machine but prints get thinner as the thread volume increases. Tweaking the gear swell mod down will increase the amount of plastic.. What thread width did you do with the .4mm thread height?

Definitely a
gree on things like freed rates you can do vs ones you can do really well. The intent was to let people provide a range of values they know work well on their machines and have the program sorta show the envelope of what should work within those ranges. The UI's a bit crowded but it seems to work ok
, once you get used to it.

It's working fine with Mono, so it's not Windows-only ;)

Tested on Linux (Debian wheezy)

Great! Thanks for the update!

(like) (like) (like)

(love) (love) (love)

Seriously, they need to make a "Love" button... Like isn't enough...

LOL.. Glad you like/love it.

If you use it, please comment on how/if it worked for you, even if it sucked.

First couple of calibration cubes came out ugly, then I dialed in the flow fudge factor and created a nice cube. I still have a DC extruder, so there is a bit of manual calibration to do, but that is just dialing in the gear swell mod and fudge factor, and then I should be able to just click Profile and have a perfect profile ready for printing. I hope that I eventually get a stepper extruder so I don't have to manually calibrate stuff anymore.

maaaaan, this thing puts out some funky numbers...

I think I'll run some anyways and see what happens! :D

Let me know how it works!!

Stupid Q. Is flow rate in RPM or mm per something? Attempting to convert the number into something my extruder likes.

Yes, the numbers are indeed in RPMs.

If you've got a MBI DC extruder, you should put 127.5 in the Flow Fudge Factor field and it will give you the PWM value to use. Those extruders have a range of around 1.5-2.0 RPM or so (YMMV) and the RPMs of the motor doesn't scale linearly with PWM so as you go lower, you'll probably want to bump
up the PWM value a little. There's some variation in DC motors so if you have one of those, you may need to mess around with this a bit to get the fudge factor right for your machine.

I just started using this and realised the following:

My DC motor does roughly 2.1RPM, So in order to get the correct PWM value I entered 255/RPM into the flow fudge factor, so 121.4 in my case. If I understand the math correctly that should work out the correct PWM value for any given motor. Adjustment will still be required to account for the non-l
inear PWM scaling. Be aware, I may not understand the math correctly :)

Thanks dave this is a really handy tool!

That math sounds right to me. You're also right in that you're going to have to poke at it a bit more if you want a flow rate other than PWM 255 - it's does not (in theory) scale linearly..

If you (or somebody else) has problems figuring out the rate your motor turns, you can carefully measure the amount of raw filament the extruder takes in in 1 minute then divide by that by 33.238, the circumference of the MK5 gear, to get the RPM. If you don't have a MK5 gear, measure the diameter of yours and multiply by pi to get the circumference.

Glad you find this useful - let me know how the prints come out!! (maybe use the I Made One button? that or just comment..)

Heh, my prints initially were looking brilliant! and then my printed filament drive warped under pressure from the teflon tube in the hot bit, looks like thermal expansion was to blame but im not totally sure on that one. After reverting to the stock filament drive i went back to do some more printing and suddenly I find the extruder wont extrude unless its set to 255.

After doing some digging on this I find some threads that say PWM has been switched off in recent firmwares. However, literally 2 hours ago i was printing with PWM set at 232. This confuses me...

It confuses a number of people.. Sorry - I have no idea how to help a DC extruder that's become grumpy. :(

Filament volume-in DOES equal object volume-out because plastic is not consumed or destroyed, (well maybe a minute fraction less due to some volatile components boiling off as fumes, but nothing noticeable).

Die swell makes the plastic come out fatter, but shorter, so the volume is the same once the plastic has cooled back down the the same temperature as the feedstock.

The only thing that is a bit indeterminate is the pinch wheel diameter because it depends how far the teeth sink into the plastic.

nophead, it is perfectly reasonable that volume was lost during extrusion. Plastic is a polymer and it is safe to assume that pressure and heat will break it down. Despite the volume being lost, mass does stay the same. i think you are confusing the laws of conservation of mass with volume.

Hey Dave,

Did you account for the diameter change between the drive wheel and the filament because of the teeth biting into the filament, your drive gear diameter would be a shade smaller. You can't just put some calipers around the drive gear and use that number to derive your filament speed, you would hav
e to measure the inside tooth diameter and the outside tooth diameter and probably figure out an average between the two.

That might account for your missing filament, your drive gear is a bit smaller that you accounted for.

Heya twotimes. I could be off by a little there but this has all be done with a MK5-style gear and those teeth are pretty tiny
amp; shallow.. I don't think they're enough to account for what I've been seeing.

The other thing that I have noticed is the tooth spacing of the MK5 gear averages .596mm per tooth while the cuts in the filament measure an average of .566mm. see image.

So under load, the filament gets compressed and goes slower. I know it's a small amount, but all of these things can add up.

By the way, how's the snow?

I've got a condo - snow's just fine over here! :)

You're absolutely right - it might be that I've got a number of small things off that add up to bit of lost volume..

I'm still sorta waffling on what to do about that modifier. I could leave it at 0.85, which is what works for my machine. Or I could make it 1.0 so everybody starts with the 'real
' value. I guess it's a question on if the average machine/settings tends to be low, right on the money or high.

At least for now those who don't like the 0.85 can just change it to 1.0 and see how that works - the program will remember all settings between runs (even the skienforge dir and which p
rofile you clone) so it's something that only needs to be done once.

Dave, I'm willing to bet the majority of your variance is coming from the RPM calculation. There are a bunch of small inaccuracies that slightly affect density, but 15% volume loss is ridiculous. I assume you are using a DC motor, and that will slow down while under stress. Basically the more force pushing against the drive gear, the slower your actual extrusion, and the farther off from theoretical volume out you will see.

Nope - I've got a stepper extruder on my Cupcake now. You're right about DC extruders. If I still had one of those, I wouldn't even blink at it being off from the math by 15%. Like I said in the comment to cyclone above, DC extruders will need a bit more test
amp; tweak before this type of tool gives them reliable info.

Have you (or anybody) tried this to see how well the profiles it generates works on your machine? I've tested it (ie: actually printed stuff) from 0.1mm layer height to 0.4mm with a variety of feed
amp; flow rates and it's right on the money, every time.

Just to weigh in on the "lost volume" issue: ABS is hygroscopic, and can swell significantly as it absorbs moisture. (This is why we started packing our spools in sealed bags.) If you want to see this in action, cut a bit of ABS and leave it in water overnight, and then measure the diameter.

The lost volume may be the water in your ABS boiling off; in the right light you can see steam coming off the nozzle. If the ABS has absorbed too much water, it can even cause bubbles as the water escapes. If you're getting bubbles in your threads, you probably haven't been keeping your ABS too dr

I'm running a soaked ABS test right now, and it's looking like the extra water isn't going to be enough to account for the difference you're seeing. So that's one less thing to worry about (for this problem, anyway).

My guess is still that it's a combination of a sum of small errors and a increase in density, though I've got no proof to back that up.

I pulled the hot end off yesterday and ran plastic through it for 2 minutes at 1RPM. The length in vs length out was close enough (0.3-0.4mm, IIRC) to be called noise but the length it took in was 1mm shorter than I expected, which is a bit outside my 'noise' level.

That doesn't account for anyw
here near 15% but sorta confirms what TwoTimes observed above in the comment about tooth spacing on the gear vs on the filament - it's a bit off from the expected.

Just to add my $0.02, I did filament-in vs extrusion-out measurements, and tried to track all my measurement uncertainties. I ended up calculating a volume loss factor of 0.85 +- 0.05. Which lines up close with daved's results. Of note, my filament had been out of it's dessicant sealed bag for a few days first. Maybe that's the deciding factor.


I don't think moisture accounts for much of the difference.. Just being out of the bag for a few days shouldn't add that much to the volume.

That's a good point, which also reinforces the idea that the difference I see is probably a number of smallish factors adding up instead of one big factor.

My place isn't exactly 'soggy', winter in New England and all that, but the ABS is just sitting on a shelf.

I have this on my list, and really want to see if I can reproduce some of these numbers. It is also very possible you have unveiled a bug in the way skeinforge is calculating flow rate.

Looking forward to hearing your findings!

If you're using a DC extruder, you should measure actual RPM when it's set to 255 as some of the comments in Bre's recent blog makes it sound like some people are actually getting
gt;2 RPM when the PWM is set to 255. Probably also want to try change my infamous 0.85 to be 1.0, at least to start..

The tab order is all screwy on the profile pop-up - sorry.. I've got it fixed but was hoping to have something useful to add before re-uploading.

I didn't think mass was being consumed! Volume is very consistantly lower, though.

The bit about gear teeth sinking into the filament is good but I don't think that's it. The MK5-style teeth are quite small and the bite marks on the filament are barely noticable.

What else could account for the loss in volume? I'd very much appreciate any pointers...

I can imagine an increase of volume, though. When you heat a thermoplast too much, tiny bubbles may get it to expand from the inside out. So while the total mass stays the same, the density lowers and, with it, the volume expands. While this probably isn't desirable, I think it's okay to have this parameter there.

lt;don ho
gt;Tiny bubbles, in my threads...
lt;/don ho

Bubbles = bad! :)

I haven't noticed any loss in volume on any of my extruders volume in is volume out. How are you measuring it?

Measuring by trial
amp; error, mostly..

If I do the math on extruder RPM, filament diameter and gear diameter to get volume/second going in then compare that to thread width
amp; height and feed rate for a profile combo that I know works well at 100% fill, the volume/s in is always low - they don't match up.

If I fake the gear diameter to be *= 0.85, expected vs observed matchs up, every time.

I assumed that this was due to density increasing (same mass, lower volume) as part of the extrusion process. The volume math seems pretty straight forward but I'll very-happily correct it if you know a better

Have you tried putting a mark on the filament and running it for a known time. Then you can measure how much goes in and measure the length and diameter of what comes out. I am sure you will find they are the same volume.

I haven't tried that, mostly because I'm not confident that I can measure it accurately enough...

Not sure I understand how measuring extruded volume would really help. I have measured my gear and filament diameters pretty accurately and am fairly sure my RPMs are correct. If those measurements are indeed correct, what else (aside from an increase in density) would cause the prints to come out

It's not that I'm saying your wrong - I just don't see how else threads would come out thin if I did indeed measure those things accurately. If prints were coming out blobby (which is what I expected) I could see/guess that there were small pockets of space being left in the print and that
I needed to drop volume-in a bit to compensate for that. That's not what I observe, though - I see the exact opposite.

Just for the sake of my own sanity: have you measured such things on your machines and did the math work out the way you expected? I've seen pix of your prints and they're quite n

Maybe I'm calculating the desired volume-out incorrectly.. At 100% fill, shouldn't it be thread width thread height feed rate? I suspect that's not right around the perimeter edges as they're not overly square but it seems right for the majority of the object, the interior.

Yes 100% fill is width * height but that would be the absolute maximum, I generally use a little less to allow some room for error as if it is slightly too much plastic builds up around the nozzle.

I just did a test where I extruded 99mm of 3.07 filament and got 1998mm of 0.68mm filament. That is less than 1% out.

When I was using a threaded screw drive I made measurements and they all added up exactly but with small diameter pinch wheels it is harder to decide what the diameter is and I do
end up fiddling with the diameter until it looks right.

Hm.. TY for measuring that! Since my extruder is all in pieces ATM, I re-measured the RPMs (by eye) and it's very close to what I expected. So close that I couldn't tell you if it was too low or too high.

Agreed on the 100% fill. I just do that when I'm trying to dial in settings and rarely print actual objects at 100%. If I can get a profile to work well at 100%, it's always quite happy at lower infill settings too (but not the other way around).

I don't doubt that there's something wrong (or rat
her not measured/understood correctly) with my rig but I don't see the problem.

Either way, the tool still works - just change the swell mod to 1.0 to get rid of the 'Daves funky machine' factor. It'd be nice if somebody could test a combo this Thing came up with and comment on how it works for th
em; I'd be happy to change that param to be 1.0 if this weirdness seems to be just on my machine..