This is only a preview of the March 2023 issue of Silicon Chip. You can view 37 of the 104 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 "The Digital Potentiometer":
Items relevant to "Model Railway Turntable":
Items relevant to "Active Mains Soft Starter, Part 2":
Items relevant to "Advanced Test Tweezers, Part 2":
Purchase a printed copy of this issue for $11.50. |
Model
Railway
e
l
b
a
t
n
Tur
By Les Kerr
This Turntable is an excellent addition to just about any model railway layout. It
allows you to turn a locomotive around at the end of a track and automatically
reverses power to the rails, so they aren’t shorted out. The electronics are easy
to build, while the other parts can be made with moderate machining skills.
R
ailway turntables have been
around since 1830. Some early
engines could only run in one
direction, so there needed to be a way
to turn them around. The solution was
to lay rails on a bridge and then mount
the whole assembly on a bearing.
To reduce sag as the engine moved
onto the ‘table’, four wheels on the
bridge extremities transferred the
weight to a circular rail that ran around
the perimeter.
Initially, the turntables were rotated
by hand, but later on, they were motorised. I can remember as a young lad
being fascinated that the driver and
fireman could push a massive steam
42
Silicon Chip
engine through 180° with little effort.
In Australia, most major country towns
on the railways had one.
Still, once the steam era ended, they
fell into decline as the diesel engines
were double-ended; ie, they could be
driven from both ends.
As I run Peckett-style tank engines
on my OO gauge model railway, I
searched the internet for a suitably-
sized turntable and found one at Swanage in the UK. I based my design on
that, and you can see it operating in
the video at siliconchip.au/Videos/
Model+Railway+Turntable
If you have larger engines, the
design can be used by increasing its
Australia's electronics magazine
dimensions. The only restriction is
the maximum diameter that your lathe
can turn.
I am using a bipolar 200-step stepper
motor to rotate the train deck. As you
need to line up the moving rails with
the stationary rails precisely, the motor
is driven using eight micro steps. This
means the motor moves through ⅛th of
a step for each controller input pulse.
To rotate it 180°, you need to pulse the
motor 800 times, giving better accuracy than in single-step mode.
The other challenge is that you need
to provide power to the rotating rails
and need to reverse the rail polarity
once the turntable has rotated through
siliconchip.com.au
Fig.1: this diagram shows the order in which the major parts are assembled in the stack. The Spring Tension Spacer
may not be required, or it might need to be thicker; that can be determined during final assembly.
siliconchip.com.au
Australia's electronics magazine
March 2023 43
SPRING LOADED CONNECTOR PINS
(ONE FOR EACH RAIL)
ROTATING
RAIL PLATFORM
WHEEL
ASS’Y
RAILS
WHEEL
ASS’Y
GIRDER
INSULATOR
SPRING TENSION
SPACER
STATIONARY
RAIL PLATE
CENTRING
INSERT
BOTTOM PCB
(SEE BELOW)
HEIGHT ADJUSTMENT
SPACER
STEPPER MOTOR
(NEMA 17)
TRAIN CONTROLLER
NEGATIVE SUPPLY
PCB HELD IN PLACE ON
STATIONARY RAIL PLATE
BY PINS THROUGH
THESE HOLES
TRAIN CONTROLLER
POSITIVE SUPPLY
BOTTOM PCB,
VIEWED FROM THE
PIN CONNECTION SIDE
Fig.2: this ‘cutaway’ overview of the Turntable doesn’t include all the parts
and details, but it shows how most of the parts go together.
Fig.3: the Centring Insert fits inside the Housing and keeps the stepper
motor and Turntable aligned.
44
Silicon Chip
Australia's electronics magazine
180°. To achieve this, I used two goldplated spring-loaded pins (shown in
Fig.2), one connected to each moving
rail. The spring-loaded parts of the
pin make contact with the tracks on
the stationary gold-plated PCB below.
Initially, the first pin is connected
to the positive terminal of the controller and the second pin is connected
to the negative pin. When the rails
rotate through 180°, the connections
are swapped.
You will need a lathe and a milling
machine to make the various parts. The
rails must line up in both the vertical
and horizontal planes, so it is essential
that you use the dials (without backlash) on your milling machine to set
the distance between holes and centre
lines. Where possible, you should do
all operations to the part in one session.
To help align the rails in the vertical
direction on the Turntable, I placed a
grub screw near the end of each rail.
By rotating the grub screws clockwise,
I could jack up the rail and reduce the
height by turning them in the opposite direction.
Fig.1 shows the various parts that
make up the Turntable. I will go through
each one in detail. The materials
needed are all shown in the parts list.
#1 Centring Insert
Photo 1 shows the Centring Insert
(Fig.3) fitted into the Housing, made
from a piece of 65mm diameter aluminium round bar. Its purpose is to
hold the stepper motor axis precisely
in line with the axis of the base, ie,
on-centre. The critical dimension is
the 22mm hole through its centre,
which must match the size of the
locating boss on the top of the stepper
motor assembly.
In boring the hole, when I was just
below the 22mm diameter, I made
1/1000th of an inch (25-micron) passes
until the stepper motor just slid into
place. To do this, mount the bar in a
three-jaw lathe chuck so that at least
8mm protrudes. Face the end and
reduce the outer diameter to 64mm.
Drill a hole 8mm deep in the centre
using a centre drill, followed by a 5mm
diameter drill.
Transfer the chuck to the milling
machine. Using a centre finder, locate
the centre of the 5mm hole. Drill the
eight holes, tapping the outer four for
M3 and countersinking the inner four
holes. Return to the lathe and use a
boring tool to enlarge the 5mm hole
siliconchip.com.au
Photo 1: the Timber Housing (base) with the Centring Insert
and stepper motor already inside it.
Photo 2: the timber Housing in the process of being
turned. Note how the raw timber has been cut into a
roughly octagonal shape to make turning it a bit easier.
to 22mm, as described above. Part off
and face the other side to a thickness
of 4mm
#2 Timber Housing
The critical dimensions of the Timber Housing are the diameter and
depth of the 64mm hole into which
the Centring Insert fits (see Fig.4). It
should fit tightly, and the top surface
should be a few thousandths of an inch
(about 0.1mm) below the bottom of the
120mm diameter hole.
Start with a 140 × 140 × 45mm pine
off-cut. To save time, cut off the corners to make it roughly octagonal, with
the inscribed circle having a diameter of about 140mm. Use six wood
screws and washers to mount the timber central on the lathe face plate (see
Photo 2). Turn the outside diameter to
135mm for a length of 35mm.
Drill a hole in the centre 35mm
deep using a centre drill, followed
by a 13mm drill. Fit a boring tool
and cut the 120mm diameter hole to
18.6mm deep (see Photo 3). Next, bore
out the hole for the Centring Insert as
described above. Use a 400-grit emery
cloth to smooth the surfaces.
Fit the Centring Insert (shown in
Photo 1) and, using a 2.5mm diameter
drill and the centring piece as a template, drill the four holes that hold it
in place. Next, enlarge the four holes
in the Housing to 3mm diameter.
Align the x/y coordinates of the
milling machine with the four mounting holes. Using a 3/8in or 10mm end
mill, cut out the rectangular clearance
hole for the stepper motor to a depth
of 12mm. Check that the stepper motor
clears the cutout.
siliconchip.com.au
Fig.4: the Timber Housing forms the base of the Turntable with the stepper
motor inside. The stationary Rail Plate fits inside it and the Turntable part
rides on that. This diagram is shown at 75% of actual size. All cutting
diagrams will be available for download on the Silicon Chip website.
Australia's electronics magazine
March 2023 45
Photo 3: at this stage of the turning, the timber Housing is
almost complete.
Fig.5: the Height Adjustment Spacer
fits between the Centring Insert and
Stationary Rail Plate. Its purpose is to
allow you to adjust the height of the
top of the Rail Platform to match the
height of the top edge of the Housing.
Photo 4: this shows the semi-rectangular recess in the
Housing underside, where the stepper motor is mounted.
While there, drill the 3.5mm clearance hole for the Rail Plate mounting
and the two ¼in (or 6.5mm) holes for
the rail power exit holes for the wires.
The latter two are elongated at an angle
using a round file. This makes it easier
to get the wires through in the assembly process.
Returning to the lathe, the next step
is to machine the rear of the Housing,
so it is the correct depth.
Use a three-jaw chuck fitted with
reverse jaws to hold the machined
side against the chuck face, so it runs
true. To prevent the timber from splitting when the jaws are expanded, fit
a pipe clamp around the perimeter of
the Housing (see Photo 4). Use a wood
saw to reduce the thickness to about
30mm. Face the end to the finished
thickness and clean up all the holes.
Using four M3 × 10mm screws and
shake-proof washers, fit the Centring
Insert into the Housing. Attach the stepper motor using four M3 × 6mm countersunk head screws – refer to Fig.1.
#3 Height Adjustment Spacer
Photo 5: the Rail Plate inside the
Timber Housing. Note that this was
taken before all the holes were
drilled.
46
Silicon Chip
The purpose of the Spacer (Fig.5) is
to allow you to adjust the height of the
Rail Platform relative to the top edge of
the Housing. I made mine from a piece
of scrap PCB material 1.6mm thick.
The Spacer is to eliminate any variation in material thickness and machining tolerances. You may have to experiment with its thickness or make it
out of several pieces to get the correct
height. You won’t know this until after
the final assembly.
#4 Rail Plate
The Rail Plate (Fig.6) is a slide fit
Australia's electronics magazine
into the Housing and, as the name suggests, it has a circular rail on its perimeter for the four support wheels to run
on – see Photo 5. These take the weight
of the locomotive as it moves onto the
Platform. It has grooves cut into the
underside for the rail power wires.
It is made from a piece of ¼in
(6.35mm) thick aluminium plate. To
save machining time, I used a hacksaw
to cut out a hexagonal piece inscribed
on a circle of about 124mm diameter.
To enable it to be mounted on the
face plate of the lathe for machining,
drill and tap four holes marked A as
shown in Fig.6. Depending on your
face plate size and shape, you may
have to move the position of these
holes. Drill a further 3mm hole in the
centre to centre the workpiece.
Mount it to the lathe using M4
machine screws and washers with a
piece of Masonite between the faceplate and workpiece, so it runs true.
Face the surface, then turn the outside diameter (approximately 120mm)
so that it is a slide fit in the Housing.
Enlarge the centre hole to 10mm
and then use a boring tool to reduce
the inside to a depth of 2.7mm and a
diameter of 109.6mm.
Change over to an RH tool and
reduce the outside depth by 2.7mm
so that you end up with a rail width
of 1.2mm. Using emery cloth, slightly
round the top edges of the rail and
smooth the Rail Plate surface.
The rear of the Rail Plate now has to
be machined to size. Remove the plate
from the face-plate and remount it so
its rear is facing away from the chuck.
As you are only facing the surface, it
is not essential to set it running true.
siliconchip.com.au
Fig.6: the Rail Plate fits inside
the Timber Housing and is the
stationary part, with the Turntable
assembly riding on it by the Wheel
Assemblies.
Holes A are temporary holes used
to fix the job to the face plate
when machining. They are 3.3mm
diameter tapped to M4 and spaced
30° from horizontal on a 40mm
radius from centre.
Fig.7: the
Locating Pins
keep the Contact
PCB stationary,
locked to the Rail
Plate while the
Turntable rotates
above it.
Reduce the plate width so that the
dimension between the bottom of the
rail and the back of the plate is 3.3mm.
Remove the job and transfer it to
the milling machine to drill the holes
and cut the grooves for the wires on
the bottom. To centre the job, I turned
a piece of scrap aluminium into a disc
that was a slide fit in the 10mm hole
in the centre of the Rail Plate. I drilled
a 5mm hole in the centre of the disc. I
then clamped the job down and using
precision drilling, bored and tapped
holes as shown in the drawing.
I loosely clamped the job onto the
base of the milling machine and, with a
centre finder in the drill chuck, moved
the job until the centre finder moved
true. I then clamped the job down and,
using precision drilling, bored out the
holes. Finally, I used a 1/8in (3.2mm)
diameter slot drill to cut the grooves
for the wires.
Now make and fit the Locating Pins
siliconchip.com.au
for the PCB – see Fig.7. Cut two 4.6mm
lengths of 1.5mm diameter brass rod.
Clean the ends up using the lathe,
then use Loctite 620 to glue them in
place into the Rail Plate, in the holes
marked F.
The last job is to fill the four 4mm
holes that were used to mount the job
in the machining process. I made a
piece of threaded M4 aluminium rod
and chopped it up into four 3.5mm
lengths. I applied Loctite 620, fitted
them in the holes and ground off the
excess material.
#5 Spring Tension Spacer
This is a small washer made of
0.25mm card that is placed under the
PCB (see Fig.2). This increases the
height of the PCB and hence the tension in the contact.
#6 Contact PCB
This will be available as a gold-plated
Australia's electronics magazine
Fig.8: the gold-plated Contact PCB is
responsible for transferring power
from the stationary Housing to the
rotating Turntable above. The springloaded pins moving on its tracks
reverse the polarity of the power to
the rails as it passes through 90°.
March 2023 47
Photo 6 (below): the Contact PCB used
in the prototype is not gold-plated like
the commercial version we’re making
available, but it does the same job of
transferring power to the rails.
Photo 7 (right): this photo shows the Girder and Wheels attached to the Rail Platform along with the Insulator, springloaded pins and wires connecting the rails to those pins. You can also see where the Fence Posts are glued into holes along
either side of the Rail Platform.
PCB coded 09103232 (see Fig.8). It is
held in place by the brass pins in the
Rail Plate and the tension of the springloaded pins.
#7 Girder
This is made from a 118mm length of
rectangular aluminium extrusion, 30 ×
15 × 2mm (see Photo 7). You can purchase this from Bunnings in one-metre
lengths. Take some time to locate the
exact centre, then use a centre drill to
drill a hole there, followed by the hole
sizes shown in Fig.9. Precision drill all
the holes on the top surface.
Next, tap the two 1.4mm holes at
the ends with 10BA threads. Note that
two of the 2.3mm diameter holes are
countersunk.
The next step is to mill the sloping sides. To save milling time, use a
hack saw to remove as much material
as possible. Mount the 15mm sides
between the jaws of the vice on the
milling machine. Rotate the vice 3°
and, using a long series end mill, cut
the taper at one end until the desired
thickness is reached. Repeat for the
other end. Mill the thickness to the
correct size.
#8 Centring Bush
As this part is a slide fit into the
Girder, you should make it after the
Girder is completed. Chuck a piece of
12mm diameter brass rod and reduce
the outside diameter to 10mm for an
8mm length.
For 1.9mm from the end, further
reduce the outer diameter so that it is
a slide fit into the 7.5mm hole in the
centre of the Girder (see Fig.10).
Using a centre drill, followed by a
5mm drill, bore a hole into the end for
Fig.9: the Girder sits under the Rail Platform, strengthening it so that it doesn’t
flex when the locomotive is driven onto the rails above.
48
Silicon Chip
Australia's electronics magazine
8mm. Part off the piece to a finished
length of 7.9mm. Transfer the part to
the drill press, then drill and tap the
hole for the 2.5 × 3mm grub screw.
After that, fit the grub screw.
The last operation is to glue the
Bush into the Girder using Loctite 620
in the 7.5mm hole and drill the Allen
key access hole for the grub screw.
From the drawing, mark where the
Allen key access hole should be. Insert
the Bush in place and check that the
tapped hole in its side lines up with
the marked hole. When correct, drill
the 1.8mm hole.
When gluing it in place, make sure
that the Bush is in the correct location
by inserting an Allen key into the hole
so that it fits into the grub screw and is
at right angles to the side of the Girder.
#9 Insulator
This is made from a 38 × 25mm piece
of blank PCB material (see Fig.11; FR4
fibreglass laminate). Locate the centre
of the PCB and use precision drilling
to drill the seven holes. Start each hole
with a centre drill. The imperial drill
size for the 3.97mm hole is 5/32in;
the spring-loaded pins are a push-fit
Fig.10: the
Centring
Bush ensures
that the Rail
Platform
rotates evenly
about its
centre on the
stepper motor
shaft.
siliconchip.com.au
Photo 8: this shows how the Wheel Assemblies are mounted to the bottom of the
Rail Platform. Ensure they’re angled correctly so the platform rotates smoothly
about its centre.
Fig.11: the Insulator prevents the pins
carrying current to the train tracks
from shorting onto the Rail Platform.
into them (4mm is close enough if you
don’t have a 5/32in drill).
(1.6mm) thick sheet of aluminium (see
Fig.13). Cut out a piece 50 × 118mm.
Find the centre and inscribe a 59mm
radius. Using a linisher, cut out the
inscribed curved ends. Precision-drill
all the holes, remembering that, except
for the 2mm diameter holes, they must
align with the Girder holes as shown
in Fig.9.
Countersink the six marked holes
and clean off any burrs using emery
cloth.
#10 Wheel Assemblies
The four wheels each consist of
three parts: the wheel, the axle and the
Housing (see Fig.12 & Photo 8). The
wheels are made from ½in brass round
bar stock. Face the end and turn the
outside diameter to 7.9mm for 3mm.
Use a centre drill followed by a 1mm
drill to bore out the hole for the axle.
Part off for a length of 2mm. Repeat
for the other three wheels.
For the axles, cut off four 7mm
lengths of 1mm diameter brass rod.
Clean up the ends in the lathe.
The wheel housings are a bit more
complicated. As I had to make four
of these to the same accurate size, I
first milled out a 70mm length of 5
× 7.5mm rectangular aluminium bar.
I then mounted it in the vice with
the 7.5mm side horizontal and then,
using a 3/32in (2.4mm) slitting saw
mounted in the chuck, cut the wheel
slot 6.7mm deep.
Next, I drilled the hole for the axle
using a centre drill followed by a 1mm
drill. I rotated the job so that the 5mm
side was horizontal, then drilled and
tapped the 1.8mm hole with an 8BA
thread. The distance between this hole
and the axle hole should be precisely
6.4mm. Cut off to length and create the
2.5mm radius using a linisher. Repeat
for the other three housings.
Fit the wheels and axles and, using
a dob of Loctite Extreme Glue Gel
(available from Bunnings), lock the
axles in place.
#11 Rail Platform
The Platform is made from a 1/16in
#12 Fence
First, you need to cut 14 Posts
17.8mm in length from hollow 1/16in
(1.6mm) square rod, as shown in
Fig.14. Once cut, clean any burrs
from the ends. Next, use the drilling
machine at high speed to drill the holes
for the wires to go through (see Fig.15).
Again, clean off any burrs.
Fig.12: these pieces make up the
Wheel Assemblies that allow the
rotating Rail Platform to ride on the
Rail Plate.
Fig.13: the Rail Platform is the rotating
part of the Turntable that the train tracks
are mounted to. Fences are fitted on
either side to make it look realistic.
siliconchip.com.au
Australia's electronics magazine
March 2023 49
Fig.14: these
Posts are the
vertical parts
of the fences on
either side of
the train tracks.
To make the rails for the Fence, cut
four 100mm lengths of 0.5mm diameter brass rod. Insert the Posts into the
Rail Plate and thread the 0.5mm rails
through the Posts on both sides. Use
Loctite Extreme Glue Gel to set the
Posts and wires.
#13 Rails/Tracks
The locomotive rails are made from
a length of R600 Hornby rail. Reduce
the rail length by removing an equal
amount from each end so the final
length, as shown in the drawing, is
117mm. Clean up the cuts with emery
cloth.
Check that the existing 1.4mm holes
are 90.4mm apart, then enlarge them
to 1.8mm. As mentioned earlier, four
2.5mm grub screws should be inserted
in the ends of the rail sleepers to adjust
their final height. So drill four 2mm
diameter holes in the sleepers, as
shown in Fig.16, and tap them 2.5mm.
Finally, to enable electrical contact
Photo 9: The painted top side of the Rail Platform with the rails and Fences
attached. Everything is painted matte black except for the rails, so that power
can be transferred to the model locomotive.
to be made to the rails, carefully
remove the plastic shown in red in
Fig.16.
#14 Painting
I sprayed the Rail Platform with
two coats of black Rust-oleum Ultra
Matte (available from Bunnings). At
the same time, I sprayed the heads of
six of the 8BA × ¼in screws and the
sides of the Girder. I sprayed the top
and inside edge of the timber Housing
with rust-coloured paint.
Mask the edge of the Rail Plate and
spray its top with a couple of coats of
Riviera Grey Dulux Duramax Chalky
Finish. When dry, use emery cloth
Fig.15: here’s how the Fences are mounted on either side of the Rail Platform.
Fig.16: the rails/tracks come pre-made but you need to make some
modifications. After cutting them to length, some holes need to be added, others
enlarged and a couple of pieces of the plastic insulation cut away so the springloaded pins can make contact with the conductive tracks.
50
Silicon Chip
Australia's electronics magazine
to remove the paint from the top of
the rail.
#15 Control electronics
The chosen stepper motor is a bipolar type rated at 1A per phase and 200
steps. As mentioned earlier, we need to
operate it in 1/8th step mode to achieve
sufficient accuracy. The Allegro A3967
IC is ideal for the task and provides
additional inputs to reverse the motor,
regulate the motor drive current and
has a 5V DC regulated output to power
the driver microprocessor.
When I went to purchase the A3967
IC, I found it much cheaper to buy it
mounted on a small module named
“Easy Driver stepper motor driver”.
This also has the advantage that you
don’t have to solder surface-mount
components.
The circuit diagram, Fig.17, shows
that the module has four outputs to
connect the two windings of the stepper motor. Two other inputs, MS1 and
MS2, determine the number of steps
per positive going pulse on the step
input according to Table 1.
As we want 1/8th steps, we leave
those terminals unconnected and
allow the internal pull-up resistors to
keep them high. An enable input turns
the driver on when low and off when
it is high. Finally, if you ground the
direction input, the motor will turn in
the opposite direction.
To turn the motor through 360°
with the Full Step setting, we need to
apply 200 pulses. In our case, we only
want it to rotate through 180°, but as
we are using it in the 1/8th step setting,
we will need to apply 800 pulses on
the step input.
siliconchip.com.au
Fig.17: most of the circuitry in the control module is within the Easy Driver stepper motor driving module (yellow shaded
box). IC1 sends it signals when pushbutton S1 is pressed to rotate the platform by 180°.
The pulse width and the delay
between each pulse determine the
Turntable rotation time. We are using
a PIC12F675 microcontroller to generate the pulses. Its GP2 input (pin 5)
is set to interrupt the microprocessor
when it goes low, ie, when you press
pushbutton S1. The 100nF capacitor
from that pin to ground eliminates any
contact bounce.
The interrupt routine causes digital
output GP1 (pin 6) to go low, enabling
the motor, and produces 800 positive
siliconchip.com.au
pulses from the GP0 digital output (pin
7) that step the motor through 180°. At
the end of the routine, GP1 goes high
again, disabling the stepper motor.
#16 PCB assembly
The circuit is built on a 56 × 51mm
PCB coded 09103231 that the Easy
Driver module is mounted on, shown
in Fig.18. Header pins are used to make
the wire connections to the power supply, pushbutton and stepper motor.
Start by fitting the male header pins
Australia's electronics magazine
(not the ones for the Easy Driver), the
8-pin IC socket, and the capacitors.
Of the capacitors, only the 100µF
type is polarised; its longer lead must
Table 1 – steps per input pulse
MS1
MS2
Resolution
low
low
Full Step (two-phase)
high
low
Half step
low
high
Quarter step
high
high
Eighth step
March 2023 51
be soldered to the right-hand pad
labelled “+”. The IC socket should
also be installed the right way around,
with its notch to the left. The reason
for the IC socket is so that, if we wish
to change the program, we can remove
the microcontroller and reprogram it.
Now add the resistors; they are
mounted vertically. The wire link can
be made from a leftover resistor wire
off-cut; however, if you purchase the
PCB from Silicon Chip, it will be a
double-sided board, so the wire link
is not needed.
Fit the PIC12F675 microprocessor in
the socket. If you have purchased this
from the Silicon Chip Online Shop, it
will already have the firmware loaded.
If you wish to do this yourself, you can
download the files from the Silicon
Chip website.
To enable the Easy Driver module to be removed, it is socketed. Cut
apart the socket strip into five pairs
of pins, one three-pin strip and one
four-pin strip and solder them to the
positions that will be under the Easy
Driver. Insert matching male header
pins into the sockets, drop the Easy
Driver module on top, ensuring all
the pins go into its pads, then solder
them in place.
#17 wiring & testing
Check the PCB for solder bridges
and dry joints, then wire up the 12V
DC socket, stepper motor and the
normally-open pushbutton switch, as
shown in Fig.18. The other connections are not used.
Before switching on the power,
double-check the power supply polarity connections. The Easy Driver and
PIC could be destroyed if they are
the wrong way around. Temporarily
remove IC1 from its socket.
Switch on the power, and the LED
on the Easy Driver module should
glow. Use a voltmeter to check that you
have 5V between pins 1 & 8 of IC1. If
it’s OK, switch off the power, wait for
the capacitors to discharge, then plug
IC1 back into its socket.
Next, set the current limit by powering it back up and adjusting the trimpot on the Easy Driver so that there
is +4.2V between TP1 and ground.
Then press the pushbutton, and you
should see the stepper motor shaft
rotated through 180°. Press it again,
and the shaft should return to its original position.
The Easy Driver board has two pairs
of shorting pads on it. The first, if
closed, reduces the output voltage to
3.3V, while the second enables the 5V
output. When supplied, the first link is
usually open but the second is closed.
If you aren’t getting 5V out of it, check
that both are set correctly.
The circuit diagram and documentation for the Easy Driver are available at
www.schmalzhaus.com/EasyDriver/
#18 mechanical assembly
Attach the Insulator with the
spring-loaded pins to the underside
of the Girder using two unpainted
8BA x ¼in screws and nuts. Next,
place the Rail Platform on top of the
Girder. Use two painted 8BA × ¼in
screws and nuts to join them together.
Solder 50mm lengths of hook-up
wire to the bottom of each rail (where
you removed the plastic), ensuring that
the wire insulation goes all the way up
to the solder joints. Place the rail over
the Rail Platform assembly and insert
the wires through the holes marked
“D” in the Rail Platform and the Girder.
Fit the two 10BA × 3/8in screws, but
leave them finger-tight at this stage.
Solder the wires to the spring-loaded
pins, leaving slack, as shown in Photo
7. Attach the Wheel Assemblies to the
Rail Platform using the four remaining
painted 8BA screws.
The stepper motor, Centring Bush
and Housing can now all be assembled as in Photo 1. Fit the Spacer over
the stepper motor shaft, followed by
the Rail Plate. Use 16mm M3 screws
plus extra washers to fit the Rail Plate
so that the end of the screws are flush
with the plate.
The next task is to get power to the
Contact PCB. Cut two 300mm lengths
of good-quality hook-up wire of different colours and strip away about
3mm of insulation from one end of
each wire. Tin the ends and insert the
wires into the board from the component side and solder them in place.
Use as little solder as possible, as we
don’t want any solder on the springloaded contact pins tracks on the PCB.
Hold the PCB with the copper side
up and feed the wires through the
grooves and holes until they exit from
the bottom of the Housing. Using a
marking pen, place a mark on the edge
of the Rail Plate that can be seen from
the top, as shown in Fig.6. This mark
Fig.18: both the PCB assembly and wiring are straightforward, as
shown here. IC1 and the Easy Driver module are both socketed to
make replacement and reprogramming (of IC1) simpler.
52
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
will be used later in positioning the
Turntable in the final layout.
The PCB should now be flat on the
Rail Plate and held in place by the
two Locating Pins. Strip the ends of
the wires and, using an ohmmeter,
check that there aren’t any shorts to
the Rail Plate.
Loosen the grub screw in the Rail
Plate assembly and slide it over the
stepper motor shaft. Loosen the screws
on the Wheel Assembly to adjust their
angles so that the wheels align with
the track on the Rail Plate. Re-tighten
the screws.
Push it all the way down until the
wheels make contact with the Rail
Plate and note how much the springloaded contact pins compress. Ideally,
this should be about 1mm. If it is less
than 1mm, this can be increased by
adding the Spring Tension Spacer, a
small washer about 20mm in diameter
with an 8mm hole in the centre made
from 0.25mm card. It is placed under
the Contact PCB.
Next, check the level of the bottom
of the rails in relation to the Housing
side. If it is too low, you can adjust the
height by increasing the thickness of
the Height Adjustment Spacer. If all
is well, tighten the 2.5mm grub screw
in the Bush.
You should now be able to rotate the
Rail Plate assembly freely using your
fingers. Connect an ohmmeter to one
rail and the other end to one of the
wires protruding from the base. Now
rotate the Rail Plate assembly; depending on its position, it will either be a
short circuit or open-circuit. Do the
same for the other rail.
#19 homing the stepper motor
When you apply power to the circuit (with S1 not pressed), the motor
windings receive power for a short
time, causing the stepper (rail bridge
assembly) to lock in one position. If
you rotate the rail bridge less than 7.2°
in either direction, on switching the
power off and on, the rail bridge will
return to the original position.
There are 50 positions 7.2° apart at
which the motor will lock in place. We
need to pick one of these for the point
at which the Turntable track and the
train entry tracks align. This way, the
bridge and entry tracks will be aligned
when you switch the power on.
#20 final set-up
My layout is built on polyurethane
siliconchip.com.au
Parts List – Model Railway Turntable
1 12V DC 500mA+ plugpack
1 17HS08-1004S 1A 16Ncm stepper motor [eBay]
1 gold-plated Contact PCB coded 09103232, 29 × 29mm
1 assembled control module (see Fig.18)
1 chassis-mounting DC barrel socket (to suit plugpack)
various lengths and colours of medium-duty hook-up wire
Fasteners
2 M3 × 16mm Phillips panhead machine screws
4 M3 × 10mm Phillips head machine screws
4 M3 × 6mm countersunk head machine screws
6 M3 shakeproof washers
5 M2.5 × 3mm grub screws
8 8BA × ¼in countersunk screws [E & J Winter ]
4 8BA nuts [E & J Winter ]
2 10BA × ⅜in hex head bolts [E & J Winter ]
Other hardware
2 Mill Max 0861015208214110 spring-loaded contacts
[element14 2751176]
1 70 × 70mm × 1.6mm piece of copper-laminated FR4 (unetched clad PCB)
1 25 × 28mm × 1.6mm blank FR4 laminate (unclad PCB)
1 Hornby R600 rail [K&S Metals]
1 round aluminium bar, 65mm diameter, 15mm long
1 140mm × 140mm × 45mm piece of pine
1 125mm × 125mm × 6.35mm aluminium plate
1 120mm length of 30mm × 15mm × 2mm hollow rectangular extruded
aluminium tube [Bunnings 1130544]
1 30mm length of ½in diameter brass round bar
1 35mm length of 1mm diameter brass round bar [K&S Metals]
1 10mm length of 1.5mm diameter brass round bar [K&S Metals]
1 70mm length of 12mm × 12mm square aluminium bar
1 300mm length of hollow 1/16in square brass bar [K&S Metals]
1 400mm length of 0.5mm diameter brass round bar [K&S Metals]
1 20 × 20mm piece of 0.25mm-thick card
1 small container of Loctite Extreme Glue No Drip Gel [Bunnings 0273717]
1 small container of Loctite 620 retaining compound
[AIMS Industrial A0116625]
1 spray can of Rust-oleum Ultra Matte black paint [Bunnings 0197886]
1 spray can of Duramax Rust Effect Spray Paint or similar
[Bunnings 0195384]
1 spray can of Dulux Duramax Chalky Finish Riviera Grey paint
[Bunnings 1400964]
or another specialised fastener supplier
Control module parts
1 single-sided or double-sided PCB coded 09103231, 56 × 51mm
1 Easy Driver stepper motor driver [Core Electronics ROB-12779]
1 PIC12F675-I/P 8-bit microcontroller programmed with 0910323A.HEX,
DIP-8 (IC1)
1 8-pin DIL IC socket
1 SPST miniature pushbutton switch [Jaycar SP0710]
1 40-pin header, 2.54mm pitch [Jaycar HM3212]
1 40-pin female header, 2.54mm pitch [Jaycar HM3230]
1 100μF 16V radial electrolytic capacitor
2 100nF 50V ceramic, MKT or multi-layer ceramic capacitors
2 10kW 1% ¼W axial resistors
3 6.8kW 1% ¼W axial resistors
Australia's electronics magazine
March 2023 53
Fig.19: you need to ensure the tracks are aligned vertically and
horizontally between the fixed and rotating sections before using
the Turntable and that the wiring polarity is correct, so there is no
voltage between the co-linear track sections.
sheets, so all I had to do was cut a hole
the same diameter as the Housing for
the Turntable to fit in. The same would
apply to layouts built of other materials. The centre of the hole should lie
on the projection of the centre line of
the entry track at a distance of 59.6mm
from the end of the entry track.
Fit the Turntable so that the top of
the Housing is flush with the surface
of the layout and the middle of the
external track entry is roughly in line
with the mark you previously placed
on the Rail Plate. Switch the power on
and off to find the homing position of
the Turntable track. Once found, rotate
the Turntable so the entry track lines
up with the Turntable track.
Switch the power on and press the
rotate push button. If all is well, the
other end of the Turntable track should
align with the entry track. If not, the
Turntable track isn’t aligned exactly in
the centre of rotation. You can correct
this by elongating the 1.8mm holes
for the 10BA screws, allowing you to
slightly move the position of the Turntable track on the rail bridge.
The last job before tightening the
10BA screws is to adjust the height
of the ends of the Turntable track to
match those of the entry track. We
now need to connect the train controller power to the Turntable track. If it
is the wrong way around, the power
supply will be shorted out when the
engine wheels hit the Turntable track.
With no engine on the track, connect the Turntable to the power supply so that there isn’t any voltage
between the connecting tracks, as
shown in Fig.19.
#21 operation
Switch the power on and use your
train controller to shunt the engine
slowly onto the Turntable. Press the
rotate button, and when the table stops
rotating, back the engine out.
SC
54
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
|