(The circuitboard for this driver is no longer available. It has been replaced by the Unipolar Stepper Motor Driver (74194) 2008 version of the driver.)
This page features a simple unipolar stepper motor driver that can be used to drive low power, slow speed stepper motor applications.
The circuit is based on the SN74LS194 - Bidirectional Universal Shift Register. The circuit is designed to drive UNIPOLAR type stepper motors and provides only basic control functions - Forward, Reverse, Stop and Speed adjustment up to 100 steps per minute.
The only step angle for these drivers is the design step angle of the motor itself. No 'half' or 'micro' stepping option is available.
For the purposes of this page the direction control function is selected by an ON-OFF-ON type toggle switch. This could be easily replaced by another method such as transistors controlled by a PC's parallel output port.
Speed control is by means of a potentiometer but the circuit can accept step pulses and direction control from other sources such as a push button or a simple computer interface. The direction could also be controlled by a computer interface.
NOTE: - This driver is intended for hobby and learning uses only and should not be used for applications that require accurate control or positioning.
This web page uses integrated circuits from the SN74LS - family of TTL devices. It is not the purpose of this page to provide detailed explanations of how these devices work and an understanding of simple logic circuits would be helpful to the user.
Do not be discouraged by this however as the circuit's operation is quite simple.
The following diagram is for the main circuit of the motor driver.
A testing version is shown later on this page. The testing circuit is laid out differently and shows the SN7474 in logic block form and LED's are used to indicate the motor coils being switched.
The blue line on the drawing is the path that the CLOCK pulses of the drive circuit follow.
Each time the CLOCK pulse goes HIGH (positive) the HIGH state at the SN74194's OUTPUT terminals, (PIN's 12, 13, 14, 15), is shifted either UP or DOWN y one place. Refer to the "Stepper Motor Driver Waveforms" diagram.
The direction of this shifting is controlled by switch S2. When S2 is in the center OFF position the HIGH output state will remain in its last position and the motor will be stopped.
When the base of Q6 is LOW the shifting will be PIN 12 - 15 - 14 - 13 - 12 .etc.
When the base of Q7 is LOW the shifting will be PIN 12 - 13 - 14 - 15 - 12 .etc.
The direction of the pulse shifting determines the direction of motor rotation.
The pulses from the OUTPUT's of the SN74194 are fed to four segments of the ULN2003 Driver. When the input of a segment is HIGH, its darlington transistor will turn ON and its OUTPUT will conduct current through one of the motors coils.
As the coils of the motor are turned ON in sequence the motor rotates to follow these steps. Refer to following diagrams.
The SN74LS194 - 4-Bit Bidirectional Universal Shift Register.
The SN74LS74 - Dual 'D' Type Positive-Edge-Triggered Flip-Flops with Preset and Clear.
The ULN2003 - 7 Segment, Darlington, High Current, High Voltage Peripheral Driver. Its outputs can handle currents of up to 500 milliamps and voltages up to 50 volts.
The LM555 - Timer, normally configured as an astable oscillator but can be used a monostable timer for 1 step at a time operation. (See later Diagrams.)
NOTE: Many of the 7400 series logic devices are widely considered to be obsolete. They are easy to use however and fairly inexpensive. For this reason they were chosen for this circuit over more sophisticated devices. Also, they provide the user with greater learning opportunities as various sections of the circuit can be tested on a breadboard before building the full driver circuit.
The following diagram shows the stepping order of the inputs to ULN2003 Peripheral Driver for forward and reverse motor directions. Pin numbers are not indicated as this depends on the PCB layout.
Each positive pulse at the SN74194's - OUTPUT terminals turns ON one of the stepper motor's coils.
There are some links to other stepper motor related web pages further down the page. These may be helpful in understanding stepper motor operation and control.
With the parts values shown on the schematic and capacitor C1 being 1uF. If resistor R1 is set to "ZERO" ohms the calculated CLOCK frequency will be approximately 100Hz and the motor will make 100 steps per second. This CLOCK frequency will be slow enough for most motors to operate properly.
The maximum RPM at which stepper motors will operate properly is quite low and the torque the motor can produce drops of rapidly as motor speed increases. Testing may be needed to determine the minimum values for R1 and C1 to produce the maximum CLOCK INPUT frequency for any given motor. Data sheets, if available, will also help determine this frequency.
Some motors can handle higher CLOCK input frequencies. This depends largely on the construction of the motor itself.
If R1 had a maximum resistance of 1 Megohm the calculated CLOCK frequency would be 1Hz and the motor would make 1 step per second.
There is no minimum step speed at which stepper motors cannot operate. Therefore, in theory, the values for R1 and C1 can be as large as desired. There are practical limitations to these values though and the 555 timer data sheet should be consulted for more information.
Provision has been made on the printed circuit board to change the values of R1 and C1 through external connections. It will also be possible to inject CLOCK pulses through these connections for external step control.
In the above items the "calculated" minimum and maximum CLOCK frequencies are valid for the actual parts values shown. Given the tolerances of real components and the leakage currents of electrolytic capacitors the actual CLOCK rate could be lower or higher.
The Switch S1 is an option that could be used to stop the motor if desired. Closing S1 will stop the 555 oscillator thereby stopping the CLOCK input pulses.
The switch was connected across the timing capacitor as this did not produce output noise problems and was easier to externally connect to the circuit.
S1 could be replaced by an NPN transistor for electronic control of the CLOCK.
The CLOCK input pulses could be supplied from other sources but any "Noise" on the CLOCK input could throw the SN74194 into a bad state. For this reason the pulses must be clean.
It would be best to pass any external input pulses through the 555 timer chip first. This possibility has been provided for on the printed circuit board.
The SN7474 does not have a control function but is used to provide a sub routine when power is applied to the circuit. This allows the SN74194 to "SET" its output states to PIN 15 - HIGH and PINs 12, 13 and 14 - LOW before the DIRECTION control switching transistors, Q6 and Q7, become active.
The First CLOCK pulse occurs when power is applied to the circuit (the OUTPUT of the 555 timer will go HIGH). DIRECTION control becomes active on the Second CLOCK input pulse. If a direction is selected the motor will step on the Third CLOCK pulse.
The motor may step forward, backward or not at all on the second CLOCK pulse. This is part of the output setting process.
Direction control is active when the OUTPUT at PIN 8 of the SN7474 has a HIGH state.
Logically speaking the SN7474 method used to initialize the circuit may not be the best but at the relatively low frequencies use in this circuit, about 100Hz, it seems to work just fine. Without this sub routine the SN74194 could have all, any or none of its outputs in a HIGH state after power is applied to the circuit.
The 3.3K ohm resistor and the 4.7uF capacitor connected to the SET terminals, PINS 4 and 10, of the SN7474 - FLIP-FLOP's ensures that the outputs at pins 6 and 8 go to a LOW state when power is applied to the circuit.
When power is applied to the circuit it is possible that none, one or all of the outputs that control the motor (Q1-5) could be ON for the first CLOCK cycle. For this reason the power supply must be able to handle four times the rated motor current. If the motor step rate is very slow this extra current draw may be lengthy.
The Direction of the motor could be controlled by another circuit or the parallel output port of a PC. This will work as long as the voltage at the bases of Q6 and Q7 can be made lower than 0.7 volts. Additional NPN transistors may be required to achieve this result, depending on the method used.
If the bases of both Q6 and Q7 are made LOW at the same time the SN74194 will go into a RESET mode. This will cause the step sequence to stop and on the next clock pulse PIN 15 will go to a HIGH state.
Making the bases of both Q6 and Q7 LOW at the same time can be used to reset the SN74194 to its proper starting position without having to remove the circuit power.
The controls and step generator portions of the motor driver circuit require a 5 volt regulated power supply. This supply is shown on the schematic and is included on the printed circuit board.
The stepper motor will have its own power requirements and as there is a great variety of motors available this page cannot hope to give information in this area. Users of this circuit will have to determine motor phasing and power requirements for themselves.
Power for the motors can be regulated or filtered and may range from 12 to 24 volts with currents of between 150 and 500 milliamps depending on the particular motor.
As shown on the schematic the CLOCK frequency has an output via Q5. There is no specific purpose for this but because of the way the printed circuit board is laid out it was very easy to provide this output. The clock output is not TTL compatible but is an open collector darlington that can sink up to 500 milliamps.
This OUTPUT could be used if there was a need to drive two or more motors at the same CLOCK speed. Another use could be as an feed back to a counter circuit if a specific number of steps were desired.
A LED is connected to the output of the CLOCK that flashes at the CLOCK frequency. One step of the motor for every time the led turns ON if a direction has been selected.
This schematic shows the SN7474 in logic block form with its two "D" type FLIP-FLOP's. This circuit was used to test the stepper motor driver circuits operation.
Section FF1 acts as a binary divider while FF2 acts as a RS FLIP FLOP. After one division step the FLIP FLOP is SET to Q-high.
This allows the SN74194 to "SET" its output states to PIN 15 - HIGH and PINs 12, 13 and 14 - LOW before the DIRECTION control switching transistors, Q6 and Q7, become active.
Switch S1 allows the clock to be stopped or pulsed for single step control.
The POWER (14), COMMON (7) and CLEAR (CLR) (1,13) connections of the SN7474 are not shown on the schematic diagram to make the drawing less cluttered. The CLEAR terminals are connected to the +5 volt supply.
The next diagram shows the basic waveforms for the stepper motor driver circuit.
The next diagram shows a simplified function diagram of the 74194 if it were built from 7474 - 'D' type Flip-Flops.
The following picture is an example circuitboard for the Stepper Motor Driver. The terminal block positions correspond with those on the schematic shown below.
A TO-220 cased regulator was used as a TO-92 case would be too small for a 24 volt power supply. With the tab trimmed off of the regulator it can easily handle 1 watt.
The following diagram shows the printed circuit board's Stepper Motor Driver circuit with the circuit boards basic external connection terminals. The motor coils have been omitted from this diagram but the external speed control potentiometer and direction switch have been included.
| Qty | - | CIRCUIT PART | - | MOUSER PART # | - | MOUSER DESCRIPTION |
| 1 | - | 74LS194 | - | 526-NTE74LS194A | - | Replacement Digital ICs 4BIT BIDIR REG DIP16 |
| 1 | - | 74LS74 | - | 595-SN74LS74ANE4 | - | Dual Pos-Edge-Trig D-Type Flip-Flop |
| 1 | - | ULN2003AN | - | 595-ULN2003AN | - | Peripheral Drivers and Actuators Darlington |
| 1 | - | NE555N | - | 511-NE555N | - | Timers General Purp Single |
| 1 | - | L7805ACV | - | 511-L7805ACV | - | Voltage Regulators 5.0V 1.0A Positive |
| 2 | - | 2N3904 | - | 512-2N3904D81Z | - | Small Signal Transistors NPN Transistor General Purpose |
| 1 | - | 512-1N4001 | - | 512-1N4001 | - | Rectifiers Vr/50V Io/1A T/R |
| 1 | - | 470uF/35V | - | 140-XRL35V470-RC | - | Radial Electrolytic Capacitors 35V 470uF 20% |
| 1 | - | 10uF/25V | - | 140-XRL25V10-RC | - | Radial Electrolytic Capacitors 35V 10uF 20% |
| 1 | - | 4.7uF/25V | - | 140-XRL25V4.7-RC | - | Radial Electrolytic Capacitors 35V 4.7uF 20% |
| 1 | - | 1uF/25V | - | 140-XRL25V1.0-RC | - | Radial Electrolytic Capacitors 35V 1.0uF 20% |
| 1 | - | GREEN 3mm LED | - | 859-LTL-4231 | - | Standard LED Green Diffused |
| 3 | - | 10K 1/4W | - | 291-10K-RC | - | 1/4W 5% Carbon Film Resistors 10Kohms 0.05 |
| 2 | - | 3.3K 1/4W | - | 291-3.3K-RC | - | 1/4W 5% Carbon Film Resistors 3.3Kohms 0.05 |
| 1 | - | 470 OHM 1/4W | - | 291-470-RC | - | 1/4W 5% Carbon Film Resistors 470ohms 0.05 |
| 2 | - | 2 POS. TERMINAL BLOCK | - | 651-1729018 | - | PCB Terminal Blocks 2P 5mm 90DEG |
| 3 | - | 3 POS. TERMINAL BLOCK | - | 651-1729021 | - | PCB Terminal Blocks 3P 5mm 90DEG |
It may be necessary to move the coil leads around to get the motor to turn properly. Leave one wire connected permanently and change the other three coil leads as needed.
The connections in the following diagram will allow the motor to make single steps. A toggle switch could be used to select between single and continuous steps if the 1 Megohm potentiometer was included in the circuit.
NOTE - In the above single-step mode the motor will not move correctly for the first two closes of the step switch after the power is applied to the circuit. This is because the 7474 IC will have disabled the direction control until the 74194 has set its outputs to the starting configuration.
Another single step control method would be to replace the direction control switch with two pushbutton switches and operate the clock oscillator at a relatively slow rate.
The use of optoisolators provides complete isolation between the driver and the external control system.
The circuit above replaces the direction control switch with a "window" type voltage comparator circuit. Potentiometer "R IN" could be a temperature or light sensing circuit.
When the voltage at the centre tap of R IN is between the HIGH and LOW voltages set by resistors R1, R2, and R3 the motor will be stopped.
When the voltage at the centre tap of R IN is above the HIGH voltage between R1 and R2 the motor will be step in the FWD direction.
When the voltage at the centre tap of R IN is below the LOW voltage between R2 and R3 the motor will be step in the REV direction.
In a practical application the motion of the motors load, a heating duct damper for example, would bring the temperature represented by the voltage at R IN back to the range between the HIGH and LOW voltage setpoints.
The limit switches at the outputs of the comparators would be used to stop the motor to prevent the damper from going beyond its minimum and maximum positions.
Also see Voltage Comparator Information And Circuits - Voltage Window Detector Circuit.
Additional capacitance can be added to the 555 timer circuit to provide slower motor step rates. There is a limit to this approach as control of the step rate becomes less accurate as the capacitance increases and at some point the timer will stop working due to leakage currents of the capacitors.
Animated operation of stepper motors.
http://de.nanotec.com/schrittmotor_animation.html
For the motor driver circuit on this web page only 1 coil can be ON at a time so the rotor of the motor would be aligned with one of the stator's poles and not half way between poles as shown in the animation.
The following links are for stepper motor related pages and have a lot of good information on other types of driver circuits and motors.
www.cs.uiowa.edu/~jones/step/circuits.html
www.doc.ic.ac.uk/~ih/doc/stepper/control2/connect.html
The motors used to test this circuit were:
JAPAN SERVO CO. (From an old floppy drive) TYPE KP4M4-001 75 OHM / PHASE 0.15 AMP / PHASE
AIRPAX : LA82720-M1 (From a chart drive) 24 VOLT 60 OHMS / COIL 7.5 DEGREES / STEP
The explanations for the circuits on these pages cannot hope to cover every situation on every layout. For this reason be prepared to do some experimenting to get the results you want. This is especially true of circuits such as the "Across Track Infrared Detection" circuits and any other circuit that relies on other than direct electronic inputs, such as switches.
If you use any of these circuit ideas, ask your parts supplier for a copy of the manufacturers data sheets for any components that you have not used before. These sheets contain a wealth of data and circuit design information that no electronic or print article could approach and will save time and perhaps damage to the components themselves. These data sheets can often be found on the web site of the device manufacturers.
Although the circuits are functional the pages are not meant to be full descriptions of each circuit but rather as guides for adapting them for use by others. If you have any questions or comments please send them to the email address on the Circuit Index page.
24 April, 2008