This is only a preview of the February 2001 issue of Silicon Chip. You can view 29 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 "Li'l Pulser Train Controller":
Items relevant to "MIDI-Mate: A MIDI Interface For PCs":
Items relevant to "Bass Blazer Sub Woofer Display":
Items relevant to "The LP Doctor: Cleaning Up Clicks & Pops; Pt.2":
Purchase a printed copy of this issue for $10.00. |
An Easy-To-Build, Compact and Cheap
Model Train Controller
Li’l Pulser is a
little power-house of a train controller
that you can build for around $45. It is designed to work
with any standard 12V model train supply or even a 12V
battery charger. It is rated up to 2A and features full pulse
power control for very smooth operation at all speeds.
By JOHN CLARKE & LEO SIMPSON
14 S
14 Silicon
ilicon C
Chip
hip
then it takes off like a rocket. Then
you wind back the control to get the
speed back to something reasonable
and then it stops or jerks because the
track is not real smooth or because it
is a little dirty.
After half an hour of this, they (or
you) are likely to pack the whole train
set and not think about it for another
few months.
Smooth running pulse power
T
In model railway jargon, “pulse
power” is what makes this little train
controller such a good performer. This
is essentially the same thing as the
“pulse width modulation” (PWM)
or “switchmode” that is used in the
highly efficient switching power
supplies used in all computers and
TV sets.
However, the Li’l Pulser train
controller doesn’t use switchmode
operation just to get high efficiency, although that is a side benefit.
No, the real reason for using
switchmode is so that we can
apply relatively high voltage
pulses, up 17V or more, to the
track, even at low throttle settings.
These voltage pulses are much more
effective at starting and running a
loco, particularly at low settings, because they are better at overcoming
track resistance and motor & gearbox
stiction (ie, static friction).
his little train controller incor- you!) got a new train set from Santa.
porates most of the best fea- You’ve already discovered the limitatures of our popular train con- tions of typical (ie most commercial!)
trollers of the past but does it all in train controllers and would like to ima compact case and at low cost. The prove it – without breaking the bank?
basic speed control uses a readily
Typical low cost rheostat or series
available power Mosfet and the for- transistor train controllers really
ward/reverse switching is done with cannot deliver realistic control of Features
a relay.
your trains. The loco often starts off
Apart from pulse power and backSimple? You bet.
like a startled kangaroo and slows EMF monitoring for very good speed
Should you build it? Well unless down whenever there is the slightest regulation, the Li’l Pulser has overyou already have a previous SILICON incline.
load protection, an over-current alarm
CHIP train controller design, then this
This is really frustrating if you are
and three LEDs to indicate Power On,
is a good place to start, especially if trying to operate the train smoothly. Reverse Direction and Track Voltage.
you have a small layout and don’t
First, you have to wind up the conLi’l Pulser is mounted in a compact
want anything too elaborate.
trol just to get the loco to start and
plastic case measuring just 140mm
This is especially true
wide, 35mm high and
if you just have a basic
110m deep.
L’il Pulser Features
train set with a locoOn the front panel it has
* Pulse power for smooth low speed operation
motive, a few carriages
two rocker switches, one
or wagons and a circle
for power and one for For* Speed control pot
of track. The first thing
ward/Reverse switching,
* Power on indication
to do is ditch the basic
a small Throttle knob and
* Track voltage LED indication
controller it came with
the three LEDs mentioned
and build this SILICON
above. The Track Voltage
* Reverse indicator
CHIP design. It will allow
LED is a bi-colour unit
* Overcurrent alarm
your train to start and
which shows green for the
* Excellent low speed control
run much more smoothly
forward direction and red
and you will have less
for reverse. The reverse
* Speed regulation
problems of unreliable
LED is orange, to give you
* Compact size
operation due to dirty
an extra indication when
track.
the train is going back* Maximum current limited to 2A.
Perhaps the kids (or
wards.
FEBRUARY 2001 15
There are four binding post terminals on the rear panel, two for the
input power and two for the leads to
the track. You can use a train power
supply, a 12V battery charger or a 12V
DC plugpack with rating of at least 1A,
to power the Li’l Pulser.
Circuit description
In contrast with some of our previous train controllers, the circuit for
the Li’l Pulser is relatively simple. It
uses two low-cost ICs, an economy
Mosfet to do the current switching
to the loco’s motor and a relay for
the Forward/Reverse switching. The
circuit is shown in Fig.1.
As already noted, the power for
the circuit can come from the power
supply you already have with your
train set or layout. It will comprise
a 12V (nominal) transformer and a
full wave bridge rectifier (4 diodes).
Alternatively, you can use a low-cost
battery charger which will also comprise a transformer and bridge rectifier
or you can use a 12V DC plugpack
with a rating of at least 1A.
The DC voltage from your chosen
power supply is applied to the circuit
via diode D1 to two 2200µF electrolytic capacitors. The resulting filtered
DC supply is likely to be at least 17V
and may be higher, depending on the
transformer characteristics.
Switch S1 and diode D2 pass the
DC voltage through to the 3-terminal
regulator, REG1, which produces a
12V regulated supply for the circuit.
LED1 indicates that power is on.
The 17V is used to power the
train motor and is switched via the
relay contacts and Mosfet Q1. Q1 is
switched on and off at about 180Hz
to control the average track voltage.
The 2-pole 2-position relay is connected as a change-over switch so that
the track voltage can be reversed. In
the normal condition, with the relay
off, +17V is applied to the anode of
the green LED within LED3 to indicate
forward operation.
Switch S2 is the reversing switch
and it energises the relay coil. When
this happens, the +17V is now applied
to the anode of the red LED and LED2
Fig.1: the circuit uses a dual op amp
(IC1) and a dual comparator (IC2) to
provide gate drive to the Mosfet Q1.
It has pulsed output and feedback
from the motor to provide good speed
regulation.
16 Silicon Chip
Fig.2: demonstrating the action of IC2a. The top trace is
the sawtooth waveform at pin 6 while the horizontal trace
intersecting the sawtooth represents the voltage from VR1.
The pulse waveform on the bottom trace is the output at
pin 7. There is a positive pulse every time the constant DC
voltage (horizontal trace) from the throttle pot is above
some part of the sawtooth waveform. This throttle setting
gives fairly narrow pulses and this would correspond to a
low speed setting.
Fig.3: this demonstrates a higher throttle setting. As you
can see, the pulses from pin 7 (bottom trace) are much
wider than shown in Fig.2, corresponding to a higher
speed setting.
is powered to indicate the reverse direction. Diode D6 is connected across
switch S2 to quench the reverse voltage spike produced when the relay is
switched off.
The rest of the circuit is used to
generate the gate drive signals for Q1,
the MTP3055 Mosfet.
Op amp IC1b is connected as a
triangle wave generator. It charges
and discharges the .022µF capacitor
at pin 2 via the 220kΩ resistor at pin
Fig.4: these waveforms show Q1 driving a resistive load.
The top trace is the gate signal from pin 7 of IC2a while the
bottom trace is the signal at the drain of Q1. Each time the
gate signal goes high, the Mosfet turns on and so its drain
voltage drops to virtually zero.
Fig.5: the output waveform changes drastically when a
12V locomotive motor is connected instead of the resistive
load in Fig.4. While the top trace showing the gate pulses
is much the same, the lower trace shows that the drain
voltage is now “messed up” by the motor back-EMF. The
drain voltage still drops to zero at each positive gate pulse
but now in the “off” times we see the motor voltage and its
commutator hash (ie, the noise from its brushes).
1 to produce a sawtooth waveform at
around 180Hz. The top trace of the
scope waveform of Fig.2 shows the
result. It is fed to the inverting input,
pin 6, of comparator IC2a.
IC2a also monitors the speed pot
(VR1) wiper at pin 5, its non-inverting input. When the speed pot wiper
voltage at pin 5 is above the sawtooth
voltage at pin 6, then the output at
pin 7 will go high. Fig.2 demonstrates
this action.
The horizontal trace intersecting
the sawtooth represents the voltage
from VR1. The pulse waveform on the
bottom trace is the output at pin 7. As
you can see, there is a positive pulse
every time the constant DC voltage
(horizontal trace) from the throttle
pot is above some part of the sawtooth
waveform. Note that this result gives
fairly narrow pulses and this would
correspond to a low throttle setting.
What happens when we wind the
FEBRUARY 2001 17
Notice too that while the gate
voltage amplitude is about 12V peakpeak, the pulse voltage at the drain of
Q1 has an amplitude of above 17V.
This is what we expect because the
voltage applied to one side of the
motor is the nominal DC input of 17V.
Fig.5 shows a very different picture
when a 12V locomotive motor is connected instead of the resistive load.
While the top trace showing the gate
pulses is much the same, the lower
trace shows that the drain voltage is
now “messed up” by the motor backEMF. The drain voltage still drops to
zero at each positive gate pulse but
now in the “off” times we see the
motor voltage and its commutator
hash (ie, the noise from its brushes).
We’ll talk more about back-EMF
later in this article.
Overload protection
Fig.6: there is not much wiring inside the case.
You will need to bend over the LEDs so that they poke through
holes in the front panel. Fig.7 (below) is the same-size artwork
for the front panel, lined up with the controls in the drawing
above. This artwork can be also be used as a drilling template.
throttle up? This is demonstrated in
Fig.3 and as you can see, the pulses
from pin 7 (bottom trace) are now
much wider, corresponding to a higher throttle setting.
By the way, if you are attempting
to duplicate these measurements on
a scope, you will find that when you
vary the setting of VR1 the sawtooth
waveform will move up and down on
the scope screen, reflecting that its DC
level is changing.
This is normal and is a function of
18 Silicon Chip
another part of the circuit, to do with
the back-EMF monitoring. We’ll get to
that in a moment.
So the output pulses from IC2a
drive the gate of Mosfet Q1 and this
drives the motor. Fig.4 shows Q1
driving a resistive load. This time the
top trace is the gate signal from pin 7
of IC2a while the bottom trace is the
signal at the drain of Q1. Each time
the gate signal goes high, the Mosfet
turns on and so its drain voltage drops
to virtually zero.
Comparator IC2b provides the overload current protection. The motor
current passes through Q1 and the
1Ω resistor in series with its source
(S) electrode.
The voltage drop across this 1Ω resistor is therefore directly proportional to the motor current. However the
voltage is quite “spikey” and needs
to be filtered via a 47kΩ resistor and
0.1µF capacitor before being applied
to pin 2 of IC2b.
-The non-inverting input at pin 3 is
connected to a reference voltage derived from trimpot VR3, the “current
set” control.
If the voltage at pin 2 exceeds pin 3,
the output at pin 1 goes low to shunt
pin 7 of IC2a to ground via diode
D3. When this happens, it kills
the gate drive to Q1.
What actually happens in an
overload condition is that IC2b
tries to shut down the gate drive
to Q1 and this has the effect of
cutting the overload current.
However, if the output current is
reduced, the voltage across the 1Ω
resistor is reduced and so IC2b can no
longer cut off the gate drive pulses.
Eventually we have a “fight” condition between IC2a and IC2b and the
current is limited to 2A, as set by VR3.
IC2b also drives a piezo alarm to
indicate when current limiting is
occurring.
Motor feedback
Why do we need feedback from the
motor? Answer: because the motor
motor speeds up, it will generate more
voltage and so the voltage we measure
will be lower. So while the back-EMF
may appear to fall with rising speed,
it is in fact increasing.
The back-EMF voltage is monitored
by error amp IC1a. It amplifies the
voltage by a factor of close to 2.1 and
its variable DC output is used to control the pin 3 threshold voltage of the
IC1b triangle generator via a 100kΩ
resistor. So as the motor voltage drops,
the back-EMF decreases, and the DC
level from pin 7 of IC1a drops. This
causes the DC level of the sawtooth
generated by IC1b to drop.
This will mean that more of this
waveform is below the speed setting
pot. This will increase the pulse width
and drive the motor harder to regain
the original speed. This provides a
control loop to maintain motor speed
when under load.
VR2 is there to give some degree of
adjustment for different motor characteristics. It is set so that pin 7 of
Inside the case as viewed from the
front (above) and the rear (right). The
piezo buzzer is stuck to the case lid
with super glue.
generates a back-EMF which is directly proportional to its speed.
We can use the back-EMF as a
feedback signal to make sure that
the circuit more or less maintains
a constant motor speed for a given
throttle setting, regardless of variations in load.
Let’s explain that a little more.
The vast majority of model locomotive motors are permanent magnet
types which means that they work as
a generator when they are spun. More
to the point, if they are spinning, they
generate a back-EMF all the time,
whether an external voltage is applied
to their terminals or not.
We have already seen this effect in
the scope waveforms of Fig.5. When
Mosfet Q1 is off, we see the motor
back-EMF and the commutator hash.
This voltage (at the drain of Q1) is
monitored via diode D5; when Q1 is
on, D5 is reverse-biased and when Q1
is off, D5 conducts and the back-EMF
from the motor is fed to a 1µF capacitor via a voltage divider consisting of
two 4.7kΩ resistors.
Note that we are monitoring the
back-EMF generated by the motor
from its negative terminal, ie, at the
drain of Q1 which will be negative
with respect to the +17V rail.
Hence, at low speeds, the back-EMF
will be close to the 17V supply. As the
IC1a is at about mid supply voltage at
around 6V when a motor is connected.
Construction
The Li’l Pulser Train Controller
is assembled onto a PC board codFEBRUARY 2001 19
Parts List: L’il Pulser Train Controller
1 PC board, code 09102011, 117 x 102mm
1 front panel artwork, 134 x 27mm
1 instrument case, 140 x 110 x 35mm (Jaycar HB-5970 or equivalent)
1 mini PC board relay 12V 5A DPDT (RLY1) (Jaycar SY-4062 or equiv.)
1 piezo siren (DSE L-7024 or equivalent)
2 mini rocker switches (S1,S2) (Jaycar SK-0975 or equivalent)
2 white banana sockets
1 red banana socket
1 black banana socket
1 mini TO-220 heatsink, 19 x 19 x 10mm
1 knob 16mm diameter
6 M3 x 6mm screws and nuts
10 PC stakes
1 200mm length of 0.8mm tinned copper wire
1 50mm length of twin light gauge hookup wire
1 50mm length of medium duty black hookup wire
1 25mm length of medium duty blue hookup wire
1 25mm length of medium duty red hookup wire
Semiconductors
1 LM358 dual op amp (IC1)
1 LM393 dual comparator (IC2)
1 7812 12V regulator (REG1)
1 MTP3055A or MTP3055E power Mosfet (Q1)
1 1N5404 3A diode (D1)
4 1N4004 1A diodes (D2,D4-D6)
1 1N914, 1N4148 switching diode (D3)
2 5mm red LEDs (LED1,LED2)
1 5mm red/green bicolour LED (LED3)
Capacitors
2 2200µF 25VW PC electrolytic
1 10µF 25VW PC electrolytic
3 10µF 16VW PC electrolytic
1 1µF 16VW PC electrolytic
2 0.1µF MKT polyester (code 100n or 104 )
1 .022µF MKT polyester (code 22n or 223 )
1 .01µF MKT polyester (code 10n or 103 )
Resistors (0.25W 1%)
1 1MΩ
1 220kΩ
5 100kΩ 3 47kΩ
1 12kΩ
1 10kΩ
1 6.8kΩ 4 4.7kΩ
3 2.2kΩ
1 1kΩ
1 10Ω
1 1Ω 5W
1 10kΩ linear 16mm PC mounting pot (VR1) (code 10k or 103)
1 10kΩ horizontal trimpot (VR2) (code 103)
1 2kΩ horizontal trimpot) (VR3) (code 202)
ed 09102011 and measuring 117 x
102mm. The PC board is housed in
a small instrument case measuring
140mm wide, 35mm high and 110m
deep. The front panel artwork panel
measures 134 x 27 mm.
You can begin construction by
checking the PC board for shorts between tracks and breaks in the copper
pattern. Check your PC board against
the published pattern. Check for hole
sizes on the PC board.
You will need 1.5mm holes for diode D1, for the speed pot and relay.
20 Silicon Chip
3mm holes are needed to secure the
tabs for REG1 and Q1 and for the
four corner mounting holes on the PC
board. The complete wiring diagram
is shown in Fig.6.
Install the resistors (except the 1Ω
5W type) and wire links first, using
the accompanying resistor table as a
guide to the colour codes. It is a good
idea to use a digital multimeter to
check each value as well.
Then install the ICs, the diodes
and trimpots, taking care to put the
correct component in each place with
the orientation as shown.
Then you can install the 1Ω 5W
resistor, the relay and potentiometer.
Leave about 1mm clearance between
the PC board and 5W resistor body for
cooling purposes; if mounted down
on the PC board it could also burn
or char it.
REG1 and Q1 are mounted horizontally and secured with M3 screws
and nuts. Q1 is also mounted onto a
mini heatsink.
Now install the capacitors, using
the codes listed in the parts list as
a guide to their values and be sure
to orient the electrolytic capacitors
correctly.
Note that the 10µF capacitor at the
input terminals of REG1 should have
a rating of 25VW, not 16VW.
Fit PC stakes at the external wiring
points and then the LEDs. The LEDs
should be mounted with sufficient
lead length to bend them over and be
inserted through the front panel holes.
Next, the PC board can be installed
in the case. Remove all the internal
pillars on the base of the case, using
side-cutters, except for those at the
four corners. The PC board is secured
with M3 screws into the corner pillars.
Drill holes in the rear panel for
the four binding post terminals and
secure them in position. Mark out the
front panel, using the panel artwork
as a guide to positioning the holes.
Drill the holes for the LEDs and
the 10kΩ potentiometer and drill
small holes around the perimeter of
the switch mounting holes and file
them out to make suitable rectangular
cutouts.
Now install the front panel components. Clip in the two switches,
secure the pot with its nut and bend
the LEDs to insert into their respective holes in the front panel. The pot
shaft will need to be cut to length to
suit the knob.
A 6mm hole should be drilled the
case lid for the piezo siren’s sound
outlet.
Make sure it is positioned 28mm
back from the front edge and 61mm
to the left of the right hand edge of the
lid. This will allow it to be glued to the
lid and not foul the pot or other components on the PC board. We glued
ours in position with super glue.
Wire up the switches, rear panel
sockets and piezo siren as shown in
the wiring diagram.
Resistor Colour Codes
No.
1
1
5
3
1
1
1
4
3
1
1
Value
1MΩ
220kΩ
100kΩ
47kΩ
12kΩ
10kΩ
6.8kΩ
4.7kΩ
2.2kΩ
1kΩ
10Ω
4-Band Code (1%)
brown black green brown
red red yellow brown
brown black yellow brown
yellow violet orange brown
brown red orange brown
brown black orange brown
blue grey red brown
yellow violet red brown
red red red brown
brown black red brown
brown black black brown
5-Band Code (1%)
brown black black yellow brown
red red black orange brown
brown black black orange brown
yellow violet black red brown
brown red black red brown
brown black black red brown
blue grey black brown brown
yellow violet black brown brown
red red black brown brown
brown black black brown brown
brown black black gold brown
Testing
Now is testing time. As mentioned,
the train controller is powered from a
train supply or a battery charger. Or
you can use a DC power supply set
to deliver around 17V DC. It should
be rated to deliver 3A or more.
The DC is applied to the red and
black binding post terminals on the
rear panel of the Li’l Pulser. Switch
on and check that there is 12V between pin 8 and pin 4 on both IC1
and IC2.
Now wind up the throttle pot and
check that the track LED lights up
green; it should get brighter as you
wind up the throttle.
Switch to reverse and the reverse
LED should light and the track LED
should change colour to red.
Connect your digital multimeter
between pin 3 of IC2b and ground
(pin 4 of IC2b), with the throttle pot
wound up so that the track LED is lit.
Adjust VR3 for a reading of 2V DC.
Set VR2 to mid setting.
Now short the output terminals and
wind up the speed pot. Check that
the piezo alarm sounds to indicate a
short. Now wind down the speed pot.
Do not leave the controller short
circuited for very long or Q1 and the
5W resistor will become very hot.
Connect the train controller to
length of track and test that your loco
runs smoothly with the control. VR2
should be adjusted while you measure the DC voltage between pin 7 of
IC1a and ground (pin 4).
Adjust VR2 for a reading of 6V.
Note that this adjustment must be
done with a loco connected across
the track.
And that’s it: your controller is now
SC
complete. Have fun!
The rear of the case has four terminals. The red & black terminals are for the
unfiltered DC input while the two white terminals connect to the track.
Fig.8: actual size artwork for the PC board.
FEBRUARY 2001 21
|