Basic Stepping-Motor Control Circuits

Home | Articles | Forum | Glossary | Books

AMAZON multi-meters discounts AMAZON oscilloscope discounts

This section deals with the basic final-stage drive circuitry for stepping motors. This circuitry is centered on a single issue, switching the current in each motor winding on and off and controlling its direction. The circuitry discussed in this section is connected directly to the motor windings and the motor power supply, and this circuitry is controlled by a digital system that determines when the switches are turned on or off.

This section covers all types of motors, from the elementary circuitry needed to control a variable-reluctance motor to the H-bridge circuitry needed to control a bipolar permanent magnet (PM) motor. Each class of drive circuit's illustrated with practical examples, but these examples are not intended as an exhaustive catalog of the commercially available control circuits, nor is the information given here intended to substitute for the information found in the manufacturer's component data sheets for the parts mentioned.

This section covers only the most elementary control circuitry for each class of motor. All of these circuits assume that the motor power supply provides a drive voltage no greater than the motor's rated voltage, and this significantly limits motor performance. Section 10.9, on current-limited drive circuitry, covers practical high-performance drive circuits.

10.8.1 Variable-Reluctance Motors

Typical controllers for variable-reluctance stepping motors are variations on the outline shown in ill. 10.37. Boxes are used to represent switches; a control unit, not shown, is responsible for providing the control signals to open and close the switches at the appropriate times in order to spin the motors. In many cases, the control unit will be a computer or programmable interface controller, with software directly generating the outputs needed to control the switches, but in other cases, additional control circuitry is introduced, sometimes gratuitously.

Ill. 10.37 Typical controller for variable-reluctance stepping motors.

Motor windings, solenoids, and similar devices are all inductive loads. As such, the current through the motor winding cannot be turned on or off instantaneously with-out involving infinite voltages. When the switch controlling a motor winding is closed, allowing current to flow, the result of this is a slow rise in current. When the switch controlling a motor winding is opened, the result of this is a voltage spike that can seriously damage the switch unless care is taken to deal with it appropriately.

There are two basic ways of dealing with this voltage spike. One is to bridge the motor winding with a diode, and the other is to bridge the motor winding with a capacitor. ill 10.38 illustrates both approaches.

The diode shown in ill. 10.38 must be able to conduct the full current through the motor winding, but it will conduct only briefly each time the switch is turned off, as the current through the winding decays. If relatively slow diodes, such as the common 1N400X family, are used together with a fast switch, it may be necessary to add a small capacitor in parallel with the diode.

Ill. 10.38 Voltage-spike control with ( a) a diode and ( b) a capacitor.

The capacitor shown in ill. 10.38 poses more complex design problems. When the switch is closed, the capacitor will discharge through the switch to ground, and the switch must be able to handle this brief spike of discharge current. A resistor in series with the capacitor or in series with the power supply will limit this current.

When the switch is opened, the stored energy in the motor winding will charge the capacitor up to a voltage significantly above the supply voltage, and the switch must be able to tolerate this voltage. To solve for the size of the capacitor, we equate the two formulas for the stored energy in a resonant circuit.

P = C V^2 / 2

P = L I^2 / 2

where P = stored energy, W s or C V

C  capacity, F

V = voltage across capacitor

L = inductance of motor winding, H

I = current through motor winding

Solving for the minimum size of capacitor required to prevent overvoltage on the switch is fairly easy.

C > LF / (Vb - s)^2

where:

Vb = breakdown voltage of the switch

Vs = supply voltage Variable-reluctance motors have variable inductance that depends on the shaft angle. Therefore, worst-case design must be used to select the capacitor. Further-more, motor inductances are frequently poorly documented, if at all.

The capacitor and motor winding in combination form a resonant circuit. If the control system drives the motor at frequencies near the resonant frequency of this circuit, the motor current through the motor windings, and therefore the torque exerted by the motor, will be quite different from the steady-state torque at the nominal operating voltage. The resonant frequency is

f = 1 / [  pi (L C)^0.5]

Again, the electrical resonant frequency for a variable-reluctance motor will depend on shaft angle. When a variable-reluctance motor is operated with the exciting pulses near resonance, the oscillating current in the motor winding will lead to a magnetic field that goes to zero at twice the resonant frequency, and this can severely reduce the available torque.

10.8.2 Unipolar PM and Hybrid Motors

Typical controllers for unipolar stepping motors are variations on the outline shown in ill. 10.39. As in ill. 10.37, boxes are used to represent switches; a control unit, not shown, is responsible for providing the control signals to open and close the switches at the appropriate times in order to spin the motors. The control unit's commonly a computer or programmable interface controller, with software directly generating the outputs needed to control the switches.

Ill. 10.39 Typical controller for unipolar step-ping motors.

Ill. 10.40 Hybrid drive with diode shunt suppression.

Ill. 10.41 Hybrid drive with capacitive suppression.

As with drive circuitry for variable-reluctance motors, we must deal with the inductive kick produced when each of these switches is turned off. Again, we may shunt the inductive kick using diodes, but now four diodes are required, as shown in ill. 10.40.

The extra diodes are required because the motor winding isn't two independent inductors; it's a single center-tapped inductor with the center tap at a fixed voltage. This acts as an autotransformer. When one end of the motor winding is pulled down, the other end will fly up, and vice versa.

When a switch opens, the inductive kickback will drive that end of the motor winding to the positive supply, where it's clamped by the diode. The opposite end will fly downward, and if it was not floating at the supply voltage at the time, it will fall below ground, reversing the voltage across the switch at that end. Some switches are immune to such reversals, but others can be seriously damaged.

A capacitor may also be used to limit the kickback voltage, as shown in ill. 10.41.

The rules for sizing this capacitor are the same as the rules for sizing the capacitor shown in ill. 10.38, but the effect of resonance is quite different. With a PM motor, if the capacitor is driven at or near the resonant frequency, the torque will increase to as much as twice the low-speed torque. The resulting torque-speed curve may be quite complex, as illustrated in ill. 10.42.

ill 10.42 shows a peak in the available torque at the electrical resonant frequency and a valley at the mechanical resonant frequency. If the electrical resonant frequency is placed appropriately above what would have been the cutoff speed for the motor using a diode-based driver, the effect can be a considerable increase in the effective cutoff speed.

The mechanical resonant frequency depends on the torque, so if the mechanical resonant frequency is anywhere near the electrical resonance, it will be shifted by the electrical resonance. Furthermore, the width of the mechanical resonance depends on the local slope of the torque-speed curve. If the torque drops with speed, the mechanical resonance will be sharper, while if the torque climbs with speed, the mechanical resonance will be broader or even split into multiple resonant frequencies.

Ill. 10.42 Effect of resonance on motor performance.

10.8.3 Practical Unipolar and Variable-Reluctance Drivers

Ill. 10.43 Possible switching schemes.

In the preceding circuits, the details of the necessary switches are deliberately ignored. Any switching technology, from toggle switches to power MOSFETS, will work. ill 10.43 contains some suggestions for implementing each switch, with a motor winding and protection diode included for orientation purposes.

Each of the switches shown in ill. 10.43 is compatible with a TTL input. The 5-V supply used for the logic, including the 7407 open-collector driver used in the figure, should be well regulated. The motor power, typically between 5 and 24 V, needs only minimal regulation. It is worth noting that these power-switching circuits are appropriate for driving solenoids, dc motors, and other inductive loads as well as for driving stepping motors.

The SK3180 transistor shown in ill. 10.43 is a power Darlington with a current gain  1000; thus, the 10 mA flowing through the 470- ohm bias resistor is more than enough to allow the transistor to switch a few amps of current through the motor winding. The 7407 buffer used to drive the Darlington may be replaced with any high-voltage open-collector chip that can sink at least 10 mA. In the event that the transistor fails, the high-voltage open-collector driver serves to protects the rest of the logic circuitry from the motor power supply.

The IRC IRL540 shown in ill. 10.43 is a power field-effect transistor. This can handle currents of up to about 20 A, and it breaks down nondestructively at 100 V; as a result, this chip can absorb inductive spikes without protection diodes if it's attached to a large enough heat sink. This transistor has a very fast switching time, so the protection diodes must be comparably fast or bypassed by small capacitors. This is particularly essential with the diodes used to protect the transistor against reverse bias. In the event that the transistor fails, the zener diode and 100- ohm resistor protect the TTL circuitry. The 100- ohm resistor also acts to somewhat slow the switching times on the transistor.

For applications where each motor winding draws under 500 mA, the ULN200x family of Darlington arrays from Allegro Microsystems, also available as the DS200x from National Semiconductor and as the Motorola MC1413 Darlington array, will drive multiple motor windings or other inductive loads directly from logic inputs. ill 10.44 shows the pinout of the widely available ULN2003 chip, an array of seven Darlington transistors with TTL compatible inputs.

The base resistor on each Darlington transistor is matched to standard bipolar TTL outputs. Each NPN Darlington is wired with its emitter connected to pin 8, intended as a ground pin. Each transistor in this package is protected by two diodes, one shorting the emitter to the collector, protecting against reverse voltages across the transistor, and one connecting the collector to pin 9; if pin 9 is wired to the positive motor supply, this diode will protect the transistor against inductive spikes.

The ULN2803 chip is essentially the same as the ULN2003 chip just described, except that it's in an 18-pin package and contains eight Darlingtons, allowing one chip to be used to drive a pair of common unipolar permanent-magnet or variable-reluctance motors.

For motors drawing under 600 mA per winding, the UDN2547B quad power driver made by Allegro Microsystems will handle all four windings of common unipolar stepping motors. For motors drawing under 300 mA per winding, Texas Instruments SN7541, 7542 and 7543 dual power drivers are a good choice. Both of these alternatives include some logic with the power drivers.

Ill. 10.44 Pinout diagram of the ULN2003 chip.

10.8.4 Bipolar Motors and H Bridges

Things are more complex for bipolar PM stepping motors, because these have no center taps on their windings. There- fore, to reverse the direction of the field produced by a motor winding, we need to reverse the current through the winding.

We could use a double-pole double-throw switch to do this electromechanically; the electronic equivalent of such a switch is called an H bridge and is out-lined in ill. 10.45.

As with the unipolar drive circuits discussed previously, the switches used in the H bridge must be protected from the voltage spikes caused by turning the power off in a motor winding. This is usually done with diodes, as shown in ill. 10.45.

It is worth noting that H bridges are valid not only to the control of bipolar stepping motors, but also to the control of dc motors, push-pull solenoids (those with PM plungers) and many other applications.

With four switches, the basic H bridge offers 16 possible operating modes, 7 of which short out the power supply. The following operating modes are of interest:

Forward mode, switches A and D closed.

Reverse mode, switches B and C closed.

These are the usual operating modes, allowing current to flow from the supply, through the motor winding, and onward to ground. ill 10.46 illustrates for-ward mode.

Ill. 10.45 H-bridge driver.

Ill. 10.46 H-bridge driver in forward mode.

Ill. 10.47 H-bridge driver in fast-decay mode.

Fast-Decay or Coasting Mode, All Switches Open. Any current flowing through the motor winding will be working against the full supply voltage, plus two diode drops, so current will decay quickly. This mode provides little or no dynamic-braking effect on the motor rotor, so the rotor will coast freely if all motor windings are powered in this mode. ill 10.47 illustrates the current flow immediately after switching from forward running mode to fast-decay mode.

Slow Decay or Dynamic Braking Modes. In these modes, current may recirculate through the motor winding with minimum resistance. As a result, if current is flowing in a motor winding when one of these modes is entered, the current will decay slowly, and if the motor rotor is turning, it will induce a current that will act as a brake on the rotor. ill 10.48 illustrates one of the many useful slow-decay modes, with switch D closed; if the motor winding has recently been in forward running mode, the state of switch B may be either open or closed.

Most H bridges are designed so that the logic necessary to prevent a short circuit's included at a very low level in the design. ill 10.49 illustrates what is probably the best arrangement.

Here, the operating modes shown in Table 10.15 are available.

Ill. 10.48 H-bridge driver in slow-decay or dynamic-braking mode.

Ill. 10.49 H-bridge driver with short-circuit protection.

The advantage of this arrangement is that all of the useful operating modes are pre-served, and they are encoded with a minimum number of bits; the latter is important when using a microcontroller or computer system to drive the H bridge, because many such systems have only limited numbers of bits available for parallel output. Sadly, few of the integrated H-bridge chips on the market have such a simple control scheme.

10.8.5 Practical Bipolar Drive Circuits

TABLE 10.15 Operating Modes of Driver Circuit in ill. 10.49

XY ABCD Mode

00 0000 Fast decay

01 1001 Forward 10 0110 Reverse 11 0101 Slow decay

There are a number of integrated H-bridge drivers on the market, but it's still useful to look at discrete component implementations for an understanding of how an H bridge works. Antonio Raposo suggested the H-bridge circuit shown in ill. 10.50.

Ill. 10.50 Discrete component representation of H-bridge driver.

The X and Y inputs to this circuit can be driven by open-collector TTL outputs as in the Darlington-based unipolar drive circuit in ill. 10.43. The motor winding will be energized if exactly one of the X and Y inputs is high and exactly one of them is low. If both are low, both pull-down transistors will be off. If both are high, both pull-up transistors will be off. As a result, this simple circuit puts the motor in dynamic-braking mode in both the 11 and 00 states and does not offer a coasting mode.

The circuit in ill. 10.50 consists of two identical halves, each of which may be properly described as a push-pull driver. The term half-H bridge is sometimes applied to these circuits. It is also worth noting that a half-H bridge has a circuit quite similar to the output drive circuit used in TTL logic. In fact, TTL tristate line drivers such as the 74LS125A and the 74LS244 can be used as half-H bridges for small loads, as illustrated in ill. 10.51.

This circuit's effective for driving motors with up to about 50  per winding at voltages up to about 4.5 V using a 5-V supply. Each tristate buffer in the LS244 can sink about twice the current it can source, and the internal resistance of the buffers is sufficient, when sourcing current, to evenly divide the current between the drivers that are run in parallel. This motor drive allows for all of the useful states achieved by the driver in ill. 10.49 (see Table 10.16), but these states are not encoded as efficiently. The second dynamic-braking mode, XYE  110, provides a slightly weaker braking effect than the first because of the fact that the LS244 drivers can sink more current than they can source.

Ill. 10.51 Half-bridge driver.

TABLE 10.16 Operating Modes of Driver Circuit in ill. 10.51

XYE Mode

001 Fast decay

000 Slower decay

010 Forward 100 Reverse 110 Slow decay

One of the problems with commercially available stepping-motor control chips is that many of them have relatively short market lifetimes. E.g., the Seagate IPx Mxx series of dual H-bridge chips (IP1M10 through IP3M12) were very well thought out; unfortunately, it appears that Seagate made these only while the company used stepping motors for head positioning in Seagate disk drives. The Toshiba TA7279 dual H-bridge driver would be another excellent choice for motors under 1 A, but again, it appears to have been made for internal use only.

The SGS-Thompson (and others) L293 dual H bridge is a close competitor for the preceding chips, but unlike them, it does not include protection diodes. As a result, each motor winding must be set across a bridge rectifier (1N4001 equivalent).

Despite this drawback, the L293 is an excellent choice for driving small bipolar steppers drawing up to 1 A per motor winding at up to 36 V. ill 10.52 shows the pinout of this chip. This chip may be viewed as four independent half-H bridges, enabled in pairs, or as two full H bridges. This is a power dual in-line package (DIP), with pins 4, 5, 12, and 13 designed to conduct heat to the PC board or to an external heat sink.

Ill. 10.52 Pinout of the L293B chip.

The SGS-Thompson (and others) L298 dual H bridge is quite similar to the preceding, but is able to handle up to 2 A per channel and is packaged as a power component; as with the LS244, it's safe to wire the two H bridges in the L298 package into one 4-A H bridge (the data sheet for this chip provides specific advice on how to do this). One warning is appropriate concerning the L298-this chip has very fast switches, fast enough that commonplace protection diodes (1N400X equivalent) don't work. Instead, use a diode such as the BYV27. The National Semiconductor LMD18200 H bridge is another good example; this handles up to 3A and has integral protection diodes.

While integrated H bridges are not available for very high currents or very high voltages, there are well-designed components on the market to simplify the construction of H bridges from discrete switches. E.g., International Rectifier sells a line of half-H-bridge drivers; two of these chips plus four MOSFET switching transistors suffice to build an H bridge. The IR2101, IR2102, and IR2103 are basic half-H-bridge drivers. Each of these chips has two logic inputs to directly control the two switching transistors on one leg of an H bridge. The IR2104 and IR2111 have similar output-side logic for controlling the switches of an H bridge, but they also include input-side logic that, in some applications, may reduce the need for external logic. In particular, the 2104 includes an enable input, so that four 2104 chips plus eight switching transistors can replace an L293 with no need for additional logic.

A number of manufacturers make complex H-bridge chips that include current-limiting circuitry. It is also worth noting that there are a number of three-phase bridge drivers on the market, appropriate for driving Y- or delta-configured three-phase pm steppers. Few such motors are available, and these chips were not developed with steppers in mind. Nonetheless, the Toshiba TA7288P, GL7438, TA8400 and TA8405 are clean designs, and two such chips, with one of the six half-bridges ignored, will cleanly control a five-winding 10-step-per-revolution motor.

Top of Page

PREV: Switched-Reluctance Motor Controls | NEXT: Current Limiting for Stepping Motors Guide Index | HOME