| A stepper motor turns through precise steps. So it is useful for moving things through an exact angle or distance. |
 |
How does it operate?
|
There are two common types of stepper motor – unipolar and bipolar.
These notes refer to the SM 46 bipolar stepper motor (Rapid Order code 37-0525).
There are four wires connected to the motor. These are connected to a set of coils inside the motor.
|

|
|

The connections to the stepper motor
|
The connections to the coils need to be able to send a current into the stepper motor (called ‘sourcing’) and also accept a current out of the motor (called ‘sinking’).
A normal transistor, Darlington driver or MOSFET can only sink current, so cannot be used with a bipolar stepper motor. However, the L293D can source and sink current, and it has four output signals, so it is very suitable for driving stepper motors.
A combination of separate integrated circuits can be used to provide the correct sequence of pulses to the L293D driving a stepper motor. However, the circuitry involved is complicated and it is much simpler to use a PIC.
A dedicated stepper motor driver integrated circuit (the SAA1027) used to be available, but this appears to have been discontinued. |
|

Stepper motor circuit
Click on the circuit diagram to download a Livewire file of the circuit that you can investigate and add to your own circuit. Note that there is no symbol for a stepper motor in Livewire, so the operation of the subsystem cannot be simulated. |
To drive the motor forward by one step (7.5o) the following sequence of signals needs to be applied to the coil connections:
| Step |
Q1 |
Q2 |
Q3 |
Q4 |
| 1 |
1 |
0 |
0 |
0 |
| 2 |
0 |
0 |
1 |
0 |
| 3 |
0 |
1 |
0 |
0 |
| 4 |
0 |
0 |
0 |
1 |
| Repeat step 1 etc. |
|
|
|
|
To drive the motor backwards by one step the sequence is:
| Step |
Q1 |
Q2 |
Q3 |
Q4 |
| 1 |
1 |
0 |
0 |
0 |
| 2 |
0 |
0 |
0 |
1 |
| 3 |
0 |
1 |
0 |
0 |
| 4 |
0 |
0 |
1 |
0 |
| Repeat step 1 etc. |
|
|
|
|
Possible applications
- Moving a lever a precise amount
- Raising and lowering a sign a fixed distance
Making
Cut off the connecting plug that is attached to the stepper motor.
The four wires to the stepper motor can be connected to the PCB using a four pin PCB-mounting terminal block.
Build and test the L293D that will provide the input signals before adding the stepper motor.
A four pin PCB-mounting terminal block
Testing
Before connecting the stepper motor, use a multimeter to check that the four signals from the L293D driver are correctly connected to the terminals on the 4-pin terminal block.
Connect the stepper motor. Write a short program that will:
- move the stepper motor a few steps forward;
- move it a few steps in reverse;
- repeat this sequence.
Fault finding
If there is a fault, check that the four wires to the stepper motor are connected correctly.
Alternatives
- A servo motor can be used to turn an object through a precise angle. It is more accurate than a stepper motor but it is more expensive and requires a separate power supply.
- A solenoid can be used to move an object between two fixed positions. Solenoids are less expensive than servo motors, but they can only move to two positions and they are not as powerful.
- A d.c. motor can be used to move an object between two fixed positions, provided two microswitches are used to stop the motor when it gets to the required position. d.c. motors are less expensive than servo motors, but they can only move to two positions and the programming (or electronic hardware) involved is more complicated.
Web links
Return to list of datasheets