Alert.png

Notice: This page contains information for the legacy Phidget21 Library.

Phidget21 is out of support. Bugfixes may be considered on a case by case basis.

Phidget21 does not support VINT Phidgets, or new USB Phidgets released after 2020. We maintain a selection of legacy devices for sale that are supported in Phidget21.

We recommend that new projects be developed against the Phidget22 Library.


Click on the 2phidget22.jpg button in the menu bar to go to the Phidget22 version of this page.

Alert.png

Stepper Motor and Controller Primer

From Phidgets Legacy Support
Revision as of 16:33, 14 October 2011 by Mparadis (talk | contribs) (Created page with '==Introduction== Stepper motors are broadly available motors commonly used for positioning. The rotor of a stepper moves in a series of discrete steps. By energizing the coils …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

Stepper motors are broadly available motors commonly used for positioning. The rotor of a stepper moves in a series of discrete steps. By energizing the coils of the motor in sequence through many of these steps, the direction of rotation, number of rotations, and exact position of the motor shaft can be easily controlled. By controlling the time between the steps, the speed and acceleration of the stepper is regulated. In contrast, a DC motor is controlled by applying power, sending the motor blindly spinning at the highest speed possible.

Each stepper motor is designed to move by a certain angle with each discrete step. The simplest stepper motors will rotate 90 degrees per step. Standard industrial steppers will rotate 1.8 degrees per step. The stepping angle can be further reduced through use of a gearbox.

In addition to the ease of precisely controlling position and speed, Steppers have other advantages:

  • Most motors have very little torque when they are operating at low speed or standstill. Since a stepper’s rotor is held in place by a magnetic field during each step, steppers have full torque at low speed or standstill, making them very useful for low speed rotation and actuation. Additionally, a stepper motor can remain in a fixed position for long periods of time with the rated current in the windings, whereas with DC motors, stalling and remaining in a fixed position for long periods of time will cause motor burnout.
  • DC Motors have brushes with a finite lifetime. Steppers have no brushes, and are limited only by the life of the bearings.

Compared to DC Motors, there are disadvantages to Steppers:

  • Each step will produce vibration in the motor. If these vibrations are at the mechanical resonant frequency of the motor, they can cause the rotor to overshoot and bounce back and forth, resulting in a severe loss of torque. This phenomenon is called “ringing” and is often accompanied by a loud buzzing or grinding noise. To prevent the motor from operating in such a way, you should test the motor at various speeds in the physical application it is intended for, and try to avoid running the motor at a speed which exhibits ringing behaviour.
  • If the motor encounters a brief overload, the fixed coils on the stator and the free-spinning rotor can lose track of each other. If this happens at higher speeds, the motor will often stall. Even at lower speeds, your system will have lost track of where exactly the motor is positioned – unless there is an independent system (e.g., an optical encoder) tracking the position.
  • A Stepper motor cannot be loaded at its maximum torque, as it will almost certainly be overloaded during operation. A DC Motor will naturally adjust its speed depending on how much power is provided, and the torque required to turn it’s shaft.

Types of Stepper Motors

We find it useful to classify motors according to how the coils are wound (Bipolar / Unipolar), the internal magnetic construction (Permanent Magnet / Hybrid), and how the current in the coils is regulated (Chopper Drive / Resistive Limited).

Coils

Bipolar

These motors are manufactured with two coils of wire, resulting in one winding per phase. By alternating the power between coils, as well as the direction of the current, the motor is rotated. This configuration produces magnetic fields within the coils in either direction, hence the term “Bipolar.” The controller is more expensive because it has to be able to produce both positive and negative electrical currents, but the advantage is that the entire coil is being used, thus increasing torque capabilities at all speeds.

Unipolar

In a unipolar motor, the motor windings consist of two identical coils per phase, wound in opposite directions (each occupying half of the space a coil normally would in a bipolar stepper). As a result, the controller only needs to select which of the two coils to pass current through in order to change the magnetic polarity, and only a positive current is required to be generated. Due to this simplified control mechanism which uses only half of each coil, the torque of unipolar motors are usually much lower, but the overall cost of the system is much cheaper.

Magnets

Permanent Magnet

Permanent magnet motors are small, low torque, and inexpensive. They use a permanent magnet in the rotor that is attracted or repelled by magnetic field generated by the stator coils. Step angles are often 7.5 or 15 degrees, and the motors are usually unipolar.

Variable Reluctance

The rotor of a variable reluctance stepper is made of iron, and it therefore aligns with the magnetic field generated by the stator coils. Since it doesn’t use a permanent magnet, it doesn’t matter which direction the current flows as long as each coil is wound in the opposite direction as the coil across from it. Therefore, variable reluctance steppers are unipolar and are typically designed to have larger step angles of 15 or more degrees.

Hybrid

Hybrid Motors dominate the stepper motor world – they use a combination of characteristics from permanent magnet and variable reluctance steppers and have the best torque and speed, but are more expensive to produce. Step angles are typically 0.9 to 3.75 degrees, giving much better step resolution.

Drive

Chopper Drive

Chopper Drive is an electronic control technique which allows specific motors to produce more power, torque, speed, and be more efficient. Instead of relying on the resistance of the coil wiring, the inductance of the wiring is exploited by sophisticated control electronics as a short-term limitation of motor current. Motor Manufacturers don’t do a good job of distinguishing motors suitable for use with Chopper Drive electronics. The motors will often be large, square, with very low resistance.

Resistive Limited

Small, inexpensive steppers are designed to be built and controlled as cheaply as possible. To simplify the control electronics, the length and thickness of the wire in the coils is selected for a particular control voltage. This allows the coil itself to regulate the power available to the motor – provided the appropriate voltage is used, of course. We call this type of motor Resistive Limited.

Controlling the Stepper Motor

The following information has been derived from using the 3308 - “Bipolar-Hybrid-Chopper Drive” stepper motor connected to a 1063 - PhidgetStepper Bipolar 1-Motor controller.

Setting the Current Limit

The current limit is an important control property of stepper controllers. Since many stepper motors have a very low coil resistance, the current through the coils cannot “self-regulate” to a safe level on their own. They require the sophisticated control techniques of a Chopper Drive, which are used in the 1063 PhidgetStepper controller. As a result, the maximum current allowed should be explicitly set. There are many factors that influence what the current limit should be set to. These include, but are not limited to,the acceleration and speed of the stepper, the supply voltage, applied torque, motor inductance, and coil resistance. The process of choosing the current limit can be simplified by following some general rules of thumb. Below are a set of speed vs. current graphs for the 3308 stepper with various power supplies.


(graphs)


In the preceding graphs, the “actual speed” of the motor is the maximum speed attainable in a real world test done with no load on the motor, but at very high acceleration. The “max speed” shows the limitation on speed imposed by the inductance of the motor coils at a given supply voltage. Given that the 1063 controller is only able to run at a maximum speed of 2048 full steps per second, our graphs don’t show data at higher speeds.

When the current limit is set low and the acceleration is high, the motor will not be able to provide enough power to accelerate itself and the load it’s driving. The motor also has to overcome friction losses within the system, and do work on the load - for example, lifting a weight. By increasing the current limit, more current and power is made available to accelerate and maintain maximum speeds. This can be seen on any of the graphs in the initial steep ramp of the actual speed. As the current limit increases, the motor is able to achieve higher speeds.

In the case of this particular motor, the large inductance of the coils - great for producing lots of torque, quickly overwhelms a 12V power supply. To get higher speeds and more performance out of this motor, higher supply voltages are necessary. Compare the actual speed curve on the 12V graph to the 30V graph. At 30V, the motor is able to achieve a much higher speed. It’s important to remember that the actual speed was measured at very high accelerations - by lowering acceleration, higher velocities can be achieved. Of course, if your motor is doing a lot of work, you’ll need to supply enough current to produce the necessary torque, therefore limiting the maximum speed.

There is no point in setting the current limit to be greater than the motor’s rated current- the increased inductance will only further limit the motor speed. In this case, the 30V graph shows that it’s not feasible to operate this motor at maximum torque (1.7 Amps) at a speed greater than 1100 full steps per second. By reducing the current limit, greater speeds are possible, but less torque will be available. Most motors designed for Chopper Drive control can operate at much higher voltages, but Phidgets Inc. does not carry a controller that can provide these voltages at this time.

Setting the Acceleration

The acceleration of a stepper motor is an important consideration when driving a load. Setting the acceleration too high can result in the motor stalling, especially with a heavy load. Try to use low acceleration in high-torque applications.

Principle of Operation

Hybrid Bipolar Steppers

(picture)


This section of the primer will cover the general principle of operation for stepper motors. While this information is by no means necessary to use a stepper motor, those who are curious about their inner workings may read on.

The above image is a cross-sectional view of the inside of a hybrid bipolar stepper motor. As you can see, it has eight poles with six teeth each. This motor contains two coils- one wrapping the odd-numbered poles, and the other wrapping the even-numbered poles. The steel end-cap in the center of the image covers a cylindrical permanent magnet which surrounds the shaft.

If positive current is sent to the odd-numbered coil, poles 1 and 5 are magnetized as south, and poles 3 and 7 are magnetized as north. Assuming the permanent magnet in the center of the motor has its north pole facing toward us, this will result in the rotor turning so that the teeth line up with stator poles 1 and 5, as they are in the image. At the same time, poles 3 and 7 will become aligned on the opposite end of the motor, where the gear on the rotor is permanently offset by the width of one tooth and the permanent magnet has magnetized the rotor as south. The rotation of the motor is continued by sending negative current through the even-numbered phase, then negative current through the odd-numbered phase, then positive current through the even-numbered phase, and so on.

Hybrid Unipolar Steppers

The operation of a hybrid unipolar stepper is very similar to the bipolar stepper described above, except that each pole has two seperate coils wound in opposite directions. This results in four phases which only require positive current to operate. Rather than alternating the direction of current, the motor controller simply sends positive current to the appropriate half of the coil.

Stepping Modes

Full Stepping

This is the default mode of stepping for bipolar motors, where both phases of the motor are controlled by two square waves of current. One wave lags behind the other by 90 degrees, and the motion of the motor is locked to these waves. A full step is completed when the square waves advance by 90 degrees. Since both phases are always fully energized, full stepping provides the best torque.

Half Stepping

In this stepping mode, the controller alternates between having one phase energized and both phases energized. This results in the rotor pausing at half-steps in between the poles, effectively halving the step angle. However, since the current to each coil cannot be exactly balanced, the angle that the rotor comes to rest at between poles may not be exactly half the step angle. The downside to half stepping is that the motor will have less torque on the steps when only one phase is energized.

Mini/Micro-stepping

By controlling the the relative current of both phases, the rotor position can come to rest at various equally spaced sub-steps between the two phases. This is achieved by following the same procedure for Full Stepping, except that the current supplied more closely resembles a sine wave rather than a square wave. Some bipolar controllers are designed to micro-step at low speeds to allow for smooth rotation.

Selecting a Gearbox

Using a stepper motor with a gearbox can be a good solution in applications that need very low rotation speeds and/or lots of torque. Selecting a gearbox to attach to the stepper will result in increasing the output torque and decreasing the speed. Simply, the Gearbox Output Speed is: