3D printer calibration, the act of changing a 3D printer’s firmware to increase stepper motor precision, is a tricky but very necessary task for 3D printer owners. After all, a 3D printer’s print head can only be as precise as its carriage, which is controlled by these stepper motors.

An uncalibrated 3D printer might be able to print miniature statues or desk toys effectively, but unless it is properly calibrated, it may be incapable of printing mechanical parts or articulated models that have become so beloved within the 3D printing community.

There are many ways to calibrate a 3D printer, but a well-established method of troubleshooting a 3D printer’s precision is by using a calibration cube.

Follow along in this guide to find out how this small, simple 3D print can improve 3D printer tolerances and enable 3D printers to become so much more precise!

Back to Contents

Troubleshooting Your 3D Printer with an XYZ Calibration Cube

When to Use One

The stretched calibration cube (left) was printed by an uncalibrated 3D printer
The stretched calibration cube (left) was printed by an uncalibrated 3D printer (Source: Tim via 3D Printing Stack Exchange)

Thanks to specific length, width, and height measurements, calibration cubes show how precise a 3D printer’s stepper motors function in the X-, Y-, and Z-axes. Any time you’re unsure of how precisely your stepper motors are moving, it’s a good idea to use a calibration cube to troubleshoot your 3D printer.

Usually, it’s a good idea to print a calibration cube on a newly-purchased 3D printer that you have not yet calibrated. It could even be the very first print – just make sure that your bed is leveled before printing one.

It also might be time to print a calibration cube if you notice that prints aren’t the exact same size as their digital files in one or more directions. Also, if you modify your 3D printer in any way, it’s definitely helpful to print a calibration cube to make sure that the modifications didn’t negatively impact print quality.

Sometimes, though, the 3D printer itself might not even be the concern. If you’re about to print an object that requires very tight tolerances and a high level of precision or if it’s the first object printed by that printer in a long time, it’s a good idea to print a calibration cube. This is because it will help make sure that the 3D printer is currently able to print the object to the level of precision that the object requires.

Other than the precision of the printer’s axes (which can be found by comparing the actual length, width, and height of the calibration cube to the length, width, and height of its 3D file), a calibration cube can also show whether or not the 3D printer is experiencing common 3D printing problems such as ghosting, elephant’s foot, bed leveling, or extrusion issues.

Back to Contents

Advertisement
Advertisement
Advertisement
Troubleshooting Your 3D Printer with an XYZ Calibration Cube

Getting Started

Calibration cubes also help makers test out new filaments on calibrated printers
Calibration cubes also help makers test out new filaments on calibrated printers (Source: Halit via Printables)

Troubleshooting stepper motor precision using a calibration cube is a fairly straightforward process but requires several tools (both physical and software-based) to be done correctly and successfully.

What You’ll Need

  • A Cartesian or CoreXY 3D printer that needs to be calibrated. Unfortunately, it’s too mathematically intensive for this guide to tune a delta 3D printer using a calibration cube because more than one stepper motor is responsible for each axis.
  • A 3D printer slicing program that can directly send G-code commands to a connected 3D printer, such as Repetier. For 3D printer calibration, Repetier is preferable to other more typical G-Code editors because it allows you to send G-code commands in real time instead of having to create and run several G-code files using a USB stick or SD card.
    • That said, if your 3D printer runs on Marlin firmware and you’re more experienced with 3D printer software, though, you could also directly edit the firmware using an IDE without using G-code. Keep in mind that if you use another 3D printing slicer for this task, it should have the ability to directly send G-code to your 3D printer, which is not currently available in slicers such as Cura without the use of extensions.
  • A way to connect your 3D printer to Repetier. This could be a USB cable, over Wi-Fi, or any method that will allow your 3D printer to connect to your computer.
  • Reliable 3D printer filament, preferably with a tight tolerance. This will help improve accuracy because 3D printer filament with a small tolerance will lead to 3D prints with a small tolerance, which will allow you to be more accurate when tuning your 3D printer using a calibration cube.
  • Reliable digital calipers.
  • A digital file of a calibration cube.
  • A calculator, as this guide requires some multiplication and division.

Back to Contents

Advertisement
Advertisement
Advertisement
1
Troubleshooting Your 3D Printer with an XYZ Calibration Cube

Printing

The letters correspond to the axes
The letters correspond to the axes (Source: Antonio Grillo on Fab Academy)

Print the calibration cube as you would any other 3D print and use the slicer settings that you’re going to use once the 3D printer is calibrated. When you print the calibration cube, it’s crucial to keep a few things in mind.

First, if you’re printing a calibration cube that has labels for the X-, Y-, and Z-axes on the cube’s walls, make sure that, in the slicing program, the walls are parallel to the axis that it’s supposed to measure. Some calibration cubes will automatically be imported facing the correct direction. You can always check that the cube is oriented correctly in your slicer because most slicers will have a red arrow that points in the direction of the X-axis, a green arrow that points in the direction of the Y-axis, and a blue arrow pointing in the direction of the Z-axis.

Second, it’s very important that the 3D printer’s build plate is leveled correctly. This ensures that the calibration cube can correctly demonstrate the 3D printer’s Z-axis precision.

Once the cube is printed, be sure to verify which side corresponds to which axis. If you don’t know which axis faces which direction of your 3D printer, you can test this by manually moving the X-axis with Repetier and observing in what direction the extruder moves. This direction is your 3D printer’s X-axis.

Back to Contents

Advertisement
Advertisement
Advertisement
2
Troubleshooting Your 3D Printer with an XYZ Calibration Cube

Measuring

A calibrated 3D printer will print a calibration cube at its (almost) exact digital size
Calipers come in handy (Source: doxxx via Thingiverse)

Once the calibration cube is printed, carefully remove it from the build plate. Then, use digital calipers to measure all three sets of sides of the calibration cube – a ruler may be too imprecise to be effective with such precise calibration. Finally, record these measurements as well as the corresponding axis for each measurement.

For example, if the caliper shows that the side labeled ‘X’ is 20.25 millimeters, record (in writing or on a digital note-taking app) that the cube’s X-axis measures 20.25 millimeters. Do the same for the other two axes.

Interpreting the Calibration Cube’s Measurements

In the slicer, the calibration cube that you select will be a set length, width, and height (corresponding to the X-, Y-, and Z-axes). These values are normally included in descriptions of individual calibration cubes that you might select, but this might not always be the case. If not, 3D printing slicers such as Repetier allow users to see and modify these values by clicking either the ‘S’ key on the computer keyboard or the “Scale” button on the object editing menu when the calibration cube is selected.

Once you have these three theoretical values, compare them to your measurements of the calibration cube that you printed. If they match almost exactly (typically within 0.025 mm), your 3D printer is perfectly calibrated! The only thing that you can do to increase your 3D printer’s precision from here is switch to a filament with a tighter tolerance.

Sometimes, one or more of the measurements do not match. For example, you may get an actual measurement of 19.9 mm for a side that’s supposed to be 20 mm. It could be more extreme: You get an actual measurement of 24.4 mm for a side that is supposed to be 20 mm. If that’s the situation you’re in, the calibration cube has demonstrated that the 3D printer needs to be calibrated using a bit of math and G-code editing.

Back to Contents

Advertisement
Advertisement
3
Troubleshooting Your 3D Printer with an XYZ Calibration Cube

Calibrating Your 3D Printer

G-code is the programming language of 3D printers
G-code is the programming language of 3D printers (Source: Gabriel Boyd on All3DP)

To calibrate your 3D printer, you’ll be using a series of G-code commands to change the amount of steps that your 3D printer’s stepper motors will rotate for each millimeter travelled. It’s a straightforward process but can be a bit tedious, so make sure to double-check each step to avoid getting numbers and commands mixed up.

  1. Connect the computer to the 3D printer using a printer cable or another method.
  2. Open Repetier or another 3D printing slicer that allows you to send G-code directly to the 3D printer.
  3. Connect the 3D printer to the 3D printing slicer (if you’re using Repetier, click on the large “Connect” button on the top left of the program). Then, navigate to the manual G-code input (on Repetier, this is under the “Manual Control” tab).
  4. Type in the command M92 and then hit “send”. It should return the number of steps per millimeter for each axis. This is the number of small incremental movements that a stepper motor will make to move the extruder a distance of one millimeter. Remember or record the steps per millimeter for each axis.
  5. For each axis, divide the theoretical length of the calibration cube for that axis (the digital length of the calibration cube) by the actual length of the calibration cube on the same axis (the one found using calipers).
    • For example, if a 20-mm calibration cube had an actual X-axis measurement of 21 mm, this ratio would be 20/21, or 0.9523. Record this ratio for each axis.
Image of:
Make sure the numbers are correct! (Source: TheWhippyTrout via Reddit)
  1. For each axis, multiply the ratio of theoretical length to actual length by the steps per millimeter of that axis (which was returned by the M92 G-code command).
    • So, if the M92 command returned the value “x78.5” (meaning that x-steps per mm was 78.5) and the ratio of theoretical/actual was 0.9523, the new steps per millimeter would be 0.9523 * 78.5.
    • A more condensed version of this formula is that, for each axis, the new steps/mm = old steps/mm * (theoretical length/actual length).
  2. Calculate the new steps/mm value for all three axes.
  3. Check to make sure that your numbers are correct. An intuitive way to check is that if the actual length of the cube on a particular axis was too small, the new steps/mm value should be larger than the previous one, and vice versa.
  4. Type M92 into the command line again. Before hitting send, add the letters of each axis followed by the new steps/mm value that you calculated.
    • For example, if all new step values were 100, the command would look like M92 x100 y100 z100.
  5. Click “send” or hit the enter key. If you realize you made a calculation error, that’s okay! The M92 command can be entered over and over again, although each use of the command will permanently save the new values that you entered as the new steps/mm for the 3D printer. Just make sure that the last time you enter the command, the numbers are correct because these numbers will not reset once the 3D printer is powered off; they’re written into the printer’s memory until another M92 command is sent.

Once these steps are completed, the 3D printer should be calibrated, and it should print accurately and precisely in all three dimensions.

Back to Contents

Advertisement
Advertisement
Troubleshooting Your 3D Printer with an XYZ Calibration Cube

More Troubleshooting

The lip around the bottom of this calibration cube is called 'elephant's foot'
The lip around the bottom of this calibration cube is called "elephant's foot" (Source: johnschneider89 via Lulzbot Forum)

While calibration cubes are most often used to calibrate the accuracy of the X-, Y-, and Z-axes, they can reveal other issues about the 3D printer that can be fixed using various techniques.

The calibration cube might exhibit elephant’s foot, where the bottom edges of the object are warped. If that is the case, the elephant’s foot can be fixed using a few different tested strategies for getting rid of elephant’s foot. The cube might also exhibit ghosting, which is most evident in surfaces that are wavy when they should be straight. This issue can also be fixed in a few easy steps, and your 3D printer’s overall print quality will increase substantially.

Hopefully, this article has demonstrated the usefulness of calibration cubes and likewise proved that they can be an integral part of a maker’s calibration process. The calibration cube itself, though, is just a part of the calibration process. If calibrating your 3D printer piqued your curiosity about G-code commands, check out our article on G-code commands to find out what other things you can accomplish with this 3D printer control language.

Back to Contents

Advertisement
Advertisement

License: The text of "Troubleshoot Your 3D Printer with an XYZ Calibration Cube" by All3DP is licensed under a Creative Commons Attribution 4.0 International License.

Stay informed with notifications from All3DP.

You get a notification when a new article is published.

You can’t subscribe to updates from All3DP. Learn more… Subscribe to updates

You can’t subscribe to updates from All3DP. Learn more…

Advertisement