slic3r / Slic3r

Open Source toolpath generator for 3D printers
https://slic3r.org/
GNU Affero General Public License v3.0
3.34k stars 1.3k forks source link

Fan and cooling #110

Closed triffid closed 12 years ago

triffid commented 12 years ago

with speed inversely proportional to layer area, ie small layers = full speed, large layers = less speed.

special cases: first (and possibly second) layer should have no fan at all, and bridges should have full speed fan.

alranel commented 12 years ago

Can you suggest what options should we expose to the user?

triffid commented 12 years ago

I've heard calls for a maximum and minimum value.

If using PWM then most fans won't start below 50% and will stall if dropped below 30%.

Some printers have difficulty maintaining nozzle temperature if the fan runs at 100%.

We also theoretically need some way of choosing a particular fan PWM value given the layer area.

Given PWM min, PWM max, min layer area (where fan is at max) and max layer area (where fan runs at minimum) you could just start with a straight linear interpolation and improve the algorithm later, perhaps to a model of airflow vs layer print time using a bezier curve or something.

You'll need a special case in the minimum enforcement code so we can actually turn the fan off completely

Perhaps we should ditch the layer area idea altogether and just go by layer print time, since that's probably a more direct contributor to the need for a fan.

If we hit the minimum layer print time where the fan is at max, we should possibly slow down a bit, like sfact cool. Remember a minimum speed!

alranel commented 12 years ago

People are discussing cooling features on the RepRap forums too: http://forums.reprap.org/read.php?263,109253

alranel commented 12 years ago

So, three user options:

Logic is just:

  1. detect layer printing time
  2. interpolate that with a minimum time (max PWM) and maximum time (min PWM) function
  3. apply that PWM during the print of the whole layer

Question is: how to determine the min and max time to compare the layer's time with?

Also: is PWM important? Does it make difference in print results? Why not have the fan always at a constant value? I have poor experience with fans.

triffid commented 12 years ago

The user will have to specify min and max times too I suppose.

For defaults, I would suggest that 10-15s is a sensible minimum below which the fan should run full speed, and up at around 60s the fan can run at idle speed. Idle PWM can probably be 40% by default, and full PWM can default to 100%

Yes, PWM is important. I have an 80mm fan that I adjust manually at the moment. if I have it running when I print first layer, the object doesn't stick properly and I get corners curling up. I need it running at a low speed for most prints, but small parts and bridges need it to run full blast. if it runs full blast all the time, I get poor layer adhesion because the printed object gets /too/ cold between layers, also my nozzle struggles to maintain temperature.

Currently I switch this fan from 7v (idle) to 12v (full) and point it away from the bed for first layers

Pointedstick commented 12 years ago

FWIW, I have a desk fan pointed at my print area at all times running at full blast and my Makergear hot end doesn't have much trouble staying hot. If this feature existed, I'd add a 40mm fan, but probably keep it on all the time.

rtgoodwin commented 12 years ago

I have a 40mm fan on my hot end that runs at full speed all the time (it's wired to an extra extruder port), and have no trouble maintaining heat, but that's the Mosaic design. The 50mm angled at the print, I usually run at either half or full (S125 or S255 I believe) with buttons in print run.

That's for PLA. I NEVER use it for ABS except at the end to cool the print so I can pop it off easier. But, it's powerful enough at S255 that it WILL cool down the HBP if I'm near the threshold of what my power supply can hold (about 115C).

So, either min/max settings, or code in an Off/Low/High drop down (simplicity!). The default for Cool in SF I believe is...well I keep it down around 20secs but I want to say it defaults to 30. So, 15-20 makes sense to me, but it needs to be clear to the newb not to use it during ABS unless they want warp city (in some cases).

sam-wright commented 12 years ago

Since first reading this, I've started playing with a small fan that I had laying around;

Honestly, any fan for me creates huge curl and warpage, but a slight amount does help my bridges. So I'd recommend it when performing bridges.

Somehow the thought to use a fan never occurred to me, but its only ~19C where Im printing so its probably cooler than where most people are.

TinHead commented 12 years ago

Don't want to push I know you have other things to work on, but can we have this feature added in some form or another ?

A delay or orbit around the print for layers smaller than X mm in area or taking less then Y seconds to print, would be great.

I have two 80 mm fans on the machine controlled trough PWM, located at the opposite sides or the X carriage. Even with them at full power blowing at each other, with 10mm/s speed and 0.1mm layers I'm still unable to get an 8mm in diameter gear (8 tooth 2.5 mm diametral pitch) to print ... I just can't get it to cool fast enough using PLA at 185 degrees.

Maybe I'm pushing the limits of the printer way too far, but still I think a cooling feature would help and I really don't want to go trough the crazy time learning how to use/calibrate skeinforge.

triffid commented 12 years ago

TinHead, print 4 or more at a time then :)

I'm thinking I might have a crack at doing this as a postprocessing script- see my fork for the framework around that.

Unfortunately I don't have a PWMable fan set up at the moment so I'd be shooting in the dark

TinHead commented 12 years ago

@triffid: yeah printing more than 4 at a time might work but it is kind of wasteful on the let's say "not cheap" plastics :) Also it does not really solve printing for example a stacked gear. I'll have a look at the postprocessing script you mentioned, thanks for reminding me. I thought at having a shot at adding this feature but my perl-fu is not good at all :(

alranel commented 12 years ago

We need to figure out the big picture about cooling features before starting to implement any of them.

So far, multiple ideas have been expressed:

I hereby ask for your help to design a good unitary logic for all this, including a good layout of user options.

My main concern is with the layer printing time. We know that no time estimation will be right; any logic we may choose will possibly return wrong results without knowing the firmware acceleration logic and its configuration values (which is something we'll never implement inside Slic3r). Thus, I'm worried about having a setting that talks about "time", expressed as an absolute value. That would be wrong and it would lead to confusion and endless "bug" reports. So, I'm very oriented towards a setting that doesn't take time into account. Layer area, for example, or total extruded length for each layer.

alranel commented 12 years ago

Okay, here's my proposal.

Cooling options:

Fan options:

Temperature options:

How does slowdown work: if your layer has, say, half the Extrusion length threshold specified, all its feed rates will be halved. No feed rates will go below the Minimum print speed value however.

@triffid, the above solution for fan control doesn't interpolate PWMs. That would require a couple more options, and I think it's too complicated to calibrate and very little benefit would come from such a feature. I think we can just live with a threshold for low speed vs. high speed. Fan options should be used in combination with slowdown.

Is there anyone who actually uses orbit? I have no experience with that, but it looks like a huge ooze-generator.

sam-wright commented 12 years ago

Suggestion, just my opinion:

Orbit has never been useful for me, as you noticed, it is a huge ooze-generator and my tip oozes less than the average tip. (Maybe other had it better configured than me?)

Also, under your temperature options, I wouldn't play too much with bed temps/first layer temps/etc... as some machines are over-powered and can control those temps very directly and rapidly, while other machines have a much slower response time. Seems like it may become more of a headache generator, unless I'm not interpreting intent properly.

Based on this, I would recommend the following for Cooling mode: Cooling mode: none/slowdown/FAN (Maybe as checkboxes as to allow a person to slowdown and/or use a fan)

Finally, using a simple threshold for low-speed vs. high-speed seems really coarse. At a minimum you would want the user to be able to configure that setting as different machines have different fans. I use a ~50mm fan, while other use a 20-80mm fan. I've even seen some using 2 fans to get the print area from both sides. I'm not sure why interpolating the pwm values would be too problematic. You should just need to get a solid metric to calculate from. Length threshold should work. I may be missing something here why it would be difficult.

Hope the added opinion was of some use.

triffid commented 12 years ago

Cool Proposal

based on

Max feedrate comes from existing perimeter/bridge/fill speeds

then we add

and definitely skip orbit please!

kelow commented 12 years ago

Nice job with Slic3r Alex ;) I don't think it's important to know exact time of each layer. You can take some default value of acceleration (2000mm/s2 ?) cause everyone needs to figure out minimum time value not by measuring actual layer time but by changing Slic3r's layer time to achieve good results. Triffid's comment is really what I think it should look like. And one more thing: please leave travel feed unchanged as it may produce lots of ooze when printing small islands far apart.

I don't want to start a new issue before asking: is it normal that Slic3r produces two paths over one perimeter in single-walled objects? I've just tried to slice bearing guide from Prusa Mendel and each perimeter prints twice giving thicker walls.

alranel commented 12 years ago

Okay, here I'm translating @triffid's proposal into an user-friendly set of options:

@triffid, perhaps we can ditch Max fan speed, can't we?

TinHead commented 12 years ago

Hey this looks great :)

rtgoodwin commented 12 years ago

Seconded. All of the benefits of Cool without the worries of slow movement and plastic pooling.

triffid commented 12 years ago

all thumbs up here :)

suggest using PWM instead of speed in descriptions since PWM doesn't directly correlate to airflow or speed and people will be confused as to why 30% "speed" doesn't cause the fan to move at all

I'd suggest keeping max fan speed for odd setups, but feel free to cull it from the gui, ie another command line interface only option.

alranel commented 12 years ago

Implemented! Go grab the lastest git HEAD and please test test test!

TinHead commented 12 years ago

Aye! Fetching!

rtgoodwin commented 12 years ago

Initial tests looking good! Note to others, if using RAMPS 1.3/1.4 and Marlin RC1 and single extruder, you need to fix your pins.h to turn fan back on properly OR move to Test branch at this time, which fixes it back.

On Sat, Feb 25, 2012 at 3:07 PM, TinHead < reply@reply.github.com

wrote:

Aye! Fetching!


Reply to this email directly or view it on GitHub: https://github.com/alexrj/Slic3r/issues/110#issuecomment-4176188

triffid commented 12 years ago

hm, sounds like time to get my fan under software control! It's wired direct to my power supply at the moment..

cakeller98 commented 12 years ago

yay! tests commencing!

TinHead commented 12 years ago

Hey first test worked great! Thanks !

alranel commented 12 years ago

What we really need now about fan and cooling is a wiki page describing the cooling logic. It should contain Triffid's graph and some explanation for users. Any volunteer? ;)

Intrinsically-Sublime commented 12 years ago

Cooling seems to work well. Except it puts WAY to many M107's in. I would rather it never turn the fan off but rather just turn it down to the min speed set. I also don't find having the M107 at the end is really needed or wanted. I like to run my fan for a minute when the model is finished. I use M106 Snn , G4 S60, M107 in my end code to solve the M107 at the end.

You can see the results http://geometricobjectdepositiontool.blogspot.com/2012/02/tantillus-progress-update-and-videos.html

simonkuehling commented 12 years ago

Really great job with the new cooling feature - works really well so far!

But i would like to suggest a minor change: Could you implement a general "Fan MIN PWM", that is always used (except during the defined first layer(s) of course)? I see a noticeable quality improvement on the perimeters when my fan is always blowing a little bit - but setting "Enable fan if layer print time is below ..." to values like 500sec to keep it running on a fully-packed printbed is only a inelegant workaround...

btw - I am amazed by the development speed of slic3r so far. Keep up the great work!

triffid commented 12 years ago

@simonkuehling see #241

cakeller98 commented 12 years ago

One thing that bugs me about the slowing down on small layers is when you have say.. a tower, or 2 or however many... that are say 3mm x 3mm or smaller even, then slowing down doesn't allow the heat to dissipate. the nozzle is hot, and radiating that heat down into the plastic. in fact, I think it's better for that situation to build it fast on a solid previous layer, than to slow down and keep the previous layers all hot and bothered (and woozy)... It would be better for short layers to be able to pull upward, and blow on the layer for 15 seconds, or even 5... let it dissipate the heat, and quickly build on that.... minimizing the heat transfer to the existing build.

slowing down makes sense if the layer is big enough to allow regions to cool, but not if it just means more heat transfer into the part.

triffid commented 12 years ago

we considered that, the problem is that the nozzle then oozes plastic while it's waiting.

This means that we can no longer accurately meter the volume of plastic extruded until the melt chamber has been purged and the nozzle wiped.

Without the purge and wipe cycle, you get large blobs on the outside of your objects and holes in the perimeters.

Historically, both approaches have been thoroughly tried, and the slow-down method has been categorically shown to cause fewer problems, although it's still not ideal as you point out.

If you're in the habit of printing small towers, I suggest you print several at a time so each one has a chance to cool. There's no solution that works perfectly for a single small tower, there are only compromises.

cakeller98 commented 12 years ago

Crud... blobs suck too. but small features at the top do need to be fixed and printing lots isn't a great solution - but as you pointed out it's a work around, so better than no solution. I'll just add one more thing to manually add to the model to get it to print correctly... which is - a thin wall that will, in essence cause the fan to blow over where I want it to. too bad it WASTES plastic!

triffid commented 12 years ago

so does throwing out prints that don't have a good enough finish for your liking. So, which wastes more?

btw, welcome to the wonderful world of compromises known as engineering ;)

cakeller98 commented 12 years ago

I wasnt disagreeing with you. Doesnt mean i have to like wasting... And as i said i can modify the model for a much better solution than multiple prints.

Of course im referring to prints that take on order of hours and a large portion of the bed so... Multi print = non-option

cakeller98 commented 12 years ago

Also esier to remove blobs from a surface than to fill voids left by the towers being shifted around because they are still soft.

But as mentioned adding an extra wall that causes a good delay between layers and positions the fan over the meeded spots will be a very serviceable work around...