Saturday, 22 February 2014

Calibrating 3D Printed Sizes in X / Y axes

Early days, calibrating my RepRapPro Mendel was a never-ending task. Little did I realize it was NOT calibrated and I was using software to fix errors that I should have actually calibrated to be correct.

One big issue I've been fighting and overcome is what a lot of people call the 'perimeter width' test. Although the perimeter width has very little to do with the outcome.

I worked out that the 'perimeter width test' from the reprap.org wiki calibration page only really tested for dimensional correctness in the x axis, and I wanted a test part where I could measure the sizes achieved in x and y for male and female holes / features. Circles are hard to detect error in just 1 axes, so a male and female 10mm square 'plug and socket' arrangement seems perfect. I give instructions below on my take on calibrating for perfectly sized and shaped objects. Triffid Hunter has an EXCELLENT tutorial on setting x, y, z and e steps and calibrating the machine mathematically, but, unlike the digital world - we in the physical world have imperfections and variances that mean that as close as we might get, almost nothing is 100% perfect... You should follow this guide to calibrate your machine initially, and continue on from here if your results are not quite perfect.  It IS tedious, and it CAN take a while, but it saves so many prints from ending up on the scrap heap, it is worth the trouble.

Print this using your default, initially calibrated settings, the male piece should measure right on 10mm in x and y directions and the female socket should also measure 10x10mm internally.

Instructions for printing Male/Female Minimal Calibration Pieces

These instructions are PER AXIS (ie if your prints are a perfect 10mm in x, but y has issues, then the information below should only be applied to the y axis as the x is already correct! Although this print simultaneously TESTS x and y axes, you should troubleshoot them individually as they are not influenced by each other. 


1) If both pieces are too big, you have too much plastic being laid down on the perimeter and this will need to be adjusted to be lower OR the perimeters need to be 'inset' (I know at least kisslicer provides this function). What you need to configure here is your flow rate. This is related to your e-steps, but you can tweak the flow rate on the fly (in marlin firmware) by issuing a "M221 Sxxx" command, where xxx is the flow rate in percentage (M221 S95 will only use 95% of the plastic that would normally be used). If you notice your infill is a bit lacking after achieving correct dimensions you can turn the infill width up or down to achieve a 'nice fill'. I usually find this bit is a little 'trial and error' for myself at this stage. If you find you always use a M221 S95 to get perfect sized prints, it is probably best to update your firmware, specifically - reducing your e-steps to 95% of their current setting.


2) If the male is too big or too small and the female is correct OR the female is too big / small and the male is correct, you possibly have incorrect x and/or y steps set. Another test to prove that it is an x/y step issue before you go modifying firmware would be to print something larger - a 20mm box should do the trick. (you can measure the base of this test piece if your first few layers aren't 'squished out and fat' like they can be if your z height is incorrect).
If you find that the 10mm male and female pieces are actually 10.2mm AND you find that the 20mm piece measures 20.4 or so... You would also likely find a 100mm piece prints at 102mm - basically your print head moves a percentage MORE (or less) than it is being commanded to due to your controller telling it it needs to turn a certain amount of steps - if the number of steps it thinks it should move is incorrect, the position it moves to is incorrect, causing parts to basically be 'scaled' incorrectly.

If the parts are too large, your steps per mm will need to be lower.
If the parts are too small, your steps per mm will need to be higher.

Triffid Hunter explains how to calibrate steps in his guide - follow the instructions but instead of mathematically calculating your steps, adjust them by a small amount, retry the test and re-measure.

If your male is 10.2mm square and female is 10mm square, you hope to achieve something like 10.1mm square for both, this way you can then go back to step 1 above and reduce the width of the perimeter by reducing the amount of plastic laid to achieve correct dimensions. It is false to assume that because you are using a 2mm pitch belt with 20 tooth pulley on blah blah stepper motor that you can mathematically calculate your x and y steps. You will be extremely close, but if you want the precision and you are not achieving it - you should never assume that your motion system couldn't
possibly be incorrect.


3) If both male and female pieces are too large or too small you possibly have a scaling problem or your x/y steps are out. They may fit together, but the problem is your printer is not printing correct sizes. 2 parts from your printer will fit together, but if you print a part with a nut-trap or other feature which adapts to something it will not fit correctly!
Check first that you have any scaling options in your slicer turned off - they should not be used when calibrating. They will likely be off but some people turn them on in an effort to correct for undersize holes etc.
If they are off, the next thing to check would be x/y steps.

Again,


If the parts are too large, your steps per mm will need to be lower.
If the parts are too small, your steps per mm will need to be higher.