e00a062.pdf
(
523 KB
)
Pobierz
000066-2-UK dig. railrun-2
GENERAL
INTEREST
Märklin Digital Model
Final part: software, construction and operation
From an idea by J. Schröder
Figure 3. Screenshot of the Windows program written for the train control system.
The Software
In addition to this circuit, a PC is necessary
onto which the requisite Windows program
needs to be installed. Continuing in the spirit
of simplicity, manual controls are not pro-
vided. The system requirements have been
kept to a minimum. Practically any PC should
be capable of performing the task.
This applies also to the minimum
required version of Windows. The
time-honoured Windows 3.1x meets
the needs admirably. In addition,
provision has been made to make
keyboard operation possible. Experi-
ence shows that, once familiar with
the keystrokes, this method of oper-
ation is extraordinarily convenient
and fast.
After starting the software, a
screen will appear as depicted in
Figure 3
. For language purists, there
62
Elektor Electronics
10/2000
Train Control (2)
GENERAL
INTEREST
is the built in facility to customise
the labels of the buttons to your
heart’s content.
At the top are the (fixed) loco
address configurations: first the
Märklin loco address, below that, the
Delta loco address of the four applic-
able controls.
The slider (can also be operated
with the arrow keys) speaks for
itself, it is used to adjust the speed.
The small window above the slider
indicates the selected speed.
The purpose of the button below
that is to select the direction of travel
(toggle function). A marginal note is
in order here. At certain loco speeds,
this button will cause instant rever-
sal of speed. At higher speeds
(approximately speed level 7 and up)
this abrupt reversal is disabled, per-
haps for the wellbeing of potential
model railway passengers. In this
case, the speed must first be
reduced to a lower value, or zero,
before carrying out the reversal of
direction.
The tick box at the bottom is used
to enable or disable the control. The
response time of the system is faster
when fewer controls are active.
The button ‘Save Settings’ saves
the configuration of the active con-
trols in the file
mrkln01.ini
, which is
in the same directory as the one from
which the program was started.
Note that the current position of the
loco control is not stored. The stop
button (also operable by hitting the
space bar) immediately forces all
controls to zero. In contrast with the
stop button on the PCB, this stop
function will maintain power to the
rails.
A number of functions, including
which parallel port to use (LPT1: or
LPT2:) are fixed in the file
mrkln01.ini
. The details are
explained in the box titled ‘Software
Operation’.
Construction
With the aid of the component overlay and
the layout of the single sided PCB (
Figure 4
),
you will not need to resort to witchcraft in
order to build a functional circuit. A few con-
struction hints, though.
There is a single wire link just above IC4.
The trimmed-off part of a lead from C1, C2 or
C3 may be used for this. Use this in prefer-
ence to a lead from one of the resistors, since
COMPONENTS LIST
5 5 watts
R5,R6 = 10k
Ω
R7 = 2k
Ω
2
R8 = 4x10k
Ω
SIL9 array, 1 common
R9 = 22k
Ω
R10 = 47k
Ω
R11 = 8x10k
Ω
SIL9 array, 1 common
K1
K2
Capacitors:
C1,C2 = 2200µF 40V radial
or C3 = 4700µF 35V axial
C4 = 220nF MKT
C5,C6 = 15nF MKT
C7 = 10µF 16V
C8 = 1nF MKT
C9 = 10nF
C10,C11 = 100nF ceramic
CON1
~
T3
C3
C7
C2
C1
B1
D3
K4
K3
C10
Semiconductors:
B1 = KBPC601 (6A bridge, International
Rectifier)
D1 = LED, red, 3 mm
D2 = LED, green, 3 mm
D3 = zener diode 5V6 400mW
T1,T2,T3 = BC547B
IC1 = L6203 (ST Microelectronics)
IC2 = 4001
IC3 = ULN2803A
IC4 = MC145026 (Motorola)
R8
C11
B R
J1
C6
C5
R11
JP1
C9
R1
C4
R2
S1
S2
T1
000066-1
D1
STOP GO
D2
T2
Miscellaneous:
S1,S2 = pushbutton with make contact (e.g.,
Diptronics DTS-6XX)
CON1 = PCB mount 25-way sub-D plug
(male)
JP1 = 3-way SIL pinheader with jumper, or
changeover switch
Heatsinking material for IC1 (e.g. aluminium
bracket, min. thickness 2 mm)
PCB, order code
000066-1
(see Readers
Services
3,5”-inch floppy disk, Windows control
software, order code
996016-1
Optional:
Power supply transformer, 15 V / 5 A, as an
alternative for the Märklin transformer
Figure 4. PCB layout and component overlay.
10/2000
Elektor Electronics
63
Resistors:
R1,R2 = 560
Ω
R3,R4 = 1
Ω
GENERAL
INTEREST
this one is slightly thicker and the link carries
the entire output current.
The PCB offers the option to use two radial
(upright) electrolytic filter capacitors (C1 and
C2) or a single axial one. C1 and C2 may both
be 2200 µF. This is sufficient, but larger ones (2
× 3300 µF or 2 × 4700 µF) are permissible and
will also fit. A single axial electrolytic capac-
itor (C3), as used in our prototype, is also a
possibility. The operating voltage was delib-
erately selected to be on the high side (35 V
minimum) to ensure that the circuit will sur-
vive if the Märklin transformer is inadver-
tently switched to direction-reversal.
CON1 is the connector with which the cir-
cuit is connected to the parallel port of a PC.
This may be mounted directly to the PCB.
Take care that the force of plugging or
unplugging the connector is not transferred
to the solder connections. To ensure mechan-
ical strength, there exist connectors with
holes for mounting screws or a kind of barb
for soldering to the PCB. Either type fits. If
you prefer not to connect the circuit directly
to the PC, but position it closer to the railway,
you can use a DB25 extension cable (avail-
able for a small outlay in every computer
store). Alternatively, you can solder the wires
of such a cable directly into the circuit board.
S1 and S2 are switches with momentary
make contacts. The switches specified in the
parts list fit directly in the PCB. However,
other types may also be used if they are con-
nected with a short length of wire.
A similar story applies to JP1, which
switches the function on or off. Three pins in
a row and a jumper are satisfactory, because
the function is usually switched on. Miniature
PCB mount switches with changeover con-
tacts also exist. Of course, an external switch
attached with hook-up wire is also possible.
The tolerance of C8 is critical, because it
defines the timing. Use an MKT-type
(Siemens or similar) capacitor.
The rectifier bridge (a very common type
from International Rectifier) will, in the event
that maximum output current is demanded,
appreciate a small amount of heatsinking.
Prior to fitting onto the board, insert an M3
bolt in the mounting hole of the bridge (the
screw head is at the bottom of B1). B1 may
now be soldered onto the PCB. Finally, make
a thermal link, using a right-angle section of
aluminium extrusion, to the right angle
heatsink onto which IC4 is mounted (refer to
Figure 5
). The hole in the bottom of the cir-
cuit board allows access so that the screw
can be tightened. Don’t put the screw
through both the rectifier bridge and the PCB
or you will run the risk that, when tightening
the screw, the circuit board traces get peeled
off the board. Alternatively, you can mount B1
Tabel 1. Loco addresses and train
speed/reversing codes
control
loco address
Delta address
A1-A4
1
2
X 0 0 0
2
6
0 X 0 0
3
8
X X 0 0
4
18
0 0 X 0
5
20
X 0 X 0
6
24
4
0 X X 0
7
26
X X X 0
8
54
0 0 0 X
9
56
X 0 0 X
A
60
3
0 X 0 X
B
62
X X 0 X
C
72
2
0 0 X X
D
74
X 0 X X
E
78
1
0 X X X
F
80
X X X X
Data bit
Coding
Result
A5
0
function (lights) off
1
function (lights) on
A6..A9
0 0 0 0
stop
1 0 0 0
reversing command
0 1 0 0
speed level 1
1 1 0 0
speed level 2 (etc.) …
1 1 1 1
… speed level 14
0 = logic zerol
X = logic open
Figure 5. Construction of the thermal link for the bridge rectifier.
64
Elektor Electronics
10/2000
GENERAL
INTEREST
Software Operation
Naturally, any other 15 V transformer can also
be utilised. From a safety point of view, we
strongly discourage connecting the sec-
ondary windings of different transformers in
parallel.
First check the voltage across C1 and C2
(or C3); this may be 20-25 V at the most. Then
check the logic power supply, for example,
between pin 8 and pin 16 of IC4. This must be
between 4.8 V and 5.2 V; the exact value is
not critical. If everything is in order, then the
entire circuit may be connected to the PC and
the tracks, using the connections B (brown,
outside rails) and R (red, centre rail).
After switching on, the circuit will nor-
mally be in stop-mode. Push the appropriate
button to activate the run-mode. Voltage is
now applied to the tracks. In case of an over-
load, the circuit will automatically switch
itself to stop-mode. Install the soft-
ware by copying the two required files
(
mrkln01.exe
and
mrkln01.ini
) to a directory
of your choice (they must both be in the same
directory). The file
mrkln01.ini
contains the
definition specifying which printer port the
circuit is connected to. This file also contains
the text labels for the operating controls.
After starting up the software, the screen will
be as shown in
Figure 3
. Operation with a
mouse is self-explanatory, for operation from
the keyboard we refer you to the appropriate
box. If it doesn’t work, check first that the
correct printer port (888 = LPT1:, 632 =
LPT2:) is selected in the
mrkln01.ini
file.
Another possibility is incorrect timing of the
encoder. In this case you will need to tweak
the values of C8 or R9. Those who hunger
for more output power may connect terminals
R and B directly to the input of the EEDTs-
booster. If the tracks are fed only via the
booster, then additional cooling for IC4 and
B1 is not required. A few ground
issues to keep an eye on, particularly if the
EEDTs-booster is connected. Mains earth is
connected through the PC to ground of the
circuit (negative terminals of C1, C2, C3).
Because the output is a full bridge, output B
is
NOT
connected to mains earth. The R and
B terminals of the EEDTs-booster must be
allowed to float with respect to mains earth
and this applies to the entire railway as well.
When connecting (grounded) measuring
equipment this has to be taken into account.
(000066-2)
Key combinations
The program may be operated without using the mouse
(applicable to mrkln01.exe V1.01)
Key (or combination)
result
<TAB>
next loco control
<SHIFT><TAB>
previous loco control
<1>-<9>,<A>-<F>
direct selection of relevant loco control
=
repeat same key, train reverse
<CTRL><1>-<9>, <A>-<F>
enable / disable relevant loco control
cursor up/down keys
increase / reduce speed
<0>
speed 0, immediately on selected control
<space>
speed 0, immediately on all controls
(software emergency stop)
<ALT><F4>
quit program
Settings in file mrkln01.ini
The file mrkln01.ini (residing in the same directory as mrkln01.exe) contains
information on currently used loco controllers (loco addresses), the printer port
used, and the text strings inside the control buttons. Comment not included in
the .ini file itself is shown to the right.
[PARAMETER]
CH1=0
0 = control not in use
CH2=0
CH3=0
CH4=0
CH5=0
CH6=1
1 = control in use
CH7=0
CH8=0
CH9=0
CH10=0
CH11=0
CH12=1
CH13=0
CH14=0
CH15=0
ADDRESS=888
printer port; 888 = LPT1:, 632 = LPT2
USE_AD=0
not used
SAVE_SETTING_TEXT=save settings
text may be edited
EXIT_TEXT=close
to requirement
STOP_TEXT=stop all trains
directly to the heatsink and bend the
connecting leads in a right angle;
they should be long enough.
IC4 is also mounted on the
heatsink. Electrical isolation is not
required (the metal part is connected
to the GND pin), but heat conducting
paste is required. Remember that
none of the AC inputs (K1 and K2)
are connected to ground.
‘power’ is involved.
To be safe, it is always good prac-
tice to check the power supply volt-
age first. Connect the circuit termi-
nals K1 and K2 to a Märklin trans-
former. By initially using the brown
and red terminals (instead of the yel-
low) you can make a cautious start
with a lower voltage.
The standard Märklin transformer
is rated 30 VA. This is too small to
deliver the maximum output current
of 3.5 A. However, actual usage will
indicate if it is sufficient for your nor-
mal use. The 50 VA ‘lighting trans-
former’, with its fixed 16 V output
voltage, may be more appropriate.
Powering up
It is always exciting the see whether
or not the result of your industrious
activity transforms into smoke when
powering up, especially when
10/2000
Elektor Electronics
65
Plik z chomika:
TirNaNog
Inne pliki z tego folderu:
bge.jpg
(22 KB)
detail10.htm
(5 KB)
detail1.htm
(5 KB)
detail12.htm
(15 KB)
detail11.htm
(7 KB)
Inne foldery tego chomika:
1974
1975
1976
1977
1978
Zgłoś jeśli
naruszono regulamin