3D printing basics: Understanding steps per millimeter and using Prusa’s calculator

3D printing basics: Understanding steps per millimeter and using Prusa’s calculator

Hello everyone, i’m Tom, and as a follow-up
to last week’s miscalibration video, today i’ll show you how to use the Prusa calculator
as that has been requested, and in the process of that, i’ll explain what the things you
are entering there actually mean. So the Prusa calculator takes many of the
calculations that would go into setting up a printer from scratch and conveniently does
them for you. And that ranges from filament volume calculations (hint: 1kg of PLA actually
has quite a bit less printing range than 1kg of ABS) over steps per millimeter calculations,
which is the part we’ll be looking at today, for both belt and leadscrew systems, so typically
XY as the belt axes and Z as the leadscrew axis. Then it goes over optimal layer heights
to hit full steps on you stepper motor – more on that later – which can give you more consistent
layers if you’re not using an auto-paralleling setup with a Z-probe. And the last part is
a calculation of the actual speed an axis can reach for given travel lengths and acceleration
settings. You’ll routinely see people proclaiming that they are printing at insane speeds, but
in reality, their printer can’t actually accelerate to those speeds for the short moves
that it’s doing. And that’s what you can verify with this last bit down here.
But we’re going to stick with the steps per millimeter calculations for now. So to
start out, what does that number, say 100 steps per millimeter for a fairly normal setup,
actually mean? You see, everything past the microcontroller on your printer’s control
board only has a very limited idea of what it’s doing. The stepper motors and their
drivers only get the command to move forward or backward one increment at a time – this
is a step. And because of the way your drive system is set up, each step moves the corresponding
axis by a set distance. Now, when the microcontroller, or rather, the firmware running on that microcontroller
gets the command to move an axis by, for example, one millimeter, it uses the steps per millimeter
setting and calculates how many electrical pulses – one for each step – it needs to send
to the stepper driver to get the desired distance in the end.
Now, when we look at the Prusa calculator, you’ll see that there are four variables
that determine the steps per millimeter value in the end. Now, in the simplest case, the
stepper motor would rotate by one step for each pulse the microcontroller sends out and
its driver receives. The step angle or steps per revolution is simply a data-sheet value
that determines how many full steps the motor has until its shaft makes a complete rotation,
360°. Typically, our motors have 200 steps per revolution,
some more precise ones use # 4 00, while cheaper or salvaged motors somtimes have only 48.
Which, of course, means that the steps are laid out much coarser throughout a revolution
than in a 200 or 400 step motor, reducing the final resolution of that axis by quite
a bit. So, typically, that setting is 200, but you can also easily look it up if you
know the part number of your motor. Now, because 200 steps per revolution actually
means that each individual step is still rather large, stepper drivers can add some electrical
trickery to split each step up into finer /# microsteps. So, for example, when your
driver chip, typically an Allegro A4988, is set to one sixteenth microstepping, the motor
will only move approximately one sixteenth as far per step pulse as without any microstepping.
Now, i’m saying approximately because microstepping, especially in the Allegro driver can be somewhat
unpredictable and doesn’t always position the motor at the exact sub-position it intends
to. Still, it’s a nice way to give stepper motors a bit extra resolution and, as a bonus,
it also means that the motor will be a bit less noisy. The microstep setting for each
axis is typically set with jumpers next to each stepper driver, but newer boards often
make them software-configurable instead. Which jumper settings mean which microstepping setting
is explained pretty well on Pololu’s site, which i’ve linked to in the video’s description.
Typically, that setting is one sixteenth with all jumpers installed, if you’re using Texas
instruments’ DRV8825 drivers, you can go up to 32 times microstepping, but that might
mean that the puny Atmega microprocessor on your control boards runs out of processing
power and slows the entire printer down. So right now, we have the microcontroller
# receiving move instructions and # sending pulses to the driver, the driver doing its
thing and splitting up the motor’s physical steps into microsteps and the motor’s shaft
finally rotating in accordance to what currents the driver is sending its way. That poor motor
never had a choice. So basically, we have the entire software
and electric side covered of what goes into the steps per millimeter figure. So the last
two things are the belt pitch and the pulley tooth count. Now the belt pitch is manufactured
extremely accurately, so that’s actually a figure that we can rely on. Nowadays, pretty
much the only belt used is GT2-2M, so a belt with a profile that’s compatible with HTD,
GT, GT2 and GT3 pulleys and with a 2mm pitch. Meaning each tooth is precisely 2mm from the
last one. Earlier printers used T5 belt with a 5mm pitch, I use HTD-3M, so a 3mm pitch,
on my big Mendel90, and some US manufacturers also use imperial belt with the XL or MXL
profiles, which have a 5.08mm or 2.03mm pitch, respectively.
They are not compatible with pulleys for metric GT profiles and are actually rather rare these
days with everyone moving to GT2-2M. Anyways, it’s pretty easy to figure out
which belt and pitch you have, as it usually says so on the back of the belt. If not, well,
the article description should have at least included that bit of information when you
bought the belt. Also, in the 3D printing sphere, GT2 is often used as an abbreviation
for 2mm pitch GT2-2M belt, even though it’s technically incorrect or at least not precise.
And the last part of the puzzle is the tooth count of the pulleys. And that is sometimes
noted on the side of the pulley, but it also something that you can simply count. You know,
how many teeth there are on the pulley. Mark one and then make your way around.
So when you have gathered all that information, you are ready to punch it into Prusa’s calculator,
which gives you a couple of presets for most parameters. The output can be used with the
M92 command to temporarily set steps per millimeter for each axis or used in the firmware’s
configuration to permanently use it. Now, there is a note that you might still need
to calibrate this further, but like i’ve said in the previous video, that will likely
make things worse instead of improving them. The steps per millimeter value we just calculated
is extremely close to what your printer is actually doing, and for regular printers,
any tiny error here is within the tolerances of the FFF process anyways.
So that was the process of the belt-driven axes, and for the Z-axis, which is usually
driven by a threaded rod or, in better printers, a real leadscrew, it’s even simpler. You
don’t need to know a belt pitch or pulley tooth count, but instead simply the pitch
of your leadscrew. If that’s a threaded rod, it’s usually an M8 or M6 one with a
1.25 or 1mm pitch, while leadscrews can have all kinds of pitches. Look it up in your printer’s
documentation if you don’t know it. And that’s it for today, one more thing,
i used to have a Surveymonkey survey under each video, but as it turns out, Surveymonkey
is pretty greedy and was like “hey, cool survey you have there, shame if anything would
happen to it. You know what, just pay us an 24€ a month and you’ll actually get to
see the new answer to that survey.”. And i wasn’t really happy with that, so i moved
that over to Google forms. Which is free. And unlimited. And awesome. So, don’t use
Surverymonkey, use Google forms. But it also means that i lost all responses from that
survey, so if you’ve already answered the Surverymonkey one, please do it again on the
Google Forms one. Linked in the description. And that survey is really helpful to me for
picking topics that you actually want to see. And now, that’s really it. Feel free to
use the like and share buttons if you feel like it, thanks for watching and i’ll see
you next week. Or rather, you’ll see me next week. Since i don’t actually see my
viewers. But that’s ok. I guess.

local_offerevent_note October 12, 2019

account_box Matthew Anderson


29 thoughts on “3D printing basics: Understanding steps per millimeter and using Prusa’s calculator”

  • I'm building a printer and using imperial leadscrews. I always get a value that has two decimal places for the steps/mm. Is this okay or will ti mess with the microcontroller?

  • Thanks Tom. Great video as always. Just won my first 3d printer on ebay. Wanhoe duplicator 4 2nd hand. Can't wait to get started. See you next week!!

  • Hi thomas. I'm glad you reported most of the microsteps aren't accurate. I thought microsteps affects much more smooth motion than resolutiin. Only plain and half steps are in the right position. I was shocked that jo prusa's calculator gives a resolution result way greater than it realy is, just because of x16 microsteps. Do you think it's fair to say that a 1.8° motor x16 driving a 20t gt2 pulley have a 12 micron resolution ? As far the resolution can't be true up to the half step, do you think saying "up to 100 microns resolution" for that configuration is better and reflects much more the reality ? Thx 4 your great videos keep on 😉

  • Hi Thommas,
     Can you tell me how can we achieve a layer thickness of 20 micron ( ultimaker 2) or 100 micron (others) with a nozzle having a hole of 0.3 or 0.35 or 0.4mm for that matter. Please help,

  • Earlier I posted to one of your videos… I gather, after watching a few of them, that you are well up on the subjects, so just disregard my comment 🙂 Thanks for sharing…

  • Be careful the MXL settings in the Prusa Calculator seems to be broken, it produces the exact same result as 2mm GT2. That's not correct. Also, Prusa Calculator doesn't include 1/32 micro stepping.

  • I set my z axis to 2560 and they lock up when i run the z axis up and down and then i put it all the way down to 175 and they move am i doing something wrong with these calculations.

  • What do you think of making a closed loop controlled 3d printer? I've been thinking about it, http://hackaday.com/2015/01/20/closed-loop-control-for-3d-printers/ .

    Personally though instead of using an optical encoder, I was thinking of using these rotary encoders… https://www.sparkfun.com/products/11102

  • Great video. Thank you. I have a question, what would you do if the motors are older and you can't find any reference to them. How would one proceed in establishing steps/mm?

  • if i want to know how much, technically, the axis moves one by one step, for example 4mm pitch leadscrew and 5000cpr encoder on the motor and without reduction, is 0.0008mm correct?

  • I completely disagree that the values from the prusa calculator are plug and play. They are starting values. Out of three different belt setups I have experience with all have needed extra calibration. The current setup I am fighting 1.8 deg 1/16 step 2mm pitch and 20 tooth pulley comes out as 80 steps per mm. However I am having to lower the steps just a bit and offset them to get objects to print with the correct dimensions and round. Unless the belts are sub par but I have had to do the same thing with steel reinforced belts.

  • Hello, ok I need to find micro stepping for A4988 and NEMA 17 stepper (200). One rotation = 20 teeth x 2mm belt pitch=40mm. And 40/200=0,2, And 1 mm / 0,2mm = 5 steeps/mm. BIGEST EVER I work at CNC Grinding machinines. My main work.

  • 4m
    Hello All,

    I am building my own 3D Printer – Graber i3. I have followed all the necessary steps to configure the Marline firmware.

    I am using the Ramps 1.4 controller board and the A4988 driver. The stepper motor I am using for X, Y and Z axis has 1.8-degree step angle.

    I have used the Pursa Calculator to calculate the steps for X, Y, and Z axis – 80, 80, 1600 based on the GT2 pully-belt and 2mm threaded rod – screw system.


    * When I am using the calculated steps for the X, Y and Z axis I am observing higher movement (i.e 10-15 mm when I want to move 1mm)
    * I have calibrated the movement by reducing down the calculated steps –
    now the new steps are X=6.5, Y= 6.5 and Z = 26.66

    1. My question is why I am getting such a lower steps per axis?
    2. How can I get more accurate movement without skipping/slipping of the motor?

    Please help

    Thank you


  • I have built a printer from scratch . the entire frame is DIY with X, Y ,Z axis . have not installed the extruder as yet . was trying the movements , and learning how to use the print run. my question is ! this not a brand it is a home made printer . with ramps1.4 Ardunio mega and 6 end stops for X min max Y min max Z min max. how will I configure?

  • Super cool video, looking forward to the next. We are a small 3D modeling software startup completely bootstrapped and tooks us 5 years to develop our real-time collaborative CAD.? Would be great if you had time to check our software SolidFace.

  • Many of my walls have a slot down the centre – Google enquiries say you have to have the wall thickness a multiple of the nozzle size, but it didn't solve my problem even with 100% fill. So I did a test with walls from 1×0.4 to 8×0.4 and got an interesting result:

    1 x 0.4 Too thin – could not print

    2 x 0.4 Good

    3 x 0.4 Bad

    4 x 0.4 Good

    5 x 0.4 Bad

    6 x 0.4 Good

    7 x 0.4 Bad

    8 x 0.4 Good

    I suspect this is a function of Cura 2.3.1 – the rule seems to be that you have to specify walls that are a multiple of 2 x nozzle thickness to avoid gaps in the middle.

    Have you hit this bug?

Leave a Reply

Your email address will not be published. Required fields are marked *