“Magic Numbers”

Is there an optimal layer height for your printer?

__________________________________________

  • Intro

  • What is a stepper motor?

  • Stepper motor example

  • The space between (half/micro stepping)

  • Half step example

  • Are half steps detrimental?

  • Find the Magic Number for your 3D printer

__________________________________________

 Jun 9th, 2022

 The “Magic Number” is something you may have heard during your 3d printing experience, I even talk about it at the latter half of my DUAL Z video. It’s a topic that has to do with stepper motors and optimal layer height. It’s also a topic that not everyone agrees on. Certain groups believe it is an effective way to improve print quality, and others believe it’s complete snake oil. One thing that isn’t up for argument is how the stepper motor operates, and that is paramount to understanding this topic. Read below, perform some tests with your own printers, and decide for yourself.

Firstly, what is a stepper motor?

It’s a brushless DC motor whose rotation moves the axes of our printer. The stepper motors impart movement along belts and pulleys to drive the X, Y, and Z axes of most 3d printers. What does that mean? The 3d printer tells the motor to rotate, it does, and the belt that is attached to it, (by a gear) starts to move. The belt is also attached to one of the axes and it in turn moves our machine. On the X axis it is connected to the bottom of the printhead. The Y axis is connected at the bottom of the bed. The Z axis has a different setup, where the rotation of the motor is transferred to a lead screw, or z rod. When the Z rod rotates it causes a threaded coupler attached to the X axis to move up or down. So the stepper motors are responsible for the movement of our 3d printers, but understanding the “Magic Numbers” means we need to go one step deeper and understand what’s going on inside them.

This will only be a glance inside the stepper operations, as there are a lot of complicated mechanics going on. I want to give a simple and concise understanding to explain how these ‘magic numbers’ may or may not be helping.

Within the stepper motor is a toothed magnetic rotor. That magnetic rotor is surrounded by a series of coils known as electromagnets. When energized the electromagnets' polarity changes, this change in polarity causes the magnetic rotor to move to the next fixed position, and this is known as a ‘step’. The electromagnet gets energized, the rotor moves, and then no more current is necessary.

STEPPER MOTOR EXAMPLE

Picture a standard wall clock, with the only marks on it being 3 - 6 - 9 - 12 and each of those numbers represents a step. If the hand is at 12 and we wanted to move one step, the stepper motor would energize the next electromagnet in order, and the hand would travel there.

Here the 3 has been energized and hand travels there. This is an example of ONE FULL STEP.

If no more movement is required coil 3 no longer is energized and the hand stays in place. In order for the motor to make one full rotation, the next electromagnet would activate(6).

The 6 is energized and again a full step is taken

Next the 9 is energized and another full step happens.

The 12 is energized and the stepper motor has now made one full revolution.

Because there were 4 fixed positions in the stepper motor per one full rotation, this motor would have 4 STEPS.

The Space Between 

It’s also possible for the motor to move between steps, known as half stepping or micro stepping. When the stepper motor performs this operation it does not move completely to the next step, it stops at a position between steps. In order to achieve this two electromagnets are partially energized, and the rotor moves to a position between them. This position requires both electromagnets to stay partially charged, meaning voltage needs to be running to them. Micro stepping is a great way to achieve smooth movement. If we were only allowed to use full steps to complete a rotation, movement could appear choppy. By utilizing half steps and micro steps(smaller than half), the rotation of the stepper motor becomes more fluid.

Half Step Example

Let’s take a look at the same clock. The hand is at 12 and we want to half step it. The 12 and the 3 would be sent partial voltage and the hand would step between them.


Both the 12 and the 3 are being partially charged and the hand has moved into position between them as a HALF STEP. If the motor were to hold this position both the electromagnets(12 and 3) would need to stay constantly charged. In order to continue movement the 12 would be disengaged of charge and the 3 would be fully charged.

The 3 is energized and the motor moves another half step.

Because the motor is at a FULL STEP there is no need for current to be continually running to it to be held in position. Only during a half step do both electromagnets need to stay partially charged to keep it in position.

By utilizing half steps we’ve double the amount of positions the hand can be sent too. This is still a 4 STEP motor, because there are still only 4 full step positions. Half stepping is the key to smooth movement while the stepper motor makes a full revolution.

 

How can Half Steps be detrimental?

Half steps are not any less exact than full steps, but in order to maintain a half step both the electromagnets need to stay at a partial charge, and that’s where the possible issue lies. When the stepper motor moves a full step it receives a set amount of current, but when microstepping the voltage is reduced from the normal amount. Because the power is reduced it means there’s less torque able to be applied.

When we consider the stepper motor needs to receive constant current to hold a half step, and the reduction in torque due to the lower power it’s receiving, it may be wise to avoid them while moving the Z axis. The Z axis is heavy, it moves the X axis gantry with the accompanying printhead, and it needs to stay ‘held’ in position while the printer completes an entire layer. While half steps aren’t less precise than a full step, the full step should hold a definite step for a longer period of time.

Let’s apply this to our 3D Printer 

Now that we have some understanding of how the stepper motor works, how do we figure out how we can stay within a full step? In the below example I will be using the values of a stepper motor equipped on the Voxelab Aquila and Ender 3 Pro (many other commons printers share these numbers). These stepper motors have a step angle of 1.8 degrees per full step. That means each step of the motor turns it 1.8 degrees. Now we can start introducing some MATH. We’ll take the total degrees of a revolution(360), and divide from it the step angle of our stepper motor(1.8) to determine how many steps are in one revolution.

That means for this stepper motor there are 200 steps in a full revolution. 

The clock was a 4 step motor, this is a 200 step motor

The next thing we need to know is how far the Z axis lifts* during a full rotation. I’ll save you the headache and tell you the answer is 8mm. So we know that a full rotation (200 steps) moves the Z axis 8mm. So we get to do a little more math. We will divide the Z travel length in a full rotation(8) by the amount of steps in a full rotation(200).

This formula shows that each individual step (in the 200 step rotation), is moving 0.04mm!


This means our MAGIC NUMBER is 0.04mm. If we keep the movement of the z axis to a multiple of this number we will always be at a full step and not between steps. Because we are talking about the Z axis -the vertical movement- we are referencing the LAYER HEIGHT. So stay with layer heights that are multiples of 0.04mm. 

0.04 || 0.08 || 0.12 || 0.16 || 0.20 || 0.24 || 0.28 || 0.32 ||

0.04 || 0.08 || 0.12 || 0.16 || 0.20 || 0.24 || 0.28 || 0.32 ||

Nowadays it’s pretty commonplace for slicer profiles to be already split into these ‘magic layer heights’. However when you start to experiment with larger nozzles (0.6mm, 0.8mm) those profiles are not nearly as robust, so you’ll want to make sure you are still maintaining a multiple of 0.04mm.

That’s the Magic Number. What do you think? Are you a believer? I want to say my demonstration on how a stepper works and the examples provided are completely inadequate to properly convey all the mechanics and engineering that goes into a stepper motor. I am offering a simplified version to try and convey a topic that does not come up so often, and when it does isn’t always clearly explained.

 You can now use this knowledge and apply it to your particular printer, unless you own a Voxelab Aquila or Ender 3 as the numbers above are accurate for those printers. If not, the only information you’ll need is the step angle and the distance the z axis lifts. The step angle can usually be found within the manufacturer’s spec sheets, either on the website or in the documentation that came with the printer. The distance of travel the Z axis moves can be determined by grabbing some calipers and moving the Z axis.

If you liked this article and want to chat about it, please Join the Discord and start a conversation!

*a few times in this article I refer to the Z axis lifting or moving. The z axis is responsible for the vertical movement but what it actually moves is the X axis where the printhead resides. I have omitted this language is some instances to not create a word soup of Zs and Xs while you are reading.