You are on page 1of 3

BUILD THIS FIGURE 4

by
David
STEPPER
Williams
MOTOR
CONTROLLER
T
his project allows you to greater than the voltage rating of the
control the speed, direc- motor for improved performance.
tion, and step size of a Stable voltage for the rest of the
unipolar four-phase step- circuit is obtained by regulating the
per motor. The controller input voltage down to 5V with U4, a
is capable of handling LM78L05 voltage regulator IC.
motor winding currents of up to 1.25 Capacitors C7, C1, and C5 provide
amps per phase and it operates from a additional voltage filtering. U1 is capa-
single supply voltage of 6-30 volts DC. ble of supplying up to 100 mA of cur-
A unique feature of this project is rent.
that the circuit can operate in either The heart of the stepper controller
remote mode or stand-alone mode. In is U1, a UCN5804B stepper-motor
the stand-alone mode, an on-board translator/driver IC. It contains a
pulse generator and a four-position DIP CMOS logic section for the sequencing
switch allows you to demonstrate all of logic and a high-voltage bipolar output
the functions without any additional section to directly drive a unipolar step-
connections. This mode is perfect for per motor. U1 can generate waveforms
demonstrating basic stepper motor for three different sequence modes: (1)

If you’re interested in robotics, motion control,


or just want to learn about stepper motors, then
you should try building this versatile stepper
motor controller.
Resistors (Except where noted, resistors are 5%, 1/4 Watt)
R1,2 ....... 50 Ohm, 5 Watt
R3 ........ 330 Ohm (Orange, Orange, Brown, Gold)
Pin Assignments - Pin Assignments - R4 ........ 10 K Ohm (Brown, Black, Orange, Gold)
R5 ........ 22 K Ohm (Red, Red, Orange, Gold)
R6 ........ 220 K Ohm (Red, Red, Yellow, Gold)
GND 1 8 Vcc OUT B 1 16 Vdd R7-12 ..... 100 K Ohm (Brown, Black, Yellow, Gold)
TRIG 2 7 DISCH COM BD 2 15 OUT ENABLE R13 ....... 100 K Ohm Potentiometer
OUT 3 6 THRESH OUT D 3 14 DIRECTION Capacitors
RESET 4 5 CONT C1-3 ......... 0.1 uF, Ceramic, marked: [104]
GND 4 13 GND
C4-6 .......... 1.0 uF, 16V Tantalum or Electrolytic
GND 5 12 GND C7 ........... 470 uF, 35V Electrolytic
LM555N OUT C 6 11 STEP INPUT Semiconductors
U1 ........... UCN5804B, Stepper Controller IC
Parts List
COM AC 7 10 HALF-STEP
Timer IC OUT A 8 9 ONE-PHASE
U2,3 ......... LM555N, Timer IC
U4 ........... LM78L05, 5 Volt DC Regulator (TO-92)
For The
D1-4.......... 1N4001 (or 1N4004), Rectifier Diode Stepper
control principles. The circuit even L1-4 ......... RED Light Emitting Diode
has LEDs that show the energized
UCN5804B Miscellaneous Items Motor
phases for each step. STEPPER MOTOR JP1 — Wire Jumper, 0.4 inches long
JP2 — Wire Jumper, 0.5 inches long
Controller
In remote mode, all motor func- JP3 — Wire Jumper, 0.6 inches long
tions can be interfaced to external TRANSLATOR/DRIVER J1 — 3-pin Jumper Post & Shorting Blocks
logic or a microcontroller. This J2 — 2-pin Jumper Post & Shorting Blocks
P1 — 2-pos Terminal Block
allows the controller to be incorporated FULL-STEP with two phases ener- P2 — 6-pos Terminal Block
into a robot, an X-Y plotter, or any gized, (2) FULL-STEP WAVE and (3) P3 — 7-pin Jumper Post
motion control project you have in HALF-STEP. The waveforms for S1-4 — 4-position DIP Switch
mind! these three sequence modes are S5 — Miniature Pushbutton Switch
U1 — 16-Pin IC Socket
shown in Figure 5. U2,3 — 8-Pin IC Socket
CIRCUIT DESCRIPTION Diodes D1-4 are clamps to pre- PCB — Etched Printed Circuit Board (STP0297)
vent damage to U1 if the outputs MOT — Unipolar (6-wire) Stepper Motor
Refer to the schematic of the step- swing below ground when driving the TXFMR — 12-14V DC, 500mA Wall Transformer or DC power supply
Misc: Hook-up Wire, Hardware, Solder, Etc.
per driver shown in Figure 1. Power is inductive load of the motor.
supplied by a DC wall transformer or Each of the LEDs L1-4 light The following items are available from: LNS Technologies, P.O. Box 67243, Scotts
DC power supply at P1. when the corresponding output goes Valley, CA 95067, Phone: (831) 768-9155.
The voltage can be anything from LOW and are useful for observing STEPPER-KIT: Complete kit of parts for the Stepper Motor Controller including etched
6 to 30 volts, depending upon the rat- the output waveforms. Resistor R3 and drilled printed circuit board, stepper motor, DC wall transformer, ICs, and all other
ing of the stepper motor. The stepper provides current limiting to the components listed above $39.00. UCN5804B: Stepper Motor Driver IC (U1) $5.00.
motor uses most of the current in this LEDs. STEPPER-PCB: PC Board for Stepper Controller Kit $10.00.
circuit, so it is powered directly from Pins 9, 10, 14, and 15 of U1
Please add $5.00 Shipping/Handling. California residents add 8% sales tax. MC/VISA
the transformer output through resis- are control inputs for phase, half- orders accepted. No COD orders.
tors R1 & R2. step, direction, and output-enable.
These resistors limit the current to These signals are pulled-down to a The UCN5804B IC is also available from:
the motor and allow the motor to be logic LOW level by resistors R7-11. Alltronics, 2300 Zanker Rd., San Jose, CA 95131, (408) 934-9773.
931002: Stepper Motor Driver IC $4.50.
operated with a power supply voltage The control signals go to both
Reprinted from October 1998 Nuts & Volts Magazine. All rights reserved. No duplication permitted without permission from T & L Publications, Inc. 1
the chip. Refer again
P1
9-24VDC U4 LM78L05 to Figure 3 before
+V +5V
GND
2 1 IN OUT 3 installing U1 to make
1 + C7 C1
GND + C5 sure of the proper ori-
R3
R1 470 MFD 0.1
2
330 1.0 entation of pin 1,
MFD MFD
50 Ohm then press the IC
5W
R2
50
4321 firmly into the 16-pin
S1-4
5W socket. Repeat the
SW DIP-4
procedure with ICs
5678
U2 and U3.
PF-42 P2 U1 P3
STEPPER MOTOR RED L1 L2 L3 L4
BLACK
COM B-D
PHASE B
6 1
2
OUTB
KBD
Vdd
OE
16
15
7
6
+5V
ENABLE
FINAL
3 14
BROWN
YELLOW
PHASE D
5
4
4
5
OUTD
GND
GND
DIR
GND
GND
13
12
5
4
3
DIRECTION
GND
STEP
ASSEMBLY
PHASE C 6 OUTC STEP 11 2 HALFSTEP
7 10
ORANGE
PHASE A
3
8 KAC
OUTA
HS
PH 9 Before continu-
1 PHASE
2
RED
COM A-C
1
ing, clean the foil side
EXTERNAL SIGNALS
R7 R8 R9 R10 R11
D1 D2 D3 D4 UCN5804
of the PC board with
100K 100K 100K 100K 100K
alcohol or flux
remover. Then refer
to Figure 4 for details
on connecting the
+5V
stepper motor and
DC power supply.
Note that the wire
R13
R4
100K R12
R6 colors for the stepper
8 4 U2 10K
SPEED
ADJUST C3
100K
8 4 U3
220K
motor shown in
J1
J2 2 R
Q
3
0.1
2 R
Q 3
Figure 4 apply only to
LOW
TR
DIS
7 MFD TR
DIS
7 B SINGLE STEP the PF-42 motor that
SPEED 5
CV THR
6 5
CV THR 6
A CONTINUOUS is included in the pur-
NE555 1
R5 22K
S5 NE555 1
chased kit. If you use
+ C6
SINGLE
+ C4
a different motor, you
1.0 MFD
STEP
1.0 MFD
will need to deter-
C2
mine the appropriate
0.1 MFD
FIGURE 1 wire connections to
P2. Also note that the
circuit is designed to
drive six-wire UNIPO-
connector P3 and the four-position DIP capacitors and the voltage regulator. LAR motors only. Next, attach the
switch (S1-4). Switches 1-4 allow for ASSEMBLY INSTRUCTIONS Note that it may be necessary to bend wires from the DC power source to the
manual control of each function, or the leads of the U4 to fit the PC board. PC board, observing the polarity show
alternatively, connector P3 allows the The easiest way to build the step- Now solder IC sockets for U1, U2, in Figure 4.
functions to be controlled by external per motor controller is to use an etched and U3 to the board. If you use the
logic or a microcontroller chip. circuit board as shown in Figure 2. If switch specified in the parts list for S5, OPERATION
The UCN5804B requires an you don’t want to fabricate your own it can be soldered directly on the print-
external pulse input on pin 11 to board, a pre-etched and drilled board ed circuit board. Then install the four To run the stepper controller using
advance the stepper motor. This signal can be purchased from the source LEDs as shown in Figure 3. the on-board oscillator, install jumper
can be supplied by external logic via shown in the parts list. It is recommended that you use J1 in the “A” position and leave J2
connector P3 or can be provided by Locate all the components shown screw-terminal connectors for P1 and open.
U2 or U3. U2 and U3 are LM555N in the parts list and use Figure 3 to P2. Potentiometer R13 can be either On the four-position DIP switch,
timer ICs and are used to provide sin- determine component placement on PC mount style or panel mount style. set S1, S2, S3, and S4 all to the “OFF”
gle-step or continuous pulses to U1. the PC board. Begin by using three To use a panel mount potentiometer, position. Switch the DC power source
U2 is configured as an astable pieces of solid wire for J1, J2, and J3. cut three pieces of stranded wire to ON and the stepper motor should start
oscillator that delivers continuous puls- Next install and solder the four diodes connect R3 to the PC board. If you to turn. The speed can be regulated
es. The pulse rate is controlled by in place, noting their polarity. Then plan to use the controller in stand- with potentiometer R13. Installing

FIGURE 2 alone mode, solder a four-position DIP jumper J2 will FIGURE 3


move on to the resistors and ceramic witch for S1-4. You may omit the DIP switch to a low-speed range. If you try
potentiometer R13 and capacitor C2. capacitors. switch if you plan to use the P3 con- to drive a stepper motor too fast or
Jumper J2 connects C6 in parallel with When installing the 5-watt resis- nector for remote interfacing. with too large of a load, it can stall (see
C2 to give a LOW SPEED range. U3 is tors R1 and R2, leave a small space Next, locate the UCN5804B inte- the note listed at the end of the article).
configured in a monostable mode to between the resistors and the PC board grated circuit (U1). Since U1 is a With the motor turning properly,
produce a single pulse when S5 is to allow for air circulation. Be sure to CMOS device, it can be easily dam- you can switch S2, S3, and S4 to
pressed. Jumper J1 selects between observe proper polarities when aged by static electricity. Take proper change the direction, step size, or
the single-step or continuous mode. installing the electrolytic and tantalum anti-static precautions when handling phasing (see Figure 6). Note that S1 is
Reprinted from October 1998 Nuts & Volts Magazine. All rights reserved. No duplication permitted without permission from T & L Publications, Inc. 2
S4- S3- S2- S1- Note:
FUNCTION PIN 9 PIN 10 FUNCTION PIN 14 PIN 15 While preparing the reprint of this article in PDF
FULL-STEP format, it was reduced to 81% of its original size, so
2-PHASE L L FORWARD L it could be printed on 8½ x 11 paper.Therefore, if
FULL-STEP
WAVE DRIVE H L REVERSE H you desire to use the PCB pattern printed here,
OUTPUT you should enlarge it to the correct size. (124%)
HALF-STEP L H ENABLED L
STEP OUTPUT
INHIBIT H H DISABLED H
Also, the pricing and continued availability of kits or
FIGURE 6 parts, by the listed sources, has not been verified
the output enable and will stop the
motor when the switch is in the “ON” principles. NV and may have changed.
position. To control the stepper func-
tions remotely, set all of the DIP
switches to the “OFF” position and
then use P3 to connect the control sig-
NOTE:
nals to an external microcontroller or
toggle switches.
To operate the stepper controller A ll stepper motors exhibit an
inverse speed-torque relation-
ship. As the stepping rate increas-
in the single-step mode, install jumper
J1 in the “B” position. Each time you es, the back EMF produced by the
press switch S5, the LN555 (U3) will motor causes the current to
produce a single pulse and will cause decrease, which leads to a
the UCN5804 to advance the motor decrease in torque. If the stepping
one sequence position. The motor rate continues to increase, at some
sequence will still be determined by the point the torque of the motor will
settings of S2, S3, and S4. drop below the inertial load and
For single-step to work properly, the motor will “STALL.” The speed-
you must release S5 before U3 com- torque curve can be greatly
pletes its output pulse or else the improved by using a higher input
LM555 will automatically re-trigger.
The single-step mode is a great educa- voltage with series resistors (R1
tional tool because you can actually and R2). Higher input voltages will
observe the various step sequences in continue to improve the perfor-
the LEDs (L1-4). mance until practical power dissi-
This controller is a robot builder’s pation limits are reached or the
dream come true! The kit also makes a voltage/current ratings of the
great educational project for demon- UCN5804B are exceeded.
strating basic stepper motor control

FIGURE 5

Reprinted from October 1998 Nuts & Volts Magazine. All rights reserved. No duplication permitted without permission from T & L Publications, Inc. 3

You might also like