This is only a preview of the June 1997 issue of Silicon Chip. You can view 31 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Colour TV Pattern Generator; Pt.1":
Items relevant to "High-Current Speed Controller For 12V/24V Motors":
Items relevant to "Build An Audio/RF Signal Tracer":
Articles in this series:
Articles in this series:
Items relevant to "Manual Control Circuit For A Stepper Motor":
Articles in this series:
Articles in this series:
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
This photo shows the stepper
motor PC board teamed with
a small stepper which could
be used for a variety of tasks.
Note: D3 & a 10µF capacitor
have been added since this
photograph was taken.
This circuit will drive a stepper motor in one direction
or the other for a fixed time. It has a variety of applica
tions & could be used to power a model railway boom
gate or give slow motion operation of points.
Manual control circuit
for a stepper motor
By RICK WALTERS
Typical stepper motor applications
generally involve a drive circuit under
the control of a computer or microprocessor. By contrast, this circuit
has been produced as a self-contained
PC board designed specifically to suit
small stepper motors which draw just
a few tens of milliamps at 5V.
When the actuate button (S1) is
pressed, the stepper motor will run in
one direction for a fixed time. When
the actuate button is pressed again,
62 Silicon Chip
the stepper motor will run in the other
direction for the same fixed time. You
can use two buttons (S2 & S3) to preset
the forward and reverse directions of
the motor before the actuate button
is pressed.
While the speed at which the
stepper motor runs is fixed, you can
set the stepping rate by changing a
resistor or capacitor in the circuit.
Note, however, that this circuit does
not allow an exact number of steps to
be specified, just the speed, duration
and direction.
Model railway application
There are still many places in
Australia where level crossings are
controlled by boom gates. Wouldn’t it
be nice to have a level crossing with
motorised boom gates on a model
railway layout? This stepper motor
drive circuit could be used to provide
the motive power.
In practice, the actuate switch (S1)
could be a reed switch operated by the
model locomotive as it approaches the
crossing. This would cause the boom
arm to lower. A second reed switch,
wired in parallel with the first, is
placed after the crossing, so that the
locomotive operates it to raise the
boom arm.
Circuit operation
The full circuit of the stepper motor
controller is shown in Fig.1. It can be
divided into three sections: one controlling the duration of operation, one
controlling the speed and direction of
stepping, and the third controlling the
stepper motor drivers.
The first section involves IC1, a
555 timer connected as a monostable.
When pushbutton switch S1 is closed,
pin 2 of IC1 is pulled to 0V and its
output at pin 3 goes high for about 10
seconds. This will turn PNP transistor
Q1 off and its collector voltage will
fall from +5V to 0V.
This has two outcomes. First, D1,
which held the 0.1µF capacitor at pins
1 & 2 of Schmitt NAND gate IC5a at
+4.4V, is no longer conducting and
therefore IC5a works as an oscillator.
Its output at pin 3 will be a square
wave with a frequency of about
100Hz. This signal is fed to the clock
input of a decade counter, IC2. When
this input is clocked each of the 10
outputs of IC2 will change from low
to high in sequence.
The second outcome is that the
collector of Q1 – which held IC2 reset
via diode D2, IC4a reset at pin 4 and
IC4b reset at pin 12 – is no longer high
and so these ICs are now enabled and
can be clocked. Q1’s collector is also
connected to the clock input of IC3a,
but as this IC needs a low to high
transition to toggle the output, this
change has no effect.
Bridge drivers
Before we describe the logic operations any further, let’s look at the
stepper motor drivers. The type of
stepper motor specified consists of
two centre-tapped windings MA and
Fig.1 (right): this motor driver circuit
is suitable for driving low current
stepper motors. It drives the stepper
motor in one direction or the other
each time switch S1 is closed.
June 1997 63
Fig.2: follow this parts layout diagram when installing the parts
on the PC board and be careful not to mix up the transistor types.
output high for around 10 seconds, as
already noted. During this time IC5a
will clock IC2 at 100Hz. This means
that the output of IC2, pin 3, will go
high for 10ms then low as pin 2 goes
high for the same time. Pins 4 and 7
will follow this sequence but when
pin 10 goes high it will immediately
reset IC2 through D3, causing pin 3
to go high again. Then the sequence
will repeat.
Each time pin 4 of IC2 goes high, it
clocks IC4a and reverses the direction
of the current through MA. IC4b is
clocked either by pin 2 or pin 7 of
IC2, depending upon the state of the
outputs of IC3a.
If pin 1 of IC3a is high, gate IC5c is
enabled and pin 7 of IC2 will clock
IC4b. If pin 2 of IC3a is high, gate IC5b
is enabled and pin 2 of IC2 clocks
IC4b. In the latter case, IC4b is clocked
before IC4a and the motor will step in
one direction.
If IC3a is toggled then IC4a will be
clocked by pin 4 of IC2 before IC4b
will be clocked by pin 7. Therefore, as
explained previously, the motor will
now rotate in the opposite direction.
Turn off
Fig.3: this is the full-size etching pattern for the PC board. Check
your board carefully before installing any parts.
MB, the centre taps of which are not
used. Each winding is connected
across a bridge of four transistors,
Q2-Q5 and Q6-Q9.
We will first describe how winding
MA is driven, as the drive to MB is
identical.
Assume pin 1 of IC4a is high, and
therefore its complement, pin 2, will
be low. Pin 1 will turn Q2 off and Q3
on. Pin 2 will turn Q4 on and Q5 off.
As both Q3 and Q4 are turned on,
current will flow through winding
MA from right to left.
If IC4a is now clocked, its outputs
toggle and so pin 1 goes low and pin 2
64 Silicon Chip
goes high. If you trace it out, you will
see that Q2 and Q5 are now turned on
and the current flow in MA is from left
to right. Therefore, by clocking IC4a
we reverse the direction of the current
in MA. A similar reversal occurs for
IC4b and winding MB.
To make the motor rotate (in either
direction) we have to delay the phase
of the current in MA relative to MB.
To rotate it in the opposite direction
we must delay MB relative to MA.
Now that we know what we have
to do to run the motor, let’s look at
how it happens.
When IC1 is triggered it will hold its
Ten seconds after switch S1 was
closed, the pin 3 output of IC1 will go
low and Q1 will turn on again. This
resets all the counters and the motor
is stopped. At the same time, this low
to high transition by Q1’s collector
will clock IC3a, thereby ensuring the
motor will rotate in the opposite direction next time it is powered.
At power on, the 0.1µF capacitor
connected to pin 6 of IC3a ensures
that this pin is briefly pulled high.
This sets IC3a so that its pin 1 is high.
Thus, the motor will always rotate
in the same direction each time the
power is first applied.
Forward/reverse, up/down
Provision has also been made
for two switches (UP & DOWN) to
change the direction of the motor.
These are on the set and reset pins of
IC3a. These switches should only be
used when the motor is stopped. The
motor may not reverse its direction if
they are used while it is running, as
it depends on the actual phase of the
drive waveforms.
PC board assembly
Begin as usual by checking the PC
board against the artwork of Fig.3.
Check for undrilled holes, shorts
between tracks, especially where
the tracks run between the pads on
IC4 and IC5, and open circuit tracks.
Make any necessary repairs before
proceeding.
Use the component overlay diagram
of Fig.2 as a guide when inserting
components into the PC board.
Begin the assembly by fitting and
soldering the seven links, followed by
the resistors and IC sockets, if used.
To give the PC board that professional
look, make sure that all the resistors
have their colour codes running the
same way, vertically and horizontally
(this also makes them easier to check
later on).
The MKT and monolithic ceramic
capacitors are fitted next and their
markings should be similarly aligned.
Lastly, fit the two electrolytics, three
diodes and nine transistors, making
sure that all are correctly orientated.
Once you have finished, check your
soldering, making sure that all the
joints are nice and shiny and that there
are no bridged tracks. A dull joint is
a sign of potential trouble. Finally,
insert and solder the ICs, or plug them
into the sockets. Make sure they are
inserted correctly.
Testing the controller
The specified stepper motor’s leads
can be removed from the plug by
pulling the wire gently while pressing
the retaining lug on one side of the
socket with a jeweller’s screwdriver or
a small nail. Leave the green wires in
the plug at this stage. Solder the pins
into the PC board with the colours as
shown in Fig.2.
The motor should turn reasonably
freely but when the power is applied
the circuit should draw around 50mA
and the motor will “lock” and be
much harder to turn.
Briefly short pin 2 of IC1 to pin 1
and the motor should begin turning.
After 10 seconds or so it will stop.
If pin 2 is shorted again the motor
should run again but in the opposite
direction.
Once you trigger IC1, the motor
will run for about 10 seconds in either direction. If you need to run the
motor for a longer time, increase the
1MΩ resistor at pin 7 of IC1. The run
time is directly proportional to the
value of the resistor. Increasing it to
1.2MΩ will run the motor 20% longer.
Conversely, if the motor runs for too
long, reduce the resistor value.
You can also change the speed at
which the motor steps by varying the
100kΩ resistor or 0.1µF capacitor at
pins 1 & 2 of IC5a although there are
limits. If you try to run the stepper
too fast it will merely stall. As a guide
though, you could double the speed
of stepping by halving the 100kΩ resistor between pins 1 & 3 of IC5a. Or
if you wish to run the motor at half
the speed, double the resistor value
between pins 1 & 3 of IC5a.
It doesn’t work!
The first step is to check your work
against the PC board overlay of Fig.3.
A tiny solder bridge is all it takes to
stop the unit from operating.
Next, set your meter to the 10V DC
range and connect its negative lead
to the DC negative input. Connect its
positive lead to D1’s anode. The meter
should read 5V ±10% (due to the tolerance on REG1). Momentarily short
pin 2 of IC1 to pin 1 and the meter
should read 0V for about 10 seconds
then return to the previous reading.
Check that this occurs at pins 4 and
12 of IC4 and pin 3 of IC3. Each time
the anode of D1 goes high it should
clock IC3a. Make sure pin 1 of IC3
alternates (+5V or 0V) each time you
trigger IC1.
While IC1 is triggered, the outputs
of IC2 (pins 2, 4 & 7) should be cycling.
If you put an analog multimeter on
each pin it should read around 1.3V.
A digital meter will jump around
PARTS LIST
1 PC board, code 09106971, 76
x 97mm
1 stepper motor, Oatley
Electronics M17 or equivalent
1 8-pin IC socket
2 14-pin IC socket
2 16-pin IC socket
Semiconductors
1 555 or 7555 timer (IC1)
1 4017 decade counter (IC2)
1 4013 dual-D flipflop (IC3)
1 4027 dual-JK flipflop (IC4)
1 4093 quad NAND Schmitt
trigger (IC5)
5 BC558 or BC328 PNP
transistors (Q1,Q2,Q4,Q6,Q8)
4 BC548 or BC338 NPN
transistors (Q3,Q5,Q7,Q9)
3 1N914 small signal diodes
(D1-D3)
1 1N4004 1A diode (D4)
Capacitors
1 100µF 16VW PC electrolytic
1 10µF 16VW tantalum or low
leakage electrolytic
1 10µF 25VW PC electrolytic
5 0.1µF 100VW MKT polyester
or monolithic ceramic
1 .01µF 100VW MKT polyester
Resistors (0.25W, 1%)
1 1MΩ
10 10kΩ
2 100kΩ
1 4.7kΩ
1 22kΩ
1 3.3kΩ
Miscellaneous
Tinned copper wire, red & black
hook-up wire, solder
with readings varying between 1.2V
and 1.4V.
Once you locate the area where the
problem exists you will have to check
for incorrect component values or solder bridges and the PC board etching
SC
for shorts or open circuits.
RESISTOR COLOUR CODES
No.
1
2
1
10
1
1
Value
1MΩ
100kΩ
22kΩ
10kΩ
4.7kΩ
3.3kΩ
4-Band Code (1%)
brown black green brown
brown black yellow brown
red red orange brown
brown black orange brown
yellow violet red brown
orange orange red brown
5-Band Code (1%)
brown black black yellow brown
brown black black orange brown
red red black red brown
brown black black red brown
yellow violet black brown brown
orange orange black brown brown
June 1997 65
|