Wednesday, February 19, 2014

Calibrating X, Y, Z and Extruder Axis Steps Per Unit

Recap: I've built a Prusa Mendel 3-d printer from a kit that I purchased at nwreprap.com.  Before I can print, I need to go through a series of calibration steps which are outlined here.

This post will explain how to calibrate the _AXIS_PER_STEP_UNIT constant in the Sprinter software's Configuration.h file that I briefly touched on in a previous post.  Completing the steps in this post requires you to have downloaded all of the software, installed the Arduino driver, uploaded the firmware and gotten familiar with using Pronterface.  You'll also need digital calipers and a ruler to make measurements.

Infact, all we're going to be doing for this step is changing some values in the Configuration.h file that lives inside the firmware and uploading it.

The _AXIS_PER_STEP_UNIT setting is an array of 4 values that tell the stepper motors how to translate a "unit" of movement in Prusa to a number of steps to be taken by the stepper motors.  I haven't seen a good description of how much a "unit" is.  Each of the 4 values goes with the corresponding axis: X, Y, Z and Extruder.

When I initially downloaded the Sprinter firmware, this is what the settings looked like:

#define _AXIS_STEP_PER_UNIT {80, 80, 3200/1.25,700}

To calibrate the X, Y and Z axes follow these steps to perform an "iteration" of the calibration process.  Note that more than one iteration per axis is usually necessary.  With each iteration, you'll instruct your Prusa to move a certain distance, measure the resulting distance and apply a correction factor to the values that you initially downloaded.

For each iteration, follow these steps:
  • Pick one or more axes to work on
  • Launch Pronterface and connect to your Prusa Mendel.
  • For the chosen axis, measure the offset from some fixed point and zero out the digital caliper
  • Use Pronterface to cause a 100 mm movement in your chosen direction
  • Measure the actual amount moved
  • Enter the correction factor in Configuration.h as follows: multiply the previous value by the desired movement and divide by the actual movement
  • Exit Pronterface
  • Launch Arduino software and upload the firmware
  • Repeat until the actual movement matches the desired movement very closely

So let's say you start by calibrating the X axis.

On the first iteration, you instruct the Prusa Mendel to move 100 mm and it actually moved 81 mm.  So now you have the following that should be uploaded in the firmware (note the numbers in bold have been added):

#define _AXIS_STEP_PER_UNIT {80 * 100 / 81, 80, 3200/1.25,700}

On the second iteration, you instruct the Prusa Mendel to move 100 mm and it actually moved 99 mm.  This is the effect (new numbers added in bold):

#define _AXIS_STEP_PER_UNIT {80 * 100 / 81 * 100 / 99, 80, 3200/1.25,700}

At this point, it's a good idea to simply multiply out 80 * 100 / 81 * 100 / 99 = 99.763... and put that value in the Configuration.h file instead of "80 * 100 / 81 * 100 / 99".

To calibrate the Extruder, I suggest the following which worked for me pretty well:
  • Insert filament into the extruder
  • Feed the filament so that about 50 mm is inside the extruder (if you feed the filament too far with the hot end off, it will have no place to go when it reaches the hot and the extruder will scrape a chunk of it off and the filament will jam in the extruder.  At that point you'll have to pull it out by hand)
  • Stick a piece of tape to mark the position of the filament just where it enters the extruder.  Alternatively, consider marking the position of the filament with a Sharpie.
  • Feed the filament in reverse by 10 mm using Pronterface
  • Stick another piece of tape to mark the position of the filament just where it enters the extruder.
  • Measure the distance that the tape moved with a ruler
  • Apply the effect of this iteration to the Extruder constant
Apply the first piece of tape

Feed the filament and apply the second piece of tape

Measure the distance between the two pieces of tape


For example, if you instructed the extruder to move 10 mm and it moved 10.5 mm, this is what you'd have:


#define _AXIS_STEP_PER_UNIT {80, 80, 3200/1.25,700 * 10 / 10.5}

In the end, my calibration yielded:

#define _AXIS_STEP_PER_UNIT {100, 100, 2561, 700 * 10 / 10.5}

If you're assembling a Prusa Mendel kit from nwreprap.com, I expect those values will work pretty well for you.  The first item to print is a 20 mm cube.  Once printed and measured, this cube will tell you how good your calibration is.

No comments:

Post a Comment