This is only a preview of the October 1995 issue of Silicon Chip. You can view 27 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. Articles in this series:
Items relevant to "Build A Compact Geiger Counter":
Articles in this series:
Items relevant to "A Fast Charger For Nicad Batteries":
Articles in this series:
Articles in this series:
|
PART 2: Last month, we presented
the circuit details of our new
Railpower Mk.II controller. We follow
up this month with the construction
details and a testing procedure for the
completed unit. It can be run from
a standard 12V battery charger or a
model railway power supply.
By RICK WALTERS
L
ET’S STATE AT THE OUTSET
that the Railpower Mk.II is a
highly flexible design and there
is no reason why it has to be built
up in the way we are presenting it in
this article. We are featuring it in two
plastic cases, one for the pushbutton
control unit and a large case for the
microprocessor-controlled pulse pow-
32 Silicon Chip
er board. Many people will probably
want to build the main board into a
large console while others will want
to conceal it underneath their layout.
So be it. You can do it in several ways.
Just remember that the basic circuit,
as featured on the two PC boards, cannot be varied unless you really know
what you are doing. Neither can you
change any of the basic performance
or operational features of the circuit,
since virtually everything is under
the control of the microprocessor; its
Railp
A Wa
F
internal program
ming is fixed and
immutable. With that proviso, let us
now describe the construction of our
prototype.
The main pulse power board is
housed in a standard plastic instrument case measuring 204mm
wide, 67mm high and 156mm deep.
The front panel features the six
board-mounted LEDs and the 8-pin
DIN socket. The rear panel is bare
except for a 5-way insulated terminal
block which carries the power input
and track output wires.
The hand control uses a small plastic case measuring 60mm wide, 30mm
thick and 120mm deep. It connects to
the main unit via a cable fitted with
an 8-pin DIN plug.
Before you begin assembly, both PC
boards should be closely inspected
for etching faults. Any broken tracks
power MkII:
alk -Around Throttle
For Model Railways
should be re
paired and any shorts
cleared with a sharp knife. In particular, look closely at the two thin tracks
between the pads of IC1 on the main
PC board.
and diodes. Next, fit the low profile
capacitors and preset potentiometers.
The four ICs are all oriented in the
same direction, with the notched end
facing the DIN socket end of the board.
It is a good idea to solder the supply
pins of each IC first, and then all the
other pins. For IC1, the supply pins
are 5 & 14, for IC2 & IC4, the supply
connections are pins 16 & 8 while for
IC3 they are pins 14 & 7.
Main board assembly
It is probably better to assemble
the main board first. Its component
overlay is shown in Fig.1. Fit and
solder the five links, then the resistors
Q11
TRACK
10uF
1k
10k
BUZZER
10k
560
REG1
1.8k
2.2k
D1
470
Q9
10k
LED2
IC4
74HC42
LED4
IC3
74HC11
1
680
470
LED3
0.1
.047
10k
10uF
1
VR1
VR2
VR3
Q3
22k
10k
D4-D7
VR4
470
ZD1
2x
22pF
D2
4.7k
10k
1
180k
0.1
VR5
AC
INPUT
IC2
74HC051
X1
10k
10k
1
Q4
1k
D3
IC1
Z86E08
Q8
10k
2200uF
DIN
SOCKET
Q2
Q1
0.1 5W
10k
LED1
Q6
Q5
Q7
LED6
LED5
TRACK
10k
Q12
22k
Fig.1: the
component overlay
for the main PC
board. Note the
heatsink assemblies
for Q2 & Q6 and
for Q4 & Q8. These
have been drawn
so as not to obscure
the surrounding
resistors although,
in practice, they
are mounted above
these components.
22uF
0.1
10k
Next, install the small signal transistors which are all BC338s except
for Q12 which is a BC328. Then fit the
larger components, ensuring that the
electrolytic capacitors and the buzzer,
are inserted with the correct polarity,
as shown on the wiring diagram of
Fig.1.
The four power transistors are
mounted in back-to-back pairs, Q2 with
Q6 and Q4 with Q8. This physically
22k
GND
Q10
2200uF
0.1
October 1995 33
A bird’s eye view of the main PC board in the case. Note how the heatsink
assemblies for the power transistors face outwards from each other. Don’t get
the transistors mixed up when you’re mounting them otherwise they’ll emit
smoke when you turn on the power.
connects their collector tabs together
with the heatsinks sandwiched between the metal tabs of the transistors.
There is no need to use mica washers
for the heatsinks but the metal collec-
tor tabs should have a light smear of
heatsink compound before they are
assembled and bolted together.
In practice, we suggest you bolt the
tran
sistor pairs together with their
Q8
BD649
HEATSINK
HEATSINK
Q4
BD650
Q6
BD649
Q2
BD650
Fig.2: this diagram shows how the four power transistors are
mounted in back-to-back pairs, Q2 with Q6 and Q4 with Q8.
This physically connects their collector tabs together with the
heatsinks sandwiched between the metal tabs of the transistors.
There is no need to use mica washers for the heatsinks but
the metal collector tabs should have a light smear of heatsink
compound before they are assembled and bolted together.
34 Silicon Chip
heatsinks and then insert and solder
the transistor pairs to the PC board –
see Fig.2.
Take particular care to make sure
that you pair up the right transistor
types and don’t swap their connections around when mounting them on
the PC board otherwise they will blow
as soon as you apply power.
The LEDs should be tested before
the leads are bent, as it appears that
there are non-standard ones around.
Normally, the longer lead is the anode,
which should go to the more positive
side of the circuit.
To test the LEDs use a 6V or 9V
battery and the 560Ω resistor used in
the hand control. Connect the resistor
to the battery positive and the longer
lead of the LED to the free end of the
resistor. The other LED lead goes to the
battery negative. If the LED lights it is
a standard type; if it doesn’t, reverse
the LED leads.
If it now lights, cut a couple of
VR1 MOUNTED ON COPPER SIDE
METER
10k
VR1
S1
2
2
4
1
S2
D4
6
D2
8
5
3
7
D3
LED3
8-PIN DIN PLUG
SOLDER SIDE
LED2
D5
D1
S3
Fig.5: this diagram shows
the pin numbers of the DIN
plug, looking at the solder
side. Solder pin 8 first.
S4
LED1
1
IC1
74HC42
LED4
560
S5
4.7k
S6
4.7k
0.1
6
D6
4
7 3
5
TO DIN PLUG
10uF
8
1
Fig.3 (left): this is the component overlay for the hand control board. Trimpot
VR1 is mounted on the copper side of the board, as indicated by its dotted
outline. Note the orientation of each pushbutton switch. Seven of the DIN cable
connections are shown at the bottom of the diagram while the eighth, marked
“2” is at the top righthand corner. Fig.4 at right shows the full-size PC etching
pattern.
millimetres off the end of the longer
lead, making it the shorter one. This
way, all the LEDs will be similar when
you come to bend them. If a LED still
doesn’t light, it is faulty and should
be discarded.
While you have this test setup you
should check the LEDs to be used in
the hand control, but don’t bend their
leads, as they stay straight.
Looking at the LED leads with the
longer one on the right, bend them
both down, 8mm out from the LED
body. The six LEDs on the main PC
board should all have their leads bent
this way.
Front panel
Before you solder the LEDs into the
board, you need to check their alignment. Carefully affix the Dynamark
label to the front plastic panel and
drill out the six 5mm LED holes and
the DIN connector hole.
Insert LED6 (red) and LED5 (green)
into the PC board and solder one leg of
each, leaving about 8mm of lead above
the top of the board. Insert the LEDs
This photo gives a close-up view of the output transistor pairs. The collector
tabs should have a light smear of heatsink compound before they are bolted to
the heatsinks.
through the front panel and slide the
assembly into the guides at each end
of the case.
Screw the PC board into the bottom
of the case using 6mm spacers to lift
the board off the plastic pillars. Check
the alignment of the LEDs through
the front panel holes. If all is OK,
unscrew the PC board, fit the other
LEDs with similar spacing and solder
all the leads.
If you are not happy with the LED
alignment make any neces
sary adjustments.
This completes the assembly of the
main board. It cannot be tested without
the hand control, so let’s build that
next. The component overlay diagram
for its PC board is shown in Fig.3.
Hand control board
After building the main board you
will find this one much quicker and
easier. Look carefully at the overlay
and place the components as shown.
Fit and solder the IC, resistors and
diodes, making sure the resistors
are bent over parallel to the board,
or else they will be damaged when
you mount the board in the case (see
photo). Next fit the capacitors and
push buttons making sure the flat
side of each button faces the centre
of the PC board.
Run an insulated wire on the copper
side of the board, from the pad adjacent to the 10kΩ resistor, to pin 16 on
IC1. The preset potentiometer should
be soldered last, as it is mounted on
the copper side, so that you can adjust
it without unscrewing the PC board.
If you wish, you could drill a hole in
the back of the plastic case, allowing
you to make adjustments to this preset
without removing the back.
The LEDs can be soldered in now,
although it’s best to leave them until
the PC board is assembled into the
October 1995 35
When you have finished assembling the hand control board the two 4.7kΩ
resistors and the 10µF capacitor near the cable end must be laid flat, in order
to fit into the case.
This is the copper side of the board,
after the cable has been terminated.
Note the trimpot (VR1) at the top if the
board. Leave slack on the cable leads,
to avoid any stress. Some of the IC
pins are unsoldered; there is no point
in soldering unused pins.
The completed hand control board is secured to the top half of the case which
must be drilled to accept the meter, the pushbutton switches and the LED
indicators. Note that the tops of the LEDs should just protrude through the case.
plastic case. They can then be pushed
right into the hole in the case front and
their leads soldered.
Now that both boards are finished,
you can assemble the hand control.
Hand control case
The meter is mounted on the front
of the plastic case (the half with the
threaded brass inserts), at the end
with the moulded recess on the front.
Turn the case over and drill out the
two plastic pillars. Start with a drill
just big enough to remove the brass
thread, then fit a drill two sizes larger
and drill out again, repeating until the
pillars are removed.
Place the front panel template
36 Silicon Chip
(Fig.7) on this half of the hand control
and mark all the holes. Drill out the
pushbutton and LED holes. Make the
cutout for the meter either by drilling a
series of holes, then cutting and filing
the plastic or by using a small coping
saw. Finally, drill the two mounting
holes for the meter.
Drill a 12mm hole centrally in one
of the dark grey end pieces. Remove
100mm of insulation and screen from
one end of the 9-way cable and clamp
it in the end piece, using the cable
clamp, leaving 5mm of the outer covering protruding through.
Mount the control board in the case
using the two 10mm metal thread
screws and 5mm spacers to hold it in
position. Check each button operation,
making sure each operates without
jamming. If a button is not free to
move, slacken the mounting screws
and readjust the board position, or
ream out the offending hole. When all
buttons are operating properly, mark
the position of the top mounting hole
for the PC board, through onto the front
panel. Remove the PC board, drill the
hole and countersink it in the front of
the case to allow the 2.5mm machine
screw to sit flush.
Hold the board so that, when you
look at the components, the red button
is at the bottom right. Insert both the
righthand LEDs into the PC board with
the long lead on the righthand side.
The lefthand LEDs should have their
long lead on the lefthand side. The red
LED goes above the STOP button, the
green above the FORWARD button, The
yellow above REVERSE and the orange
above INERTIA.
Replace the control board using
the 12mm countersunk screw, 8mm
spacer and nut, as well as the metal
Design Philosophy For the Railpower Mk.II
While last month’s article gave a
comprehensive circuit de
scription,
we did not have the space to fully
describe some of the operating features, especially as they related to
our very popular Railpower design
featured in April & May 1988. While
that design was very effective, there
were a number of features which we
would have liked to improve upon
but could not, without an excessive
amount of extra circuitry. In particular,
we have had comments from readers
about the following points.
When the Railpower was turned
off, it inevitably caused any loco on
the track to give a very slight lurch
forward. At about the same time, the
overload protection buzzer would
briefly sound at a low level. This
happens because the op amps in the
circuit lose control once the supply
voltage drops to a very low value. It’s
a minor problem but a problem that
would be nice to solve.
While some examples of the Rail
power with infrared remote control
came on with Forward selected, most
seemed to come on with Reverse
selected and while this was easily
corrected by pushing the Forward
button before pushing the Faster
button, again it was something we
would have liked to fix.
A more subtle problem involved
the minimum speed setting. In order
to make the controls more respon-
thread screws and spacers, checking
the operation of all the buttons again.
Once all is OK, push the LEDs forward until they protrude satisfactorily
through the front panel then solder all
leads of the LEDs.
Cable termination
Slide the grey endpiece with the
cable into the channels, at the end
away from the meter, then cut and
solder the wires as detailed in Table 1,
leaving around 20mm of slack on each
one. The terminations for the wires
are marked on the copper side of the
board. Pins 1-8, excepting pin 2, are
all at one end of the board. Pin 2 is at
the other end of the board.
To make it easier to follow, we sug-
sive, we provided a minimum speed
trimpot and this was set to provide
a low voltage across the track so
that the locomotive was just on the
point of moving. However, with many
locomotives, the very narrow pulse
output at the minimum speed setting
caused an audible buzz. There was
no way around this.
In designing the microprocessor
version of the Railpower, we were
able to address all the above problems without any added circuitry – it
was all done in the programming.
Hence, when power is first applied,
the Railpower controller always
comes on with STOP selected. To
make the loco go forward, just press
FOWARD and the FASTER button
until the desired speed setting is ob
tained on the meter.
The minimum speed buzz problem
was solved in the following way. If the
train is stationary and Forward or
Reverse is selected, then the minimum speed voltage will be applied
to the track and the loco will produce
a background buzz. However, if the
train is stationary and the Stop button is pressed, the track voltage is
reduced to zero; the loco will then
be totally quiet.
Forward/Reverse protection
In the infrared remote control version of the Railpower (presented in
April and May 1992), we added pro-
gest that, as far as possible, you use
the wire colours corresponding to the
resistor colour code.
The braid (shield) of the cable
should also be connected to the PC
TABLE 1
Colour
Pin no.
Pink
1
Red
2
Orange
3
Yellow
4
Green
5
Blue
6
Violet
7
Grey
8
tection against throwing the train into
reverse while it was going forward at
speed. Normally, if you throw a model
train into reverse it is highly likely it
will be derailed and that could cause
lots of damage to expensive models
(if the loco and wagons fall off the
layout onto the floor).
In the remote control version of
the Railpower, the for
ward/reverse
protection prevented reverse from
being selected until the train had been
brought down to a very low speed. In
the new microprocessor version we
have taken a different approach. Now
if you press Reverse while the train is
going forward, it will come to a stop
and then the controller will switch to
Reverse. However, it will not move off
until you use the Faster button.
That way, the modeller will get a
positive response when the Reverse
button is pushed, even if that outcome had not really been intended.
The train is still protected against
damage though. We have taken this
alternative approach because some
users find it confusing when there is
no response to persistent pressing
of the buttons. This way, you learn to
press the right buttons.
Finally, because the microprocessor allows nothing to happen unless a
button is pressed, there is no disconcerting lurch from a locomotive when
the unit is switched off and nor does
the buzzer sound briefly.
board. Cover the braid with a piece
of sleeving and connect it to the pad
marked B(raid). The cable we used
had two green wires so we used the
dark green for the termination; the
light green wire should be cut off
as short as possible, as it is
not used.
October 1995 37
Fig.6: this is the
full-size etching
pattern for the main
PC board. Check
your board carefully
for etching defects
before installing any
of the parts.
The Dynamark label can now be
affixed to the front panel and the meter mounted. Run two wires from the
PC pads marked “meter” to the meter
terminals, left pad to left lug, right pad
to right lug.
The other end of the cable can now
be terminated into the 8-way DIN
plug. To prevent the pins moving as
you solder them, push the plug into
the socket on the main board. Don’t
forget to slide the outer rubber sleeve
of the plug, small end first, onto the
cable before you begin!
Cut the insulation and sheath back
about 30mm, cut off the light green
wire, and using the previous table connect the wire colour to the corresponding pin number. We have shown the
pin markings for an 8-pin DIN socket
in the diagram of Fig.5 as some DIN
sockets do not have the pin markings
and even if they do, they can be hard
to see even under good lighting.
The braid should be threaded
through the hole in one of the clamps
that restrain the cable, then soldered.
Check the colours against the numbers
again, then reassemble the plug.
Testing
Set trimpots VR1 (Inertia) and
VR2 (Brake) to mid position. Turn
38 Silicon Chip
C
C
A
A
D
B
B
A
A
B
B
A
A
HOLES: A = 9mm
B = 3.2mm
C = 2mm
D = 2.5mm
Fig.7: photocopy this diagram and
use it as a template when drilling and
cutting the holes on the hand control.
the minimum speed control VR4 to
minimum and the maximum speed
control VR3 to maximum. Set the Meter adjustment VR5 to centre position.
Set trimpot VR1, in the hand control,
anticlockwise.
Power input to the main board can
be from a standard 12V battery charger
or from a 12-15VAC model railway
power supply. Either way, you connect
to the two PC pins on the board marked
“AC input”.
Plug the hand control into the main
board and turn on the power. The
green power LED on the main board
should light imme
diately, followed
by the red Stop LEDs on main board
and the hand control. Pressing the
Forward button should extinguish the
Stop LED and light the green Forward
LED on both units. Pressing Reverse
should cause the green LED to go out,
the Stop LED to light briefly, then the
yellow Reverse LEDs to light.
Hold down the Faster button and
the meter should start creeping up
the scale. Release the button and the
meter should instantly drop back then
begin to climb slowly. Press Slower
and the meter should jump upscale
then creep back as the button is held
down.
If everything is working so far, it
STOP
RAILPOWER
Fig.9: the full-size artwork for the
hand control label.
is time to test the unit in situ. Turn
off the mains power and disconnect
the wires from the main board and
then mount it in the case. Fit a 5-way
insulated terminal block to the back
panel, as shown in the photograph,
to take the wires for the AC input and
track output. Connect the Railpower
to your layout and place a loco on it.
Turn on the mains power and the
green power LED should come on as
before. Pick up the hand control and
press FORWARD, then hold FASTER
down and if the train moves forward,
the polarity of the wires to the track
is correct. Note that the train may not
move immediately, as the minimum
speed preset was set to 0V. If the
train runs backwards, swap the wires
connecting the controller to the track.
Calibration
It will take a few attempts to get
the adjustment of the trimpots to
your satisfaction. The minimum
and maximum speed trimpots will
undoubtedly need resetting several
times, as well as those for inertia and
brake. As we explained in the circuit
description last month, the microprocessor normally only reads the values
set on the trimpots when the power
is first turned on.
To save you from having to turn
the power off and on after each adjustment, it is only necessary to hold
down the FORWARD button and then
press and release the INERTIA button.
Fault finding
There are two rules to follow if it
doesn’t go when you turn it on. The
first rule is don’t panic and the second
is don’t assume that you have a faulty
IC or crook transistor. While it may be
a shock to your ego, the most likely
reasons why the unit does not work
are shorts due to solder splashes on
the underside of the board, poorly
soldered or unsoldered connections,
crossed wires in the DIN connector
cable or components in the wrong
way. So the first step in rectifying any
problem is to very thoroughly inspect
your work.
As all the LEDs have been tested,
there shouldn’t be any problems
associated with them. If you wish to
check the DIN cable, use a multimeter
set to a low Ohms range and check for
continuity between each pin and its
respective pad on the hand control
PC board.
If the green POWER LED does not
light you may have a problem with
your power wiring or a short on the
+5V line. You should have +5V at the
output of REG1, at pin 5 of IC1, pin
16 of IC2 & IC4, pin 14 of IC3 & IC1 in
the hand control and at Q12’s emitter.
If the green LED lights but the red
Stop LED does not light at power-on,
the first step is to unplug the hand
RAILPOWER
INERTIA
OV
E
FORWARD
R
L
OA
D
REVERSE
ST
OP
FO
R
W
AR
D
RE
V
E
IN
RS
ER
E
T
I
A
OF
F
FASTER
ER
SLOWER
This tells the microprocessor to read
the trimpot values again.
So each time you want to readjust
the trimpots, press these buttons to get
the new values loaded into the microprocessor’s memory. If you readjust the
minimum speed it will be necessary to
stop the train to make this new value
effective.
Once you are satisfied with the
trimpot settings, you can calibrate the
meter. Slow the train with the SLOWER
button until it comes to a complete
stop. Adjust trimpot VR1, in the hand
control, until the meter’s pointer is on
zero. Press FORWARD, wait until the
green LED lights, then press INERTIA
and the orange LED will light. Take
the train to maximum speed, then set
trimpot VR5 on the main board for a
reading of 10 on the meter. There is a
small amount of interaction between
these two adjustments and it may take
several attempts to get them spot-on.
Note that if you change the settings
of the maximum or minimum speed
trimpots, you will have to recalibrate
the meter.
PO
W
SPEED
Fig.8: the artwork for the front panel
label of the main board case.
control. Turn the power off, wait for
10 seconds then re-apply power. If it
now lights, the problem is most likely
in the cable connections.
If all the LEDs light in the way they
should when the buttons are pressed,
but the loco does not go, then the
microproces
sor is working and the
fault is in the area associated with IC3
SC
or the transistor H-bridge.
October 1995 39
|