From collectibles to cars, buy and sell all kinds of items on eBayWelcome! Sign in or register.
aAdvanced Search

Reviews & Guides

Write a guide

Stepper Motor Testing and Implimentation

by: signtorch( 2070Feedback score is 1000 to 4,999) Top 1000 Reviewer
95 out of 101 people found this guide helpful.
Guide viewed: 12253 times Tags: CNC | stepper | motor | controller | CAM


This guide is a summary of how stepper motors work, how they are wired, how they are controlled, and how to test them.  It is meant as an overview and confidence builder to encourage a hobbyist or entrapeneur to embrace (or at least consider)basic motion control, since it is so easily attainable and readily available right here on eBay.  Anyone can do iT on eBay.

A stepper motor is a special type of DC motor that does not rotate continuously like a regular DC motor. It is made to turn a certain fraction of a turn at a time.  In other words, it steps from one position to the next.  By applying power in a certain sequence, a stepper can be made to step forward or backward, one step at a time.

Typical stepper motors have 200 steps per revolution.  So, each step is exactly 1/200th of a revolution, or 1.8 degrees.  When coupled to a drive mechanism, it is trivial to calculate the exact position of a driven member based on the number of steps taken.

A stepper motor and the driven member is called an axis.  Any number of axii can be assembled to form a multi-axis CNC machine.  CNC control software is used to calculate then send the correct number of step and direction signals to each axis for precise motion control.

Each stepper motor requires a stepper motor controller to accept the step and direction signal and emit the appropriate stepper motor power sequence to move the motor to the next step.  The controller must be matched with a compatible stepper motor based on the following criteria.

Stepper motors can have 2 or more phases.  2 phase is standard.  5 phase is common.  The phase count simply designates the number of coils wound inside the motor.  Polyphase (more than 2 phase) systems are more complex with more wires and more stringent controller compatibility issues.  This guide covers 2 phase wiring.  5 phase is for x-spurts : )

Stepper motors can be manufactured with either bipolar or unipolar coil configuration.  Unipolar means that each coil (each phase) is divided in two and one or two extra wires per phase are present and connected to the center of the coil.  Bipolar just means there is 2 undivided coils with only 2 wires present for each phase.  So a 2 phase bipolar motor has 4 wires (2 coils).  An equivalent unipolar motor will have the same 4 wires plus 2 or 4 additional wires coming from the coil center.

Most unipolar motors can function as bipolar, but a bipolar motor cannot function as a unipolar because it lacks the additional  wires.  This is relevant because if a unipolar controller is used then a unipolar motor is required.  Whereas a bipolar controller can drive both bipolar and unipolar motors.

Unipolar drives can be more efficient at lower cost in high speed low power and/or noise sensitive applications.  Bipolar drives deliver more torque and holding power for heavier duty applications.  For basic hobby CNC, bipolar is better than unipolar because it has more power and involves fewer wires.

Selecting a stepper motor and a compatible controller is not very  difficult.  Connecting the two together requires knowing which wires go to which phase (coil)inside the motor.  Most motors have no markings or instructions to indicate which is which.  An ohmeter can be used to identify each pair of wires to each coil and the center tap wires of a unipolar motor as follows.

If the motor has 4 wires, it is a bipolar motor, and we just look for continuity between any two wires indicating a pair, and the other two should have equal continuity in the other pair.  There should be no continuity between the two pairs or between either pair and the motor case.  If there is any cross continuity, or any loss of continuity within either pair, the motor may be faulty.

The word continuity is used to mean that the wires are actually connected in a continuous coil.  The coil will have some low resistance value of a few ohms, so we measure continuity in ohms with an ohm meter.  An ordinary continuity tester may or may not indicate continuity depending on the resistance of the coil.  A value of 2 or 3 ohms or so does indicate coil continuity.

The coil resistance can range from a fraction of an ohm to several hundred ohms depending on the nature of the motor.  More powerful motors have less coil resistance which just draws more amps from the power source.

Now, if we have a six wire unipolar motor we will find continuity between two sets of three wires.  Within each set of three wires, the center tap wire will have half as much resistance with the other two wires as the other two wires have between them.  So the two wires with the most resistance between them are the ends of the coil wires and the other wire will be the center tap.

With an eight wire unipolar motor it is only possible to identify 4 pairs of wire (coils) and which pairs belong to which phase is ambiguous.  The only way to tell is by trial and error by whether the motor runs correctly or not.  Take any 2 pairs, connect one wire from each pair together and that forms the center tap, then the other two wires leftover bwcime the main wires for that phase.  Then do that with the other two pairs to form the other phase and try it.  If the motor doesn't run right, just swap one pair of wires between phases and it should then be correct.

You see, with eight wires, there are 4 coils which must be combined into 2 coils to be 2 phase.  Two wires (from 2 coils) connected together just forms one larger coil and the 2 connected wires form a center tap.  The center tap is only utilized in unipolar drive controllers.  Bipolar drives do not utilize the center tap wires, but in the case of an 8 wire motor, the center tap wires must be connected in pairs to form 2 coils total. Now, there are some 4 phase drives that connect right to 8 wire motors, but this guide is about 2 phase in general.

An 8 wire motor is apt to run no matter which wires are used where, but it will not meet its specifications except with particular wire connection combinations.

 A bipolar controller will only have 4 connectors for 4 wires.  A unipolar controller will have 5 or 6 connectors for 2 sets of 3 wires with one wire in each set being the center tap, and the 2 center taps possibly may be 1 wire and/or may be connected to a single terminal on the controller. 

Technically, a unipolar driver grounds the center taps and switches positive voltage to one end or the other of the driven coil. A bipolar drive switches both positive and negative voltage at both ends of the driven coil simultaneously. So a bipolar drive energizes the whole coil while the unipolar drive only energizes one half of the coil at a time.  Bipolar drive electronics are more complicated and robust than unipolar, so they usually cost more.

To reverse the direction of a stepper motor just reverse the two main phase wires of one phase pair.  Reversing both pairs has no effect.

It really is trivial to hook up a bipolar stepper motor and controller because it is hard to mess up and unlikely to fry if misconnected (briefly).  Unipolar controllers are more polarity sensitive and the extra wires yield more possible combinations with more potential for elctrical damage from certain incorrect combinations.

For testing unipolar motors you can just ignore the center tap wire(s). To test a stepper motor without a controller you can apply power directly to one wire pair and the motor should lock into a position and hold in that position.  Simultaneously apply power to the other wire pair and the motor should advance one half step to the next full step position and it should hold in position with even more holding power.  Next, disconnect the first pair and the motor should advance on more half step.  Then reconnect the first pair with opposite polarity and the motor should advance one more half step.  Keep disconnecting and reversing polarity on alternating pairs and the motor will take a half step each time in one direction.  Reverse the sequence and the motor reverses.

The prior paragraph illustrates how a stepper motor controller works by sequencing the power applied to the motor.  Except, a full step controller reverses the polarity on each coil instantly, so the motor takes a full step.  A half step controller operates as described.  It disconnects one coil to make a half step.  Then it reconnects with opposite polarity to make another half step.  Since one coil is off half the time, a half step controller is not as powerful as a full step controller.

Some controllers are called microstepping controllers.  Rather than reversing the polarity instantly, a microstepping controller varies the voltage on one coil down then back up with opposite polarity in a set number of microsteps.  Microstepping controllers are less powerful than even half step controllers because they hold in positions in between steps where one phase is pushing it forward while the other phase is pulling it back so neither phase transfers full torque to the load during mid-phase microsteps.  But microstepping does provide higher machine resolution for much higher positional accuracy.  Microstepping controllers are usually bipolar and can usually function as half or full step drivers to, so they are usually the best choice.

To test a controller, you can only measure the voltage on the phase power output terminals.  With each step signal, the voltage should change on any partial step, and the polarity should reverse on each full step.  NEVER hook an oscilloscope to a motor controller unless you really know what you're doing.  Most scopes are not isolated from earth ground and most bi-directional motor drive circuits don't like being shorted to ground.  At higher voltages, be sure to enjoy the fireworks because your controller will be deep fried with a crispy crust.

Speaking of voltage, for top performance, you want a controller with current limiting so you can overpower the motor with higher than rated voltage and the controller will control the current to keep from burning up the motor.  The higher voltage enables higher speeds and smoother operation, especially when microstepping.  A typical 5 volt motor can be ran at 24 volts with minimal effect, especially as long as the amperage is held to a minimum.  To be sure, some degradation of the motor's magnetic characteristics will occur over time but most good motors can handle that.  Heat build-up is the deciding factor.  Once a motor gets too hot, that's when it breaks down.  Amperage controls heat.  Voltage controls speed.  You can adjust both over a wide range.  Externally cooling a motor is pointless.  The heat occurs deep in the coil where it eventually melts the insulation off of the wire which causes it to short which causes it to draw even more amps which causes even more heat and more insulation loss which quickly destroys the motor.  High heat (from too high amperage) can also demagnetize a motor which quickly destroys the motor.

For typical hobby cnc applications, a small 5 or 6 volt motor rated at 4 or 5 amps, ran at 24 volts at around 2.5 amps will produce an amazingly powerful little motorized positioner.   They can usually be geared down dramatically and still maintain adequate top speed, while gaining precision and power. Synchronous timing belts are usually the most economical drive method and they perform well.

The construction of a stepper motor not to mention the function is unique.

A normal dc motor has one coil inside (1 phase) and two wires.  Each wire is each end of a wound coil.  Applying power to both wires causes the dc motor to spin.  Reversing the polarity causes the motor to spin in reverse.

A standard stepper motor has 2 coils alternatingly interdigitated to form a set number of poles around the inner perimeter of the motor housing, or stator.  In that sense, it is equivalent to having two normal dc motors in one can.  The motor shaft, or rotor, has a number of magnetic teeth with alternating magnetic polarization positioned around its outer perimeter closely fitted inside the stator.  When one coil is powered on, every other tooth on the rotor is attracted to that coils poles, and the other teeth are repelled by that coils poles, so the rotor aligns with that coil within the stator in a specific position.  When two coils are powered on, all teeth are either attracted or repelled by both coil's poles such that the rotor assumes a specific position within the stator.  Sequencing the power polarity on the coils causes the rotor to sequentially rotate (step) to a new position between the two coils based on the two magnetic polarities of the teeth on the rotor and the electrical polarity of the coils in the stator.  The two coils can assume 4 polarity combinations so one pole on each of 2 coils defines 4 possible step positions.  Therfore a 200 step per revolution motor has 50 poles on the stator and 50 poles on the rotor with 4 possible positions between each rotor tooth and each stator pole.  Reversing the polarity on one coil at a time ensures that the rotor takes one step at a time.  If polarity was reversed on both coils simultaneously, the motor would take two steps, and the direction could not be controlled.

It's very simple to piece together a stepper motor control system at modest cost.  No other motor type or control system type is so easily attainable for CNC eccentric motion control.  The possibilities are endless as to what can be done with a simple stepper motor drive system under computer control.   The technology is scalable, so it works on everything from nano-scale microchip fabrication to monstrocious metal working machinery.  As a hobby, it is just fascinating to contemplate what to build next to take advantage of this marvelous technology.  Driving the stepper motor is the easy part though.  Taking advantage of it is the real challenge.


Guide ID: 10000000001227707Guide created: 06/22/06 (updated 10/11/08)

 
Was this guide helpful? Report this guide

Ready to share your knowledge with others? Write a guide



Member Information

signtorch
signtorch( 2070Feedback score is 1000 to 4,999) Member is a PowerSellerAbout Me
See all guides by this member
View items for sale by this memberVisit this seller's eBay Store!
Member has an eBay Storeplasma-graphics

 


eBay Pulse | eBay Reviews | eBay Stores | Half.com | Reseller Marketplace | Austria | France | Germany | Italy | Spain | United Kingdom | Popular Searches
Kijiji | PayPal | ProStores | Apartments for Rent | Shopping.com | Skype | Tickets


About eBay | Announcements | Security Center | eBay Toolbar | Policies | Government Relations | Site Map | Help
Copyright © 1995-2008 eBay Inc. All Rights Reserved. Designated trademarks and brands are the property of their respective owners. Use of this Web site constitutes acceptance of the eBay User Agreement and Privacy Policy.
eBay official time