Home > CNC > Spec’ing Out a Stepper Motor for a CNC Mill

Spec’ing Out a Stepper Motor for a CNC Mill

Figuring out what kind of motor will work best for a certain application is not as simple as some may think, where there are dedicated jobs to spec’ing these things out. There are many factors that go into determining what you need and deciding is a delicate balance of all of them:

  • Motor Type – For home CNCs, there are two general classes of motors: servo and stepper. Servos require more expensive controllers and motor encoders get up and running, but provide a very smooth and quiet operation. These are typically seen on larger mills, because they can produce more output torque/power at higher rpms and require a step-down pulley system. For smaller mills, these can be too big and are not very cost effective. Stepper motors provide high torque at a slower rotational speed, but with known step increments, such as 200 steps per revolution. This allows for an open-loop control design that works just as long as your motor doesn’t stall and miss a step and is cheap to build and control. Steppers are often found in printers and scanners for this very reason. With steppers, there are three basic types of windings: unipolar, bi-polar parallel, and bi-polar series. Unipolar steppers are older, have an output torque 70% of bi-polar, and typically referred to as simple to control, but is not the case anymore with the emergence of cheap Allegro ICs for bi-polar steppers. Bi-polar steppers have a higher output torque due to using more of the available motor windings, as the name implies. They can be run in parallel (higher speed) or in series (high torque), which trades winding resistance for motor inductance. In current CNC builds, bi-polar stepper motors and controllers are most commonly used, but when choosing the type of motor to use, keep in mind that stepper motor output torque drops quickly with increasing speed.
  • Maximum Rated Torque – This is defined as the maximum continuous torque of a motor, usually given by the manufacturer at ideal conditions. In a typical application, you will rarely see this rated torque output, since there can be significant torque reductions from your motor controller, power supply selection, rotational speed, mechanical friction, and other factors. You will need to figure out how much torque it takes to rotate your leadscrews while cutting under load at the maximum feed rate and how much torque is required to start and stop the leadscrew (i.e. inertial force). Fortunately, you can infer this from manufacturer websites with their CNC kits and other people’s builds. You will just have to make sure that you take into account the rest of their setup (i.e. power and controllers) to figure this out. I will go into this further later.
  • Rotational Speeds – Motors are ‘effectively’ constant power, meaning that for a given motor, the faster you go, the less torque you get. You can only send so much electric current into a motor without burning the coils out. (There are many other factors as well, but I will not go into them here.) You just need to make sure that at the maximum rotational speed (rpm), or desired feed rate (ipm x tpi), you have enough torque at the desired maximum speed to still turn your lead screws. Many motor manufacturers provide a motor torque curve with respect to rotational speed. These are also usually given at ideal conditions, so to achieve their stated torque curve, your setup will have to be close the same as theirs.
  • Resolution – Depending on the motor type chosen, you will need to ensure that the motors have a fine enough rotational resolution, or increments per full rotation, such that you do not drive your lead screws more than your desired precision per increment. Meaning, for a stepper motor step or a servo motor encoder, each step does not translate to more than ~0.0005″ (or desired precision) to your table when your lead screw turns. For example, a Sherline mill has a leadscrew with 20tpi and a full rotation will translate to a 1/20″ or 0.050″ table movement. A standard 200 step/rev stepper motor will move the mill table 0.00025″ per full step, which is about where we want it. Any higher step per revolution, the motor will have to driven faster to reach the same feed rate, which will also reduce the running torque.
  • Motor Controller – There are a ton of motor controllers available for all types of motors. The best ones all share one common trait: both the motors and controller hardware don’t get very hot, relatively. This means that they are efficient and don’t waste energy in the form of heat. I can only speak for stepper motor controllers, but the most common good stepper motor controllers for home CNCs are made by Allegro, who manufacturers high quality integrated circuits. RepRap, HobbyCNC, Sherline, Sparkfun, and Pololu all use Allegro ICs for most of their controllers, if not all. The reason being is that they are cheap, easy to integrate, and they recycle the energy already in the windings of the motor. When choosing a motor controller, ensure that the controller can handle the peak rated amperage of the motor chosen. And for stepper motors, take care in using the correct rated amperage for the type of wiring: unipolar, bi-polar parallel, or bi-polar series. Also, keep in mind that, at least with these Allegro ICs, micro-stepping causes a reduction of output torque to 70.7% of the maximum rated torque. This applies to both unipolar and bi-polar stepper motors. (Meaning unipolars are 70% of 70% of bipolars.) This is due to how micro-stepping must power coils at different levels to get intermediate steps and still provide a constant torque throughout each step.
  • Power Supply – Choosing the right power supply can be tricky by itself. Most good motor controllers recycle the energy in the motor and only need to replenish the energy loss from the work done. Also, in most cases, a CNC machine will only move one or two axes at a time, while the other(s) are held stationary. As a rule of thumb, the power supply should be able to supply peak amps for all of your motors and a voltage at the motor torque rating. But, you can get away with peak amps of just 2 of 3 motors and voltages slightly lower than the torque rating. Also, consider the type of power supplies: unregulated, regulated, switching, wall wort, etc. You have to ensure that power is constant and does not turn off, if there is no load, as in switching power supplies, uses decoupling capacitors, is star-grounded, and does not suffer from voltage dips, as in wall worts. PC ATX switching power supplies can provide great 12V, high amp  power, if you install a resistor to bypass the switching sensor. These are used in RepRaps and other DIY CNC machines with great success, but in larger CNC builds, the 12V is marginally enough. UPDATE: After building my CNC, Allegro-based bipolar stepper drivers (Pololu A4984/4988) are very efficient and do no draw much power from the power-supply due to energy recycling. These output less heat at the highest possible motor driver voltage. In my case, an ATX power supply would have not worked.
  • Motor Mass – This is something you won’t often read about in CNC builds, but is really important in a structural sense. Benchtop mills don’t have much mass, especially for the Sherline mills. But, when you add a large motor mass off the end of a mill table, this can cause a lot of problems, such as stiffness and resonance. For example, suppose you have a fly fishing rod, when you cast it, it’s pretty stiff and whips around like you want it. Suppose you tape a golfball or something heavy onto the tip of the rod and then try to cast it, it rod will flop around, bending much farther than you expect and could possibly break. This same structural principle works the same as on the mill table. The larger the mass hanging on the ends of the your mill, the more it will deflect and flop around. With this, the resonance of the mill with added mass can cause the mill to vibrate at certain motor speeds. These resonance vibrations can be so large that table will noticeably flex, which is not good for your part or the mill itself. The more mass, the lower the vibration frequency and larger the amplitudes. In other words, you will need to pick a motor and mounting setup that minimizes the mass you add to the mill to a reasonable degree. This means that by buying that ‘ToolTime’, har-har, awesomely huge, overkilll motor or even adding a belt driven pulleys with a typically large servo motor will probably give you more problems than solve. However, this is all based on how stiff your mill table is and what the mass of the CNC motor assemblies are in comparison to the mill. With a thick steel/cast-iron 120lb mill, this can still be a problem, especially if you go overboard, but with the aluminum 35lb Sherline mill, it definitely can be, as someone on the internet has already experienced at finding that magic sweet spot. With the handwheel he adds, the large coupler either damps the vibrations and/or lowered the resonance frequency from the desired running speed of the motor, but I guarantee you that he probably sees the vibration moved to a particular lower speed with that handwheel on.
  •  UPDATE: Motor Rotor Resonance: During my build, I had encountered motor rotor resonance,which I did not account for. This is the vibration of the motor rotor inside the motor’s casing. Stepper casings are overbuilt to help stiffen up everything to keep internal fundamental vibration frequency higher than what the steppers are intended to run at. When the steppers are stepping at that frequency, the steppers would begin to resonate and stall. With microstepping, the stepping frequencies are doubled for each higher step resolution. So, when I had tried 1/4 step or 1/8 step, the maximum speed was about half of what I could get from 1/2 or full step mode. Structural coupling can also change the fundamental vibration of the motors too, and this depends mainly on how stiff the motor mount and leadscrew couplers are. There are a few ways to fix this: Use the smallest/lowest mass stepper you can get away with, buy a quality stepper motor with a stiff casing, use larger step sizes (as I had to do), accept running at lower feedrates, to use a damper as the guy in the video had to, or stiffen the motor mounts up (This is a bad road to go down because, to stiffen, you’re having to add more mass.) Servo shouldn’t have this resonance problem because they are smooth running, but, again, their main drawbacks are they are heavy and expensive to control.

Later, I will go through the process of reverse engineering the Sherline CNC kit and how I ended up selecting the motors, controllers, power supply, etc.

Categories: CNC
  1. Euthad
    April 30, 2011 at 4:48 pm

    Goo page, keep it up.., Thanks

  2. Alden Hart
    July 22, 2011 at 3:56 pm

    Yes, great post. It’s interesting to note that the little Allegros (and most other choppers, like the TIs) like higher voltages and actually run cooler as the time taken in switching is minimized. So going from 12v to 24v or even 36v even for for small applications is a win.


  3. July 22, 2011 at 4:51 pm

    Interesting. I hadn’t considered how higher voltages effect motor driver efficiency, but that does make sense. I’ve started to play with the Pololu A4983 stepper drivers (Allegro IC) and been pleasantly surprised at how efficient they are. At 24V, the total current draw from the power supply is less than 1 amp, while all of my three motors (@ 1.5 amp/coil) are enabled. I will definitely have to try out using a higher voltage power supply. Thanks, Alden.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: