TC Controlling Analog and Digital Trains Together

download TC Controlling Analog and Digital Trains Together

of 122

description

Preitenbahn Technical Description - outlining a method of controlling analogue and digital trains on the same model railway layout.

Transcript of TC Controlling Analog and Digital Trains Together

  • 29 January 2013 Rev 2.0

  • 2

    Die Preiten Bahn a PC controlled Model Railway

    By Chris Fletcher

    Abstract

    Just after Christmas we completed system testing of our model railway and this event represents the successful conclusion to a project that started 4 years ago. This paper is intended to describe technical details in the design and implementation of the Preiten Bahn. Even though the Preiten system is specifically designed to permit Conventional (Analog) and Digital (DCC) Model Trains to operate on the same layout, the report covers many theoretical and practical aspects applicable to any PC controlled Model Railway. Such subjects are

    Electronic Design

    Planning

    Power distribution

    Cabling

    Data Preparation (for Freiwalds TrainControllerTM) System Testing

    The Analog hardware is marketed by Oaktree Systems LLC under the name of Railroad Control Interface (RCI) This hardware is described in some detail. The DCC Command Station is manufactured by Digitrax and Mobile decoders come from a variety of sources including MTH, ESU, Lenz etc. Other peripheral Hardware such as Mini-Boosters, DC/DCC Switches and Occupancy Detectors are home built for reasons explained in the paper. In the past, when one talks of mixing DCC and DC together the warnings from all quarters sounded: Dont Do It, you will destroy your equipment! Of course I took this seriously and researched the failure circumstances to design protection systems against accidental bridging of DC and DCC. These problems can be enumerated as follows

    1. Voltage Doubling across DCC decoder input 2. Overload Currents in One Rail Only 3. Different DC and DCC Supply voltages may cause Feedback through intrinsic

    Protection Diodes in H-Bridges. 4. Some DCC sound decoders include large capacitors on their input circuitry

    which falsely trigger overload protection circuits.

    Disclaimer The Equipment described here works well on my System. I take NO Responsibility for its correct functioning anywhere else!

    Chris Fletcher

  • 3

    Contents

    1 INTRODUCTION .................................................................................................. 6

    1.1 HISTORY ........................................................................................................................................ 6 1.2 I WENT DOWN MANY WRONG PATHS! ................................................................................................ 6 1.3 ACKNOWLEDGEMENTS .................................................................................................................... 7 1.4 IS IT ECONOMICAL? ........................................................................................................................ 7 1.5 COPY RIGHT ................................................................................................................................... 8 1.6 REFERENCES ................................................................................................................................. 8

    2 GENERAL PRINCIPLES ..................................................................................... 9

    2.1 WHY PC CONTROL ? ...................................................................................................................... 9 2.1.1 Manual Control .................................................................................................................9 2.1.2 Automatic Control .......................................................................................................... 10 2.1.3 Analog and Digital Traffic together ................................................................................ 10

    3 TC OPERATION ................................................................................................ 10

    3.1 ALLOCATION OF BLOCKS .............................................................................................................. 10 3.2 BLOCKS, SECTIONS AND ROUTES ................................................................................................. 11 3.3 SPECIAL CONSIDERATIONS FOR ANALOG SYSTEMS ....................................................................... 13 3.4 LOGICAL BLOCK POLARITY IN ANALOG SYSTEMS .......................................................................... 15 3.5 SCHEDULES ................................................................................................................................. 16 3.6 SIGNALING ................................................................................................................................... 17 3.7 ENGINES (SEE FIG. 12) ................................................................................................................. 19

    3.7.1 Analog Engines ............................................................................................................. 19 3.7.2 Digital Engines ............................................................................................................... 19

    3.8 SIMULTANEOUS ANALOG/DIGITAL OPERATION .............................................................................. 20 3.9 RUNNING ENGINES SMOOTHLY ACROSS BLOCK BOUNDARIES. ....................................................... 21 3.10 TRAFFIC CAPACITY AND BUS ARRANGEMENTS (SEE FIG. 14) ......................................................... 22

    3.10.1 COM Ports ..................................................................................................................... 22 3.10.2 Traffic Capacity of the RCI Equipment .......................................................................... 23

    4 PROBLEMS WITH MULTIPLE POWER SUPPLIES ......................................... 27

    4.1 ACCIDENTAL BRIDGING OF ANALOG AND DIGITAL BLOCKS (SEE FIG. 17) ....................................... 27 4.2 VOLTAGE DOUBLING (SEE FIGS. 18, 19) ........................................................................................ 27 4.3 OVERLOAD CURRENT ON ONE SIDE ONLY ...................................................................................... 29 4.4 UNDETECTED O/L CURRENTS THROUGH PROTECTION DIODES IN H-BRIDGE CIRCUITS ..................... 30 4.5 IN-RUSH CURRENTS WITH SOME SOUND DECODERS ...................................................................... 31 4.6 LIMITATIONS APPLIED TO ANALOG ENGINES RUNNING UNDER TRAINCONTROLLERTM ...................... 32

    5 HARDWARE ...................................................................................................... 33

    5.1 SYSTEM REQUIREMENTS ............................................................................................................... 33 5.2 PRODUCTION OF PCB CARDS AND THE EAGLE CAD SYSTEM ........................................................ 33

    6 COMMERCIALLY AVAILABLE HARDWARE ................................................... 34

    6.1 THE RAILROAD CONTROL INTERFACE, RCI .................................................................................... 34 6.2 MICRO PROCESSOR CONTROLLED THROTTLE CARD CBC-8R ........................................................ 35

    6.2.1 CBC8 Features .............................................................................................................. 35 6.2.2 Card Addressing ............................................................................................................ 37 6.2.3 Commands and Responses for the CBC-8R Card ....................................................... 37

    6.3 THE MINI-INPUT-OUTPUT CARD IO-24 ........................................................................................... 40 6.3.1 Features ........................................................................................................................ 40 6.3.2 Card Addressing ............................................................................................................ 41 6.3.3 Commands and Responses for IO-24 ........................................................................... 41

    6.4 THE INPUT OUTPUT CARD IO-48 ................................................................................................... 44 6.4.1 Features ........................................................................................................................ 44 6.4.2 Card Addressing ............................................................................................................ 45 6.4.3 Commands and Responses for IO-48 ........................................................................... 45

    6.5 THE RCI BUS SYSTEM .................................................................................................................. 48

  • 4

    6.5.1 Bus Wiring ..................................................................................................................... 48 6.5.2 Poling ............................................................................................................................. 49

    6.6 DIGITRAX HARDWARE ................................................................................................................... 50 6.6.1 The Command Station/Booster DCS 100 ..................................................................... 50

    6.7 USB LOCONET INTERFACE PR3 ................................................................................................... 51

    7 HOME-BUILT HARDWARE ............................................................................... 52

    7.1 A HOME-BUILT OCCUPANCY DETECTOR ........................................................................................ 52 7.1.1 Principles ....................................................................................................................... 52 7.1.2 The DC-DCC Switch (4) card ........................................................................................ 52

    7.2 THE DCC MINI-BOOSTER ............................................................................................................. 54 7.2.1 Features ........................................................................................................................ 55

    7.3 THE TORTOISE UNIT ..................................................................................................................... 58

    8 IMPLEMENTATION ........................................................................................... 60

    8.1 PHYSICAL CONSTRUCTION ............................................................................................................ 60 8.2 PLANNING .................................................................................................................................... 64

    9 MOUNTING AND CABLING THE WHOLE SYSTEM ........................................ 65

    9.1 THE BOARD PANELS .................................................................................................................... 65 9.2 BOARD INTERCONNECTIONS ......................................................................................................... 67

    9.2.1 Solution Specific for New RCI IO-48 Board................................................................... 67 9.2.2 Solutions for other Equipment Cases ............................................................................ 68 9.2.3 Existing Main Boosters .................................................................................................. 68

    9.3 CABLING ...................................................................................................................................... 68 9.4 POWER SUPPLY AND DISTRIBUTION .............................................................................................. 69

    10 DATA CONFIGURATIONS ............................................................................ 73

    10.1 BLOCK DATA (FIG. 63, 64, 65)...................................................................................................... 74 10.2 ROUTE DATA (SEE FIG. 66) ........................................................................................................... 79 10.3 TURNOUTS (SEE FIG. 67) .............................................................................................................. 81

    10.3.1 Turnout .......................................................................................................................... 82 10.3.2 Double Slips .................................................................................................................. 82

    11 TEST TOOLS ................................................................................................. 84

    11.1 CABLE TEST TOOL ....................................................................................................................... 84 11.2 RCITEST PROGRAM ...................................................................................................................... 84 11.3 THE PRICOM DCC POCKET TESTER .............................................................................................. 87 11.4 VERSA-TAP DEVICE ...................................................................................................................... 87 11.5 TEST AND MONITOR FACILITIES BUILT INTO TC .............................................................................. 89

    11.5.1 Dr. Railroad ................................................................................................................... 89 11.5.2 Inspector ........................................................................................................................ 90 11.5.3 The TC Explorer Window .............................................................................................. 90 11.5.4 Detailed Messages ........................................................................................................ 92 11.5.5 The Simulator ................................................................................................................ 93

    12 SYSTEM TESTING ........................................................................................ 94

    12.1 INSTALLING THE DRIVERS ............................................................................................................. 94 12.2 CHECK BUS COMMUNICATIONS AND BASIC CARD FUNCTIONS ........................................................ 97 12.3 RUN TRAINCONTROLLER .............................................................................................................. 98 12.4 FINAL CONFIGURATION OF TURNOUTS AND DOUBLE SLIPS ........................................................... 100

    12.4.1 Electro Frog wiring ....................................................................................................... 100 12.4.2 Output Configuration ................................................................................................... 101

    12.5 RAIL POLARITY........................................................................................................................... 102 12.5.1 Analog Wiring .............................................................................................................. 102 12.5.2 Check Occupancy indicators ....................................................................................... 102 12.5.3 DCC Polarity ................................................................................................................ 103

    12.6 SYSTEM TESTING COMPLETE ...................................................................................................... 103

    13 ALL ABOUT SCHEDULES ......................................................................... 104

    13.1 TYPES OF SCHEDULES ................................................................................................................ 104

  • 5

    13.1.1 Single Schedule ONE Start to ONE Destination ...................................................... 104 13.1.2 Multi Schedule SEVERAL Starts to SEVERAL Destination ..................................... 104 13.1.3 Shunting Schedules NO Starts or Destinations ....................................................... 104

    13.2 CREATION OF SCHEDULES .......................................................................................................... 104 13.2.1 By picking from the Block Diagram ............................................................................. 104 13.2.2 Use of AutoTrain .......................................................................................................... 108

    13.3 INTERLINKING OF SCHEDULES ..................................................................................................... 110 13.3.1 Schedule Successors .................................................................................................. 110 13.3.2 Calling Schedules via Operations Lists ....................................................................... 110

    13.4 SETTING UP A MULTI-SCHEDULE ................................................................................................. 111

    14 TRAIN DATA AND SPEED PROFILING ...................................................... 114

    14.1 TEST TRACK .............................................................................................................................. 114 14.2 ANALOG ENGINES ...................................................................................................................... 115 14.3 DIGITAL ENGINES ....................................................................................................................... 116 14.4 SPEED PROFILING ...................................................................................................................... 118

    14.4.1 Adjusting Creep speed .............................................................................................. 118 14.4.2 Determining Speed Profile .......................................................................................... 118

    Appendix A Conversion Tables.120

  • 6

    1 Introduction

    1.1 History

    I have been interested in 0 Gauge Model Railways since Childhood in Germany. At the ripe age of 6 I inherited from my older brother a Mrklin 3 rail AC trainset E 44 engine and some coaches and trucks. This passion has stayed with me until today and also infected my son from an early age. We started seriously in 1976 and Preiten Bahn is our 7th layout. Layout No. 5 was electronically controlled, but was of the hard wired logic type ie. not computer controlled. Work commitments since 1985 prevented any further work in the hobby until my retirement in 2005. In

    1999 I became aware of RR&Co TrainControllerTM (TC) and RCI, CTI hardware.

    Since I had a fairly large collection of analog engines conversion to DCC was costly and problematical. Any serious work, however, had to wait until my full retirement and the construction of layout No. 6 in 2006. For economic reasons I finally chose the RCI system of hardware. Layout No. 6 was TC controlled (V 5.8) and ran small numbers of DC controlled trains. Change of personal circumstances (shifting to a new home) in 2009 motivated construction of layout No. 7, also known as the Preiten Bahn (derived from our address), where my work with TC and RCI continued. Until May 2012 Preiten Bahn was functioning in analog mode only and the wiring had become a complete Birds-nest For the last 7 months I introduced mounting of all boards on 8 panels, which necessitated a complete rewiring. During construction of layouts No. 6 and 7, I went down many blind alleys and took many wrong turns, mostly because of insufficient understanding of the system principles behind the facilities offered. Today those problems are mostly solved (with help from see acknowledgements) and therefore I thought other Model Railroaders could benefit from some of my experiences.

    1.2 I went down many wrong paths!

    On the way I ran into the following difficulties

    1. The Back EMF of Motors confuses the single occupancy indicator per block on the CBC8 card, i.e. intermittently it indicates unoccupied. In this case TC loses control and trains come to rest two blocks further on as unknown locos.

    2. Initially I thought I could provide a CBC8 outlet per Section in a block and combine several in one super block. This was a false assumption and you cannot start a brake ramp in one block and have a stop marker in another. All markers apply to the one block only and therefore 2 or 3 occupancy detectors are required in One Block.

    3. With analog trains the current sensing occupancy indicators do not indicate when the engines are stationary. Therefore the inbuilt indicator on the CBC8 is still required to detect stationary trains.

    4. The comments in the TC manual about special DCC connection on RCI cards apply to the TD4 card which has not been available for some years and was replaced by the CBC8 (but without DCC connection).

    5. For satisfactory operation DCC supply voltage must be 4 to 5 Volts higher than Analog supply voltage, which brings its own problems when bridging occurs between the two.

    6. Command and Feedback Buses must be separated; otherwise traffic capacity is limited to about two trains simultaneously running.

    7. A special Mini-Booster had to be developed to handle general short circuit conditions (even ignoring filter capacitor charging currents) as well as short circuits to CBC8 outputs.

    8. DCC type Occupancy Indicators such as BDL168 DO NOT work for Analog Running and therefore I had to develop my own.

  • 7

    1.3 Acknowledgements

    This is the conclusion of a 4-year Project and I am very happy with the outcome. A few thank-you notes are appropriate. My first Thank-You must go to my friend Vladimir Grbac who virtually did all the physical work associated with the construction of the Preiten Bahn. He did everything from erecting the room (after excavation), building the bench work, laying roadbed and track, up to much of the wiring. My very artistic architect son David however infused Preiten Bahn with its character: He created the mountains, backdrops, tunnel entrances and ballast along the track. My heartfelt thanks go particularly to him. Susanne Heim in Germany built most of the houses on the layout and these buildings are an absolute delight. My good friend Joseph Schweikl in Germany has built some of my best engines and my thanks go to him also. On the technical side I am indebted to Mr. Charles L Davis, President of Oaktree Systems, LLC for his good advice and assistance. During my research into problems with bridging DC and DCC together, I received much help from Mark Gurries.

    Much help was also received from members of the TrainControllerTM Forum

    particularly from Otto Berg von Linde, Jrgen Freiwald, Bob Wright, Jeremy Brandon and many others. I am indebted also to Lubos Domalip, Jan Marvan and the PragOclub who produced some 40 odd German Light signals which look phantastic.

    1.4 Is it Economical?

    Here is a comparison of number and types of boards required for the Preiten Bahn (64 Blocks) now and if I was to implement it with pure DCC equipment

    Combined Analog/Digital Installation

    CBC8 Boards Qty 8

    DC/DCC Switches Qty 16

    Mini-Boosters Qty 16

    IO-24 Boards (Turnouts) Qty 8

    IO-48 Boards (DC/DCC Switch Operation & Signals) Qty 8

    PSX-AR (Auto Reverse) Qty 2

    DCS 100 (5 Amp) Command Station Qty 1

    PR3 Computer Interface Qty 1

    RS 485 Interfaces (RCI and SmartHand) Qty 5

    Pure DCC Installation

    BDL 168 Boards and Mounting Boards Qty 9

    PM-42 Boards Qty 9

    DS 64 Boards (Turnouts) Qty 11

    SE8C Boards and Mounting Boards (Signals) Qty 4

    PSX-AR (Auto Reverse) Qty 2

    DCS 200 (8 Amp) Command Station Qty 1

    PR3 Computer Interface Qty 1

  • 8

    RS 485 Interface (SmartHand) Qty 1

    Additional Loco Decoders (3 Amp) Qty 20 approx. Depending on the number of additional loco decoders you need the Pure DCC Installation is probably more economical than the combined Analog/Digital system. Analog Operation also suffers from several limitations as outlined in 4.6. On the other hand not every loco is convertible to digital for a number of reasons

    I have a number of Tank engines (some Brass) which do not have enough space for the decoders.

    A friend of mine has a number of collector items which he would not want to touch in any case.

    Some of the smaller scales such as N and Z scale do not readily lend themselves to conversion.

    The choice is then to run the analog vehicles on your layout alongside digital locos (albeit with limitations) or relegating them to the shelf to be looked at only. I have heard of a number of club set-ups that have some weekends set aside for pure analog running, while other users with digital equipment do their running on different weekends. A change-over switch must accomplish the different connections. The system described here would allow all users to run all trains All the Time! I did some trial PCB layouts (to the limit of my EAGLE license - 160 x 100 mm Max) and could establish that DC-DCC switch, cut-down IO-48 and Mini-Booster could be combined into one board. Perhaps this would enhance the economic situation of the combined system. Since this involves knowledge of proprietary firmware this is clearly a question for RCI (or anyone else) to develop such a thing.

    1.5 Copy Right

    The information contained herein, insofar as it is not also contained in any of the references in 1.6, is my copy right. However I dont mind if any of this information is being used by anyone, except that I would like to be quoted in such a case.

    1.6 References

    Document Website 1. TrainController V7.0 G Users Guide www.freiwald.com/pages/download.htm 2. +SmartHand V7.0 Manual www.freiwald.com/pages/download.htm 3. CBC-8R Users Manual www.oaktreesystems.com 4. IO-24 Users Manual www.oaktreesystems.com 5. IO-48 Users Manual www.oaktreesystems.com

    6. Digitrax Super Chief Manual www.digitrax.com/ftp/superchief.pdf 7 Open DCC website www.opendcc.org/index_e.html

  • 9

    2 General Principles

    2.1 Why PC Control ?

    Fig. 1 PC control of a Model Railway

    At the beginning one should ask the following question: Why have a PC controlled Model Railway? For my part I wanted the following three basic functions (See Error! Reference source not found.) fulfilled.

    1. Driving, where the system should be able to control the speed and direction of the motor within a model engine. The traverse of a layout should be carried out safely i.e. different engines should not collide with each other! Therefore the whole system is divided into blocks where normally only one train (engine) is permitted to be in one block at the one time. The exception are consists where several engines pull the one train.

    2. Feedback of position. In order to steer an engine adequately from one block

    to another on a layout, the control program must be continually updated as to the actual position of the train on the layout, ie. in which block the train is currently located. A Feedback Mechanism must thus be provided.

    3. Switching. For an engine to reach its destination, it is implied that the path

    through the station yards etc. must also be set up correctly. For this reason switching functions are provided which can set turnouts to the correct position as well as move (show) signals in the correct aspect.

    2.1.1 Manual Control

    Traditionally model trains were driven from Power CABs which were switched to different parts of a layout via sometimes quite complex CAB switching arrangements.

    RR&Co

    Command

    Station

    & Booster

    MobileDecoder

    Block b

    MobileDecoder

    Block b

    Occupancy

    Detector

    Digital Engine

    Block aBlock a

    Analog Engine

    Stationary

    Locomotive

    Decoder

    Accessory

    Decoder

    Automatic

    Control

    Manual

    Control

    SwitchingPC Interface (DCC)

    RS 485 Interface

  • 10

    It is clear that generally a single operator can control only up to 2 trains simultaneously. Thus, without PC control, a layout has to be set up for a particular path and then 2 trains (half the main line apart) are driven from the same power pack. As long as both trains move at approximately the same speed they will stay apart and continue running. Such running lacks life and to me is boring! Many clubs operate layouts with several operators, who hand trains over from one operator to another by CAB switching. This is fun but is not very suitable for a single operator like myself. Thus, I hoped to benefit from a PC controlled system, particularly when several trains are running automatically, I can drive a particular engine with a hand held controller and have a signaling system available to do this safely. Equally when friends are visiting they can have a handheld controller each and drive their individual train (of course obeying the signals displayed on their handhelds).

    2.1.2 Automatic Control

    From the above it is clear that the PC system should run as many trains as possible (in my case this seems to be 7 with 14 blocks in the main line). This certainly puts life into the system my son commented the other day: there are little maggots crawling out of all sorts of holes! In the end, watching an automatic layout is also boring and that is why I would like to run some trains manually within the automatic background traffic.

    2.1.3 Analog and Digital Traffic together

    Often I can hear the question: Can I run my conventional engine on a digital layout? The short answer is: Yes, but only one engine at a time (stretched 0 facility), but other traffic is severely restricted. Add to this that many of us Modelers are on in years and lack the inclination or the necessary electronics skills to convert their prized models to digital operation. With 0 Gauge I am ok, but the smaller the scale, the more difficult the job becomes (Z-scale is very, very difficult!). In my case I was confronted with converting some 80 engines to digital working or running only the digital vehicles and leaving the others in their boxes or on the shelf! TC offered a solution to run both so I went this way! In the long run I will probably convert all my good locomotives to DCC and leave the rest DC controlled (see also section 1.4 Is it Economical?)

    3 TC Operation

    3.1 Allocation of Blocks

    To enable TC to steer locos across the system, it is necessary to define the whole track layout in terms Blocks, such that positions of all trains may be known to TC at all times. Blocks are generally required to hold one train to the exclusion of all others. A block is usually a piece of track insulated at both ends (if current sensing occupancy detectors are used). It should be long enough to hold the longest train you have operating on your system and NOT include any Turnouts or Crossings. It can be rather disastrous when turnouts are being switched under a moving train! The Turnout Ladder in Fig. 2 (shown in Grey) is made up of Routes Only and in a Pure Digital system is undetected.

  • 11

    3.2 Blocks, Sections and Routes

    Fig. 2 Blocks, Sections and Routes

    Any Block can be subdivided into several Sections which may be set up for purposes such as Start Braking (Brake Marker) or Stop Here etc. They are merely pieces of isolated track which are being supplied through different Occupancy Detectors. Sections are pieces of track situated in the ONE Block (adjacent to each other). Blocks are interconnected by Routes which may be only 1 2 mm long or include a whole undetected section of track as shown in Fig. 2. Routes may include Turnouts or Double Slips but Trains Never Stop there. In Summary we note

    The whole layout is divided into blocks where each block is a length of track partitioned off the general system by incorporating at least one occupancy indicator which indicates to TC whether this block is occupied or not.

    Trains may only stop in Blocks Blocks may NOT contain Turnouts, Slips or Crossings Blocks should normally be long enough to accommodate the longest train.

    However this rule can be broken with TC V7.0 Gold and later, where train length can protect the end of a long train by not releasing the previous block.

    Blocks are interconnected with routes where routes are seen to contain all the switches or crossings.

  • 12

    Fig. 3 Block Allocation for DCC

    Fig. 3 shows the block allocation for the Demo layout delivered with the TC software. The layout is organized for a digital control system and obeys the above rules exactly. Each block (light blue, green and red) is a piece of track separated at both ends from the rest of the system. Switches are shown in dark grey and are not part of any block. They can be connected to the Track Bus with or without occupancy detection. Thus the switches are part of routes which interconnect the blocks. Fig. 4 shows how this layout is drawn manually in TC as a Switchboard Diagram. Each block is represented by a rectangle with signal lamps at each end. The signal lamp can be displayed as a 2, 3 or 4 aspect light signal (set in the block editor). This signaling scheme merely regulates the traffic between the blocks and does NOT represent any particular prototypical signaling scheme. The signaling scheme works irrespective whether actual signals are Installed on the layout or NOT. I made a bad error a couple of years ago where I defined physical addresses in TC V5.8 without any cards connected. This rendered the whole system inoperable.

    Fig. 4 Representation in a Switchboard Diagram in TC

    At any time while the Switchboard Diagram is being drawn TC automatically calculates a Dispatcher (Block-) Diagram as shown in Fig. 5 showing all blocks and

  • 13

    routes but no other parts of the switchboard diagram. The user has NO Control over this process and this enforces the Block Allocation Rules mentioned above i.e. turnouts are not part of blocks. All routes are traced and the block diagram is continually kept in synchronism with the switchboard diagram.

    Fig. 5 Automatically calculated Dispatcher Diagram

    3.3 Special Considerations for Analog Systems

    For Analog Operation, however, a problem presents itself: Every piece of track derives its power from the decoder allocated to the particular block. This includes all turnouts, double slips and crossings, which must therefore be part of a block. If you want to force the block diagram to accept a new block for that reason you have to turn off automatic diagram calculation first and then edit the block diagram with the new routes. If you do this, tracing of all routes is turned off and you must trace ALL routes manually. This is definitely NOT Recommended.

    Fig. 6 Block Allocation for Analog System

  • 14

    For an analog systems the rules can be bent a little i.e. switches can be included in a block by connecting them at the ENDS. Fig. 6 indicates how the Demo layout can be adapted for analog operation. In such a case the switchboard diagram and dispatcher diagram remain the same as shown in Fig. 4 and 5. In most cases this arrangement would suffice. In some situations special arrangements have to be made, as shown in Fig. 7.

    Fig. 7 Creation of Switch Islands

    Such ladders of double slips occur in two places in the main yard of the Preiten Bahn and these Islands cannot be handled by the method outlined in Fig. 6. Jrgen Freiwald suggested relays that make temporary connections between the island and one or other succeeding block. These relays (labeled xx Entry) are operated when particular routes are seized (in either direction). For example, assume a train on a schedule is to proceed from block 72 to block 45. The process continues as follows

    1. The train has entered block 72 from the left and would stop there if the path ahead is not clear.

    2. A condition for seizure of any route in this complex is that all 5 relays must be released.

    3. Assuming the condition 2. is true and block 45 is unoccupied the route 72 > 45 is seized and relay 45 Entry is operated. This connects power from block 45 to the island and 45 is marked occupied as soon as the train enters the island.

    4. Under this condition any other train waiting to enter the island from blocks 75 > 77 must continue to wait because relay 45 Entry is operated.

    5. The relays would be released once the route is released. Sometimes this could occur when the train is still situated on the island. Therefore I have added a delay of 5 seconds to the release time of all relays which ensures that the island is cleared under all normal circumstances.

    6. Once the train is safely running in block 45 relay 45 Entry is released after 5 seconds and the island is available for the next train.

    With such an arrangement no additional blocks are required and the standard block diagram calculations can stand. There can be other solutions to such problems which do not involve relays. Jeremy Brandon suggested a solution whereby the double slips can be divided into their constituent Right Hand Turnouts and a switchboard diagram with an additional block in the middle of the island can be produced. This solution would not require the

  • 15

    connecting relays but the resultant switchboard diagram would not look like the real situation. If simultaneous analog and digital operation is required block allocations according to the above methods are still required.

    3.4 Logical Block Polarity in Analog Systems

    With digital systems such as DCC the power is supplied as AC i.e. there are continuous polarity reversals on the track. This AC power, apart from being decoded, is rectified in the decoder and then applied to the motor with a polarity depending on the Content of the Command. The phase of the DCC signal does not affect the direction of the train. With analog systems the polarity on the track is directly applied to the motor and the standard is that +ve to the right hand rail (and ve to the left hand rail) will move the engine in that direction i.e. in the direction where the positive rail is on the right hand side. If you now turn the engine around and apply the same polarity the engine still runs in the same direction even if the tender is leading i.e. the engine runs backwards. We can say that the block has a Logical Forward Direction if +ve is applied to the right hand rail). That is in an Analog System the Block has a logical forward direction and not the engine.

    Fig. 8 Logical Polarity of Blocks

    Fig. 8 gives an example of a Double Track main line with a station consisting of blocks 1 3. Every block is allocated a logical forward direction as shown by the arrows. How you allocate the logical forward direction probably depends on what prototypical railway you are modeling. In the USA or Continental Europe trains run normally on the right hand track and Forwards is implied by the direction of the black arrows in Fig. 8 as shown. If you are modeling trains in British countries and Sweden,

  • 16

    trains run on the left and Logical Forward would be in the opposite direction. Of course this is up to the owner of the layout (I have a friend who runs British and American trains side by side on the left track). The main thing is that you decide the Logical Forward direction for each block. If you have a bi-directional track you must decide which direction is logically Forward and an engine moving the other way is then considered to be running backwards irrespective how it is facing! To describe these Attributes to blocks in TC a check box Reversed Polarity is provided in the Connection window of the Block Data. TC is designed at present so that an Unchecked Reversal box indicates that the Logical Forward direction is from West to East, or North to South. If the Logical Forward direction is East to West or South to North the box should be Checked. From the above it follows that in Stationary Decoder Systems Polarities should be adjusted as follows

    1. On a printout of the Dispatcher diagram mark in arrows indicating the logical forward direction of each block.

    2. Set the Reversed Polarity check boxes to suit. 3. Wire the whole layout in a consistent way ie. connect the +ve terminal of the

    decoder to the right hand rail of the block track looking in the forward direction. It would be wise that you determine the +ve terminal first by wiring and testing electrically (running an engine) on one block.

    4. Put a train on the track inside of the block. 5. Assign an engine to a block (where you start testing the whole layout). 6. Make sure the engine image in the block symbol is heading in the Logical

    Forward direction. 7. Select the engine in the train window. 8. Drag the speed slider in the train window to the right (forward). 9. If the actual train on the layout is now moving in the Logical Forward

    direction the polarity of the block is Correctly adjusted. 10. If the engine moves in the opposite direction you must Reverse the Physical

    wire connection between the decoder and the track. Please note that an incorrectly wired block may be corrected for running, using the Reversal check boxes but Brake or Stop Markers in these blocks will be ignored. It is therefore imperative that the reversal checkboxes are checked as per the above and then the physical wiring is arranged to suit.

    3.5 Schedules

    It is clear from the preceding sections that many and varied commands are necessary to run a train from one Block to another

    The path ahead must be checked to be available

    Signal Aspects must be set

    Turnouts and Slips must be set to the correct position

    Trains must be started up in the correct way ie. Momentum etc. must be applied.

    Under way Speed must be controlled according to Break and Stop Markers etc.

    TC provides two Flexible and Easy Methods of specifying this multitude of commands

    By using AutoTrain

  • 17

    In this case you need to specify the Start and End Blocks for your schedule and otherwise delete any blocks from the schedule if you dont want to include them in the search. This process can be iterative ie. you can order a path search, abandon it if unsuitable, change the conditions and order another search. When satisfied you can edit the schedule data and save it.

    By picking items from the block diagram. This process is more laborious as you have to pick every block and route you want in the schedule from the dispatcher diagram.

    Fig. 9 Operation Of A Schedule

    Fig. 9 explains the operation of a Schedule in a much abbreviated way. The Schedule has been recorded to move the engine (BR 64), currently located in the Start Block 04, backwards through either Blocks 38 or 37 to the Destination Block 47. The operations on Blocks (Status enquiry etc.), would be carried out in TC memory rather than the hardware, but for simplicity the latter has been presented. More detailed information on how a particular schedule is operating can be found in the Detailed Message display available in TC. Schedules may be called from

    The schedule list in the Dispatcher Diagram

    Push Buttons on the switchboard

    From Time Table using the Fast Clock

    From Other Schedules either as successors or via Start/End Operations

    3.6 Signaling

    Every model railway system needs prototypical working signals to give it realism. I was fortunate that Lubos Domalip and the boys of the PragOclub produced for me some 40 German signals (1969 variety). To drive them I had to develop a series of daughter boards to be plugged into the IO-48 boards.

  • 18

    Fig. 10 German Hp Signal Interface

    The daughter board contains 2 x 4 Aspect Signal circuits and each is connected to the actual light signal via an 8-wire flat telephone cable. Each of the 8 wires is connected

    Fig. 11 The German Hp Signaling System (1969)

  • 19

    to a separate LED in the signal. At the foot of each signal I have installed another little board where the 8 wires coming in on a RJ45 jack are connected to screw terminals. The actual LED wires coming from the Hauptsignal on top of the base board terminate there. The various Signal interfaces (including a 3 aspect American circuit developed by RCI) and their connections are shown in Fig. 11. TC provides an internal signaling system at the exit of each block which emulates some parts of the Hp system and can be used to drive light or semaphore devices via suitable interfaces. TC also provides definable independent signal interfaces which can use the internal signals as triggers in combination with other conditions (like occupancy) to modify the Signal Aspects. In Fig. 11 I have shown how I intend to derive the operation of the Advance Signals (Vorsignal) using the internal signals of the next block and other conditions in a defined signal block. At this stage this is all theory as I have yet to install the actual signals and try all this. There is also a discrepancy between the internal signaling system and its prototype in that in the real system the signal goes to red as soon as a train has gone past. In TC this does not happen until later. I will probably define independent signal blocks for all signals when I am more up to speed with this.

    3.7 Engines (see Fig. 12)

    3.7.1 Analog Engines

    Analog Engines are Conventional locomotives that have no decoders mounted in them. The Motor Outputs of Stationary Decoders are now connected to the track section through the Occupancy Detectors. Otherwise there is no Real Difference in principle to Mobile Decoders. In this case every section of track must belong to a block and therefore is supervised as to occupancy through the individual block. The Stationary locomotive decoders are mounted beneath the track boards and are fixed. They are connected to the command station (the PC running TC) via a Command bus, which we will call the Analog Command Bus. The TC Program running in a PC is the Command Station and no separate CS or Booster is required.

    3.7.2 Digital Engines

    Digital locos each contain a digital receiver (Mobile decoder) connected between the motor and the track contactors. In this case a special Command Station (in this case Digitrax DCS100 (or DCS200) is required. The command station is connected to the PC via a Digital Command Bus (in this case LocoNet wires 1, 6). In the digital configuration the PC does Not Act as a Command Station but as a CAB, such as DT402.

  • 20

    3.8 Simultaneous Analog/Digital Operation

    Fig. 12 Combined DC/DCC Operation

    The Analog Command Bus in the case of RCI is the Balanced 4-wire RS 485 Bus where different pairs are used for transmission and reception of signals i.e. the Bus is Bi-Directional and can be used for both Commands and Feedback. In my system RCI bus A is only used for Loco Driving (ie. connects to CBC8 cards), RCI bus B is the Feedback Bus for occupancy detectors (connects to IO-48 cards), while RCI bus C only connects to RCI Accessory Cards IO-24 for Turnout control. The Digital Command Bus is in my case implemented in Digitraxs LocoNet Technology wires 1 & 6 only and these are used for Forward Loco Driving Commands (Standard NMRA DCC packets). Of course TC communicates with the DCS100 command station via wires 3 & 4 as for all other LocoNet devices. Each Block is allocated a change over relay on the DC/DCC switch card. In its released position the relay connects the particular stationary decoder to the track of the block. An analog engine is marked in its Train Data as No Connection and if the block is reserved for such an engine the relay is left released and the engine is controlled via the stationary decoder. A DCC equipped engine on the other hand is marked with Address Data in its train data. When a block is reserved for this type of engine the block data specifies a particular On-Off switch in the Digital Power field. This On-Off switch operates the DCC Enable relay for the block and the track is connected to the Digital Command Bus. Because of the voltage drop experienced in mobile decoders the DCC track power has to be run at about 5V more than the analog power here called CBC power. If the stationary decoders were powered from the same supply as the DCC boosters the motors would probably be damaged. On the Preiten Bahn we are running CBC power at 19V and DCC power at 24V.

  • 21

    DC engines can only be reached within the block where they are marked as being situated, while DCC engines can be reached anywhere on the layout provided the DCC Enable relay is operated. Engines are tracked in TC which means that TC knows at all times which loco is situated in what block. In the scenario shown in Fig. 10 a digital Engine A moves from Block X to Block Y, thus enabling analog Engine B to enter Block X. Then Engine A is moved out of Block Y thus enabling Engine B to move from Block X to Block Y. The Stationary Decoders are connected permanently to their particular blocks and this arrangement is called Static Assignment of blocks.. The RCI System of hardware is more suited for this mode of operations. To save on numbers of stationary decoders it is possible to connect blocks through relay contacts with particular decoders. This application of Stationary Decoders is called Dynamic Assignment to blocks. In this case, when the block is reserved for a particular analog engine, TC selects the decoder already connected to that engine in the previous block in preference to another free device with access to this block. The CTI hardware is more suited for Dynamic Assignment. TC supports both Static and Dynamic Assignment and the choice is probably an economic one: Static Assignment means more decoders while Dynamic Assignment means more relay switches (and accessory decoders to drive them!). I have employed Static decoder allocation in my system, but I know that one of my friends uses Dynamic Allocation with CTI hardware and is certainly happy with this.

    3.9 Running engines Smoothly across Block Boundaries.

    Fig. 13 Running Analog Engines smoothly across Block Boundaries

    Digital engines can be addressed from the Command Station while situated anywhere on the layout. However from the above discussion it is clear that Analog engines can only be addressed through the specific block where the engine is located. This means that when an Analog engine reaches the end of a block the stationary decoder of the next block must be Powered Up before the engine can continue. Thus if you try and run an Analog engine from one block to the next

  • 22

    without a Schedule the engine would stop momentarily until TC (via train tracking) decides which the next block actually is. The engine would Hick across each block boundary which is quite unsatisfactory. Thus the block ahead must always be Prepared before the Analog engine reaches the boundary. This implies that for Analog Running a path needs to be defined in TC which is done via setting up a Schedule. Fig. 13 shows how all engine commands are also repeated towards the next block ahead, thus ensuring that the analog engine runs smoothly across Block Boundaries. Within Shunting Schedules a whole area of blocks is reserved for the one engine ie. no other engine can be situated on any block in the defined area. If the engine is analog, then the driving commands are repeated to ALL blocks within the area.

    3.10 Traffic Capacity and Bus Arrangements (see Fig. 14)

    3.10.1 COM Ports

    The following 7 USB connected ports are used on the Preiten Bahn

    1. COM 10 connects LocoNet via a PR3 interface to the Command Station and all 16 Mini-Boosters ie. 16 Power Districts of 4 Blocks each. TC simulates DT402 driving commands towards CS. DCS100 formats all NMRA packets and transmits these on LocoNet wires 1 & 6 towards the Mini-Boosters.

    A UP5 panel has been included in LocoNet to allow plugging in of a DT402 for DCC only testing.

    2. COM 4 (RCI-A) handles all Analog Driving Commands on the Main System. TC puts out approx. 100 Speed Commands per second which compares well with the capacity of the DCC system (120 packets per second). The only Feedback TC receives on this bus is CBC Overload and Occupancy of stationary engines. It is inconsequential if this information is delayed somewhat (due to driving commands)

    3. COM 7 (RCI-B) carries all Feedback replies on the main system (2 occupancy

    indicators per block). This traffic is handled via 8 IO-48 cards which equates to a poling cycle duration of 80 mS, ie. any engine entering a block anywhere would be noticed within 40 mS on the average. A 0-Gauge engine travelling at scale speed of 120 Kph moves 2.8 cm in 40mS. In terms of accuracy this can be safely ignored. The occasional output command for setting signals and DCC enable relays will also not make much difference.

    4. COM 9 (RCI-C) handle all 8 IO-24 cards which in turn set the 42 tortoise

    switch machines. This load is not likely to exceed 1 2 turnout settings per second.

    5. COM 3 (RCI-D) connects one CBC8 card only. This card is connected to a

    Tram system, where 2 tram vehicles run back and forth between the ends of an 8 block tram system. This system only uses the in-built occupancy detectors in the CBC8 card and therefore could not be connected to RCI-A.

    6. COM 6 is the SmartHand Control Bus as recommended by RR&Co.

    7. COM 8 connects a Versa-Tap monitoring device (Stratus Engineering) which

    can be plugged into any of the RS485 buses to record the traffic there.

  • 23

    Fig. 14 Peripheral Buses on the Preiten Bahn System

    3.10.2 Traffic Capacity of the RCI Equipment

    With analog systems TC (running in a PC) is the command station itself and TC provides its own timing structure which ensures 100 commands are sent per second on any RCI bus (see Fig. 12). The RCI cards at 38,400 Baud, actually can handle up to 300 commands per second but 100 commands per second per bus is not much slower than the total DCC command station capacity and is more than adequate. With a poling type master-slave system in contrast to an Event driven bus, there will be a period of uncertainty regarding the actual point of recognition with respect to the point of physical contact by the engine with the particular track section. I have assumed that the requirement for recognition of an engine entering a block be one engine length (35 cm for 0 Gauge). If we further assume that an engine entering a block at full scale speed, must be recognized within less than half the average length of an engine then a maximum polling cycle time can be calculated as follows

    120 kph = 33 m per Sec.

    33 m per Sec / 45 = 73 cm per Sec approx. ( for 0 Gauge) Length of Engine = 35 cm approx

    Maximum allowable period of uncertainty = 230 mS From this we can calculate the maximum number of IO-24,48 cards that may be scanned on one RCI bus. It is assumed that no Output commands are sent on these (Polling) buses.

    230 mS / Polling Command Time (10 mS) = 23 commands per polling cycle This would limit the number of cards on one polling bus to about 23 maximum (see Fig. 12). On the Preiten Bahn I have used the following maximum bus load

    For Output Command Handling 10 Max CBC8 cards (8 actually used)

  • 24

    For Feedback via Polling Replies 15 Max IO Cards (8 actually used) On the Preiten Bahn with 8 x IO-48 cards on RCI Bus B, TC can recognise arrival of an engine (35cm long) in 4% of 73 cm i.e. 3 cm (average between 0 and 6). A Poling Cycle Start every 230 mS (with 23 cards) would guarantee recognition of an engine traveling at full scale speed, within quarter of the length (on the average) of one engine (period of uncertainty is 0 to 0.5 the length of an engine).

    Fig. 15 Ultimate Analog/Digital System 320 Blocks

    The example shown in Fig. 15 illustrates how 320 blocks (2.1 occupancy indicators per block) can be accommodated on 9 RCI buses using 40 CBC8 cards and 75 IO-48,24 cards. The poling cycles in the above cases would be 15 x 10 mS long i.e. much less than the 230 mS required. 320 blocks seems a very large system and can be regarded as the upper limit of an Analog/Digital System. Such a system would probably also require a very fast PC. On LocoNet there is a limitation of 20 devices such as Mini-Boosters on one bus. Therefore the arrangement in Fig. 15 would require 80 Mini-Boosters (1 per 4 blocks). In such a case 4 o 5 LocoNet Repeaters, LNRP, would also be required. Calculating it out 320 blocks would require the following cards

    CBC8 40

    IO-48 40

    IO-24 35 ??

    Mini-Boosters 80

    DC/DCC switches 80

  • 25

    Of course, I have NOT made measurements on a Maximum System. On the Preiten Bahn (64 blocks) I have operated up to 7 trains simultaneously (Main Line = 14 Blocks). Clearly the limitation is the number of blocks in the Main Line. Fig. 16 shows a sample of the bus exchanges between TC and CBC8 cards as an analog engine moves through blocks 16 and 18 on the Preiten Bahn. The sequences were recorded on a Versa-Tap device but the comments are typed in by me.

    MM/DD/YY hh:mm:ss.ms.us DTE(hex) DCE(hex) Comment

    05/27/10 18:03:03.731.372 013000ffce

    05/27/10 18:03:03.748.962

    4030000070

    05/27/10 18:03:03.750.299 4030000070

    05/27/10 18:03:03.768.991

    41500ecad5 Set Speed in Block 18 = Forward 74

    05/27/10 18:03:03.770.359 41

    05/27/10 18:03:03.778.747

    41500acad1 Set Speed in Block 16 = Forward 74

    05/27/10 18:03:03.780.087 41

    05/27/10 18:03:03.788.539

    4130000071

    05/27/10 18:03:03.789.877 4130a000d1

    05/27/10 18:03:03.798.359

    41500ecad5 Set Speed in Block 18 = Forward 74

    05/27/10 18:03:03.799.702 41

    05/27/10 18:03:03.809.975

    41500acad1 Set Speed in Block 16 = Forward 74

    05/27/10 18:03:03.811.315 41

    05/27/10 18:03:03.819.964

    4330000073

    05/27/10 18:03:03.821.304 43300f007c

    05/27/10 18:03:03.838.993

    4430000074

    05/27/10 18:03:03.840.333 4430300044

    05/27/10 18:03:03.849.945

    4530000075

    05/27/10 18:03:03.851.282 4530000075

    05/27/10 18:03:03.868.912

    81300000b1

    05/27/10 18:03:03.870.242 81300000b1

    05/27/10 18:03:03.878.940

    41500ec9d6 Set Speed in Block 18 = Forward 73

    05/27/10 18:03:03.880.281 41

    05/27/10 18:03:03.889.928

    41500ac9d2 Set Speed in Block 16 = Forward 73

    Fig. 16 RCI Bus Communication Sequence

  • 26

    DTE is sent by the Data Terminal Equipment ie. the CBC8 while DCE is sent be the Data Circuit Terminating Equipment ie. the RS485 bus interface attached to the PC. Note the 5 Byte replies for the poling commands and the 1 Byte reply for the Output commands.

  • 27

    4 Problems with multiple Power Supplies

    4.1 Accidental Bridging of Analog and Digital Blocks (See Fig. 17)

    If you ask people whether you can connect analog DC and DCC together you get the Common Wisdom reply: Dont Do It !! Around the model railway circles stories about Blown-Up Decoders and Boosters etc. abound. I therefore researched the reasons for these claims in order to find ways to prevent Harm.

    Fig. 17 Accidental DC to DCC Bridging

    4.2 Voltage Doubling (see Figs. 18, 19)

    Fig, 18 shows one scenario of how Two Supplies can be connected In Series by bridging the gap on one side of the track. It is assumed that the outputs from the two H-Bridges are Out of Phase at that instant. This would cause doubling of the voltage on the track in certain places as shown (Wayne Roderick has explained this on http://www.tslrr.com/common.htm). If a mobile decoder happened to be sitting across a part with 30 - 40 V connected to the input, it will in all probability be destroyed. Since this is an effect of excess voltage the damage will occur without any overload current flowing thus no circuit breaker is going to be tripped. The problem would occur in every case where multiple power supplies are used in different adjoining blocks in the system, If the negative poles of the DC supply to all H-Bridges are connected together via a strong Common, the Booster Common, Voltage Doubling is eliminated (see Fig. 15). Bridging the gap would cause the two out of phase outputs to be short-circuited together causing tripping of the overload protection. Most manufacturers of Digital Model Railway equipment strongly recommend this common. Similarly in all situations where more than one supply is involved the existence of this common should be checked to prevent damage later.

  • 28

    Fig. 18 Voltage Doubling

    Fig. 19 Voltage Doubling is eliminated by Common

  • 29

    4.3 Overload Current on one Side only

    Digital control equipment for model railways such as circuit breakers are generally designed to protect the equipment against short circuits across the track. Therefore no protection is afforded if the overload current occurs in one leg only. Assuming one H-Bridge produces DC pulses and the other DCC reversals, heavy overload currents may occur which are not necessarily detected. If two H-Bridge outputs are out of phase and connected together on one side, the Overload current Must be sensed in one H-Bridge circuit or the other (see Fig. 20). This will only be true if the OL detectors are in all H-Bridges on the Same Side ie. the Negative Side in Fig. 20 or on Both sides (as in CBC8). In Wolfgang Kufers Mini-Booster (based on L6203) described here the overload detector is on the Negative Side and this circuitry is external to the chip. Other Mini-Booster circuits have been designed which are based on LMD 18200 which contain On-Chip circuitry on the Positive Side. I have NO knowledge what arrangements have been made in commercially available Boosters from eg. Digitrax, NCE (Lenz), or CTI. These questions need to be answered if you want to mix Digital and Analog operations. In my case, I am using CBC8 which is safe with anything on the DCC side (see Fig. 21)

    Fig. 20 Overload Current on ONE side only

    Fig. 18 shows that the old CBC8 card can be operated with All Types of Boosters irrespective of their protection arrangements: If you are using the old CBC8 card in a mixed analog/digital system the Overload Protection (and therefore disconnection of power up to 2 seconds will operate in every case cross bridging. However DCC circuit breakers (such as PM42) are still required to isolate power districts in case of short circuits across the DCC track.

    Fig. 21 Overload Currents with CBC8

    Chuck Davis from RCI has informed me that he is developing a new CBC8 card because the TLE5205 central component in the old one is no longer available. This card will have overload protection (I > 2 Amps) on the negative side and is therefore safe with the Mini-Booster described here but not with everything like the old card.

  • 30

    Fig. 22 explains what can happen if two H-Bridges (with OL Protection on Different sides) Collide.

    Fig. 22 Big Problems if two H-Bridges with different Protection COLLIDE !!!

    This condition will only occur in mixed DC and DCC situations since the DCC outputs are constantly reversing while the DC output connects to positive only. Therefore one of the protection circuits will operate and disconnect power from both rails. I found a circuit using the LMD18200 on the following website: http://home.cogeco.ca/~rpaisley4/CircuitIndex.html but, of course, I have no experience with this device.

    4.4 Undetected O/L currents through Protection Diodes in H-Bridge circuits

    All H-Bridge motor drive circuits have intrinsic protection diodes included in the same chip. These diodes protect the output transistors against back emf spikes. If a voltage differential exists between two H-Bridges which have been connected together a heavy current may flow through the protection diode to the other supply as shown in Fig. 23. This current would not be detected by the H-Bridge Protection circuit and even if the chip was disabled it would not break the current. Most circuit breakers open one leg only on overload because they are designed to protect against short circuits across the track.

    Fig. 23 Feedback through Protection Diodes

  • 31

    This problem can be overcome by connecting a diode in series with the lower voltage supply as shown in Fig. 24. In my case I have connected a 10 Amp diode in series with each CBC8 card.

    Fig. 24 Series Diode eliminates Feedback

    In Summary

    1. Stationary Decoders with Protection on BOTH sides can interwork with ALL kind of Boosters (Mini or Main). In this case Circuit Breakers are only provided for short circuits across the track.

    2. Stationary Decoders with Protection on the NEGATIVE side can interwork with Mini-Boosters with Protection on the NEGATIVE side (like the one described in Fig. 39.

    3. Stationary Decoders with Protection on the POSITIVE side can only interwork with Mini-Boosters with Protection on the POSITIVE side (eg. LMD18200 based).

    4. In ALL OTHER Combinations you are courting DISASTER!

    4.5 In-Rush Currents with some Sound Decoders

    Many of the DCC sound decoders contain large Filter Capacitors which need to be charged up at decoder initialization. This causes the protection circuitry in some H-Bridges to operate falsely before the Capacitors are charged up. This is a well-known problem which some DCC decoder manufacturers like ESU have tackled. However there are many decoders with this problem and Boosters or Mini-Boosters need to take account of the condition. It is assumed that a delay of 30 40 mS is sufficient for this condition.

    Fig. 25 Problem with In-Rush currents in some sound decoders

  • 32

    If we include a delay of 40 mS, based on a CR network in the Mini-Booster circuit, we get an additional problem if DC collides with DCC. Since DCC constantly reverses every 50 or 100 micro seconds The Overload Current is chopped every half cycle of the DCC output. If a single delay circuit of some milliseconds was added to the circuit, the delay would be restarted for every half cycle and therefore would never expire. Both H-Bridges would probably be destroyed in this case. The Mini-Booster described here takes care of the situation as described in 7.2

    4.6 Limitations Applied to Analog Engines running under TrainControllerTM

    Analog i.e. DC controlled trains are subject to a number of limitations as follows

    1. Engine control is limited to Speed and Direction Change. 2. No extra Functions are available such as Whistle Blowing or Flashing Lights. 3. No Sound Functions are available. However 4D Sound should work

    Normally 4. No Back-emf compensation is applicable since stationary decoders can only

    be Tuned to the Block and not the Engine. 5. Speed Calibrations must be done for the whole train not just the engine.

    Virtual Markers are Unreliable. I have used Physical Contact Indicators everywhere (2 or 3 per block).

    6. Running without Defined Path (i.e. no defined schedule) is Not Possible. Since schedules operate strictly One Way, shunting across block boundaries is not really possible. Shunting Schedules generally do work but must be applied to specific Roads where no block is reserved for another engine.

    7. Pushing trains containing Resistive Wheel Sets ahead of the engine is only possible within a shunting schedule ie. you cannot do it within a normal schedule. The need for resistive wheel sets has been eliminated in TC Gold because it calculates (from train length) when to release the previous block.

    From the above it is obvious that conversion of Analog Engines to Digital Operation has Many Advantages. However Analog Operation allows automatic running of your conventional locos where conversion is not possible or desired. Friends can run their analog engines on my system amongst my trains running automatically. This means they have to follow the signal indications given on SmartHand which is a lot of fun!

  • 33

    5 Hardware

    Clearly not all problems encountered in the project can be solved using commercially available equipment and therefore some Boards had to be specially designed and built for my system.

    5.1 System Requirements

    In summary the requirements for my system were as follows = 1. Provide Stationary Decoders for Analog operation 2. Provide for Strict Separation of buses carrying Driving Commands and

    Feedback 3. Provide access to the Digital Command (Track) Bus when required (relay

    method) 4. Allow for Separate Power Feed (different voltages) to the digital and analog parts

    of the system 5. Allow Safe Bridging of any currently analog and currently digital blocks 6. Provide a delay in tripping of the overload protection to cover the In-Rush

    Current in some sound decoders. 7. Provide Overload Detection with automatic reset 8. Provide remote indication of Overload in TC.

    5.2 Production of Pcb cards and the EAGLE CAD System

    I purchased a Hobbyist license for Eagle which allows me to lay out multilayer Pcbs up to the size of 100 x 160 mm. I am also obliged to design boards only for the Hobby and not monetary gain. I therefore cannot produce and sell any boards. However I am making the EAGLE files available which anyone can take to a Pcb manufacturer who will accept designs as EAGLE files. I certainly had no trouble in finding such a company in Melbourne. So anyone wanting to build such a system can get the boards manufactured for themselves. I only got the blank printed boards made and built them up myself but the company would also have built the boards at extra cost..

  • 34

    6 Commercially available Hardware

    In this section I am describing the Analog equipment from RCI in more detail since I assume that DCC technology and operation is well known.

    6.1 The Railroad Control Interface, RCI

    RCI is a series of peripheral cards which may be connected to a PC via a Communications Network based on the RS485 Bus. The cards contain considerable intelligence because of their on-board micro controllers and TrainControllerTM is designed to interwork with them.

    Fig. 26 Railroad Control Interface - System Overview

    The System is designed and marketed by Oaktree Systems LLC and is intended to run a model railway directed by Control Software in a PC or even a custom made Hardware Controller. Fig. 26 shows the arrangement and TrainControllerTM is designed to interwork with this hardware. Fig. 26 includes the main cards available in the system and the controller (here the PC) manipulates the cards via a set of commands and replies which are specific to the RCI system. All cards conform to the RCI command format which consists of 5 bytes (fixed length) in each packet - Command (PC to Card): AAAAAAAA CCCCCCCC DDDDDDDD dddddddd Check Where AA.A is the card address CCC is the Command Code DDD is the first Data Byte dd.d is the 2nd Data Byte Check is a Checksum of all other bytes. Polling Response AAAAAAAA CCCCCCCC XXXXXXXX YYYYYYYY Check (5 Byte Acknowledge) Where AA.A is the card address CCC is the Command Code received by card XXX is the first Data Byte YYY is the 2nd Data Byte Check is a Checksum of all other bytes.

    Control

    Software

    USB to

    RS485 IF

    Computer Block

    Control

    CBC-8

    To 8 Blocks

    IO-24

    1 2 8 1 2 16

    Inputs Outputs1 8

    IO-48

    1 2 16 1 2 32

    Inputs Outputs

    1 2 16 1 2 32

    Outputs Outputs

    O-48

    RCI Bus (RS 485)

  • 35

    Output Response AAAAAAAA (only the address is sent back in the response) (1 Byte Acknowledge) Note that NO card can initiate a message, it can merely respond to a command.

    6.2 Micro Processor controlled Throttle Card CBC-8R

    The CBC-8R is a Microprocessor Controlled peripheral card which serves to control 8 Analog Blocks. At this stage I would like to emphasize that this card drives analog trains only and has No Connection to DCC. The TC Manual describing Dual Control of Analog and Digital engines, refers to another Track Driving Card, TD4 which was able to connect DCC signals upon receiving a special command. The TD4 card is currently out of production.

    6.2.1 CBC8 Features

    Control of 8 Blocks where each block controller includes a 96 Step PWM Speed Control and a Voltage Sensing single Occupancy Detector. Blocks may be independently controlled from the PC.

    As with all digital motor drive circuits CBC-8R uses a so-called H-Bridge Integrated circuit (type TLE 5205). This circuit is applied to the track 9.8 mS after the start of the power cycle. The CBC8R card runs to a 10 mS power cycle and maximum power is applied when the speed step applied is 95%. Fig. 27 shows how a sensing circuit is applied after 9.8 mS, at a time when the power is switched off. The sensing circuit is built into the H-Bridge output circuit of TLE 5205 and checks for continuity through < 10K resistance (minimum current detected is 0.7 mA).

    Fig. 27 Occupancy Detection in CBC-8R

    This occupancy detector has the advantage that is will respond to the presence of Stationary Vehicles. All other detectors require some power to be applied to the track, which is OK for DCC, but is a problem for Analog Track Feeding. The disadvantage is that the detector is sensitive to back emf pulses from the motor i.e. it may not detect a vehicle when back emf pulses are High. The other problem is that occupancy indication is signaled back from the CBC-8R card via the RCI bus while loco driving commands are sent forward. When I had more than two trains operating in a group of blocks polling replies were

    15 V

    Speed Step = 50%

    Speed Step = 95% (Max)

    5 mS 9.5 mS 9.8 mS

    10 mS

    0

    Occupancy

    Detector

    applied

  • 36

    not received by TC for 0.5 seconds or more and trains got lost to the system. We will see later how this problem was overcome. Another disadvantage is that the CBC-8R card only provides one occupancy detector per block while Analog locos usually require at least 2 (Brake Marker and Stop Marker). However external detectors require some power to be applied to the track at all times which is not possible for stationary analog engines. I solved the problem by including all three indicators in the block data in TC. Brake and Stop Markers are needed when trains are moving, while the block must show occupied when the engine is stationary. The fact that the stationary loco information may get delayed by a second or so is of no consequence. There is Flicker Filter (variable up to 10 sec in 0.1 sec steps) applied to the occupancy detector to guard against bad contact due to dirty track or wheels. Since the external Occupancy Indicators have no internal flicker filter I have applied one to each block in TC block data and have turned off this hardware one.

    Fig. 28 The CBC-8R card

    The output circuits are fully current and heat protected. The output current is

    limited to 4 Amps and when this value is exceeded for longer than 50 S the H-Bridge is turned off and a bit is set in the poling reply. The power is re-applied after 2.5 seconds to see whether the short circuit has been cleared. Up to 22V may be applied to the power terminals but the negative pole of all cards must be connected to a strong common.

    The start of each 10 mS Prime Interval may be Synchronized for all CBC cards in the system so that no speed irregularities occur when an engine drives from one block to the next.

    Since the Card Address is set by a set of 6 Toggle Switches, Card Addresses are limited to the range of 64 127.

    The RCI Bus speed may be chosen from 19,200 or 38,400 Baud by Jumper and TC will work at either speed. On the Preiten Bahn all RCI cards run at 38,400 Baud.

  • 37

    6.2.2 Card Addressing

    The card address is set on 6 Toggle switches which implies that the most significant two bits are permanently set to 0,1 which restricts addresses for CBC-8R to the range of 64 to 127.

    6.2.3 Commands and Responses for the CBC-8R Card

    NOTE - The commands show here use zero based point addressing, i.e. the first outlet on the card is numbered 0, the second point 1, etc. TC however numbers the outlets from 1 to 8. This is a little bit confusing but there it is! These commands work together to control actual locomotive speed via the Track Driver card. Through these commands actual speed and momentum can be simulated.

    The commands have three purposes

    Initiate Action on the card e.g. setting the speed and direction of the engine

    Read back information from the card e.g. Block Status or Card Type

    Program Variables e.g. Setting holdover values or momentum are the RCI equivalent of CVs in DCC. These commands are issued neither by TC nor TrainProgrammer, but rather the values have to be set via the RCI Test program, RCITest.

    The valid commands for the CBC8-R are

    0 Read Type 2 Stop Card 3 Start Card 5 Sync Clocks 8 Store in Memory 9 Recall from Memory 10 Store Current Settings 48 Read Bytes 49 Set Holdover 64 Set Starting Voltage 65 Set Target Speed 67 Set Starting Momentum 68 Set Braking Momentum 80 Set Speed (IO-48 Compatibility Mode)

    When these features were designed in TC the CBC-8R card did not exist and its forerunner was a Track Driver card that plugged into the IO-48 card (TH4). For this reason on the Connection tab of Block data you should set Track Driver attached to IO-48 card if you are connecting the CBC-8R card. TC performs its own Momentum, Brake Rate and Starting voltage calculation and therefore only uses commands 0, 5, 48 and 80. The others have been enumerated here for completeness. When the CBC-8R is powered on, certain values are set by default. These default values are -

    Starting Voltage - 0

    Target Speed - 0

    Starting Momentum - 10

    Braking Momentum - 10

  • 38

    These values may be changed by means of RCITest. I have changed variables on my system as follows

    Starting and Braking Momentum 1 on all blocks Holdover value 1 (0.1 Seconds) on all blocks

    Command 0 Type Inquiry The command causes the card to respond (long response) with its Type and Version information. Command: AAAAAAAA 00000000 xxxxxxxx xxxxxxxx Checksum Where xxxxxxxx is ignored Response: AAAAAAAA xxxxxxxx TTTTTTTT VVVVRRRR Checksum Where TTTTTTTT This is the card type code for CBC this is always 6 (Compatible with IO-48) VVVV This is the Firmware Version, for CBC this is also 6 RRRR Firmware Release Level Command 5 Synch Clocks: This command causes the card to reset the timing of its power output pulses. The purpose is to ensure that the track outputs on All CBC8-R cards are exactly in phase with each other. If the cards were not synchronized, there could be a momentary speed changes occurring when trains transit from one block to another. The eight outputs on each individual CBC-8R card are always kept in sync with each other by the processor. This command must always be sent as a broadcast message (address of 00), so that it will act on all cards at the same instant in time. TC sends this command to all RCI buses connecting CBC8-R cards every 8 seconds. The card does Not send any Response to this command. Command: 00000000 5 xxxxxxxx xxxxxxxx Checksum Where xxxxxxxx is ignored Response: None Command 10 Store Current Values This command stores (permanently) the current values of the holdover times, starting voltages, starting momentum and braking momentum currently set in the card. When the card is restarted from power-up, all these settings will be restored. Once these values are permanently stored in this manner, they will be in effect whenever the card is powered on, regardless of what PC software is being used. This command should only be used during setup of your railroad; using it during normal operation may cause timeout errors and a temporary interruption of train control. This command must be generated in RCITest. Command: AAAAAAAA 10 xxxxxxxx xxxxxxxx Checksum

  • 39

    Where xxxxxxxx is ignored Response: AAAAAAAA Command 48 Read Bytes This command read the two bytes of status information from the CBC-8R. The first byte contains the value of the occupancy detectors, while the second byte contains the value of the overload indicators. Note that inputs are latched in the card until they are read by this command, i.e. any input that goes to a one will be held in that state by the card until the value is read by TC. Note also that each block detector point on the card can have a holdover value set. The holdover is the minimum time (in increments of 0.1 of a second) that an input will stay at one, even after the input has returned to zero. This is useful for filtering out Contact Flickering due to dirty wheels or track. Command: AAAAAAAA 48 xxxxxxxx xxxxxxxx Checksum Where xxxxxxxx is ignored Response: AAAAAAAA 48 DDDDDDDD OOOOOOOO Checksum Where DDDDDDDD Are the 8 Occupancy Indicators OOOOOOOO Are the 8 Overload Indicators Command 49 Set Holdover Value This command sets the Holdover Value for the occupancy detector bits described under command 48. Command: AAAAAAAA 49 PPPPPPPP xHHHHHHH Checksum Where PPPPPPPP Is the Outlet Number (0 7) 255 is all 8 bits = 1 xHHHHHHH Is the Holdover Value (1 127) in 0.1 second steps Response: AAAAAAAA Command 80 Set Speed This command sets the absolute speed (in % of Full Speed which equals the pulse width in 0.1 mS steps) and direction for an outlet. The speed control function on the card will set the actual speed based on momentum calculations. Since TC does its own Momentum Calculations these values should have been set to One and TC determins the actual speed directly. Direction of travel is set according to the D bit. D=1 indicates forward, while D=0 indicates reverse. Command: AAAAAAAA 80 xxxxPPPx DSSSSSSS Checksum Where PPP Is the Outlet Number (0 14) xxxx is ignored D is Direction (1 Forward, 0 Reverse) SSSSSSS Speed Step (95 Max; > 95 = 95) Response: AAAAAAAA

  • 40

    6.3 The Mini-Input-Output Card IO-24

    Fig. 29 The IO-24 Card

    This card combines 8 Input points with 16 Output points. The Input points require to be driven from low-going outputs (i.e. 0V behind a relay contact). If they are to be used for occupancy detection, the points must be optically decoupled (BD8-T card). In the main, I have used this card to operate Circuitron Tortoise switch machines.

    6.3.1 Features

    16 Output Points and 8 Input Points on a very compact card (3.8 " x 2.5").

    Power Output Drivers: Bi-directional power drivers on all 16 outputs. Allow you to drive common anode, common cathode, or bipolar LED signals; stall motor switch machines; and two-wire or three-wire solenoid powered switch machines drawing up to 1 amp of current (pulsed). Each output can have it's polarity controlled individually - no need to choose an output type when you buy or build the card!

    Circuitron Tortoise Switch machines can be connected directly to an Even and next higher Odd outlet. TC when set up for driving the Tortoise will automatically set up the two outlets in the turnout data.

    WARNING! The outputs of IO-24 are NOT SHORT CIRCUIT PROTECTED. If A live track rail is connected to the motor terminal (e.g. short between 7 & 8 on tortoise machine) the IO-24 card can burn up! I fixed the problem by connecting 150 ohm resistors in series with each motor terminal which limits the current to safe levels while allowing the stall motor to operate normally. Oaktree Systems LLC have developed a Tortoise Connection card that does the same thing.

    Filtered, Pulled-Up Inputs for compatibility with contact closures, or electronic detectors of all types. Both Input polarity and output polarity can be set via software. The BD-8T Tiny Block Detector is designed specifically to complement the IO-24 card, providing 8 optically-isolated block detectors on a tiny card

  • 41

    Input Holdover allows you to set up a delayed "drop out" (similar to CBC8) of occupancy signals from attached block detectors which don't have this feature built in.

    Again the card address is set by 6 Toggle Switches and the IO-24 card addresses are limited to the range 128 - 191

    6.3.2 Card Addressing

    The card address is set on 6 Toggle switches which implies that the most significant two bits are permanently set to 1,0 which restricts addresses for IO-24 to the range of 128 to 191.

    6.3.3 Commands and Responses for IO-24

    The commands have three purposes

    Initiate Action on the card e.g. lighting signals or setting turnouts

    Read back information from the card e.g. Block Status or Card Type

    Program Variables e.g. The Setting of holdover values or Sense Bits are the RCI equivalent of programming CVs in DCC. These commands are issued neither by TC nor TrainProgrammer, but rather the values have to be set via the RCI Test program, RCITest.

    The valid commands for the IO-24 are

    0 Read Type 10 Store Current Settings 11 Store Current Commands 16 Write Point 17 Write Multiple Points 18 Pulse Out 19 Long Pulse Out 20 Alternate Pulse Out 21 Mix 22 Flash Off 23 Blink 24 Blink/Mix 25 Pulse Width Modulation (PWM) 26 Set Output Sense Bits 27 Flip-Flop Pulse 28 Extra Long Pulse 29 Extra Long Blink 30 Set Two Points 31 Set Three Points 32 Set Four Points 35 Strobe Light Output 36 Chase Light Output 37 Three Light Traffic Signal 38 Six Light Traffic Signal 48 Read Bytes 49 Set Holdover Time 51 Read Raw Input Bytes 53 Set Input Sense Bits 80 Set Speed (IO-48 Compatibility Mode)

  • 42

    TC only uses commands 0, 16, 30 and 48. The others have been enumerated here for completeness. Command 0 Type Inquiry The command causes the card to respond (long response) with its Type and Version information. Command: AAAAAAAA 0 xxxxxxxx xxxxxxxx Checksum Where xxxxxxxx is ignored Response: AAAAAAAA xxxxxxxx TTTTTTTT VVVVRRRR Checksum Where TTTTTTTT This is the card type code for IO-24 this is always 6 (Compatible with IO-48) VVVV This is the Firmware Version, for IO-24 this is 2.4 RRRR Firmware Release Level Command 10 - Store Current Values This command stores the current value of the output sense bits, input sense bits, and holdover values currently set in the card. When the card is restarted from power-up, all the settings will be restored. These settings are restored before the power output drivers are turned on. If you have a device connected to an output in such a way that it requires the output to be normally high, you can change the sense of the output using command 26, then use this command to save the settings. These settings should be made before the device is connected to the card. Command: AAAAAAAA 10 xxxxxxxx xxxxxxxx Checksum Where xxxxxxxx is ignored Response: AAAAAAAA This command is only given from the RCI Test program to permanently store all settings such as Holdover Value etc. Command 16 Write Single Point The command sets a single output poin