loading

**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 X80.21” 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!

<p>Update to my previous message:</p><p>I can only change the values for X and Y if I go into config, firmware EEPROM configuration, as when I type in the g-code, it does not change the values after saving with M500 and when I check with M501 the values are the same as they started with.</p>
<p>Are you using Repetier? And what type of printer are you using?</p>
Hi there, i am using Repetier and the printer is a ctc clone prusa i3 pro b, from ebay, i could get you a link to the one I bought if you would need to see it?
<p>No, the name should be fine.... I strongly recommend calibrating one axis at a time.... and following the instructions carefully. Is it possible that you aren't inputting the commands properly, so when you try and save it, it doesn't do anything?</p><p>Do you have the right motors plugged in to their corresponding motor controllers?</p><p>I don't seem to be having any issues modifying values by going into config&gt;firmware eeprom configuration (they didn't have that when I first wrote this tutorial). You're saving them after you modify them?</p><p>Did you upload the Marlin software to your printer with the Arduino IDE? If so, another way to get it to change the amount of steps for each motor would be to alter the configuration.h file for Marlin. do a search for </p><p>&quot;#define DEFAULT_AXIS_STEPS_PER_UNIT&quot;</p><p>The first number in the brackets is for the X-axis, then Y, Z, and E.</p>
<p>whenever I type in the commands (of which I've tried everyway I can think of lol) e.g M92 X82.26, m92x82.26, it doesn't seem to change the values in the log. if I enter the values in config&gt;firmware eeprom configuration, I can get the values to change in the log, however when I type M500 into the g-code it must not save as it soon reverts back to the original values. Unfortunately ive not been able to upload the Marlin software to the printer, as once again I got an error message :-( thabnks again for all your help</p><p>Adam</p>
<p>I'm not really sure how you're confirming that the X-axis values have in fact changed without turning you printer off. If you change your Xaxis M92 value to say 10, does it reduce the travel of you x-axis significantly? If not, you're not changing the M92 value at all (forget about powering on and off being the issue).</p><p> If there was something wrong with your eeprom, I would think you wouldn't be able to write to it at all. If somehow that is the problem, I would recommend going to slicer tab of Repetier, then going to slic3r configuration. Once the slic3r window opens up, go to the far right tab 'Printer settings', then in &quot;start up G-code&quot; write:</p><blockquote>M92 X(value);</blockquote><blockquote>M92 Y(value);</blockquote><blockquote>M92 Z(value);</blockquote><blockquote>M92 E(value);</blockquote><blockquote>M500; </blockquote><p>This will type in those settings every time you start a print job, so resetting wouldn't be an issue.</p><p>You need to save the custom g-code you just made, make sure it's selected in as your slicer settings in the slicer tab of Repetier (under &quot;printer settings&quot;), then you're actually going to have to start a print job to get those values to save to your printer.</p><p>You should also be able to write it like this too:</p><blockquote>M92 X(value) Y(value) Z(value) E(value);</blockquote><blockquote>M500;</blockquote><p>The main downside to this method is that your eeprom has a finite amount of times it can be written to..... but I think it's something like hundreds of thousands of times (or millions with good programming)... so it shouldn't be a real issue.</p><p>Oh, are you modifying the values with the LCD or are you connected to a computer over USB and doing it how I've outlined in the tutorial?</p>
Ive been confirming by setting the values, then (when the printer is connected via usb cable) the lcd screen is on, so ive been able to go to menu, control, motion and there i can see the values for the axis and using the commands m92 X...... Changes these values, though the problem seems to be when trying to save. If i go to eeprom config and change the values on there, i can see in the command line on the pc that the values have changed, then i will type command m500, then go to check it by typing m501, which resets the values back. I have printed something after altering the values by eeprom and the item i printed cameout the correct dimensions, though, once the printer has been switched off the values reset, which results in the prints being incorrect size
<p>Ok, ...... When you try and input the values in the manual control tab, are you doing it as 2 different entries? &quot;M92 X80&quot; .... enter .... &quot;M500&quot; ...enter .... wait for it to &quot;echo:Settings Stored&quot; then &quot;&quot;M501&quot; ..... enter to confirm? ... maybe give it 5 seconds before entering any commands... entering things too quickly can mess stuff up.</p><p>If that doesn't work, maybe download and try Cura (I have version 15.04.3... newer ones don't support printing over USB)? Load a 3D file, click on the &quot;print over USB&quot; icon, then once it's connected you can type your g-code (i.e. M92 values) on the bottom right of that window.</p>
<p>I have noticed that when I enter the g code for the axis, it does not say &quot;echo: settings stored&quot; no matter how long I leave it. it doesn't seem to notice any commands apart from M501</p>
I i may be guilty of not waiting long enogh, i shall try that solution tomorrow :-) i normally use cura to print out, but was going to say, im not bothered if i dont print via usb as i normally print via sd card anyway
Oh, and yes, i have been entering the the commands for each axis one at a time
<p>New update, after typing the g- code commands in, I checked on the printers lcd, the changes had been made to the axis, though after turning off printer, or even typing M501, the printer resets to original </p>
<p>Oh and sorry, when I click save in the config&gt;firmware eeprom configuration, it appears to have saved but the next time the printer is started the values are reset to their original form.</p>
<p>Hi there, great work with the help you've given, unfortunately, like most people, I still have a problem, I set the new values for X and Y, however, once the printer has been shut down, it forgets the values ive entre resorting back to the ones that I first changed. Any help on this would be great, thanks again for your help,</p><p>Adam</p>
<p>Great write-up, it was helpful. </p>
<p>thanks - this helped a lot. </p><p>I had a problem lining up my tape so I taped an ink pen to the side of my print head and moved my printer head to mark the path. did this for my x and y and removed any guess work on the measurement</p>
<p>This is good information and thank you for sharing it.</p><p>I do have a question:</p><p>When you enter these values for calibration, are they stored on the Repetier Software or written to the control board of the 3D printer?</p><p>I ask because I use an SD card when I make my prints leaving my computer free for other activities.</p><p>Thank you for your response in advance.</p>
<p>After sending M92 with whatever value you would like to change, send a M500 and it will store your new values. Send another M501 to verify.</p>
<p>Thank you for the reply.</p><p>Since I receive a response until yours, I gave it a try and noted it does get loaded into memory.</p><p>Thank you for the reply :-)</p>
<p>Thanks SethR29, didn't see Valveman's question.</p><p>There are somethings that are saved on the control board. M92 values are one of them. So, once you've calibrated your printer, you should be able to switch between printing software (like cura) if you like, without too much trouble. </p><p>You can still alter them via SD which I had to do once because I couldn't connect my printer to my computer for some reason (I found it to be a bit of a pain though). To alter over SD (assuming you don't have an LCD screen that has some sort of calibration setup procedure), you can slice a file then go to the print preview tab, click on 'edit G-code,' then scroll down to the first line of code. Enter your M92 command, add a semi-collon to the end of it, then in your next line save it with M500; </p><p>(i.e. </p><p>M92 X83.5 ; </p><p>M500 ;</p><p>)</p><p>If you'd like to calibrate without printing anything (not really recommended), do the above then delete everything after the first G1 line of code. You can also get rid of some other things that take up too much time too, like auto probing or heating up your hot end if you're not testing your extrusion. </p><p>Then in place of the first G1 line write &quot;G1 X50 ;&quot; without the quotes. This should move the Xaxis 50mm. change X to YZ and E to test these other axis. The part that's a pain about doing it this way is that you'll have to turn your printer on and off every time you want it to move.</p><p>Things that are stored in Repetier can be found/altered by clicking 'printer settings.' These things include max printer area, how fast the printer should move when you click on the manual move icons (within Repieter), max extruder and print bed temperature, among other things.</p>
<p>I adjusted the M92 value for the X axis to get the travel distance accurate at 70mm. But when I tell it to move 10mm, it moves 12mm. It's still accurate when I move it 70. Do you see this behavior as well?</p>
<p>That sounds strange. What printer are you using? Are you always moving 10mm from the same spot? or are you trying to move it 10mm at a time from multiple coordinates. Does it sound like anything is grinding or interfering with the X-axis as it moves? Does it move smoothly or kind of chug along? Maybe you need to adjust the acceleration/speed of the stepper motor controlling your x-axis? Or maybe you need to adjust the potentiometer on the x-axis motor controller?</p>
<p>Arg! User error. I was misreading my analog calipers.</p>
<p>Glad you got it worked out!</p>
<p>Hi, do you have any idea why my Y axis doing this?</p><p><br><iframe allowfullscreen="" frameborder="0" height="281" src="http://www.youtube.com/embed/gvynOpbJaUc" width="500"></iframe></p><p>I have tried:<br>Tightened the belt,<br>Change the a4988 driver with a new one,<br>Calibrate the a4988 voltage and amperage,<br>Change the steps/mm several times,<br>Change the board from gt2560 to ramps1.4+mega,<br>Switch the X and Y wires but still the problem with my Y axis only still here.</p><p>Thanks for the help.</p>
I can't really tell what is happening in the video. are you trying to home your printer and it's counting up? or is it skipping when trying to move? what kind of printer do you have? is your printer moving to the end stop and then banging into itself without stopping, or is it going in the opposite direction when homing? <br><br>your screen also says that your y min endstop is turned off. can you turn it on with gcode? if that's the case, then you should be able to find the code to turn it on here. http://reprap.org/wiki/G-code#M120:_Enable_endstop_detection
Hi, thanks for the quick response. The printer is a custom made, I'm using repetier firmware to run the printer. I have no problem with endstop or wrong direction of motor but only the incrementation. If I move the Y axis 1mm at a time, it should be exactly 1mm consistently but instead i get a 0.99mm movement and not exactly 1mm.
<p>Oh, I see what you're talking about now. That's pretty weird. When you look at your computer, does that 0.01mm difference happen in the Repetier software, or just on that LCD screen? If you move the printer 0.1mm at a time, will the 0.01mm difference happen over the same distance or will it happen when you press it every 2-5 times like when you move it 10mm. It might just be your screen reporting back an improper value. </p><p>To test, I would move the Y-axis by 1mm at a time (or 0.1mm if you're really patient) until you get to 20mm (or 100 if you can), then measure how far it actually went. Then do it again 2 more times. If all 3 values are very close then it's probably just your screen reporting back a messed up value. Maybe this is common with Repetier? I've never used an LCD screen with my printer so I wouldn't know. If it is just the LCD, then you should be able calibrate it like you normally would.</p><p>Stepper motors don't have any way of reporting back how far they've actually moved (if you hold the motor firmly so it can't spin, then send a command to spin it, your screen and Repetier will assume that it spun). If it were me, and it was just a faulty reading on the LCD, I'd be annoyed, but probably wouldn't do anything about it. </p>
And like what you see from the video, it happens every 2-4 times of press.
maybe try cura instead of repetier. also, have tried printing anything? you might not notice in the end result...
With all honesty I have done a lot of try and error including what you have said here and the result is the same. I've used the repetier host with my Mac and to my laptop that runs ubuntu but same result.
When I type in M501 in Repetier, it states it's loaded all defaults, which resets all the calibration changes back to default. <br>If I type M503 after entering them into the G-Code, it does show the change has been made.<br><br>Geeetech i3 Pro B<br><br>Why is yours different? Mine uses Marlin v1
<p>Did you save with M500 before typing in M501?</p>
Hi, <br><br>No actually I didn't type in M500.<br><br>I tried just moving one of the axis after changing everything. (Minus M500 to save) and my printer freaked out. I had to hit emergency stop to shut it down. Which freaked me out... =-O!<br><br>The stepper motor was screaming like it was running at high speed.<br><br>Once I rebooted, it was fine again. I did try one more time and it did the same thing.<br><br>I don't want to ruin my printer or burn out a motor before I even get going. I'm sure you understand.<br><br>The changes took in Repetier, but apparently, not the firmware. Which I take it there was a conflict between the firmware and Repetier settings which caused it to freak out.<br><br>A little hesitant to try it again. As stated, I don't want to ruin my printer.
<p>Once you change an M92 value, you need to save it with M500 before you check it with M501. I'm not sure I understand what you mean by &quot;the changes took in Repetier, but ... not the firmware.&quot; ... When you calibrate your printer, I believe it writes that data onto the 3D printers microcontroller.... I've been able to jump from one software to another without re-calibrating it. I think it's just slicing profiles that aren't written to your machine (not 100% sure about that though). </p><p>You could troubleshoot by taking a note of your X-axis M92 value (or any others). Then change it to something really small, like 10% of its recommended factory setting. For example, if your printer recommends starting with an M92 for X of 100, try 10. Try moving your X axis by 10, it should only move a very small amount. If that happens, your doing it right. If it keeps moving and you're afraid it's going to try and go beyond its limits, unplug it like you done before. Make sure you follow the process of saving it before checking it.</p>
Hi, thanks for the reply.<br><br>The changes took in Repetier. Meaning &quot;took hold&quot; just a shortened way to say it.<br><br>To expound. After inputting values, they showed as excepted in the g-code in Reptier.<br><br>I didn't see you had to also save it the values by typing in M500, my bad there.<br><br>I thought since they showed they were saved in Repetier g-code window that was it...<br><br>So once I tried moving it, the two different settings were obviously conflicting and the stepper motor went nuts, whining loudly. Freaking out... and me with it. lol.<br><br>Ok try again using M500 to save it to the printer chip. See what happens... though I'm nervous about it I will admit. The suggested way by Geeetech is to open the firmware in Aurdino(sp?), make the change, upload the new firmware with changes to the printer. That saves it.<br><br>Your way is much easier. I'm just hoping it works for mine, the way it does for yours.<br><br>- chase -
<p>It should work. But if it goes too far, just unplug it from the wall.</p>
<p>Hi! Could you please help me. I have a Tronxy P802M (Prusa i3). <br>I can't even start the calibration because when I type M501 all I get in the code is one line: &quot;echo: Hardcoded Default Settings Loaded&quot; <br>There are no any other lines, so there is no &quot;echo: M92 X__ Y__ Z___ E__&quot; line at all. <br>Could you please help me and let me know what am I doing wrong, as I am going crazy about it? :(<br>Thank you very much in advance!</p>
<p>Meanwhile I was able to find the solution for my error.<br>So basically M501 just sets the parameters, I need to type M503 in order to get the parameters displayed. </p><p>Detailed expalanation of G-codes: http://reprap.org/wiki/G-code</p>
Thanks for that update about using M503 to get the parameters to display. I had the same issue when trying it as instructed. (Geeetech i3 Pro B)
<p>Are you using Repetier? Are you able to connect your printer and move it all with the manual control settings?</p>
<p>Great explanation of the calibration process. However I wonder about the accuracy in the measurements. In your examples your measurements found your axis to be off by 0.8mm, 0.2mm and 0.5mm. </p><p>It seems to me that these values would fall into the measurement error of the tools that you are using? Do you think that the placement of 2 pieces of tape (x &amp; y axis) and then the measurement is accurate within the measured delta of 0.2mm?</p><p>After adjusting based on these measurements did you see a measurable difference in the quality of your prints? </p><p>Not trying to be critical here... as I said this is a great instructable. I am just wondering the accuracy expectation should be for this process.</p>
<p>If you're looking for a higher level of precision, you can check out a follow-up Instructable I just made.</p><p>https://www.instructables.com/id/Calibrate-3D-Printer-or-Other-CNC-Machine-With-Las/</p>
<p>It's not perfect, but by being careful and taking a average over a few measurements, I was able to get prints that (when tolerances were taken into account) fit together perfectly.</p><p>I was recently thinking of making a mount (or maybe 2) to attach a laser pointer to my printer. That way you could make a dot where it starts and finishes and then measure that distance.. just haven't gotten around to it yet.</p><p>You can also put something parallel next to an axis you want to measure (i.e. a book), make a mark on the book and axis, line them up, move the axis __mm and then measure the actual difference between the starting point and the finish point, then change the M92 value accordingly.</p>
<p>Hey thanks for making this! It's been a huge help! Figured I would share some of the tricks I used to make this process smoother.</p><p>I used part of the Y axis to keep my ruler held upright and aligned while I adjusted the Z, but I'm most proud of that trick with the toothpick. Made adjusting the Y axis a breeze!</p>
<p>I used a small dab of finger paint, with the help of a cotton swab, on the tip of the extruder and it makes a small splotch on the tape for both the X &amp; Y when you home Z</p>
<p>Maybe a cheap laser pointer held in place would be good too?</p>
<p>Glad it helped! Nice paint job on your printer! </p>
Fantastic instructable! Thanks very much for the help.
<p>I am connected to my printer, but I get the error: &quot;Error: No EPROM support compiled.&quot; Any ideas? I can manually control my motors, but need to calibrate them.</p>

About This Instructable

115,462views

232favorites

More by mrakuaku:Easily Secure stock to CNC LED Light painting with 3D printer Calibrate 3D Printer or Other CNC Machine With Laser Pointer 
Add instructable to: