+ All Categories
Home > Documents > All About Stepper Motors - Electrical Engineering …...What is a Stepper Motor? A 4-phase unipolar...

All About Stepper Motors - Electrical Engineering …...What is a Stepper Motor? A 4-phase unipolar...

Date post: 15-Mar-2020
Category:
Upload: others
View: 8 times
Download: 0 times
Share this document with a friend
28
All About Stepper Motors Created by Bill Earl Last updated on 2015-09-29 06:19:01 PM EDT
Transcript

All About Stepper MotorsCreated by Bill Earl

Last updated on 2015-09-29 06:19:01 PM EDT

234

66789

101112121313

1516171819212222232324

2628

Guide Contents

Guide ContentsWhat is a Stepper Motor?

A 4-phase unipolar motor.

Types of SteppersMotor SizeStep CountGearingShaft StyleWiringCoils and PhasesUnipolar vs. Bipolar

5-Wire Motor6-Wire Motor8-Wire Motor

Driving a StepperSimple Unipolar DriverSimple Dual H-Bridge DriverAdafruit Motor Shield V2Advanced CNC ControllersMatching the Driver to the StepperKnow the Driver SpecificationsKnow the Motor SpecificationsObey the Law!Running Above the Law?

Chopper Drives

FAQResources

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 2 of 28

What is a Stepper Motor?

Stepper motors are DC motors that move in discrete steps. They have multiple coils that areorganized in groups called "phases". By energizing each phase in sequence, the motor will rotate,one step at a time.

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

Stepper motors come in many different sizes and styles and electrical characteristics. This guidedetails what you need to know to pick the right motor for the job.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 3 of 28

A 4-phase unipolar motor.Animation from Wikimedia Commons

What are stepper motors good for?Positioning – Since steppers move in precise repeatable steps, they excel in applicationsrequiring precise positioning such as 3D printers, CNC, Camera platforms and X,YPlotters. Some disk drives also use stepper motors to position the read/write head.Speed Control – Precise increments of movement also allow for excellent control ofrotational speed for process automation and robotics.Low Speed Torque - Normal DC motors don't have very much torque at low speeds. AStepper motor has maximum torque at low speeds, so they are a good choice forapplications requiring low speed with high precision.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 4 of 28

� What are their limitations?

Low Efficiency – Unlike DC motors, stepper motor current consumption is independent ofload. They draw the most current when they are doing no work at all. Because of this, theytend to run hot.Limited High Speed Torque - In general, stepper motors have less torque at highspeeds than at low speeds. Some steppers are optimized for better high-speedperformance, but they need to be paired with an appropriate driver to achieve thatperformance.No Feedback – Unlike servo motors, most steppers do not have integral feedback forposition. Although great precision can be achieved running ‘open loop’. Limit switches or‘home’ detectors are typically required for safety and/or to establish a reference position.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 5 of 28

Types of SteppersThere are a wide variety of stepper types, some of which require very specialized drivers. For ourpurposes, we will focus on stepper motors that can be driven with commonly available drivers.These are: Permanent Magnet or Hybrid steppers, either 2-phase bipolar, or 4-phase unipolar.

Motor SizeOne of the first things to consider is the work that the motor has to do. As you might expect, largermotors are capable of delivering more power. Stepper motors come in sizes ranging from smallerthan a peanut to big NEMA 57 monsters.

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

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

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

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 6 of 28

Step CountThe next thing to consider is the positioning resolution you require. The number of steps perrevolution ranges from 4 to 400. Commonly available step counts are 24, 48 and 200.

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

The trade-off for high resolution is speed and torque. High step count motors top-out at lower RPMsthan similar size. And the higher step-rates needed to turn these motors results in lower torque thana similar size low-step-count motor at similar speeds.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 7 of 28

GearingAnother way to achieve high positioning resolution is with gearing. A 32:1 gear-train applied to theoutput of an 8-steps/revolution motor will result in a 512 step motor.

A gear train will also increase the torque of the motor. Some tiny geared steppers are capable ofimpressive torque. But the tradeoff of course is speed. Geared stepper motors are generally limitedto low RPM applications.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 8 of 28

Shaft StyleAnother thing to consider is how the motor will interface with the rest of the drive system. Motors areavailable with a number of shaft styles:

Round or "D" Shaft: These are available in a variety of standard diameters and there aremany pulleys, gears and shaft couplers designed to fit. "D" shafts have one flattened side tohelp prevent slippage. These are desirable when high torques are involved.Geared shaft: Some shafts have gear teeth milled right into them. These are typicallydesigned to mate with modular gear trains.Lead-Screw Shaft: Motors with lead-screw shafts are used to build linear actuators.Miniature versions of these can be found as head positioners in many disk drives.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 9 of 28

Wiring

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 10 of 28

There are many variations in stepper motor wiring. For our purposes, we will focus on steppers thatcan be driven with commonly available drivers. These are Permanent Magnet or Hybrid stepperswired as 2-phase bipolar, or 4-phase unipolar.

Coils and PhasesA stepper motor may have any number of coils. But these are connected in groups called "phases".All the coils in a phase are energized together.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 11 of 28

Unipolar vs. BipolarUnipolar drivers, always energize the phases in the same way. One lead, the "common" lead, willalways be negative. The other lead will always be positive. Unipolar drivers can be implementedwith simple transistor circuitry. The disadvantage is that there is less available torque because onlyhalf of the coils can be energized at a time.

Bipolar drivers use H-bridge circuitry to actually reverse the current flow through the phases. Byenergizing the phases with alternating the polarity, all the coils can be put to work turning the motor.

A two phase bipolar motor has 2 groups of coils. A 4 phase unipolar motor has 4. A 2-phase bipolarmotor will have 4 wires - 2 for each phase. Some motors come with flexible wiring that allows you torun the motor as either bipolar or unipolar.

5-Wire MotorThis style is common in smaller unipolar motors. Allof the common coil wires are tied togetherinternally abd brought out as a 5th wire. This motorcan only be driven as a unipolar motor.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 12 of 28

6-Wire MotorThis motor only joins the common wires of 2 pairedphases. These two wires can be joined to create a5-wire unipolar motor.

Or you just can ignore them and treat it like abipolar motor!

8-Wire MotorThe 8-wire unipolar is the most versatile motor ofall. It can be driven in several ways:

4-phase unipolar - All the common wiresare connected together - just like a 5-wiremotor.2-phase series bipolar - The phases areconnected in series - just like a 6-wire motor.2-phase parallel bipolar - The phases areconnected in parallel. This results in half theresistance and inductance - but requirestwice the current to drive. The advantage ofthis wiring is higher torque and top speed.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 13 of 28

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 14 of 28

Driving a StepperStep in time, step in timeCome on, mateys, step in timeStep in timeStep in time, step in timeStep in time, step in timeNever need a reason, never need a rhymeWe step in time, we step in time

"Step In Time"Robert B. Sherman and Richard M. Sherman

Driving a stepper motor is a bit more complicated than driving a regular brushed DC motor. Steppermotors require a stepper controller to energize the phases in a timely sequence to make the motorturn.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 15 of 28

Simple Unipolar DriverThe simplest type of driver can be built with a handful of transistors. These are simply switched onand off in sequence to energize the phases and step the motor. Unipolar drivers are relativelyinexpensive to build, but only work with unipolar motors. There is an excellent tutorial on how tobuild one at the Arduino site.

Unipolar Stepper Drive Tutorial

http://adafru.it/doa

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 16 of 28

Simple Dual H-Bridge DriverDriving a bipolar motor requires 2 full H-bridges so it can reverse the current to the phases. H-bridges can be tricky to build from scratch. But there are plenty of H-bridge chips available tosimplify the task.

The L293D is one of the most popular and economical chips. These can be found at the heart ofmost first-generation motor shields, including the incredibly popular V1 Adafruit Motor Shield.

There is an excellent tutorial on using a bare L293D with an Arduino in the Adafruit LearningSystem:

Lesson 16 - Stepper Motors

http://adafru.it/dob

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 17 of 28

Adafruit Motor Shield V2The Adafruit Motor Shield V2 is a big step up from the basic L293D based controllers. The V2 shielduses two TB6612 MOSFET drivers. Compared to the L293D, the TB6612 offers twice the currentcapacity and much lower voltage drops to drive your steppers more efficiently.

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

Compete details of this driver can be found in the Learning system.

Adafruit Motor Shield V2 Guide

http://adafru.it/doc

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 18 of 28

Advanced CNC ControllersThe gShield and TinyG CNC controller boards take you one step closer to industrial level stepperperformance. These boards feature constant-current "chopper" drivers that can be tuned to delivermaximum torque and speed from your motors.

The TinyG CNC features an on-board G-code interpreter and 4 motor outputs making this acomplete embedded solution for a small to medium sized 4-axis CNC machine.

As you might expect, these advanced, high-performance boards are more complex to work with andare recommended for experienced users. Details on these boards and their operation can be found in the TinyG Wiki and the SynthetosForums.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 19 of 28

Synthetos Forums

http://adafru.it/dod

Tiny G Wiki

http://adafru.it/doe

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 20 of 28

Matching the Driver to the Stepper

Now we come to the most important part: making sure that your motor and driver are compatible.

Mismatched motors and drivers can result in disappointing performance. Or worse: damage to themotor and/or controller.

If you choose unwisely, you might meet this guy:

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 21 of 28

Know the Driver SpecificationsThe two most important parameters in the driver specificatons are:

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

Know the Motor SpecificationsYou will also need to know the electrical specifications for the motor. There are 2 criticalparameters:

Amps per phase - This is the maximum current that the motor windings can handle withoutoverheating.Resistance per phase - This is the resistance of each phase.

A Voltage rating is often stated. It is usually calculated from the two above - but not always. It is

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

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 22 of 28

better to calculate yourself from the above parameters using Ohm's Law.

Obey the Law!Stepper motor phases are inductors, so they will resist rapid changes in current flow. But at the endof each step or when not moving, they behave like a purely resistive load and will behave accordingto Ohm's Law (http://adafru.it/ikA).

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

Voltage = Current x Resistance

or

Current = Voltage / Resistance

But some motors have very low coil resistance. Strictly following those formulas, the drive voltagewill be less than 5v and performance will not be good. This type of motor is not a good match for aconstant-voltage driver. These steppers require a more specialized controller.

Running Above the Law?It is not possible to cheat Ohm's Law. If you try, you will have to answer to the Blue Smoke Monster.However, there are some other laws at work here. The expertise at the law firm of Lenz, Faradayand Ohm can help you to increase the performance of your motor.

The stepper coils create a magnetic field when they are energized. According to Faraday'sLaw (http://adafru.it/ikB), the changing magnetic field induces a current in the coil. And according to

These formulas should be strictly applied for all "constant voltage" stepper controllers. Thisincludes both V1 and V2 Motor Shields from Adafruit, and virtually all other L293D basedcontrollers.

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 23 of 28

Lenz's Law (http://adafru.it/ikC), that current will be in the reverse direction of the current creatingthe field. This reverse current is known as "Back Electromotive Force" or "Back EMF".

This Back EMF increases the "impedance" or effective resistance of the coil. So Ohm'sLaw (http://adafru.it/ikD) still applies - but to this impedance, not to the simple phase resistance.This impedance limits the current flow through the coil at the beginning of each step.

Chopper DrivesA Chopper or "Constant Current" drive compensates for the back EMF by driving the motor with ahigher voltage. It is not unusual to drive stepper motors at several times their rated voltage using achopper drive.

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

By starting at a higher voltage, the chopper drive is able to deliver more current to the coils at thestart of the step, increasing the available torque. In addition to adding torque at slower speeds, thisalso allows for higher top-speeds.

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

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 24 of 28

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 25 of 28

FAQWill this motor work with my shield?

You need to know the motor specifications as well as the controller specification. Once you havethat information, check the "Matching the Driver to the Stepper" page to see if they arecompatible.

It's a NEMA 17, so it should work, right?NEMA frame-size standards only define the dimensions of the mounting faceplate. To figure outif it is compatible, you need to know the electrical specifications of the motor.

What if there are no motor specifications?See Jason on reverse engineering the stepper wire pinouts (http://adafru.it/aOI). That will tell youthe phase resistance. For phase current, you can estimate based on motors of similar designand similar phase resistance.

When in doubt, it is always better to err on the safe side and use a lower current!

What size motor do I need for my project?Most motors have torque (http://adafru.it/doj) specifications - usually in inch/ounces ornewton/centimeters. One inch/ounce means that the motor can exert a force of one ounce atone inch from the center of the shaft. For example, it could hold up one ounce using a 2"diameter pulley.

When calculating the torque required for your project, be sure to allow extra torque required foracceleration (http://adafru.it/dok) and to overcome friction. It takes more torque to lift a massfrom a dead stop than it does to simply hold it up.

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

How do I connect my motor to the Motor Shield?For motors purchased from Adafruit, there are wiring instructions listed in the productdescriptions.

For other motors, check the motors spec sheet if available.

If you don't have a spec sheet, check Jason on reverse engineering the stepper wirepinouts (http://adafru.it/aOI).

Will this power supply work with my motor?First make sure it does not exceed the voltage rating for the motor or the controller.* You canusually run a motor at a lower voltage, although you will get less torque.

Next, check the current rating. Most stepping modes energize two phases at a time, so the

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 26 of 28

current rating should be at least twice the current per phase for your motor.

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

© Adafruit Industries https://learn.adafruit.com/all-about-stepper-motors Page 27 of 28

ResourcesThere is a lot of excellent information on the web about stepper motors. Here are some of ourfavorite links:

Wikipedia (http://adafru.it/aOF)Stepper Motor Page (http://adafru.it/aOF)RepRap Stepper Motor Page (http://adafru.it/dol)Jones on Stepper Motors (http://adafru.it/aOH)Jason on reverse engineering the stepper wire pinouts (http://adafru.it/aOI)

© Adafruit Industries Last Updated: 2015-09-29 06:19:01 PM EDT Page 28 of 28


Recommended