Stepper Motor Circuits
To control a stepper motor, you have to energize each winding individually in a specific and timed order. The energizing is accomplished by a driver circuit (an amplifier). The timing is performed by an indexer circuit and the objective (go forward, go backward, brake, coast, etc.) is controlled by some external user interface, such as a computer or joystick. The figure below shows this process.
The circuits for driving unipolar and bipolar stepper motors differ because bipolar stepper motors don't have a "center tap." However, it is possible to use bipolar drivers to drive unipolar steppers after some small modifications.
Care must be taken in the driver circuit to protect against voltage spikes. Because the motor windings are inductors, switching off the power to the winding produces a short burst of voltage. To protect against this, always put a diode in parallel with the winding, making sure the diode can handle the winding current. This is shown in the following figure.
Unipolar Stepper Driver Circuit
The basic drive circuitry for a single unipolar winding is shown in the following figure.
For the switches, any kind of switching technology can be used. The following figure shows two such switches. The first one uses a power darlington transistor and the second one uses a power field effect transistor.
For driving a full stepper motor, with multiple coils, you can either build each of the above circuits individually, or you can use a integrated chip. One such chip is the DS2003, which is a darlington array, and is shown below. This chip can be used when the total current to each winding is less than 500 milliamps.
Bipolar Stepper Driver Circuit
Bipolar stepper drivers use H-bridges to energize the windings of the motor. H-bridges allow you to chose the direction of the current through the winding. Using an H-bridge configuration, there are four transistors for each winding as shown in the first figure below. However, most of the time they are prewired together so that only two inputs are needed. This makes generating pulses easier and also serves to protect against short circuits. This circuit is shown in the second figure below.
The table below shows the result of each possible control input.
There are many methods of producing the index pulses needed to drive stepper motors. This can either be done using a microprocessor or an integrated circuit. The calculations will most likely be so burdensome that the microprocessor would be unable to do any other calculations while producing the pulse trains. However, there are many cheap microcontrollers available these days and they could be used as dedicated indexers.
Most indexers have similar inputs and are intended to control the speed and direction of the motor. The logic diagram shows how this is accomplished.
Digikey Part #: 497-1394-5-ND
The L297 is a 20-pin DIP chip that was designed specifically to control either unipolar or bipolar stepper motors. It will control two H-bridges to power two windings. Its inputs control the speed and direction of the motor. The diagram below shows the typical setup of the circuit. The A and B outputs would correspond to the X and Y inputs on the H-bridge of the first winding (see above). Likewise, the C and D outputs would correspond to the X and Y inputs on the second winding.
This chip was specifically designed to interface with the L298N stepper motor driver chip, which is also found in the lab. See this document.
The PIC16F684, which is available in the lab, is a good programmable microcontroller ideally suited for controlling a bipolar stepper motor.
Allied Electronics Part #: 568-9170
The MC3479 is a single-chip stepper motor driver that can handle 350mA per winding. There are several high-level digital inputs that control the speed and direction of the motor. The first figure below shows the internal circuitry and the second picture shows a typical setup.
- "Stepper Motor Basics", http://www.ams2000.com/pdf/step101.pdf
- "Jones on Stepping Motor Control Circuits", http://www.cs.uiowa.edu/~jones/step/circuits.html
- MC3479, http://www.onsemi.com/pub/Collateral/MC3479-D.PDF
- L297, http://www.st.com/stonline/books/pdf/docs/1334.pdf