components_IMG_4838.jpg

Stepper motors are DC motors that move in detached steps. They have multiple coils that are organized in groups chosen "phases". Past energizing each stage in sequence, the motor volition rotate, one pace at a fourth dimension.

With a computer controlled stepping you can reach very precise positioning and/or speed control. For this reason, stepper motors are the motor of option for many precision motion control applications.

Stepper motors come up in many dissimilar sizes and styles and electrical characteristics. This guide details what you lot need to know to selection the right motor for the job.

A 4-phase unipolar motor.

Animation from Wikimedia Commons

What are stepper motors skilful for?

  • Positioning – Since steppers move in precise repeatable steps, they excel in applications requiring precise positioning such as 3D printers, CNC, Camera platforms and X,Y Plotters. Some deejay drives likewise use stepper motors to position the read/write head.
  • Speed Command – Precise increments of motion likewise allow for excellent command of rotational speed for process automation and robotics.
  • Low Speed Torque - Normal DC motors don't have very much torque at low speeds. A Stepper motor has maximum torque at low speeds, then they are a good choice for applications requiring low speed with high precision.

components_IMG_4796_crop.jpg

What are their limitations?

  • Depression Efficiency – Unlike DC motors, stepper motor current consumption is independent of load. They describe the most current when they are doing no work at all. Because of this, they tend to run hot.
  • Express High Speed Torque - In general, stepper motors take less torque at high speeds than at low speeds. Some steppers are optimized for ameliorate high-speed performance, but they need to be paired with an appropriate commuter to achieve that performance.
  • No Feedback – Dissimilar servo motors, nigh steppers practice not accept integral feedback for position. Although great precision tin can be achieved running 'open up loop'. Limit switches or 'domicile' detectors are typically required for safe and/or to found a reference position.

There are a wide multifariousness of stepper types, some of which require very specialized drivers. For our purposes, nosotros volition focus on stepper motors that tin be driven with commonly available drivers. These are: Permanent Magnet or Hybrid steppers, either 2-phase bipolar, or 4-phase unipolar.

components_IMG_4810_crop.jpg

Motor Size

One of the kickoff things to consider is the work that the motor has to do. As you might look, larger motors are capable of delivering more power. Stepper motors come up in sizes ranging from smaller than a peanut to big NEMA 57 monsters.

Most motors have torque ratings. This is what you lot need to look at to determine if the motor has the strength to do what you want.

NEMA 17 is a common size used in 3D printers and smaller CNC mills. Smaller motors find applications in many robotic and animatronic applications. The larger NEMA frames are common in CNC machines and industrial applications.

The NEMA numbers define standard faceplate dimensions for mounting the motor. They do non define the other characteristics of a motor. Two different NEMA 17 motors may have entirely unlike electrical or mechanical specifications and are not necessarily interchangeable.

components_IMG_4799.jpg

Step Count

The next thing to consider is the positioning resolution y'all require. The number of steps per revolution ranges from 4 to 400. Commonly available step counts are 24, 48 and 200.

Resolution is often expressed every bit degrees per step. A 1.8° motor is the same as a 200 step/revolution motor.

The merchandise-off for high resolution is speed and torque. High stride count motors summit-out at lower RPMs than like size. And the higher step-rates needed to turn these motors results in lower torque than a similar size low-step-count motor at similar speeds.

components_IMG_4797.jpg

Gearing

Some other fashion to accomplish high positioning resolution is with gearing. A 32:1 gear-train applied to the output of an viii-steps/revolution motor volition upshot in a 256 stride motor.

A gear train volition also increment the torque of the motor. Some tiny geared steppers are capable of impressive torque. Merely the tradeoff of course is speed. Geared stepper motors are generally express to low RPM applications.

Backfire is another issue with geared motors.  When the motor reverses direction, it needs to take up any slack there may exist in the gear-railroad train.  This can impact positioning accuracy.

components_1253-01.jpg

Shaft Mode

Another affair to consider is how the motor will interface with the rest of the drive system. Motors are available with a number of shaft styles:

  • Round or "D" Shaft: These are available in a variety of standard diameters and there are many pulleys, gears and shaft couplers designed to fit. "D" shafts have i flattened side to help forestall slippage. These are desirable when high torques are involved.
  • Geared shaft: Some shafts have gear teeth milled right into them. These are typically designed to mate with modular gear trains.
  • Atomic number 82-Screw Shaft: Motors with lead-screw shafts are used to build linear actuators. Miniature versions of these can exist found as caput positioners in many disk drives.

components_IMG_4814.jpg

Wiring

There are many variations in stepper motor wiring. For our purposes, nosotros volition focus on steppers that tin exist driven with ordinarily available drivers. These are Permanent Magnet or Hybrid steppers wired every bit 2-phase bipolar, or 4-phase unipolar.

components_IMG_4837.jpg

Coils and Phases

A stepper motor may have whatsoever number of coils. Just these are continued in groups called "phases". All the coils in a phase are energized together.

components_winding_types_2.png

Unipolar vs. Bipolar

Unipolar drivers, always energize the phases in the same way. One lead, the "common" lead, will always exist negative. The other pb volition always be positive. Unipolar drivers can be implemented with uncomplicated transistor circuitry. The disadvantage is that there is less available torque because only one-half of the coils can be energized at a fourth dimension.

Bipolar drivers use H-bridge circuitry to actually reverse the current menses through the phases. By energizing the phases with alternating the polarity, all the coils can exist put to work turning the motor.

A two phase bipolar motor has two groups of coils. A 4 phase unipolar motor has iv. A 2-phase bipolar motor will take 4 wires - 2 for each stage. Some motors come with flexible wiring that allows y'all to run the motor as either bipolar or unipolar.

  • components_unipolar_5.png

5-Wire Motor

This fashion is common in smaller unipolar motors. All of the common coil wires are tied together internally and brought out every bit a 5th wire. This motor can only exist driven as a unipolar motor.

  • components_unipolar_6.png

6-Wire Motor

This motor only joins the common wires of ii paired phases. These 2 wires can exist joined to create a five-wire unipolar motor.

Or you just tin ignore them and treat it similar a bipolar motor!

  • components_unipolar_8.png

8-Wire Motor

The viii-wire unipolar is the most versatile motor of all. It tin be driven in several ways:

  • 4-stage unipolar - All the common wires are connected together - just like a 5-wire motor.
  • 2-phase serial bipolar - The phases are connected in serial - just similar a six-wire motor.
  • ii-phase parallel bipolar - The phases are continued in parallel. This results in half the resistance and inductance - only requires twice the current to bulldoze. The advantage of this wiring is higher torque and top speed.

components_IMG_4796_crop.jpg

Step in fourth dimension, pace in time
Come on, mateys, step in time
Step in time
Step in time, pace in time
Step in fourth dimension, step in fourth dimension
Never need a reason, never need a rhyme
We step in time, nosotros step in fourth dimension"Step In Time"
Robert B. Sherman and Richard M. Sherman

components_IMG_4805.jpg

Driving a stepper motor is a bit more than complicated than driving a regular brushed DC motor. Stepper motors crave a stepper controller to energize the phases in a timely sequence to make the motor plow.

components_IMG_4817_cropped.jpg

Elementary Unipolar Driver

The simplest type of commuter can be built with a scattering of transistors. These are simply switched on and off in sequence to energize the phases and step the motor. Unipolar drivers are relatively inexpensive to build, but but work with unipolar motors. At that place is an excellent tutorial on how to build 1 at the Arduino site.

components_H-Bridge.jpg

Simple Dual H-Bridge Driver

Driving a bipolar motor requires two full H-bridges so it can reverse the electric current to the phases. H-bridges can exist tricky to build from scratch. But there are plenty of H-bridge fries available to simplify the task.

The L293D is one of the virtually popular and economical fries. These tin be establish at the eye of about first-generation motor shields, including the incredibly popular V1 Adafruit Motor Shield.

At that place is an splendid tutorial on using a bare L293D with an Arduino in the Adafruit Learning System:

components_1438-00.jpg

Adafruit Motor Shield V2

The Adafruit Motor Shield V2 is a big step up from the bones L293D based controllers. The V2 shield uses two TB6612 MOSFET drivers. Compared to the L293D, the TB6612 offers twice the current capacity and much lower voltage drops to bulldoze your steppers more efficiently.

With 2 driver chips and 4 total H-bridges total, each shield can drive up to ii stepper motors. The driver chips are interfaced via a defended PWM driver chip with an I2C interface. This frees up lots of GPIO pins for other uses, and makes the shield stackable too. You can stack up to 32 of them to command 64 motors with only two IO pins!

Compete details of this driver can be plant in the Learning organisation.

components_IMG_4840_crop.jpg

Advanced CNC Controllers

The gShield and TinyG CNC controller boards take you lot one pace closer to industrial level stepper performance. These boards feature abiding-electric current "chopper" drivers that can be tuned to deliver maximum torque and speed from your motors.

The TinyG CNC features an on-lath G-lawmaking interpreter and iv motor outputs making this a complete embedded solution for a small to medium sized four-axis CNC auto.

As you might expect, these advanced, loftier-performance boards are more complex to piece of work with and are recommended for experienced users.
Details on these boards and their operation can exist found in the TinyG Wiki and the Synthetos Forums.

components_IMG_4842_crop.jpg

Now we come to the most important role: making sure that your motor and commuter are uniform.

Mismatched motors and drivers can result in disappointing operation. Or worse: damage to the motor and/or controller.

If you lot cull unwisely, you might meet this guy:

components_691-00.jpg

Know the Commuter Specifications

The 2 most important parameters in the driver specificatons are:

  • Voltage - The maximum voltage that the driver tin can supply to the motor.
  • Continuous Current - The maximum current that the driver tin can supply to the motor.

"Peak" current ratings are not applicable to stepper motors. Always go past the "continuous" current rating.

Know the Motor Specifications

You lot volition also need to know the electrical specifications for the motor. There are 2 critical parameters:

  • Amps per phase - This is the maximum current that the motor windings tin can handle without overheating.
  • Resistance per phase - This is the resistance of each phase.

A Voltage rating is often stated. Information technology is usually calculated from the two above - but not always. It is improve to calculate yourself from the in a higher place parameters using Ohm's Law.

components_Ohm.png

Obey the Law!

Stepper motor phases are inductors, so they will resist rapid changes in current catamenia. But at the cease of each stride or when not moving, they behave similar a purely resistive load and will bear co-ordinate to Ohm's Law.

Standing still is besides when a stepper motor draws the most current. So Ohm'south Law allows us to employ the motor specifications to calculate the current requirements of the driver.

Voltage = Electric current 10 Resistance

or

Current = Voltage / Resistance

These formulas should be strictly applied for all "abiding voltage" stepper controllers. This includes both V1 and V2 Motor Shields from Adafruit, and almost all other L293D based controllers.

But some motors take very low coil resistance. Strictly post-obit those formulas, the drive voltage volition be less than 5v and performance will not be good. This blazon of motor is not a good match for a abiding-voltage driver. These steppers require a more specialized controller.

Running Higher up the Law?

It is not possible to cheat Ohm'southward Law. If you try, y'all will have to answer to the Blueish Smoke Monster. However, in that location are some other laws at piece of work here. The expertise at the police firm of Lenz, Faraday and Ohm tin can help you to increase the operation of your motor.

The stepper coils create a magnetic field when they are energized. Co-ordinate to Faraday'southward Law, the irresolute magnetic field induces a current in the coil. And according to Lenz'due south Constabulary, that current will exist in the opposite management of the current creating the field. This reverse current is known as "Dorsum Electromotive Force" or "Back EMF".

This Back EMF increases the "impedance" or effective resistance of the ringlet. So Ohm'south Police still applies - but to this impedance, non to the simple phase resistance. This impedance limits the current period through the ringlet at the starting time of each step.

components_IMG_4840.jpg

Chopper Drives

A Chopper or "Constant Current" bulldoze compensates for the back EMF by driving the motor with a college voltage. It is not unusual to bulldoze stepper motors at several times their rated voltage using a chopper drive.

To keep things safe at these college voltages, the chopper drive also monitors the current being delivered to the motor and "chops" information technology before it exceeds a pre-set level.

Past starting at a higher voltage, the chopper drive is able to deliver more than electric current to the coils at the offset of the step, increasing the bachelor torque. In improver to adding torque at slower speeds, this besides allows for higher pinnacle-speeds.

Selecting a chopper driver and configuring it for a specific motor requires a good understanding of both the motor and the controller.

Will this motor work with my shield?

Yous need to know the motor specifications as well as the controller specification. Once y'all have that information, check the "Matching the Driver to the Stepper" page to come across if they are compatible.

It's a NEMA 17, so it should work, right?

NEMA frame-size standards only define the dimensions of the mounting faceplate. To figure out if information technology is compatible, you demand to know the electrical specifications of the motor.

What if there are no motor specifications?

See Jason on reverse engineering the stepper wire pinouts. That will tell you the stage resistance. For phase current, y'all tin can estimate based on motors of similar design and similar phase resistance.

When in doubt, information technology is always better to err on the safe side and apply a lower current!

What size motor practise I demand for my projection?

Nigh motors accept torque specifications - usually in inch/ounces or newton/centimeters. One inch/ounce ways that the motor tin can exert a strength of one ounce at one inch from the middle of the shaft. For example, it could hold upwardly one ounce using a two" diameter caster.

When calculating the torque required for your projection, be sure to allow extra torque required for dispatch and to overcome friction. It takes more torque to lift a mass from a dead terminate than it does to just hold it upward.

If your projection requires a lot of torque and not much speed, consider a geared stepper.

How do I connect my motor to the Motor Shield?

Will this power supply work with my motor?

Beginning make sure information technology does not exceed the voltage rating for the motor or the controller.* Yous can usually run a motor at a lower voltage, although you lot volition get less torque.

Next, check the electric current rating. Virtually stepping modes energize 2 phases at a time, so the current rating should be at least twice the current per stage for your motor.

* This applies to constant voltage drivers. For chopper drive controllers, check the instructions for your controller.

components_IMG_4810_crop.jpg

components_IMG_4838.jpg

This guide was first published on May 05, 2014. It was last updated on May 05, 2014.