How to Calibrate your FDM 3D Printer: The Ultimate Guide

Curtis Satterfield, Ph.D.

Curtis Satterfield, Ph.D.

Share on facebook
Share on twitter
Share on linkedin
Share on email

You finally have your shiny new 3D printer and started printing! But your prints aren’t coming out as nice as those pictures you see posted online. Why are there prints so much better than yours?  Because you need to tune and calibrate your printer.

Here are the steps to calibrating a 3D Printer:

  1. Ensure everything on the printer is tight.
  2. Level your print bed
  3. Calibrate your Z-offset
  4. Measure Your Filament
  5. Print a Temperature Tower for Your Filament
  6. Calibrate your Extruder
  7. Tune Your PID Settings for Consistent Heating
  8. Calibrate Your Stepper Motors
  9. Calibrate the Printing Speed
  10. Calibrate Your Retraction Settings
  11. Print a Benchy (or other calibration print)

In this article we will cover the details of how to thoroughly calibrate your 3D printer to achieve the best quality prints. This process will take time and patience but is well worth the effort! For several of the steps you will need to access settings on your printer. I recommend using OctoPrint for theses steps. I have a guide on setting up OctoPi and OctoPrint here.

Ensure Everything on the Printer is Tight

Parts on your printer can become loose during shipping so it is important to ensure everything is tight on the printer. Go over the entire printer and look for bolts and screws and ensure they are tight.

Loose printer belts will introduce slop into your print resulting in poor quality. The G-Code that your printer uses to print with gives specific instructions on how the printer should move. The printer takes these commands and applies it by moving the motors as instructed by the G-Code. The printer does not know if the print head is following the correct travel path. It only knows that it has instructed the motors to operate in a certain way. If the belts are loose then the print head will not follow the exact travel path it should leading to poor quality.

The illustration below demonstrates how loose belts affect the travel path of the print head.

Loose belt results in bad print quality

In the top part of the image a printer with properly tightened belts allows the print head to follow the appropriate path printing a uniform circle. However, if the belt is loose, the print head will not follow the toolpath like it should. The printer doesn’t know that there is slop in the print head and is unable to compensate.

Your printer should have a way to properly tension the belts. Some printers will come with small metal clips on the belt to provide tension. If your printer doesn’t have a way to tension the belts I recommend printing and using a belt tensioner. The picture below is a belt tensioner I printed to give ultimate control over belt tension.

Two Piece 3D Printed Belt Tensioner

The two halves are connected with an M3 bolt and as the bolt is tightened so is the belt.

Level Your Print Bed

If you ever ask for help troubleshooting 3D print issues such as adhesion, one of the first things you will hear is “Level your bed”. This isn’t referring to leveling the print bed in relation the surface it sits on. Bed leveling is ensuring the distance from the printer nozzle to the print bed is uniform across the entire bed. If you have an auto-leveling printer, this step is taken care of for you every time your print. If you have a manual leveling bed read on.

If your printer doesn’t have an induction sensor or a BLTouch you will need to level it yourself. The process is straight forward only taking a few minutes. You will need a sheet of printer paper for this process.

Start by homing your print bed. Your printer should have the option to home on the menu or using Cura or on OctoPrint use the home Z feature. After the bed is homed heat the nozzle to printing temperature. Let the nozzle sit for a few minutes and stabilize at the appropriate printing temperature. Because metal expands when it heats up, we need to level the bed while the nozzle is hot. Be careful when performing bed leveling that you don’t burn yourself on the hot nozzle.

Now move the nozzle over the thumbscrew that adjusts the bed height on the front of the bed.

Nozzle over bed leveling screw

Take a piece of printer paper and slide it between the nozzle and the bed. If the paper won’t fit, you need to tighten the leveling screw so that it pulls the bed down slightly. The paper should slide between the nozzle and the bed with a slight bit of resistance. The paper should feel like it’s vibrating lightly as you push and pull it under the nozzle. If there is no resistance or friction you will need to loosen the leveling screw a little at a time.

Using paper strip to level 3d print bed

Once you are done at the front move the nozzle and repeat for the other two leveling screws. After you have adjusted all the screws move the nozzle to the four corners of the bed and ensure proper nozzle height. If at any point you find the fit is too loose or too tight slightly adjust the leveling screw closest to the affected area. Repeat the process until you have uniform tension on the paper across the entire bed.

If you have trouble getting every spot on the bed to be the exact same tension, it is possible that you have a warped bed. If there is only a small difference you should be OK. Keep an eye out for bed adhesion issues in the area where you think the bed is warped. If you have adhesion issues in that area but the rest of the bed is fine, chances are your bed is warped.

Once you have finished leveling the bed print a small 10 x 10 x 3 mm cube in the center of the bed. The print should stick to the bed and have minimal elephant’s foot. Elephant’s foot is where the bottom layer of the print is wider because the first layer was squashed down on the bed. Having less distance between the nozzle and the print bed causes the filament to spread out on either side of the nozzle while printing.

Small 3D printed cube demonstrating good bottom layer

The above picture shows a good bottom layer due to proper bed leveling and Z-offset. The filament lines are still visible but there are no obvious gaps in the bottom layer.

Once the bed is leveled and you have a decent print move on to adjusting the Z-offset of your printer.

Calibrate Your Z-offset

If you have an auto leveling printer or even with a manually levelled bed, you may need to make tiny adjustments to the distance from the nozzle to the print bed. Adjusting the Z-offset in your printer’s firmware will allow you to make these changes.

The method will vary from printer to printer so I will explain the steps for calibrating by connecting to your printer with OctoPrint. Unfortunately, Cura does not provide an interface to run commands on your printer and see the output. Other programs such as Pronterface or Simplify3D offer this functionality. I use OctoPrint to manage my servers so that is what I will use to demonstrate the process. The commands will be the same regardless of how you connect to the printer.

First, we send the printer an M503 command to display the print settings currently in memory. You should receive output like this:

M503 command return values
The highlighted lines are the settings we are looking for. Specifically, we want to modify the M206 Z setting.

If your first layer is not being pressed down into the bed enough you want to lower the Z offset. If your first layer is too thin because the nozzle is too close to the bed raise the Z offset. I recommend increasing/decreasing by 0.2mm at a time. After you make the adjustment print a small test such as a 10mm cube. After it finishes inspect the bottom layer. If the individual filament lines are all smooshed together, and you have elephant’s foot increase the Z-offset. If there are large gaps between the filament lines on the bottom of the print decrease the Z-offset. You can modify the Z-offset with the following command:

M206 Z[value]
M500 (this saves the settings)

For example, if my first layer has gaps and I want to decrease the distance from the nozzle to the bed I would use:

M206 Z-0.1

Once you finish tuning the Z-offset you should have great bed adhesion and perfect first layers. Now we can move on to calibrating your filament settings.

Measure Your Filament

Not all filaments are created equal and because of differing quality standards, your filament may not be exactly 1.75mm over the entire length of the spool. Many manufactures will make filament to 5% tolerances meaning that at any point along the filament it could be up to 5% larger or 5% smaller than 1.75mm. To ensure the most consistent extrusion you need to measure your filament to get an accurate dimension.

Slicers work by calculating how much filament is needed to be pushed through the extruder for a given path. If the filament is inconsistent in its diameter the printer will over or under extrude as the amount of plastic being fed to the hot end varies. By measuring the filament, we have a more accurate number to give the printer and account for variations in the filament diameter.

Take your spool of filament and a pair of calipers. If you don’t have calipers, go get some, as they are invaluable for 3D printing. I highly recommend General’s digital calipers with LCD display (Amazon link) as I have several sets that I have been using for years. Take the calipers and measure along your filament at 3 places minimum. The farther apart the measurements the better.

Measuring filament diameter with digital calipers

Now take the average of your measurements. Enter this average into your slicer as the filament diameter.

Filament Diameter settings in Cura

The bad news is that for this calibration you need to do it for every roll of filament. Many people don’t bother with this step and still get good quality prints. However, if you want the best print quality possible this is another step you will need to take.

Print a Temperature Tower for Your Filament

We have calibrated the diameter of our filament to ensure that we get consistent extrusion. Now we need to find out what the best printing temperature is for that filament. All printing materials have a range of temperatures that they are printed at and differences in materials, manufacturing quality, and even color can affect the printing temperature. If you print too hot, the material will ooze and string all over the print. Print too cold and you will get under extrusion and filament grinding.

Temperature tower for calibrating 3D Filament

Printing a temperature tower will show you the print quality of the filament at several different temperatures. You can then determine which temperature has the best finish and whenever you use that filament you know what temperature to print at.

Printing a temperature tower is a little different than a normal print. After slicing the model, you need to modify the G-Code to change the temperature at the correct layers. Luckily, quirxi on Thingiverse has a great model and instructions on how to slice and prepare a temperature tower. You can download the model and read their instructions here.

Once you have decided the best temperature for your filament you can enter it into your slicer.

Printing Temperature Cura

You will need to print a temperature tower for each filament type you use. Even the same material such as PLA can have different optimal printing temperatures between manufacturers. The good news is that once you built your temperature tower you can save the G-Code file and send it to the printer whenever you need to calibrate a new roll of filament.

Calibrate Your Extruder

As we talked about before the slicer assumes that your printer is feeding a specific amount of filament through the extruder at any given time. This is not necessarily the case. You need to calibrate your extruder or e-steps to ensure that the extruder is moving the correct amount of filament through the hot end.

Once again, we will use OctoPrint to connect to our printer. Enter the command M503 to retrieve the current printer settings. I recommend copying the settings into notepad or another test document so you can refer to them if you need to roll back your changes.

In order to calibrate the extruder, we will send a command that tells the printer to extrude 100mm of filament. We will then check and see if the actual extrusion length was 100mm. If not, we tweak the settings and try again repeating the process until we get 100mm extrusions consistently.

You will need a way to measure the filament such as a pair of calipers and a sharpie. I recommend using a light-colored filament to make it easier to see the reference marks you need to make with the Sharpie.

To test the extruder’s current calibration, follow these steps:

  1. From where your filament enters the extruder measure backwards along the filament (back towards the spool) 120mm. This is our starting reference point.
  2. Connect to the printer via a program that lets you send G-Code commands. In this case I will use OctoPrint.
  3. Heat the hot end to normal printing temperature. Ideally using a calibrated temperature from a temperature tower print.
  4. Ensure you have ample distance from the hot end to the print bed so the filament can flow freely.
  5. Enter the command M83 to the printer setting it into relative mode.
  6. Enter G1 F50 to set the federate to 50mm/min.
  7. Extrude 100mm of filament. You can use the build in control features on OctoPrint or the command G1 E100.
  8. The extrusion will take around two minutes to complete. Extruding at such a slow rate reduces the chance of heat fluctuations in the hot end affecting the results.
  9. Measure from where the filament enters the hot end back to the original mark you made. If the measurement is 20mm then the extruder is properly calibrated. If not, we need to do some tuning.

If your extruder did not extrude exactly 100mm of filament then we need to tune the settings, so it is properly calibrated. In order to tune the extruder, we need to know what our starting feed rate values are. Then using those values and the amount of under/over extrusion from our 100mm test, we can calculate the correct value.

 Use the following steps to calibrate the extruder:

Enter M503 into OctoPrint. You should get a response that looks like this:

M503 Response
  1. The highlighted line with M92 is what we are looking for. Specifically, we need the numbers after E which shows the current steps/mm for the extruder.
  2. Calculate the amount of filament that was actually extruded. Subtract the measurement you took after the extrusion from 120.
    • 120 – [measured length from reference mark to extruder] = actual length of extrusion
  3. Now calculate how many steps the extruder used to extrude the length of filament.
    • [Value from M92] x100 = steps taken. For example, from the output above:
      •  96.50 x 100 = 9,650
  4. Finally, we calculate the correct steps by dividing the steps taken by the actual length extruded:
    • [steps taken] / [ length extruded] = new steps/mm
    • For example: If we measured that our printer only extruded 99mm of filament the calculation would be: 9650 / 99mm = 97.47
  5. Now that we have the new steps/mm we need to send to the printer.
  6. M92 E[new value]. Using our example calculation, it would look like: M92 E97.47
  7. Then enter M500 to save the new setting.

Now we repeat the process to verify if the new setting is correct. I will tell you that you will often need to repeat this process many times as you close in on an accurate E-steps value. This can often feel like chasing your tail as you will start to get really close to the correct extrusion length and then you end up going too far. If you can consistently get within a few hundredths of a millimeter you should be good to go. Don’t chase perfection here, you will drive yourself mad.

Tune Your PID Settings for Consistent Heating

PID tuning is used to calibrate your hot end to provide the correct temperature as evenly and consistently as possible. PID stands for Proportional Integral Derivative and is the algorithm used to control most hot ends and heated beds. Don’t worry, we don’t need to do any calculus here! The steps for PID tuning are easy, you just need a little time and patience.

To start with we need to run a command on the printer so connect to your printer with OctoPrint. Then with your nozzle at room temperature, run the command: M303 E0 S200 C8 This tells the printer to run PID auto tuning and will cycle around the target temperature of 200 degrees 8 times. When finished the command will return a value like this:

PID Autotune results

Now we need to take the values from the PID tuning and save it to the printer. Use the following command replacing the P, I, and D values that were returned from your printer.

M301 P38.51 I6.19 D59.94
M500

That will set the new PID values in the printer and save the settings. If you have a hotbed Repeat the process suing the command:

M303 E-1 S60 C8

Enter the returned PID values with:

M304 P[value] I[value] D[value]
M500

Now as you monitor the hot end and hot bed temperature during a print you should see it sticking closely to the set temperature with minimal oscillation. The less oscillation we get with our hot end the more consistent our extrusion will be. Consistent extrusion is key to quality prints.

Calibrate Your Stepper Motors

We need to calibrate our stepper motors to ensure they are moving the correct distance. This process is like we did with the extruder, but we will be measuring an actual printed object. You will need this calibration cube model for the calibration process.

Connecting to OctoPrint we run the M503 command to retrieve our current values.

M503 Response

Like with the extruder calibration we are interested in the M92 line. This time however, we are looking at the X, Y, and Z values. We will need these values for later. Now go ahead and print the calibration cube I linked to earlier. When it’s finished use a pair of calipers to measure the size of the cube in all three dimensions.

To start with look at the steps per/mm for the dimension you are working with. For example, the X axis had an M92 value of 80.0, that is our current steps/mm.

Take the measurement for the X-axis. Now multiply the dimension of the cube (20mm) by the M92 value for X 80.0 and divide by the actual measurement of the cube.

Calibration Cube Measured

A calibration cube I printed.

As you can see the actual X dimension is 20.28 mm. We will use that measurement in our example calculation.

20mm * 80.0 / 20.28 = 78.9 This result is our new value for the X axis. Enter the new value with the command:

M92 X78.9 (replace this with the value you calculated)
M500

Repeat this process for the Y and Z axes. Once all three values have been updated repeat the entire process to validate the new settings. If the settings still aren’t correct update them with the newly calculated M92 values and try again. Like the extruder calibration you can end up chasing your tail. If you can get within a few hundredths of a millimeter consistently you will be good to go.

Calibrate the Printing Speed

To further tune our printer, we need to find out how fast our extruder can push filament through the hot end. The maximum amount of filament that we can push through in mm/second will dictate our maximum printing speed. If we try to print faster than our extruder can push filament we will get under extrusions and filament grinding.

Using OctoPrint we connect to the printer to complete the following steps:

  1. Bring your hot end up to 200 degrees.
  2. Enter G91
  3. Enter G1 E50 F120
    • This will extrude 50mm of filament at 2mm/second
    • Stay close to the printer and inspect the filament extrusion. We want to ensure smooth extrusion with no filament grinding in the extruder.
    • If the filament extrudes successfully, we will repeat the process but increase the speed to 3mm/second.
  4. Enter G1 E50 F180
    • Again, observe the extruder, if it is consistent and doesn’t struggle increase the speed again.
    • Continue increasing the print speed by adding 60 to the F value.
      1. G1 E50 F240
      1. G1 E50 F300
      1. G1 E50 F360
      1. G1 E50 F240
      1. G1 E50 F420
      1. Etc.
  5. Once you notice either inconsistent extrusion with thick and thin areas on the extruded filament or clicking from the extruder motor, you have hit the limit.
  6. After you find the limit of your extruder reduce your federate by 20mm/min until you get a consistent output. Once you have that value, we can begin to calculate our maximum extruder speed.
  7. To get the maximum extruder speed Multiply 2.4 times your maximum reliable F speed and divide by 60.
    • 2.4 * Max F speed /60
    • I’ll use 360 for an example.
      1. 2.4 * 360 /60 = 14.4
    • Hang on to this number.
  8. Now you will need two numbers from your slicer. You will need the layer height and the Extrusion width. See the images below to find these values in Cura.

Extrusion width setting Cura

Extrusion Width Cura

Layer Height setting Cura

Layer height setting in Cura
  1. Multiply the layer height by the extrusion width in our example 0.4 x 0.2 = .08
  2. Divide the speed you calculated in step 7 by the result of step 9
    • 14.4 / 0.08 = 150
  3. The result is your maximum printing speed in mm/second.

We now have the maximum speed that your extruder can print at. If you try to print at a higher print speed you will have inconsistent extrusion so be sure to never try and print faster than this speed.

Calibrate Your Retraction Settings

The final step we will take is to calibrate your printer’s retraction settings to reduce oozing and stringing. The first thing you will need is this retraction calibration test. This is a great print for testing retraction because it’s quick and doesn’t need a lot of filament. When printing calibration prints you really want quick prints that use less filament.

Begin by setting your retraction to 0 in your slicer. The first print will look terrible with no retraction, but this gives us a benchmark. See the image below for retraction settings in Cura.

Retraction settings in Cura

The retraction distance and retraction speed are the settings we need. Start by setting the retraction distance to 0 and printing the retraction calibration model. After it finishes look at the model. You will probably see all kinds of strings and extra filament hanging between the towers. We are going to fix this problem!

Starting baseline print:

Baseline Retraction Test

We need to get rid of all the extra filament stuck between the towers.

Now set the retraction distance to 0.5 in the slicer and print again. Compare the results. It should look slightly better than the first print but probably not by much. Keep increasing the retraction distance by .5mm and printing the calibration model. With each iteration we want to see less stringing and artifacts on the 4 towers.

Calibrated Retraction

This is what we are looking for. No stringing or artifacts between the towers.

Once you find a retraction distance that looks decent, we need to calibrate the retraction speed. Start with a slow speed of 10mm/second and increase by 5mm/second for each print. Compare the models until you are happy with the results. Once you achieve a print quality you are happy with you don’t need to make any more changes to the retraction settings. Leave them as they are and move on.

Eventually the model will stop looking better and will start to get worse. Now begin by taking the setting between the last good print and the latest print. If you had decent results with 2.0 and printing at 2.5 made it worse try 2.25.

Print a Benchy

3D Printed Benchy Calibration Test

The calibrations are done! Now we will print the ubiquitous Benchy as a rite of passage. The Benchy is a great “torture test” for your printer to see how well it performs after all the calibrations we just completed. You can read more about Benchy at http://www.3dbenchy.com/.

That’s it! We made it through the calibration process! Your printer should now be well tuned and calibrated and ready to produce some amazing prints. I hope you found this guide helpful in learning how to calibrate your 3D printer!