Вы находитесь на странице: 1из 6

Stepper Motor Controller

Connection Diagrams
The wires from the Logic PCB connector to the stepper motor in a TM100 Disk Drive are
as follows

This means that, to use the stepping sequences as is, the Green and Brown wires are the
wrong way round. There is no need to alter the wires at the connector, of course - it can
be done in the cable from the PC parallel port or microcontroller.

If you have a stepper motor with different wiring, look here.

Four-Wire Connection

The ULN2003 / MC1413 is a 7-bit 50V 500mA TTL-input NPN darlington driver. This is
more than adequate to control a four phase unipolar stepper motor such as the KP4M4-
001.

It is recommended to connect a 12v zener diode between the power supply and VDD (Pin
9) on the chip, to absorb reverse (or "back") EMF from the magnetic field collapsing
when motor coils are switched off. (See Douglas W. Jones' rather more sophisticated
example)
Here's one I made earlier

I recycled the power and motor lead connectors from the TM100 Logic PCB. A
convenient source of 12v and 5v is an old IBM-PC power supply unit. The 9-way D-type
connector is appropriate for the number of (parallel) control lines needed in the cable.

Here's some example software for this setup

 One of my student groups used an enhanced version of this circuit for their
Remote Control WebCam project.
 One of my individual students produced a microcontroller-driven version for his
SMACK project. Read his report for more details.

Data Sheets

Allegro MicroSystems has a PDF datasheet for its 2003 thru 2024 high-voltage high-
current Darlington arrays.

Texas Instruments supplies the SN75468, which is a higher-voltage version of the


ULN2003A.

The ULN2803 is an 8-bit 50V 500mA TTL-input NPN darlington driver. The extra
Darlington pair means that two stepper motors can be controlled by this method with the
single chip.

Motorola has PDF datasheets for its MC1413 and ULN2803 chips

Two-Wire Connection

With the addition of a few resistors, you can control this kind of motor with only two data
lines (compared with the Four-Wire Connection, above). This uses the fact that, with
Two-Coil Excitation, at any time two of the coils have the inverse excitation (on/off) of
the other two.
(based on Parallax BASIC Stamp Application Note 6)

You only need to supply the on/off signals for coils 3 and 2, according to the Two-Coil
Excitation sequence. The corresponding inverted signals for coils 1 and 4 are supplied by
the circuit itself.

I used this circuit (times two) for the StoneAge DiskDrive Logo Turtles and the Pan-and-
Tilt Mount for a camera.

The same technique is used by the (discontinued) UDN2544B (PDF) Quad Darlington
Power Driver chip from Allegro MicroSystems

A disadvantage of this method is that you cannot half-step the motor.

Allegro's UCN5804B Stepper-Motor Translator/Driver chip supports all three excitation


modes.

Allegro 5804B

This translator/driver chip provides complete control and drive for a four-phase unipolar
stepper motor.
from the data sheet (PDF)

The logic section provides the sequencing logic, DIRECTION and OUTPUT ENABLE
control, and a power-on reset function. Three stepper-motor drive formats, wave-drive
(one-phase), two-phase, and halfstep are externally selectable.

Drive Format Pin 9 Pin 10


Two-Phase L L
One-Phase H L
Half-Step L H
Step-Inhibit H H

I used the following circuit (times two) for a third (different) controller board for my
students.

With Pin 15 OUTPUT ENABLE tied to Ground (always enabled), four data lines are
required to interface the chip, for all three drive formats to be selectable in software.

From the Data Port of the PC Parallel Port, I used:


Bit Function
0 Step Input
1 Direction CW/CCW
2 One-Phase/Two-Phase
3 Half-Step/Full-Step

Bits 1-3 need to be set to 1 or 0 to reflect the desired direction of rotation and drive
format. Bit 0 must be set to 1 initially. To step the motor, Bit 0 must be reset to zero for a
minimum 3 µsec then set back to 1.

Note: If the controller board is powered up but not connected to the PC and under
software control, the motor(s) will free run as Pin 11 STEP INPUT floats low. This
behaviour can be prevented by connecting a 10K pullup resistor between pin 11 and +5v.

Other Sources of Information


 Everett (Skip) Carter's Control Stepper Motors - with Forth
 Kari Salmi's stepper motor controller/driver (using XOR gates and JK flip-flops
with a ULN2003)
 Peter Lynch's experiences in controlling a couple of stepper motors with a PIC
12c509 8-pin microcontroller (and a ULN2803)
 CW Technology's Opto-Isolated Stepper Controller and 3-Axis Stepper Controller
(using a UCN5804B)
 Michael Oates' Stepper Motor Drive Circuit (using a SAA1027)
 David Rowe's Dual Axis Stepper Motor Controller (using a SAA1042)
 Prashant Bhandary's circuit and software to drive motors salvaged from floppy
drives via the PC parallel port. (using a L293)
 Rob Paisley's Stepper Motor Driver (74194)

Stepper Motors Index

last updated: 2-Feb-03 Ian Harries <ih@doc.ic.ac.uk>

Вам также может понравиться