How to Accurately Calibrate Your 3D Printer

232,347

290

83

Introduction: How to Accurately Calibrate Your 3D Printer

**Update July 28, 2016**

I've made another Instuctable that builds off this one. Instead of using tape to mark a location, a laser pointer can be used to achieve a higher precision calibration. So once you read through this one and understand the process, check out the follow-up HERE

******

One of the steepest learning curves when starting with 3D printing is learning how to calibrate all the motors accurately. The good news is that once you know how to calibrate one motor of the printer, the rest are pretty well the same. The following instructable shows you how to accurately calibrate your printer using minimal filament (filament is only needed to calibrate the motor that feeds the filament through the hotend).

I'll be using a Printrbot simple and Repetier for this instructable, but you should be able to follow along with any printer and software combination.

This instructable assumes you got your printer running, it just needs fine tuning.

Here's what you'll need

-3D printer with software to run it

-Digital Calipers

-Ruler (about 40cm should be good)

-Tape

-Filament

-A pencil and a pad of paper can come in handy too.

Step 1: Step 1: Setup

After opening Repetier and connecting your 3D printer, select the manual control tab. Next turn off easy mode and hit the toggle log button(if you're using the most recent version of Repetier), then type into the G-Code: “M501” then press enter or hit send (a bunch of information will be added to your log, at the bottom of the screen)

Scroll up through the log until you see something like this “echo: M92 X__ Y__ Z___ E__.” Make a note of this line of code somewhere because we will be referring back to it often. The M92 values tell the stepper motors how many steps to take when you ask it to move any given distance. In my case I got M92 X80.2 Y80 Z2044 E104.

We'll work on calibrating one motor at a time, starting with the one that controls the X-axis.

Step 2: Step 2: Calibrating X-Axis

Measuring values of X-axis

Start by homing your X axis and raising the Z axis out of the way. (picture 1)

Take a piece of tape (less flexible tape is preferred, so it doesn't sag) and place it on the printerbed parallel to another point of the printer that won't move when you move the X-axis. (picture 2)

In Repetier tell your printer to move its X-axis. I like to start with 70mm (assuming you're using a 100x100x100mm printbed). If you choose to move your X-axis further, you should have less margin for error, but you don't want to go too far and over shoot your printers capabilities. Use another piece of tape at the same marker point you used before moving the X-axis. This is where your printer thinks 70mm is. (picture 3) We'll call this measurement the "Desired movement."

Now use your digital calipers to measure what the "True measurement" is for the X-axis (picture 4)

If you measure 70mm perfect, your X-axis is calibrated. Chances are you didn't get exactly 70mm on your first try though. Make note of the measurement you took. In my case I got 70.87mm.

Calculations for calibrating X-axis

We need 3 variables to calibrate our X-axis. First we need the 'Current M92 value' for X we made a note of in step one. Then we need the two measurements we just took. With these three variables we'll be solving for a 'New M92 value.'

Current M92 value = 80.2

Desired movement = 70mm

Actual movement = 70.87mm

Here's a formula you can use to solve for the New M92 value

New M92 value = Desired movement / Actual movement * Current M92 value

70/70.87 = .987724002 (New M92 value should be 98.77% of the Current M92 value)

80.2*.987724002 = 79.22 = New M92 value

Our New M92 value is 79.22. This makes sense because our New M92 value is less than the Current M92 value(80.2), because we overshot our goal of moving the X-axis 70mm. Now let's move on to the next step and learn how to input the New M92 value.

inputting New M92 Value for X

First type in your G:code for your New M92 value like so : “M92 X79.22” then press enter (picture5)
Then type In G:code: “M500” and press enter. (this saves your changed setting).

Type “M501” in your Gcode and scroll up in your log and make sure your new M92 for X has been saved.

If so, you can return to the beginning of this step and double check that your X-axis is now calibrated. If it is, GOOD JOB!! if not, try again. When you get that done let's move onto the Y Axis.

Step 3: Step 3: Calibrating Y-axis

Measuring values for Y-axis

This is pretty similar to what we've already done. The only real difference is finding another place to stick your tape to mark how far the Y-axis moves. First home your X,Y&Z-axes. Next move your X-axis over until it lines up with the most outside part of your printer arm(picture1). Place a piece of tape on the Y-axis over a point marked on the X-axis(picture 2). Tell Repetier to move the Y-axis 70mm. Now mark that point with a piece of tape and measure the true distance between those points (picture3). I got 69.8mm, which isn't far enough. With these two measurements and our current M92 value for Y, we can now solve for our New M92 value.


Calculation for the Y-Axis and inputting data

Desired movement = 70

Actual movement = 69.8

Current movement = 80

Use our same formula from step 3 to solve for our Y-axis motor.

Desired movement/Actual movement * Current M92 value = New M92 value

70/69.8 = 1.00286533 (New M92 value should be 100.29% of the Current M92 value)

New M92 value = 1.00286533* 80 = 80.23

Now let's input that number. In G:code type your New M92 value like so : “M92 Y80.23” then press enter. Next type “M500” in G:code and press enter. (this saves your changed setting). Then in Gcode type : “M501” and scroll up in your log and make sure your new M92 Value has been saved. If so, you can return to the beginning of this step and double check that your Y-axis is now calibrated. If so, great! If not, try again. Next we'll be working on the Z axis.

Step 4: Step 4: Calibratnig Z-axis

Measuring Z-axis

Instead of using the digital calipers for the Z-axis, we'll be using a ruler. First home your XY&Z axes. Next put your ruler perpendicular to your printbed, alongside the printer. Move your eye so it's level with the printer and make note of a particular point of your printer (I like to use the tallest part of the printers arm). Make sure when you take your measurements, your eye is level with the point your measuring. I measured 17.7cm. Now tell your printer to raise 100mm. Take a look at how far your printer has actually moved. Mine moved to about 27.75cm. If we subtract the second measurement from the first (27.75-17.7cm) we get 10.05cm or 100.5mm. So we've slightly overshot our goal of 100mm.

Calculating and inputting new value for the Z-axis:

Again we use our same formula from step 3 to solve for our Z-axis motor.

Desired movement = 100

Actual movement = 100.5

Current M92 value = 2044

Input measurement/Actual measurement * Old M92 value = New M92 value

100/100.3 = .995024876

New M92 value = 995024876* 2044 = 2033.83

Now let's input that New M92 value: in G:code type your New M92 value like so : “M92 Z2037.89” then press enter. In G:code type: “M500” then press enter. (this saves your changed setting). In Gcode type : “M501” Now scroll up in your log and make sure your new M92 Value has been saved. If so, you can return to the beginning of this step and double check that your Z-axis is now calibrated. If so Great job! Only one more motor to go!

Step 5: Step 5: Calibrating Extruder

Measuring E value:

Now we'll measure and calibrate how much filament comes out of your extruder. First heat up your hotend to the recommended temperature for your filament. Next use a pencil to mark a few cm up on the filament (you can use tape to mark it instead, just don't forget about removing it before it gets jammed in your extruder). Measure how far away the mark is from the extruder. Then tell the printer to extrude 10mm of filament. Measure the distance again.

Subtract your first measurement from your second to find your actual measurement. I got 2.9-1.83 = 1.07cm or 10.7mm

If you got 10mm, then great your E value is calibrated. If not continue to find your new M92 value.


Calculating New M92 E value:

Again we use our same formula from step 2 to solve for our Y-axis.
Input measurement = 10

Actual measurement = 10.7

Old M92 value = 104

Desired measurement/Actual measurement * Current M92 value = New M92 value

10/10.7 =.934579...

New M92 value = 104*.934579... = 97.20

Now let's input that New M92 value: in G:code type your New M92 value like so : “M92 E97.2” then press enter. In G:code type: “M500” then press enter. (this saves your changed setting). In Gcode type : “M501” Now scroll up in your log and make sure your new M92 Value has been saved. If so, you can return to the start of this step and double check that your extruder is now calibrated. If so Great job, Your finished!

Formlabs Contest

Participated in the
Formlabs Contest

Teach It! Contest Sponsored by Dremel

Participated in the
Teach It! Contest Sponsored by Dremel

Tech Contest

Participated in the
Tech Contest

2 People Made This Project!

Recommendations

  • Pocket-Sized Speed Challenge

    Pocket-Sized Speed Challenge
  • Super-Size Speed Challenge

    Super-Size Speed Challenge
  • Metalworking Contest

    Metalworking Contest

83 Discussions

0
doug_scott
doug_scott

Question 8 months ago on Step 2

I find this to be very confusing. I have a FLSUN Cube printer. This printer does the X and Y movements by moving the print head left, right, towards, and away and the bed does the Z movements by moving up and down. The instructions talks about picture 2 or picture 4, but none of the pictures are numbered. At what point do I start numbering the pictures. Sorry for asking seemingly stupid questions, but I am one of those that once I get confused, its all uphill from there on. I understand you cannot cover all printers, but there are only a couple of formats to cover. My printer bed is just over 300mm square. Printer supports 260 square. When I run M28 followed by pressing the X Home icon in Repetier-Host V2.1.6, the print head moves to X20 and leaves Y and Z where they are. If I run M501 at this point, it thinks the print head is still at 100 for x,y and z.
Sometimes I just think too much, and it just doesn't end well.

0
mrakuaku
mrakuaku

Answer 7 months ago

I don't think there is, or was, at the time of writing this, any way of clearly labeling the picture itself. When I say picture 1, I mean picture 1 of that step.

It doesn't matter if your nozzle moves up or down or your print bed, calibrating Z should be the same... The bed will go down as your Z value increases...

M28 = "Start writing to a file on the SD card" ... What exactly are you trying to do? I can't find any part of the tutorial where I mention that code.

0
doug_scott
doug_scott

Reply 7 months ago

Sorry, M28 should have been G28. Perhaps I should first ask if I am even looking at what is the solution to my issue. My machine has auto leveling, and the proximity sensor is approx. 1 inch to the left of the hotend. When the axis goes far end of the x axis, the proximity sensor is past the board, out in the air, with no metal in sight to register. Being a retired auto mechanic my first fix was to simply move the table one inch to the left by drilling 4 new holes in the bed mounting strips. It works that way, but I would imagine it will cause issues down the road.

0
mrakuaku
mrakuaku

Reply 7 months ago

I'm still not exactly sure what you're asking. M501 can't save your home positions, that's why you need your endstops every time you home your printer. Once you turn off and on your printer or if a motor skips steps (from physically stopping your motors from rotating), your printer will get "lost." There are exceptions to this, like with the popular Trinamic drivers that can sense stalling and can pause a print that has skipped a step or use a physical block to act as an endstop.... but even those need to home after losing power.

If you have an opensource printer, and if you want to probe a different location(s) on your print bed you should be able to do that too.... it may add to the confusion.... I believe it would involve flashing your printerboard with modified marlin code.

0
dashawk
dashawk

Question 1 year ago

Hi, do you have a tutorial for the 3D Printer that you are using in this instructables on how to build it?

0
dashawk
dashawk

Reply 1 year ago

thanks you for providing these resources.

0
d32loser23g
d32loser23g

Question 1 year ago on Introduction

Do I put the new values into my printer's firmware or the slicer I use such as cura?

0
mrakuaku
mrakuaku

Answer 1 year ago

I can think of 3 ways to calibrate your printer (4 if you have a self calibrating printer). Probably the easiest way is described in my tutorials. The next easiest way would be to do it in the Arduino IDE when you flash your marlin software to your printer (this will take awhile cause you have to flash your printer with every change you make). The most tedious way is to create a sliced file of a print and then manually enter lines of code to do whatever changes you need. I'm not exactly sure what you're asking and if what I just said made you more confused. What kind of printer are you using?

0
mviljoen2
mviljoen2

2 years ago on Step 5

Give this man a bells!

Shot bru! You have no idea how much I struggled. There are lots of Marlin tutorials out there. The very very first thing before you try anything at all with your newly built printer is to calibrate the motors. Mine was Waaaaaaayyyyyyyyyy off. Not knowing what I was doing I incremented the bed size to 475 before it got to the opposite end. Then I realized the motors are only moving half of what the LCD said because the bed is only 220mm. Thanks to your instructable. I managed to fix it. all of the axis-es were moving terribly slow, now they move much quicker to get from point A to B.

0
dz1sfb
dz1sfb

2 years ago

Thank you for this simple clear instructable. I used your method to tune the axis in Marlin. I have had experience tuning Mach3 on my CNC machine before, but have not had to touch it afterwards over a decade.

Ken :)

0
SteveB452
SteveB452

2 years ago

Confused: You say "80.2*.987724002 = 79.22 = New M92 value" yet when you input it to your printer and save it you say "First type in your G:code for your New M92 value like so : “M92 X80.21” then press enter". Why are you entering X80.21 when you said the new value for x was 79.22?

0
mrakuaku
mrakuaku

Reply 2 years ago

I think you're right, I made a mistake... I'll update it now. Thanks!

0
RiteshB14
RiteshB14

2 years ago

Is there any way to change the calibration value without using computer and save it?
The calibration values keep resetting back to default every time I switch the printer off and back on. The printer usb connection is not working properly.

0
mrakuaku
mrakuaku

Reply 2 years ago

What kind of printer are you using and what printing software did you try from your computer?

On your computer go into your printing software settings.

First with your printer unplugged see what COM ports are available to connect to. Then plug in your computer and there should be a new 'COM port' available to connect to. Make sure you select the one that appears only when the printer is plugged in and turned on.

Next if you still can't connect to the printer, try changing the 'baud rate' (also in the printer software settings)... keep changing this and trying to connect to your printer until you find one that works.

0
RiteshB14
RiteshB14

Reply 2 years ago

I am using a Tevo tarantula.
I got the printer connected, but I am still not able to save the value. The value reset after I switch the printer off and back on.

0
YanV4
YanV4

Reply 2 years ago

Probably you are missing to store setting in EEPROM. Checked on web pages, Tevo Tarantula should have EEPROM enabled. Try to search menu for "Store setting" / "Load setting".

EEPROM is a permanent part of memory where printer can store such kind of data.

0
Dolon12
Dolon12

2 years ago

MrAkuAku,

Great explanation. I will do it as soon as I am able to get my newly assembled kit to print. I came to your instruction, because I am trying to fix the weird problem I have.

I move X, Y,Z axes to to limit switches before powering up. The go through the bed levelling process. As soon as I try to print the Z axes moves up 15mm and reset to zero. It then begins printing in midair!

What am I missing? Heaps of stuff on the internet, but still have not found a proper explanation. Is it the firmware or the slicer?

0
mrakuaku
mrakuaku

Reply 2 years ago

It's difficult to say what the issue is without more information. What printer and slicing programs are you using? Did you change your Z-axis offset?

The command M212 deals with the Z offset. If you can connect your printer to your computer over USB, check what yours is currently set to by entering "M501" in the command line . If it's set to something like 15, then that's probably your issue, and you should start by setting it to 0. If it's set to 0, you can lower your offset by with -15 (although I'd lower it by small increments so you don't crash your printers nozzle into the print bed). you'll need to fine tune the number until you find the exact height for a good first layer.

Follow these steps to change your Z-offset.. (the offset number you use will depend on what M212 is currently set to and how much you need it to move)

1. enter the command "M212 Z-1" to lower your Z axis offset to -1mm

You can also raise your offset with a positive number "M212 Z0.5" this will raise the Z offset to 0.5mm... I would go with a smaller number first though and gradually bring it down. You'll need to save the command before you test it

2. Save your changes by entering "M500" into your command line.

3. Check to make sure your settings were saved with "M501"

If that problem happens with multiple slicers, then it's probably your issue, as M212 is saved on the printers eeprom (internal memory). If it only happens with one slicer, I'd look at your g-code to see if there is a command that tells your printers Z-axis to raise 15mm (something like G1 Z15). You can save a g-code file to your desktop and then open it with notepad to check.

Oh, and by moving xyz to limits, I assume you mean you have the printer home itself and that you're not physically moving them... right?

0
Dolon12
Dolon12

Reply 2 years ago

MrAkuAku,
Thanks so much for your reply.
The printer is a Flsun i3.
I think it is working properly now.
I did small print, but it is not sticking to bed properly.
I changed it to Auto Leveling now.
I think the problem might have been the firmware. i am totally new to 3D so its all very confusing.
I now use G28 to go home to X and Y. Then G29 to Autolevel and then print. I set the sensor to nearly same level as extruder nozzle. I have to fine tune and then use Z offset. But not sure how to enter the Z offset.
Use the LCd or Repetier Host.