M579 and part scaling in firmware to compensate for material shrinkage

190 views
Skip to first unread message

Mark Rehorst

unread,
Jan 31, 2016, 11:51:32 AM1/31/16
to Smoothieware Support
As explained in another thread, I was puzzled by the matching X and Y axis errors in the size of printed parts even though my printer uses a belt driven X axis and a ball screw driven Y axis.  I have come to the conclusion that the error is due to shrinkage of the material (ABS) that I was using for the test prints. 

I have been compensating for the error by adjusting the steps per mm in the X and Y axes which works great as long as I print only with ABS, but since other materials shrink by different amounts, my compensation scheme creates more errors when I use other materials.  I started looking at scaling in slicers- Cura allows scaling by any arbitrary amount- nice!  Slic3r only scales in whole number % increments, or in mm by using the XY size compensation, neither of which solves the problem.  Further digging finds an M579 command in RepRap firmware which allows scaling the axes by arbitrary amounts, but it is not implemented in Smoothieware.

Would it be difficult to get the M579 command added to Smoothieware?  It would be nice to be able to add a custom menu item to the LCD that lets the machine operator set the scaling factor at print time, or even sexier, select the print material and have the firmware set the scaling factor.  Expanding on that idea further, there could be a user editable table of materials that would include shrink, bed, and nozzle temperatures, maximum print speeds, even retraction settings, that all get set by selecting the material being printed at print time.

I don't have the programming chops to do this myself.  How would I go about requesting that the M579 command be added to Smoothieware?  Would it be better to add that sort of function in the slicer?

Mark Rehorst

unread,
Jan 31, 2016, 12:16:18 PM1/31/16
to Smoothieware Support
If I change the axes steps/mm to scale a print to compensate for material shrinkage, do I also need to change the extruder steps/mm by the same amount?

If I calibrated the extruder using ABS, should I adjust the extruder steps per mm downward by 0.5% to get a baseline, then adjust back up for each material depending on its shrinkage?

Arthur Wolf

unread,
Feb 1, 2016, 12:12:40 PM2/1/16
to Smoothieware Support
On Sun, Jan 31, 2016 at 6:16 PM, Mark Rehorst <mark.r...@gmail.com> wrote:
If I change the axes steps/mm to scale a print to compensate for material shrinkage, do I also need to change the extruder steps/mm by the same amount?

I would *guess* so yes.

If I calibrated the extruder using ABS, should I adjust the extruder steps per mm downward by 0.5% to get a baseline, then adjust back up for each material depending on its shrinkage?

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-sup...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

Triffid Hunter

unread,
Feb 1, 2016, 11:36:34 PM2/1/16
to smoothiewa...@googlegroups.com

Be aware that COTE/shrinkage doesn't precisely apply to 3d printing.

Each layer must drop below its glass transition and harden before the next layer (or two) goes on top - so the object tries to shrink layer by layer but each new layer is placed in the correct position, and previously hardened layers (and originally the bed itself) hold the new layers in place and mechanically resist their shrinkage.

This is what causes warping forces (which get locked into the object as static stress), and thus if warping forces aren't lifting your corners, the shrinkage of the plastic probably isn't what's causing your dimensional errors.

If ever you set your bed too hot, you will observe "hourglass" shrinkage in the first 1-2cm of your object - note that layers above this zone lose the shrinkage that's evident where the plastic is allowed to do what it wants as it cools.

There may be a little linear shrinkage between a temperature somewhat less than your bed temperature and ambient (ie ΔT of ~50-75°C for ABS), but don't make the mistake of assuming in your math that the object remains at extruder temperature during the print, then the object cools as a whole only after the print is complete.

Furthermore, the Extruder steps/mm is a linear value that's directly proportional to extrudate volume, however if you reduce XY steps then you're only changing 2 of 3 axes (skipping Z) and thus you should probably compute pythagorean distance of your change and apply it ratiometrically, ie ΔE ∝ √(Δx²+Δy²)

I do not compensate for shrinkage when I print and I usually get quite good dimensional tolerance - hole centers dead on over 150mm distance, and 50-100um of clearance for a close fit.

In summary, I would expect belt tension and quality to affect dimensional tolerance rather more than plastic shrinkage.

Mark B

unread,
Feb 9, 2016, 4:25:01 AM2/9/16
to Smoothieware Support
I always scale my objects before slicing to account for shrinkage but that's after doing the following to reduce/eliminate printer geometry errors:

For ABS:
- Build printer as geometrically true as possible.
- Calibrate printer using a repeatable + reliable Z probe with a decent calibration algorithm (least squares based calibration is ideal, firmware LSQ calibration exists for RepRapFirmware and Smoothieware [my fork]). Delta rod length should be fixed to actual measured delta rod length, so that's a 6 factor LSQ calibration. Steps/mm should be calculated, not calibrated (though it might be tweaked slightly later on if all else has failed).
- Run heated bed at a temperature that ensures all the ABS is above 75 degC after 10-20 layers, so normally that's 110 - 130 degC for me depending on ambient room conditions.
- Print a calibration piece (I recommend http://www.thingiverse.com/thing:835790) at x1 scale in all axis (assuming extruder steps/mm has been calibrated perfectly).
- Whilst the heated bed is on and the part is all above 75 degC, measure with a vernier caliper (one with decent resolution and accuracy). Be careful not to burn yourself of course.

You're aiming for a perfect 130mm in X and Y whilst the object is hot. You will need to measure near the top of the object as the first 2-5 layers may be a little bigger due to first layer compression. You will need to keep iterating on tweaks (don't tweak delta rod length, everything else is fair game) until you get a perfect 130mm in X and Y whilst object is hot.

Once the object has cooled down, the scaling factor you need for a particular material can be calculated. My empirical measurements has shown that I need to scale my objects by 1.0065 in XYZ for ABS (Z is debatable but I don't do tall objects anyway), this gives me perfect 130mm XY for my calibration piece after cooling.

I'm not sure why you're finding it difficult to scale objects - repetier host lets me do this easily before slicing.

Mark Rehorst

unread,
Feb 9, 2016, 8:37:56 AM2/9/16
to Smoothieware Support
I calibrate using a 100mm cube that I used to set steps/mm and adjust orthogonality of the axes (https://www.youmagine.com/designs/alignment-and-calibration-cube).  Measuring the part warm and cold is an interesting idea, but it looks like we came to the same result.  For ABS I need about 0.5% size increase to result in the room temp part being the intended size.

My printer is rock solid, very precise, and well calibrated except for this little issue.  I avoid host software and print from SD cards (less to go wrong on a long print). I level the print bed manually and rarely, usually only after experimenting with some mechanical changes to the machine.  Details here: http://www.instructables.com/id/An-Almost-Reliable-High-Precision-3D-Printer-Son-o/

Since the error in dimensions is material dependent, it seems that the slicer should be able to account for it by scaling based on the material or at least by using an empirical and arbitrary value.  If it's not happening in the slicer (as in Slic3r) I thought the next best place would be the firmware, hence my original question about M579.  I checked into Slic3r at Github and found that I am not the only one who has raised the issue of arbitrary scaling, so maybe it will eventually get added to the code.  Cura will allow arbitrary scaling (it lets you enter the numbers- not sure if it actually scales that way though), Slic3r only scales in whole number %.



Mark B

unread,
Feb 9, 2016, 12:21:33 PM2/9/16
to Smoothieware Support
I had completely forgotten that Cartesian printers exist... calibrating steps/mm on Cartesian makes sense. (I was talking in delta language)

Good to hear that you've independently reached a value of 0.5%, that is similar enough to my 0.65%. I found PLA to have about 0.15 - 0.25%
Reply all
Reply to author
Forward
0 new messages