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
3302.jpg 1063.jpg


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. We do not recommend using a bipolar controller to run a unipolar motor, even though it is theoretically possible.

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. The simplicity of the unipolar controller also means that you cannot use it to run a bipolar stepper motor.

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.

How it Works

Cross-Section of a Hybrid Bipolar Stepper

Hybrid Bipolar Steppers

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 thumbnail to the left 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.

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.


Graph12v.jpg

Graph24v.jpg

Graph30v.jpg


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.

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:



Although the reduction ratio plays a large part in determining the Gearbox Output Torque, there is also an inefficiency that is introduced through the use of a gearbox. Some of the torque of the motor is internally converted into heat and lost. So to calculate the Gearbox Output Torque:



When choosing a stepper motor with a gearbox, keep in mind that the gearbox is rated to sustain a specific amount of torque, beyond which the gearbox could become damaged. This limit is often much lower than the amount of torque specified by the above equation.

The Gearbox Step Angle can be determined by:


Product Comparison Tables

Stepper Motor Product Specifications
Phidgets Product # Motor Model Number Motor Type (Unipolar/Bipolar) Step Angle (deg) Holding Torque (g•cm) Low-Speed Torque (g•cm) Rated Current (A) Number of Leads Mounting Plate Size Shaft Diameter (mm) Total Weight (g) Motor Length (mm) Motor Size/Diameter (mm) Max Speed* (RPM)
3300 28BYGH102 Hybrid Bipolar 1.8 600 ??? 0.67 4 NEMA-11 5 107 32 28 x 28 600
3301 35BYG304 Hybrid Bipolar 1.8 1250 1090 1 4 NEMA-14 5 130 27 35 x 35 600
3302 42BYGHM810 Hybrid Bipolar 0.9 4800 4280 2.4 4 NEMA-17 5 362 48 42 x 42 ???
3303 42BYGHW811 Hybrid Bipolar 1.8 4800 4240 2.5 4 NEMA-17 5 332 48 42 x 42 ???
3304 39BYGS202 Hybrid Bipolar 3.75 750 590 1 4 NEMA-17 5 171 32 39 x 39 1250
3305 39BYG013 Hybrid Bipolar 1.8 550 450 0.4 4 NEMA-17 5 110 20 39 x 39 600
3306 57BYGH013 Hybrid Bipolar 1.8 4000 3580 1.5 4 NEMA-23 6.35 424 41 56 x 56 600
3307 57BYG621 Hybrid Bipolar 1.8 12500 11060 2.2 4 NEMA-23 6.35 916 76 56 x 56 600
3308 57BYGHM201 Hybrid Bipolar 0.9 9000 8480 1.7 4 NEMA-23 6.35 580 50 56 x 56 260
3314 PM42L-048-17 Hybrid Unipolar 7.5 950 710 0.28 6 N/A 3 138 14.4 42 ???
3315 PM25S-048-15 Hybrid Unipolar 7.5 140 50 0.1 6 N/A 2 31 15 25 ???
3316 PM20L-20-14 Hybrid Unipolar 18 50 30 0.08 6 N/A 1.5 24 16.5 20 ???



Gearbox Stepper Motor Product Specifications
Product # Motor Model # Motor Type Step Angle (deg) Holding Torque*, (g-cm) Low-speed Torque*, (g-cm) Rated Current (A) # of Leads Mounting Plate Size Shaft Diameter (mm) Total Weight (g) Motor Length (mm) Gearbox Length (mm) Motor Size/Diameter (mm) Gear Ratio Gearbox Max Torque (g-cm) Gearbox Efficiency Max Speed (RPM)
3310 57BYG630-07AG20 Hybrid Bipolar 0.09 30000 30000 2.8 4 NEMA-23 8 1330 73 38 56x56 20:1 30000 30
3311 42BYGHW811-AG5.18 Hybrid Bipolar 0.35 24860 17790 2.5 4 NEMA-17 8 513 48 31 42x42 5.18:1 30000 0.9 115
3312 42BYGHW811-AG26.8 Hybrid Bipolar 0.07 40000 40000 2.5 4 NEMA-17 8 526 48 39 42x42 26.8:1 40000 0.81 22
3313 42BYGHW811-AG99.5 Hybrid Bipolar 0.02 50000 50000 2.5 4 NEMA-17 8 610 48 47 42x42 99.5:1 50000 0.73 6
3317 42BYGH40(M)-160-4A Hybrid Bipolar 0.35 16780 12000 1.6 4 NEMA-17 8 464 40 30 42x42 5.18:1 20000 0.9 115
3318 42BYGH40(M)-160-4A Hybrid Bipolar 0.07 30000 30000 1.6 4 NEMA-17 8 464 40 38 42x42 26.8:1 30000 0.8 22
3319 42BYGH40(M)-160-4A Hybrid Bipolar 0.02 40000 40000 1.6 4 NEMA-17 8 464 40 46 42x42 99.5:1 40000 0.7 6

Step angle, torque values, and max speed are all measured at the output of the gearbox.

*Holding torque and low speed torque for gearbox motors are limited by the max torque that the gearbox is rated to sustain. *

Glossary of Terms

Motor Terms

Coil Resistance

The electrical resistance (to direct current) of the wiring within the motor. This resistance causes some of the energy being applied to the motor to be converted into heat. Some motors and motor controllers rely solely on the electrical resistance to regulate the current flowing through the motor. The Unipolar Motors we sell, and the 1062 PhidgetStepper Unipolar rely on this inexpensive, but inefficient technique. Other motors will have very low resistance, increasing their efficiency, but requiring very sophisticated control techniques because the resistance cannot regulate the current to a safe level on its own. The 1063 PhidgetStepper Bipolar controller and our Bipolar motors use this technique, otherwise known as Chopper Drive.

Holding Torque

Holding Torque is the amount of torque needed to rotate the shaft of the stepper motor while the controller attempts to hold the position, using the maximum current allowed for the motor. Holding Torque is the sum of the magnetic force exerted by the electrical coils to hold the current position, and the detent torque, which is the natural resistance of the motor against rotation due to the permanent magnet inside the motor. Once the motor begins to rotate, the torque it can exert (at least at low speeds) is Holding Torque minus twice the detent torque (because the motor is now working against the detent). As the motor speed increases, torque begins to decrease. If the power supply voltage is low, or the inductance of the motor is high, the torque will fall more rapidly.

Motor Inductance

Stepper motors are built with a specific coil inductance. A high inductance motor will provide a greater amount of torque at low speeds, at the cost of having lower torque at high speeds.

Overhung Load (OHL)

An external load applied on the output shaft of the gearbox. This load is often produced if pulleys are mounted directly on the shaft, pulling perpendicular to it. When the OHL exceeds a safe value, the bearings can fail, or the shaft can break from bending fatigue. While OHL and Thrust Load specifications are only available for our gearbox motors, both types of load should be avoided when using any of our motors.

Rated Current

The rated current is the maximum current that should be applied to each coil of the motor. Current generates heat within the motor, and exceeding the regulated current will cause the motor to overheat. If the motor is operated in a hot environment, or is enclosed, it can overheat at currents lower than the rated current.

Step Angle

The change in the shaft angle when the motor moves forward or backward by one full step.

Step Accuracy

Depending on the motor and how it is loaded down, the step positions will vary slightly. Fortunately, this variance doesn’t accumulate – so if you move the motor by one step or one million steps, the angle that the motor stops at will have the same margin of error.

Thrust load

A load applied directly in line with the output shaft of the gearbox. Avoid thrust as much as possible. If thrust load is unavoidable, keep it to no more than the permissible value.

Gearbox Terms

Gear Ratio

The gearbox accepts the power (think of power as a torque that rotates) from the motor, reducing the speed (exactly) by a given ratio, while increasing the torque (roughly) by the same ratio – a ratio of the gear head with which the gear head reduces the motor speed. For example, if a motor has a speed of 500RPM and the reduction ratio is 100:1, the speed of the gear head is 500/100 = 5RPM. This is the actual reduction ratio. The calculated speed from the gear head should be based on this ratio.

Gearbox Step Angle

A full step of the motor will result in the gearbox making a smaller step. The angle of this step is the step angle of the motor divided by the gearbox reduction ratio. For example, a motor with a step angle of 1.8º and a gearbox with a reduction ratio of 20:1 will have a step angle of 1.8/20 = 0.09º at the output of the gearbox.

Gearbox Output Torque

The gearbox takes the torque from the output shaft of the motor, reducing the speed and increasing the torque. The gearbox, depending on its efficiency, loses some of the torque as it is converted into heat. Therefore, the Gearbox Output Torque is the motor output torque multiplied by the reduction ratio multiplied by the efficiency of the gearbox. For example, a motor with a low-speed output torque of 500g*cm and a gearbox with a reduction ratio of 5:1 and 90% efficiency will have a Gearbox Output Torque of 500*5*0.9 = 2.25 kg*cm. Remember, however, that if the Gearbox Output Torque exceeds the allowable torque the gearbox is rated for, you can cause damage to the gearbox.

Gear Trains

Planetary gearboxes use multiple gear sets to achieve large gear reductions. Each gear set makes the gearbox longer, and reduces the efficiency.