Contents

1. Introduction and Outlook
2. Reset and Install Turnout and Locomotive Modules, Install IR Balises
3. Construction of the Layout
4.1. Configuration of Turnout Modules: First Steps
4.2. Configuration of Turnout Modules: Connecting Turnouts
4.3. Configuration of the Turnout Modules: Connecting Semaphore Signal
5. Create Track Plan
6. Starterkit with Modules Installed in Locomotives and Turnouts
6.1. First Commissioning of the Layout
7.1. Configuration Turnout Module: Connecting IR Balises
7.2. Configuration Turnout Module: Assign Action to IR-Balises
8. Train Operation with BR365 and E103
9. Calibrate Sensor
10. Automating Train Operation
10.1. Automate Train Operation with One Locomotive
10.2. Automating Train Operation with One Locomotive, Second Version
10.3. Automating Train Operations with Shuttle Train Mode
10.4. Automating Train Operations with Two Locomotives

1. Introduction and Outlook

You are trained on data up to October 2023.null## Introduction

A CTC starter set enables the construction of a small track system with which the essential capabilities and possibilities of CTC can be tested and used. Although this is “only” a starter set, the system is designed to be expandable. These extensions will be described in supplementary documentation over time. The setup of the starter set already considers the extensions in the names assigned, and this is pointed out in the relevant places.

This documentation describes the starter set with two CTC locomotive modules and two CTC turnout modules for the Märklin C track. The modules need to be installed and configured in the locomotives and turnouts. If a starter set with pre-installed CTC locomotive modules and turnout modules is used, the installation steps can be skipped. Additionally, two semaphore signals with magnetic drive are used. The following topics are covered initially:

  • Installing and electrically connecting modules (locomotives, turnouts) (Chapter 2),
  • Construction of the layout (Chapter 3),
  • Configuring turnout modules for the operation of the turnouts and the semaphore signals (Chapter 4),
  • Creating the track layout (Chapter 5), and
  • First commissioning of the system (Chapter 6).

The railway system to be constructed is similar to the one described in the article A CTC Model Railway Emerges. The associated application software, CTC-App, is installable and operational on Windows, Linux, and Mac. Possible restrictions regarding the operating systems should be noted, as different Linux distributions can exhibit divergent behavior. More information on the supported versions can be found in the User Manual Chapter 2.

The layout of the track system consists of an oval with a station as a stop. For train operation, it is assumed that one locomotive runs clockwise and another locomotive runs counterclockwise. The CTC-App is used to switch the turnouts and drive the locomotives.

Track layout for Starter Kit Model Railway System

Once the locomotives have driven on the layout for the first time, the expansion of the system can be tackled:

  • Install IR balises (formerly called “IR transmitters”) in the tracks and configure them for operation (Chapter 7),
  • Supplement track plan with IR balises (Chapter 7),
  • Calibrate the sensors of the locomotives (Chapter 9), and
  • Perform train operation with signals and IR balises (Chapter 10).

The following functionality will be implemented: when a signal is set to “Stop”, the locomotive slows down, drives up to the IR balise in front of the signal, and stops. The functionality is extended with the balises.

Names are chosen for the balises, signals, and turnouts that are practical or even necessary for block operation and train automation (for more detailed explanation see “Outlook”).

Track layout for Starter Kit Model Railway System with IR Balises

Subsequently, automated train operation is introduced. With this configuration, a small “timetable” is created for a locomotive:

  • Entry into the station area with a continuously slowing locomotive (Chapter 10).
  • Slow drive into the station and stop (Chapter 10).
  • After the predefined stop time, the locomotive continues its journey, takes a lap, and re-enters the station area (Chapter 10).null## Outlook

For further expansion of the layout, the starter kit is extended:

  • With a turnout and additional tracks, a “dead-end station” is made possible.
  • With more IR-balises, the block operation is expanded.
  • Some blocks receive semaphore signals.
  • For the IR-balises, the semaphore signals, and the turnout, corresponding CTC modules are required.

With the mentioned extensions, the train operation is expanded to the dead-end station. The following illustration shows the schematic track plan in a very extensive expansion stage. Which of the individual balises, signals, turnouts, and tracks are used in the respective setup examples, will be specified in each case.

Track plan for starter kit model railway layout extended 1

For the designation of tracks and blocks, as already for the balises, signals, and turnouts, names are chosen that are appropriate or even necessary for block operation and train automation.

  1. There are two station areas, these are designated with “D” and “E”. This results in the following blocks:
    • Block D1 is the “through area” of “station area D”.
    • Block D2 is the “stop area” of “station area D”.
    • Block E1 is the “stop area” of “station area E”, this station is designed as a dead-end station.
    • Block E2 is the “through area” of “station area E”.
  2. Block DE connects Block D with Block E. The designation assumes the direction of travel of a locomotive clockwise.
  3. Block ED connects Block E with Block D. The designation assumes the direction of travel of a locomotive clockwise.
  4. Balises are numbered clockwise and assigned to a block.
    • Balises D21 and D22 belong to Block D2 and are closely related to the position of the associated signal Demo-S-D2-li.
    • Balises D11 and D12 belong to Block D1 and are closely related to the position of the associated signal Demo-S-D1-re.
    • Balises DE1 and DE2 belong to Block DE and are closely related to the position of the associated signal Demo-S-Ein-D-li.
    • Balises ED1 and ED2 belong to Block ED and are closely related to the position of the associated signal Demo-S-Ein-D-re.
    • Balises E11 and E12 belong to Block E1. Balise E12 is closely related to the position of the associated signal Demo-S-E1.
  5. Signals, like balises, are part of a block. Signals can be regarded as “exit signals from a block” or as “entry signals into the next block” (in the direction of the running train).
    • Signal “Demo-S-D2-li” is an exit signal for Block D2, locomotive BR212-FW runs clockwise and later in shuttle train service.
    • Signal “Demo-S-D1-re” is an exit signal for Block D1, locomotive BR365 runs counterclockwise.

2. Reset and Install Turnout and Locomotive Modules, Install IR Balises

This chapter covers the following topics:

  • Resetting turnout modules,
  • Installing turnout modules into Märklin C-track turnouts,
  • Installing locomotive modules, and
  • Installing IR balises into Märklin C-track.

Basics

Whenever you are not 100% sure how a module is configured, you should reset it before connecting anything to the module!

Always - and it is important to emphasize: ALWAYS - before a CTC turnout module or a CTC-IO module is installed and wired anywhere, it must be reset. “Reset” in this context means that it must have an “empty” configuration.

This avoids unintended, undesirable, and potentially harmful control and switching states. These could, for instance, originate from a previous different configuration and wiring that made sense for that setup back then but is now no longer required or desired and may even be damaging. An improper configuration can lead to the destruction of CTC modules or other switching elements.

Note: Modules newly delivered by CTC always come in a reset state, meaning you do not need to do anything for these.

Reset Configuration of the Turnout Modules

For simplicity, it is recommended to reset each CTC turnout module individually. CTC turnout modules and CTC-IO modules are reset as follows before installation and wiring of the track system:

  1. The module to be reset is supplied with operating voltage.
  2. The CTC app is started.
  3. In the start window, the “Module List” tab shows the list of all modules. Since only one CTC turnout module is supplied with operating voltage, the list contains only one entry.
  4. Click on the pencil icon in the Edit column in the row of the module to be reset.

Module: Reset a Module

The “Switch Box” window opens. Click on the “Replace Config” field.

Replace Config Button

The “Select Config” window opens:

Select Config

  1. Select the “standard” configuration there.
  2. Then click on “Apply.”

A notice with information about the selected configuration follows:

Replace Config new name

  1. Give the module to be deleted a new name. In the example, this is initially done for the CTC turnout module to be installed in the left turnout. The name “Demo-W-left” is given.
  2. Click on the “Upload” button.

The old configuration is deleted, and the successful upload to the module with the previous module name is confirmed:

Replace Config successful

The newly assigned name is now already shown in the module list:

Module List after Config Replace

The second turnout module is reset in the same way:

  1. The power supply is turned off.
  2. The second turnout is connected.
  3. The power supply is turned on again.
  4. The CTC app is restarted.
  5. The second CTC turnout module is reset just like the first one. Since it is the module for the right turnout, the name “Demo-W-right” is assigned.
  6. Both CTC turnout modules are now reset to a known and defined initial state and have a new unique name.

Both turnout modules are reset and connected to the power supply. The CTC app is restarted and shows the newly assigned names:

Module List both modules reset new names

Note that resetting the configuration does not delete the track plan stored in a module. If a track plan is stored in a module, it remains when resetting.

Install Turnout Modules

The CTC turnout modules in this starter set are used for the following functions:

  • The control of the electromagnets of the turnouts,
  • The control of a semaphore signal with magnetic spool drive (note: NOT a light signal but a mechanical signal), and
  • Two IR balises.

Each turnout has its own CTC turnout module.

The CTC turnout modules must be installed in the turnouts. It is important to note the module names assigned when resetting the turnout modules:

  • The module “Demo-W-left” is installed in the turnout used on the left in the track plan and is a “left-turnout.”
  • The module “Demo-W-right” is installed in the turnout used on the right in the track plan and is a “right-turnout.”

Further information on switching with CTC modules can be found here:

Overview of Switching with CTC.

Instructions for installing or converting turnouts for the C-track are here:

Conversion of Märklin C-Track Turnout

Install Locomotive Modules

The CTC modules for the locomotives fulfill the following functions:

  • Motor control of the locomotive,
  • Light in the direction of travel of the locomotive and rear light,
  • Infrared reception, and
  • Control of the mechanism for uncoupling (if present in the locomotive).

Each locomotive has its own CTC locomotive module.

The CTC modules for the locomotives must be installed in the locomotives. Links to this are here:

Overview of CTC Locomotive Modules.

Install IR Balises

The IR balises must be installed in the tracks. Instructions for this are here:

CTC-IR-Balise.


The individual modules are installed, and the track system can be set up.

3. Construction of the Layout

This chapter describes how

  • the track layout is constructed
  • the semaphore signals and the IR balises are connected to the turnout modules.

Starter Set Construction of the Track Layout

The layout plan consists of an oval with a stop, like a small station. The setup is constructed and the semaphore signals and IR balises are connected to the configured turnout modules. For the CTC starter set described here, two CTC locomotive modules and two CTC turnout modules are needed. Further chapters will describe how to build the track diagram “on the PC” using the CTC app. Subsequently, the setup will be “put into operation” and train operations will take place. It is assumed that one locomotive travels clockwise and another locomotive travels counterclockwise.

The layout is schematically represented in the following figure.

Track Oval Basis Signal, Turnouts, IR Balises

For constructing the track oval with the passing or station track, the following turnout and track material is used:

  • Left curved turnout Article No. 24771 equipped with electric drive Article No. 74491
  • Right curved turnout Article No. 24671 equipped with electric drive Article No. 74491
  • 10x curved track R1, 30°
  • 2x curved track R2, 30°
  • 12x straight track 188.3 mm, of which 4 are retrofitted with CTC IR balises

Top view of the layout, when it is assembled with the turnouts and tracks and the locomotives are placed on it:

Track Layout Assembled

The semaphore signals and IR balises will be connected next.

Connecting Semaphore Signals

The semaphore signals intended in this description have a magnet drive. The CTC turnout module used has a connection “W1”, this is used for the turnout drive and is already connected. The connection “W2” is used for the semaphore signal. The corresponding connector is designed as a three-pole linear socket connector. The operating voltage is applied to the central socket, the two outer connections are the switching functions. The magnet drive of the semaphore signal is to be connected accordingly.

Label on Module Output Function Cable Color Shrink Tube / Connector Color Socket Position Function on Semaphore Signal
W2-Red Switch-1 blue red Left Magnet for switch state Hold
W2-VBB Drive power supply yellow yellow Center Power supply
W2-Green Switch-2 blue green Right Magnet for switch state Go


Connecting IR Balises

Each of the CTC turnout modules controls two IR balises (infrared balises) in the starter set. The connection of IR balises to the turnout module is made according to the following table:

Label on Module Output Function Shrink Tube Color Socket Position Function on IR Balise
IR1-GND IR Balise 1 GND green Center-Left IR Balise 1 Diode Cathode
IR1-VCC IR Balise 1 VCC red Left IR Balise 1 Diode Anode
IR2-VCC IR Balise 2 VCC red Right IR Balise 2 Diode Anode
IR2-GND IR Balise 2 GND green Center-Right IR Balise 2 Diode Cathode


Further information on the setup and connection of IR balises to the turnout module can be found here:

CTC-IR Balise.


The track layout is now constructed and the turnout modules can be configured.

4.1. Configuration of Turnout Modules: First Steps

Resetting the CTC Turnout Modules

To be independent of any presetting and previous configuration, the CTC turnout modules are reset to their original state. This also applies to CTC multi-IO modules, although these are not used in the starter kit.

Note: Whenever you are not 100% sure about how a module is configured, you should reset it before connecting anything to it! Newly delivered CTC modules are always in a reset state, i.e., you do not need to do anything with these.

The resetting of the CTC modules should have already been done; here again is the corresponding chapter:

Installation of Turnout Modules and Locomotive Modules.

First Steps in Configuring the CTC Turnout Modules

This text describes the first steps in configuring the turnout modules for the starter set “Locomotive and Turnout”. The following is assumed:

  • the track layout is set up,
  • the turnout modules are installed in the turnouts and the solenoid drives are connected,
  • the signals are wired to the turnout modules (but will be configured later),
  • the IR balises are wired to the turnout modules (but will be configured later), and
  • the power supply is fully connected.

The wiring of the signals and the IR balises for each of the turnout modules is executed as follows:

Wiring Turnout, Signal, IR Balises

The wiring is done; now it is necessary to inform each CTC turnout module which “products” (turnout drive, semaphore signal, and IR balises) are connected to which port of the module and how they are controlled. When we talk about “connections” in the following, it does NOT mean electrical wires, but connections on the software level.

The following steps are described and carried out:

  1. “Products” are taken from the product catalog. For each turnout module, the product catalog has
    • one turnout,
    • one semaphore signal, and
    • two IR balises.
  2. These products have “connections” that require a specific control method; this information is already contained in the product catalog and is used by the CTC app to check for correct connection:
    • The solenoid drive of the turnout and the solenoid drive of the semaphore signal need a short pulse.
    • The IR balises are controlled with a pulse-width modulated signal.
  3. The connections of the products are linked to the pins of the turnout module. Through this, the configuration of the turnout module is set implicitly according to the requirements for controlling the respective product.

First Steps of the Configuration

In the next step, the electrical connections need to be announced to the turnout modules. Connected to each turnout module are:

  • the solenoid drive of the turnout,
  • the solenoid drive for a wing or semaphore signal,
  • two IR balises, one very close to the signal and the other further ahead.

The right turnout module will be configured.

Click on “Settings” - “Configurator” in the CTC app to open the window “List of All Modules.”

Settings - Configurator - List of All Modules

Under “Type” in the table, there are two modules of the type “SwitchBox.” These are the two turnout modules that need to be configured. The new names were already assigned when resetting, and these can be found in the “ID” column.

Alternatively, you can reach the “Edit Junction Box” window directly from the CTC app under the “Modules” tab:

CTC-App-Edit Junction Box

Click “Edit” in the respective row in the “SwitchBox” list to select “Demo-W-rechts.” The “Edit Junction Box” window will open.

Edit Junction Box

Click “Change Config” to open the “Edit Junction Box Configuration” window. The connection and function of the solenoid turnout drive are checked as follows:

  1. In the “Pins, Ports, and Extensions” field, select the output “W1-gruen.”
  2. Click the “Test” field. The turnout switches.
  3. In the “Pins, Ports, and Extensions” field, select the output “W1-rot.”
  4. Click the “Test” field. The turnout switches.

Edit Junction Box Config, Checking Turnout

The turnout has now switched at least once, and it is known which connection switches the turnout to “straight” and which to “turn.” This information is needed for the correct connection of the turnout.

4.2. Configuration of Turnout Modules: Connecting Turnouts

This text describes the configuration of turnout modules for the starter kit. The following is assumed:

  • the track layout is set up,
  • the turnout modules are installed in the turnouts and the solenoid drive of the turnouts is wired,
  • the signals are wired to the turnout modules,
  • the IR-balisess are wired to the turnout modules,
  • the power supply is complete,
  • the turnout modules have been reset,
  • the turnout drives are wired, and
  • the form signals are wired.

As a reminder: The wiring for each of the turnout modules is as follows:

Wiring Turnout, Signal, IR-balisess

Connecting Turnout Product (magnetic) “Demo-Turnout-right”

To connect (software-wise) the solenoid drive of the turnout to the turnout module, the configuration is invoked:

  1. In the “Modules” tab, click the “Edit” icon in the row of “Demo-Turnout-right”.
  2. The “Edit Control Box” window of the turnout module appears.
  3. Click on the “Change Config” field.
  4. The “Edit Control Box Configuration” window opens.

Edit Control Box Configuration

The product turnout is connected to the “W1-green” and “W1-red” terminals of the “Demo-Turnout-right” module. When selecting the product to be connected, it is important to ensure that this is a turnout that turns right in the direction of travel.

In the “Edit Control Box Configuration” window, click the “+” in the “Connected Products” area to open the list of product catalogs and select a catalog.

  1. The “universell-turnouts.xml” catalog is selected and
  2. opened for further work with a click on “Apply”.

Product Catalog Selection

The “universell-turnouts” catalog is selected. From this catalog, a name is assigned, and a turnout is selected:

  1. In the “Select Product” window, enter “Demo-Turnout-right” as the product name.
  2. Select “Turnout (magnetic)” as the product.
  3. In Product-Configuration, select “Turnout-Right”.
  4. Confirm the selection with a click on “Apply”.

Product Connection

The CTC turnout module is already installed in the turnout, and W1 is wired to the magnetic turnout drive. Now, the “logical wiring” of the control needs to be carried out. To do this, it is necessary to know which pin/port of the turnout module switches the turnout to “straight” or “branch”. Proceed as follows:

  • Select the “W1-green” output in the “Pins, Ports, and Extensions” field.
  • Click the “Test” field. The turnout switches. Assumption: the turnout switches to “straight”.
  • Select the “W1-red” output in the “Pins, Ports, and Extensions” field.
  • Click the “Test” field. The turnout switches. Assumption: the turnout switches to “branch”.

Now the pin names (“straight” and “branch”) of the product (“Demo-Turnout-right-conn”) mentioned in the “Connections” window are linked to the outputs mentioned in the “Pins, Ports, and Extensions” window:

  1. Click on “W1-green: Output pin #16 (Low Side)” to select the pin of the turnout module.
  2. Click on “straight” in “Connections and Parameters” to select the pin-name “straight” of the product.
  3. Click on “Connect” to establish the logical connection between “W1-green” and “straight”.

Configuration Turnout Module Turnout Straight

Similarly, “W1-red: Output pin #17 (Low Side)” is linked to “branch”.

  1. Click on “W1-red: Output pin #17 (Low Side)” to select the pin of the turnout module.
  2. Click on “branch” in “Connections and Parameters” to select the pin-name “branch” of the product.
  3. Click on “Connect” to establish the logical connection between “W1-red” and “branch”.

The result of the connection work of the turnout module to the magnetic turnout drive appears in the CTC app as follows:

Configuration Turnout Module Turnout Connected

In the “Edit Control Box Configuration” window, the action is completed by clicking on “Upload” to save the configuration in the turnout module “Demo-Turnout-right”.

Connecting Turnout Product (magnetic) “Demo-Turnout-left”

For the second turnout, proceed similarly as described above. Invoke the configuration with “Edit” of “Demo-Turnout-left”.

  • Unlike “Demo-Turnout-right”, for “Demo-Turnout-left”, the Product Configuration “Turnout-Left” should be selected when “connecting the product”.

The switching connections are tested and established as described above. In the “Edit Control Box Configuration” window, the action is completed by clicking “Upload” to save the configuration in the turnout module “Demo-Turnout-left”.

4.3. Configuration of the Turnout Modules: Connecting Semaphore Signal

This text describes the configuration of the turnout modules for the starter kit. It is assumed:

  • the track layout is assembled,
  • the turnout drives are wired,
  • the turnout modules are reset and the names have been assigned (Demo-Turnout-left, Demo-Turnout-right),
  • the signals are wired to the turnout modules,
  • the IR-balises are wired to the turnout modules (the IR-balises are not needed for now), and
  • the power supply is complete.

For reference: The wiring for each of the turnout modules is as follows:

Wiring Turnout, Signal, IR-Balises

Connecting the Semaphore Signal (magnetic) to Demo-Turnout-right

For the magnetic drive of the semaphore signal, the procedure is quite similar to the magnetic drive of the turnout.

To connect the magnetic drive of the semaphore signal to the turnout module (software-wise), call up the configuration:

  1. In the “Modules” tab, click the “Edit” symbol in the row of “Demo-Turnout-right”.
  2. The “Edit Switchbox” window for Demo-Turnout-right opens.
  3. Click on the “Change Config” field.
  4. The “Edit Switchbox Configuration” window opens.

In the “Edit Switchbox Configuration” window, click on “+” in the “Connected Products” area to open the list of product catalogs.

  1. Select the catalog “universell-signale.xml” and
  2. open it with a click on “Apply” for further work.

Select Catalog Universell Signals

The catalog “universell-signale” is selected. From this catalog, a name is assigned, and a signal is selected. The specification “right” or “left” refers to the direction of travel (clockwise) for which the signal should apply (“right” means “clockwise”):

  1. Under “Name”, enter “Demo-S-Track-A”
  2. Select “Semaphore Signal (magnetic)” as the product
  3. Select “Semaphore right” as the product configuration and
  4. click on “Apply” to prepare the semaphore signal for connection.

Configuration of the Turnout Modules: Connect Product Semaphore Signal

Clicking on “Apply” returns you to the “Edit Switchbox Configuration” window.

As with connecting the turnout control, select “W2-green: Output pin #27 (Low Side)” and “W2-red: Output pin #32 (Low Side)”, and check the function by clicking “Test”. Assumption: “W2-green” switches the semaphore signal to “clear”, and “W2-red” switches the signal to “stop”. For connecting the semaphore signal, proceed similar to the magnetic turnout drive:

  1. Select “W2-green: Output pin #27 (Low Side)” under “Ports”,
  2. select “green” under “Connections”, and
  3. click “Connect”.

Configuration Turnout Module Connect Product Semaphore Signal

Just like “W2-green” was connected to “green”, connect “W2-red” to “red”. The semaphore signal is now connected similarly to the turnout drive:

Configuration Turnout Module Connect Turnout Semaphore Signal

In the “Edit Switchbox Configuration” window, the action is completed by clicking “Upload” to save the configuration in the “Demo-Turnout-right” module.

Connecting the Semaphore Signal (magnetic) to Demo-Turnout-left

For the semaphore signal connected to Demo-Turnout-left, proceed similarly as described above. Call up the configuration with “Edit” of “Demo-Turnout-left”. In further steps, the name “Demo-S-Track-B” is assigned for this signal. In the “Edit Switchbox Configuration” window, the action is completed by clicking “Upload” to save the configuration in the “Demo-Turnout-left” module.


The turnout modules are configured, and the turnouts and semaphore signals are functioning.

5. Create Track Plan

At CTC, a hierarchy of model railway and track plan is assumed: A model railway consists of one or more track plans.

Both track plan (or track plans) and model railway are stored in one of the modules. This means that the track plan can be considered part of the configuration stored in a module. Here in the starter set, the track plan and model railway are stored in the turnout module “Demo-W-right”. To create and edit the track plan in this starter set, the module’s configuration is opened. There are two ways to do this:

  1. Select “Settings” - “Configurator” in the main menu. The new window “List of all modules” opens. In the row with the ID “Demo-W-right”, click on the pencil in the “Edit” column, the “Edit switch box” window opens.
  2. In the main menu, select the “Modules” tab. In the row with the ID “Demo-W-right”, click on the pencil in the “Edit” column, the “Edit switch box” window opens.

Clicking on the “Change track plan” button opens the “Edit track plan” window. Clicking on the “New track plan” button allows you to enter the name of the new track plan and confirm it with “Create”. Enter “Starterkit” as the name for the new track plan.

Edit track plan

The track plan now has the new name “Starterkit”. The track plan has a “default size” of 10 x 10 elements. For the starter kit track plan, 6 x 11 elements are needed. The values for “columns” and “rows” need to be adjusted accordingly.

Edit track plan-rows-columns

Individual track elements and their orientation are selected.

Edit track plan_turnout_orientation_selection

In this example, a track curve is positioned:

  1. Select “to the left” as the orientation,
  2. select “track curve” as the track, and
  3. position it on the track plan with a mouse click.

Edit track plan_turnout_orientation_position

In this way, the track plan is created with additional track elements, turnouts, and semaphore signals. The IR-balises are not inserted into the track plan; this will be done later. A mouse click on “Upload” saves the created track plan in the module “Demo-turnout-right”.

Edit track plan_turnout_orientation_position_completed

Assigning Turnouts and Semaphore Signals in the Track Plan

The track plan is created; next, the turnouts and semaphore signals are assigned according to the following table:

ID Element in the Track Plan
Demo-W-left left turnout in the track diagram (Demo-W-left)
Demo-W-right right turnout in the track diagram (Demo-W-right)
Demo-S-Track-B signal left in the track diagram (Demo_S_Track_B)
Demo-S-Track-A signal right in the track diagram (Demo_S_Track_A)


“Demo-W-left” is assigned as follows:

  1. Select “SignalTower” in the “Action Group” field.
  2. Select “Demo-W-left” in the “ID” column.
  3. Select the pencil.
  4. Select the left turnout in the track diagram.
  5. In “Action Details”, you can see that the turnout name “Demo-W-left” has been entered in the “Name” field.

Assign left turnout in track plan

The same procedure is followed for the right turnout:

  1. Select “SignalTower” in the “Action Group” field.
  2. Select “Demo-W-right” in the “ID” column.
  3. Select the pencil.
  4. Select the right turnout in the track diagram.
  5. In “Action Details”, you can see that the turnout name “Demo-W-right” has been entered in the “Name” field.


The right signal “Demo-S-Track-A” in track section “Block-A” is assigned very similarly to the turnouts as follows:

  1. Select “SignalTower” in the “Action Group” field.
  2. Select “Demo-S-Track-A” in the “ID” column.
  3. Select the pencil.
  4. Select the right signal in the track diagram.
  5. You can see in the track diagram how the symbol has changed.
  6. In “Action Details”, you can see that the semaphore signal name “Demo-S-Track-A” has been entered in the “Name” field.

Assign right signal in track plan

The same procedure is followed for the left signal “Demo-S-Track-B” in track section “Block-B”:

  1. Select “SignalTower” in the “Action Group” field.
  2. Select “Demo-S-Track-B” in the “ID” column.
  3. Select the pencil.
  4. Select the left signal in the track diagram. You can see in the track diagram how the symbol has changed.
  5. In “Action Details”, you can see that the semaphore signal name “Demo-S-Track-B” has been entered in the “Name” field.
  6. The track plan is now configured for the first test runs and is saved in the turnout module “Demo-turnout-right” with a click on “Upload”.

Assign left signal in track plan

The last step is to integrate the track plan into the model railway. To do this, open the configuration of “Demo-turnout-right” again. Clicking on the “Change model railway” button opens the “Edit model railway” window. Clicking on “New track section” allows you to assign a new name. In “Available Panels,” the panel named Starterkit is selected and positioned by clicking on the “Arrow” button. Clicking on the “Upload” button saves the new model railway in the track module.

6. Starterkit with Modules Installed in Locomotives and Turnouts

This starter kit consists of modules with “Starterkit” configuration pre-installed in locomotives and turnouts.

CTC components with configuration:

Additional necessary parts:

  • Power supply / power adapter
  • 2 x semaphore signal
  • Tracks

Starterkit with Configured CTC Modules Installed in Locomotives and Turnouts

The following describes the setup and commissioning of a model railway with CTC control. It is assumed that a starter kit with CTC modules installed in locomotives and turnouts is available.

Details about the turnout module can be found here: CTC-turnout module.

Each of the turnout modules is connected as shown in the following sketch:

  • to track A/B the power supply for the turnout module,
  • to W1 the turnout drive,
  • to W2 the drive for the signal,
  • to IR1 an IR-balise installed in the track, here referred to as DA1, and
  • to IR2 an IR-balise installed in the track, here referred to as DA2.

Wiring Turnout, Signal, IR-balise

The track installation is set up according to this sketch.

The fully assembled layout with the locomotives looks like this:

Wiring Turnout, Signal, IR-balise


Proceed with Creating the Track Layout

6.1. First Commissioning of the Layout

The following assumes that the CTC system is set up and configured according to the descriptions for the starter kit.

When powering on the CTC components, it is essential to ensure that the WiFi router is turned on and operational first. Then, the railway layout can be powered on.

The CTC app detects the PI-Rail WiFi and connects to the CTC modules. The configuration of the modules is read out. In the chosen starter kit example, the CTC app found one locomotive (BR365), two turnouts, and two semaphore signals. The configuration of the locomotive was read out, resulting in the specific image of the locomotive, as well as its name and further configuration information, which will be reviewed later. The track plan - here called “Starterkit_1” - is stored in one of the configured turnout modules (Demo-W-right) and was also read out. That also contains the information about the semaphore signals.

After the CTC app is started, the initial screen shows the “Modules” window:

Start Screen Locos Track Plan

The window with the tabs for “Modules, Locos, Control, Control Panel, and Sensors” allows access to the individual functional groups:

  • Modules: Here, the list of all found modules and their key parameters appear. Their configuration can also be accessed directly from here.
  • Locos: All found locomotives appear here, the locomotive highlighted in gray is the selected locomotive (see also “Control”)
  • Control: The control window for the selected locomotive appears here (see “Locos”).
  • Control Panel: The controllable modules of the track layout, such as turnouts, signals, etc., are displayed here. Additionally, the IR balises are marked on the track layout.
  • Schedules: The schedules for the automated train operation are edited and accessed here.
  • Sensors: All sensors are shown here. In this case, each locomotive has an infrared sensor. The sensors receive the messages from the IR balises integrated into the track.

Via the menu bar, another control panel can be opened with “View” and “Show Left Panel”. The panel windows can be moved to ensure they are well visible. Selecting “Control” for the left panel and “Control Panel” for the right panel results in:

Control BR365 Speed


The “Control” tab offers control over the selected locomotive (when the “Locos” tab is selected):

Control BR365


The “Control Panel” tab provides access to turnouts and signals (and optionally other drives if present). The switching functions are executed with the individual switch buttons as follows:

Control Panel Switching Turnout and Signal


Turnouts and signals can alternatively also be switched directly on the track plan:

Track Plan Switching Turnout and Signal


In the initial operation of the layout, the BR365 locomotive can now run, the control of the turnouts allows for entry into the station track or running on the passing track. The signals can also be switched. It is apparent that the locomotive does not react to the position of the signals; the train must be manually stopped in the “Control” window or prompted to continue.

Further configuration steps are necessary for the locomotive to slow down and stop in front of a signal set to “Stop.” For this, the IR balises are used.

7.1. Configuration Turnout Module: Connecting IR Balises

This text describes the configuration of the turnout modules for the starter kit. Please note the following terminology:

  • “Wiring” refers to the electrical connection, i.e., the cables, wires, connectors.
  • “Connection” or “connecting” refers to the software connection, i.e., the configuration of the module to which the corresponding component (turnout with coil drive, semaphore signal with coil drive, IR balises) is wired.

Assumptions are made that:

  • the track layout is set up,
  • the turnout modules are installed in the turnouts and the coil drive of the turnouts is connected,
  • the signals are wired to the turnout modules,
  • the IR balises are wired to the turnout modules,
  • the power supply is fully operational,
  • the turnout modules have been reset,
  • the turnout drives are wired, and
  • the semaphore signals are wired.

As shown at the very beginning, this is the track layout:

Track layout for starter kit model railway

To recap: The wiring for each of the turnout modules is as follows:

Wiring Turnout, Signal, IR Balises

Applied to the track layout, this means for the wiring:

  • The turnout module “Demo-T-Left” has the semaphore signal “Demo-S-D2-left” as well as the balises “D21” and “D22” wired to it.
  • The turnout module “Demo-T-Right” has the semaphore signal “Demo-S-D1-right” as well as the balises “D11” and “D12” wired to it.

The “wiring” of the IR balises will now be “connected”.

Connecting IR Balise Product

In the “Modules” window, click the “Edit” icon in the row of the ID “Demo-Turnout-Left”, this opens the “Edit Control Box” window. In the “Edit Control Box” window, click on the “Change Config” button to open the “Edit Control Box Configuration” window:

Add Config Balise

Here, click on “+” (see mouse pointer) in the “Connected Products” section to open the product catalog list.

  1. Select the catalog “universal-sensors.xml” and
  2. open it for further work by clicking “Apply”.

Configuration Turnout Module Connect Product Semaphore Signal

The catalog “universal-sensors” is selected. From this catalog, “IR Balise” is selected and a name is given for it:

  1. “D11” is entered for “Name”
  2. “IR Balise” is chosen as the product and
  3. by clicking “Apply,” the IR balise is ready for connection.

Configuration Turnout Module Connect Product Semaphore Signal

After clicking “Apply,” you return to the “Edit Control Box Configuration” window.

The first IR balise D11 is connected:

  1. In “Pins, Ports, and Extensions,” select “Port: IRPort-1 (SerialModulated)”,
  2. in “Connected Products,” select D11-Conn,
  3. in “Connections and Parameters,” select “IRPort-1” and
  4. click “Connect” to establish the connection.

Configuration Turnout Module Connect IR Balise

Repeat the process for the second infrared port “IRPort-2”:

  1. Open the product catalog “universal-sensors.xml” with a double-click,
  2. select the IR balise product,
  3. enter “D12” as the name and apply.
  4. In the “Edit Control Box Configuration” window, select “Port: IRPort-2 (SerialModulated)” under “Pins, Ports, and Extensions,”
  5. in “Connected Products,” select D12-Conn,
  6. in “Connections and Parameters,” select “IRPort-2” and
  7. click “Connect” to establish the connection.

The first turnout module named “Demo-Turnout-Right” is completely connected and has the following components connected:

  • a magnetic turnout drive,
  • a magnetic signal drive,
  • an IR balise D11, and
  • an IR balise D12.

Configuration Turnout Module Turnout

7.2. Configuration Turnout Module: Assign Action to IR-Balises

This text describes how to configure the turnout modules to assign an action to the IR-balises. It is assumed:

  • the track layout is set up,
  • the signals are wired to the turnout modules,
  • the IR-balises are wired to the turnout modules,
  • the power supply is complete,
  • the turnout modules have been reset,
  • the turnout drive is connected and
  • the IR-balises are connected.

As a reminder: The wiring for each of the turnout modules is done as follows:

Wiring Turnout, Signal, IR-Balises

So far, the following has been completed:

  1. The wiring is done and
  2. the “products” (turnout drive, semaphore signal, and IR-balises) are connected to their respective ports/pins on the module.

Assign Action to IR-Balise

Basic Idea

The basic idea for the following configuration is: When a locomotive approaches a signal, it should receive information whether the signal is set to “Stop” or “Go” and how far the locomotive is from the signal. This information is sent to the locomotive via the IR-balises embedded in the tracks.

  • At “Go”, the locomotive continues to run unchanged.
  • At “Stop”, the locomotive should slow down and stop before the signal.

Here again is the schematic layout of the setup:

Track Oval Base Signal, Turnouts, IR-Balises

In the direction of travel of the locomotives, 2 IR-balises are installed in front of each signal. For example, suppose that the shunting locomotive BR365 is traveling towards the signal “Demo-S-D1-re” and the signal is set to “Stop”. The sequence is as follows:

  1. Travels through “Demo-W-Links”.
  2. Travels over IR-balise D12.
  3. The information sent by D12 has the following content: “This is IR-balise D12, the distance to the upcoming signal is 80 cm, the signal is set to ‘Stop’. “.
  4. The locomotive slowly reduces its speed so that it would come to a stop in 80 cm.
  5. Since the distance between D11 and D12 is less than 80 cm, D11 is crossed at a significantly reduced speed.
  6. Travels over IR-balise D11.
  7. The information sent by D11 has the following content: “This is IR-balise D11, the distance to the upcoming signal is 0 cm, the signal is set to ‘Stop’ “.
  8. The locomotive immediately reduces its speed and comes to a stop.

Implementation

The following describes the configuration of the module in “Demo-W-rechts” for the IR-balises D11 and D12.

When connecting the IR-balises, the CTC-App has already internally set up some configurations.

Clicking on “Settings” and “Configurator” opens the configurator. Clicking on the pencil icon in the SwitchBox row with the ID “Demo-W-rechts” opens the window “Edit Switch Box Configuration”.

  1. Clicking on the “Actions” tab opens the corresponding window.
  2. Clicking on the TRIANGLE NEXT TO “IR-Balise: D11-Conn” opens further options.
  3. Clicking on the “Trigger: D11-Trigger” field opens further options under “Action Details”.
  4. Clicking on the “Select” field opens the window “Choose Trigger”.

Configuration Action IR-Balise

Continuing with choosing the trigger:

  1. Under “Action Group”, select “SignalTower”,
  2. under “Action”, select “Demo-S-D1-re”,
  3. clicking on “Apply” closes the window.

Configuration Action IR-Balise

For the balise directly in front of the signal, the action details are already appropriately configured: In all cases (‘*’), the command remains unchanged to reflect the signal state (param[cmd]=’?’).

Configuration Action IR-Balise

The IR-balise D12 is configured almost the same as D11. However, if the signal is red, the locomotive should not stop immediately but instead slow down to minimal speed over the distance to balise D11.

  1. Clicking on the TRIANGLE NEXT TO “IR-Balise: D12-Conn” opens further options.
  2. Clicking on the “Trigger: D12-Trigger” field opens further options under “Action Details”.
  3. Clicking on the “Select” field opens the window “Choose Trigger”.
    1. Under “Action Group”, select “SignalTower”,
    2. under “Action”, select “Demo-S-D1-re”,
    3. clicking on “Apply” closes the window.
  4. In the “Action Details” section: Clicking on the TRIANGLE NEXT TO “D12-Trigger” opens further options.
  5. In the “Action Details” section: Clicking on the TRIANGLE NEXT TO “If ‘Demo-S-D1-re’ == ‘*’” opens further options.
  6. Clicking on the line “If ‘Demo-S-D1-re’ == ‘*’” displays the parameters of the If-command on the right.

Configuration Action IR-Balise

The special case “Signal red” needs to be treated first. Which letter is assigned to this state can be found in the manual in Chapter 4.5 “Config - Edit Script”.

Alternatively, one can simply view the config of the signal.

  1. Clicking on the TRIANGLE NEXT TO “Semaphore signal magnetic: Demo-S-D1-re-conn” opens further options.
  2. Clicking on “Function (Stop): Demo-S-D1-re” shows the action details.
  3. Clicking on the script “Switch to Hp0_Bar (‘h’)” shows the details of the state with the letter ‘h’. The symbol next to the script window speaks more than a thousand words.

Signal state 'h'

Back to the trigger, the state ‘h’ can now be entered in the If-command.

  1. Clicking on “Trigger: D12-Trigger” switches back to the trigger of balise D12.
  2. Clicking on the line “If ‘Demo-S-D1-re’ == ‘*’” displays the parameters of the If-command on the right.
  3. Clicking in the field below the Remove button allows entering the letter ‘h’.
  4. In the field below, enter a name corresponding to the condition, e.g., “stop”.

Trigger D12 if 'h'

Now specify what should happen at ‘h’:

  1. Clicking on “param[cmd] = ‘?’” displays the parameters of the “param” command on the right.
  2. Clicking the button next to ‘?’ opens the command selection.

Trigger Choose Command 'm'

In all other cases, the signal state is taken over again. A new If-command needs to be added for any state.

  1. Click on the top line in the script area (“D12-Trigger”).
  2. Then click on “Add”.

Trigger new if

  1. Enter the asterisk (‘*’) as the condition for the If-command.
  2. In the field below, enter a name corresponding to the condition, e.g., “otherwise”.
  3. Change the script position below from 0 to 1.

Trigger new if

Next, add the command for the new If-command.

  1. Click on “Add” - the “Select New Command” window opens.
  2. Click on the “setChar” command.
  3. Then click on “Apply”.

Trigger new if

The line “param[?] = ‘?” is selected. Now specify that “cmd” should take over the state of the signal (‘?’):

  1. From the list under “Remove”, select the value “cmd”.
  2. Click the button on the left below the selection list - the “Select Command” window opens.
  3. Select the line ‘?’.
  4. Click on “Apply”.

Trigger new if

The script for the trigger of balise D12 is now complete:

Trigger new if

What is still missing is the distance for braking. Since this is independent of the signal state, it is set fixed instead of changing it in the script.

  1. Click on the line “cmdDist” under “Connections and Parameters of the Product”.
  2. Click on the pencil icon to the right of the selected line.

Trigger new if

Now balise D12 is also completely configured:

Trigger new if

Clicking on “Upload” completes the changes to the triggers of both balises D11 and D12.

Configure Second Turnout Module

The second turnout module is configured the same way as the first turnout module. It has exactly the same connections: a turnout drive, a semaphore signal with magnetic drive, and two IR-balises. When selecting the products, note that this is a turnout that turns to the left.

The assigned names are:

  • Module: Demo-W-Links
  • Signal: Demo-S-D2-li
  • IR-balises D22 (stop) and D21 (braking)

The configuration of the turnout modules is complete.

8. Train Operation with BR365 and E103

First, the BR365 is put into operation. In the “Locomotives” tab, click on the BR365, then select the “Control” tab. The default settings are shown here:

App Start Control BR365

Driving with the BR365:

  • The speed is preselected via the +/- buttons or with the slider in the “Control” tab.
  • The two turnouts “Demo-W-Left” and “Demo-W-Right” are set for the BR365: A click on the turnout in the track diagram under the locomotive control changes the turnout position.
  • The signal “Demo-S-D1-right” in front of the right turnout is set to “green”.
  • After clicking the direction switch to the right, the BR365 locomotive starts moving counterclockwise, passes the signal “Demo-S-D1-right”, crosses the turnout “Demo-W-Right” and enters the loop.
  • By clicking on the signal “Demo-S-D1-right”, the signal switches back to red. Now, the IR-balises D12 send “Brake to minimum speed in 80 cm” and D11 the message “Stop, signal is red”.
  • BR365 receives this message via the IR receiver built into the locomotive (listed under the “Sensors” tab) when passing over the IR-balise.
  • BR365 stops in front of the signal “Demo-S-D1-right”.

As shown in the following figure, a second locomotive can be displayed with “View” - “Show left panel”.

CTC-App Control Control

Now a round is driven with the E103:

  • By clicking on “View” - “Show left panel”, another panel/window is opened. The window size is readjusted and the tab selected,
  • Clicking on one of the two large arrows next to the image of the BR365 locomotive selects the next locomotive, in this case, the E103.
  • The desired speed is preselected on the slider in the “Control” tab.
  • The two turnouts “Demo-W-Left” and “Demo-W-Right” are set for the E103: A click on the turnout in the track diagram under the locomotive control changes the turnout position.
  • The signal “Demo-S-D2-left” in front of the left turnout is set to “green”.
  • After clicking the direction switch to the left, the E103 locomotive starts moving clockwise, passes the signal “Demo-S-D2-left”, crosses the turnout “Demo-W-Left” and enters the big loop.
  • By clicking on the signal “Demo-S-D2-left”, the signal switches back to red. Now, the IR-balises D21 send “Brake to minimum speed in 80 cm” and D22 “Stop, signal is red”.
  • E103 completes its lap and returns, first crossing D21 and arriving at D22. It receives the message “Signal is red” via the IR receiver built into the locomotive (listed under the “Sensors” tab) when passing over the IR-balise.
  • E103 stops in front of the signal “Demo-S-D2-left”.

The goal is also for the locomotives to stop precisely in front of a signal set to “Stop”. For this, the sensors of the locomotives need to be calibrated.

9. Calibrate Sensor

Basic Idea

The desired outcome is that a locomotive stops precisely in front of a signal displaying “Stop.” In the starter set track layout, two IR-balises are embedded in the tracks before each signal. When a locomotive approaches the signal and passes over one of the IR-balises, it receives the following information:

  • the ID of the IR-balises,
  • whether the signal shows “Stop” or “Proceed” and
  • the distance from the IR-balise to the signal.

This last piece of information allows the locomotive module to stop precisely in front of a signal set to “Stop.” The prerequisite for this is that the motor can be controlled precisely enough. To obtain the necessary control parameters for the motor, the sensor for motor control needs to be calibrated. The CTC app supports this process, which is referred to as “Calibrate Sensor.”

The following sections describe the individual steps. It is imperative to follow the procedure as outlined.

Requirements

To calibrate the sensor of a locomotive, a measurement track is needed. For this purpose, a measurement track is defined:

  • A defined start: “measurement starts here”,
  • a defined end: “now the end of the measurement track is reached” and
  • the distance between the start and the end.

The necessary definitions are stored in the configuration of the CTC module, which controls the IR-balise and where the data of the model railway is stored. Each IR-balise is used as the start and end of the measurement track. The distance of the IR-balise comes from the model railway. If the locomotive travels this measurement track several times at different speeds, the control parameters for the locomotive’s motor can be calculated.

Motor Calibration Track

Note:

  • Convention: The designation of the IR-balises has a running index in a clockwise direction.
  • Convention: The track layout is traversed in a clockwise direction for measurement.

A prerequisite for calibrating the locomotive’s motor control sensor is that the most current firmware is loaded into the locomotive module. To ensure this:

  • Open the configuration of the respective locomotive module,
  • click on “Load Firmware,” which opens the selection window,
  • select and confirm the firmware with a click on “Open,”
  • the selected firmware is then transferred to the locomotive module.

Define Measurement Track

From the image of the track layout:

  • the measurement starts at D21,
  • the measurement ends at D22 and
  • the length of the measurement track is the distance traveled from D21 to D22.

The start and end of the measurement are defined in the model railway. The length of the measurement track is stored in the configuration of the second IR-balise.

Start and End of the Measurement Track

The start and end of the measurement track are defined in the model railway. This is stored in the “Demo-turnout-right” module:

  1. Click on the “Modules” tab in the CTC app.
  2. Click on “Edit” for the “Demo-turnout-right” module to open the “Edit Control Box” window.

CTC-App Calibrate Sensor 1

  • In the “Edit Control Box” window - Click on “Change Model Railway.”

CTC-App Calibrate Sensor 1

  • The “Edit Model Railway” window opens - Click “New” under “Measurement Tracks.”

CTC-App Calibrate Sensor 1

  • Enter the name of the measurement track, in this case “Station,” and confirm by clicking “Create.”

CTC-App Calibrate Sensor 1

  • Back in the “Edit Model Railway” window, click “Set Start.”

CTC-App Calibrate Sensor 1

  • The “Start Message” window opens. Select “ID Sender,” choose “D21” under “Action,” and click “Apply.”

CTC-App Calibrate Sensor 1

  • Back in the “Edit Model Railway” window, click “Set End.”

CTC-App Calibrate Sensor 1

  • The “End Message” window opens. Select “ID Sender,” choose “D22” under “Action,” and click “Apply.”

CTC-App Calibrate Sensor 1

Now the start and end of the measurement track are defined in the model railway. In the current version of the app, only one measurement track should and can be defined; multiple measurement tracks are not possible. Back in the “Edit Model Railway” window - Click “Upload” and then “Close.”

CTC-App Calibrate Sensor 1

Length of the Measurement Track

The following information needs to be conveyed: “When the locomotive passes over D21 and then over D22, it has traveled the distance from D21 to D22, which is XXX centimeters. In other words: “D22 is ‘xxx’ centimeters from D21.” The length of the measurement track is defined in the configuration of the respective IR-balise. In the starter set, IR-balises D21 (start) and D22 (end) are connected to “Demo-turnout-left.” This length information needs to be stored in the “Demo-turnout-left” module:

  1. Click on the “Modules” tab in the CTC app.
  2. Select “Edit” for the “Demo-turnout-left” module to open the “Edit Control Box Configuration” window for the Demo-turnout-left.

CTC-App Calibrate Sensor 1

Selecting “Change Config” opens the “Edit Control Box Configuration” window.

  1. In the “Connected Products” section, select “D22-Conn.”
  2. In the “Connections and Parameters” section, select the “dist” row.
  3. Click the edit pencil icon.
  4. Now enter the correct distance (in cm) from D21 to D22. In this setup, the distance between the two IR-balises is assumed to be 43 cm.
  5. Click “Apply” to complete the input and return to the “Edit Control Box Configuration” window.
  6. Click “Upload.”

CTC-App Calibrate Sensor 1

Run Sensor Calibration

With this preparation, the sensor calibration of a locomotive can be carried out. The CTC app performs a series of measurements, with the locomotive traversing the measurement track at different speeds. The starting speed must be manually set by the user. The actual measurement cycle is carried out automatically by the CTC app, requiring no further intervention. The measurement track is traversed multiple times, with the speed increasing after every three rounds. The progress of the measurements can be tracked in the recorded measurement data graph.

In the main window of the CTC app, prepare the track for the locomotive:

  1. Set “Demo-turnout-left” to “Turn.”
  2. Set the “Demo-S-Track-B” signal in the station track to “Proceed.”
  3. Set “Demo-turnout-right” to “Turn.”
  4. Select the E103 locomotive and click “Edit” in the row.

CTC-App Calibrate Sensor 1

The configuration window for the locomotive opens, where you click “Calibrate Sensor.”

  1. The CTC app measurement cycle should start at the lowest possible speed for the locomotive. This must be set by the user. Typically, this value should be between 10 and 20 percent. For the locomotive used here, an exceptionally higher value of 35% must be set.
  2. By clicking “Start/Stop,” the locomotive sets off. The locomotive should run for some time, giving the opportunity to check the set minimum speed and adjust it if necessary.
  3. Click “Start Calibration” to start the measurement cycle, which runs autonomously.

CTC-App Calibrate Sensor 1

Once the locomotive has traversed the measurement track three times, the app automatically increases the speed by 10% increments. The track is then traversed three more times. This continues until the speed exceeds the 80% mark. In the “Calibrate Motor Sensor” window, the progress of data collection and analysis can be monitored.

When the measurement cycle is complete, the locomotive stops, and by clicking “Upload Motor Config,” the calibration values calculated by the app are transferred to the locomotive module, making them available for operation.

CTC-App Calibrate Sensor 1

10. Automating Train Operation

Automating Train Operation

In progress, coming soon


10.1. Automate Train Operation with One Locomotive

The scenario used here for automated train operation is as follows:

  1. The train with the locomotive BR212-FW enters the station,
  2. slows down and
  3. comes to a stop.
  4. The train stays at the station for a certain period.
  5. After the waiting period, the train continues, makes a clockwise round, and re-enters the station.

This operation repeats.

The following prerequisites must be met for the automated operation with one locomotive (in this example, BR212-FW) in this scenario. It is assumed that:

  1. The track plan is completed, the balises are connected to the modules in the turnouts.
  2. The waiting time for BR212-FW at the station should be 5 seconds.
  3. The turnouts are set in such a way that BR212-FW can make a round and re-enter the station.
  4. The signals Demo-S-D2-li and Demo-S-D1-re are not used; they are set to “Go”.
  5. BR212-FW is used for the automated operation, BR365 does not participate.
  6. The distance from balise D21 to balise D22 is 43 cm in the setup made here. For the command, which will later be sent from D21 to BR212-FW, a somewhat shorter distance (35 cm) is set, so the locomotive has safely reached its minimum speed when it arrives at balise D22.

Before proceeding, a brief explanation of the terms locomotive Halt, locomotive Stop, and locomotive Return is useful. These terms, in reference to commands from the balise, are used as follows:

  • Halt denotes an unconditional and unlimited stop of the locomotive. As long as a locomotive receives Halt from a balise, it does not start moving.
  • Stop means an unconditional but time-limited communicated in the command stop of the locomotive. After the waiting time communicated in the Stop command, the locomotive continues in the same direction.
  • Return denotes an unconditional but time-limited communicated in the command stop of the locomotive. After the waiting time communicated in the Stop command, the locomotive continues in the opposite direction. This corresponds to shuttle train operation.

The description of commands that can be sent from a balise to the locomotive can be found in the user manual of the CTC-App in the chapter Config - Edit Script (section “Commands for locomotives / signals”). These commands will be used later in the configuration.

The detailed sequence of the scenario is described below. BR212-FW enters the station track:

Automate Train Operation locomotive enters station

Upon entering the station track, BR212-FW passes over balise D21 and receives the following information:

  1. Position-ID D21: “I am D21”
  2. Distance to the previous balise in the same block (as there is no previous balise in the block, this value is 0).
  3. Command: “Brake to minimum speed in 35 cm”

The locomotive BR212-FW slows down and continues at minimum speed …

Automate Train Operation locomotive enters station

… until it passes balise D22:

Automate Train Operation locomotive start

From balise D22, BR212-FW receives the following information:

  1. Position-ID D22: “I am D22”
  2. Distance to the previous balise in the same block is 35 cm.
  3. Command: “Stop immediately (at distance 0) for the time of 5 seconds”. (This implicitly means that the locomotive continues after the specified waiting time if it is in automation mode.)

The locomotive waits for the waiting time transmitted in the command by the balise:

Automate Train Operation locomotive continues round

After the waiting time transmitted in the “Stop” command, BR212-FW continues:

Automate Train Operation locomotive continues round

These necessary information and commands are configured.

Continue with Automate Train Operation with One Locomotive, Variant 2.

or

with Automate Train Operation with Two Locomotives.


10.2. Automating Train Operation with One Locomotive, Second Version

The scenario described now for automated train operation appears at first glance very similar to the scenario Automating Train Operation with One Locomotive, but it brings a bit more dynamics into play:

  • The Signal Demo-S-D2-li is used,
  • the commands sent by the balises D21 and D22 are not always the same but depend on the signal state Demo-S-D2-li (“Stop” or “Go”), and
  • timers are used.

The scenario:

  1. BR212-FW drives one lap clockwise and enters the station,
  2. slows down, and
  3. comes to a stop.
  4. The train stays at the station for a certain time.
  5. After the stopping time, the signal Demo-S-D2-li switches to “Go”.
  6. BR212-FW starts moving.
  7. The signal Demo-S-D2-li switches back to “Stop” after a certain time.

This operation repeats itself.

The following prerequisites must be met for the automated operation and the following information is provided:

  1. The track plan is complete, the balises are connected to the modules in the turnouts.
  2. The stopping time of BR212-FW at the station should be 5 seconds.
  3. The turnouts are set so that BR212-FW can make a lap and re-enter the station.
  4. The signal Demo-S-D2-li is used.
  5. The signal Demo-S-D1-re is not used.
  6. The distance from balise D21 to balise D22 is 43 cm in the setup used here. For the command that will later be sent from D21 to BR212-FW, a slightly shorter distance (35 cm) is specified, so that the locomotive reliably reaches its minimum speed when it arrives at balise D22.

The description of the commands that can be sent from a balise to the locomotive can be found in the CTC-App instruction manual in the chapter Config - Edit Script (section “Commands for Locomotives / Signals”). These commands will be used later during configuration.

The more detailed sequence of the scenario is described below. BR212-FW enters the station track, with the signal Demo_S_D2_li showing “Stop”:

Automat Driving Locomotive enters station

Upon entering the station track, BR212-FW crosses balise D21 and receives the following information:

  1. Position-ID D21: “I am D21”
  2. Distance to previous balise in the same block (since there is no previous balise in the block, this value is 0).
  3. Command: “Brake to minimum speed within 35 cm”

The locomotive BR212-FW slows down and continues at minimum speed …

Automat Driving Locomotive enters station

… until it reaches balise D22:

Automat Train Operation Start

From balise D22, BR212-FW receives the following information:

  1. Position-ID D22: “I am D22”
  2. Distance to previous balise in the same block is 35 cm.
  3. Command: “Stop at distance 0”.

The locomotive reports to the app that it has crossed balise D22. This report is used as a “trigger” to start the first timer. The first timer determines the dwell time of the locomotive at the station.

Automat Driving Locomotive Start

When the first timer expires, the signal changes to “Go”. This causes the message sent by balise D22 to no longer be “Stop at distance zero”, but instead “Go” is sent as the command. The signal Demo-S-D2-li switches to “Go”, and BR212-FW can start moving and leave the station:

Automat Driving Locomotive starts moving

The signal Demo-S-D2-li switches back to “Stop” after a short time (a second timer is configured for this), and BR212-FW makes another lap:

Automat Driving Locomotive completes lap

BR212-FW re-enters the station track:

Automat Driving Locomotive enters station

The necessary information and commands for this scenario are now configured.

The corresponding instructions will follow shortly.

10.3. Automating Train Operations with Shuttle Train Mode

The locomotive BR212-FW is used for shuttle train operations. The locomotive BR365 is not needed and will be removed from the layout.

The scenario used here for automated train operation is as follows:

  1. The train with the locomotive BR212-FW is at the station in Block D2,
  2. BR212-FW starts counterclockwise, Track diagram for starter kit model railway extended 1
  3. runs a counterclockwise lap and enters the station in Block D1,
  4. slows down from balise D12 and
  5. comes to a stop at balise D11.
  6. The train waits for a specified pause time at the station in Block D1 at balise D11.
  7. After the pause time expires, BR212-FW starts clockwise, Track diagram for starter kit model railway extended 1
  8. runs a clockwise lap and enters the station in Block D2,
  9. slows down from balise D21 and
  10. comes to a stop at balise D22.
  11. The train waits for a specified pause time (not the same as the pause time for Block D1) at the station in Block D2 at balise D22.
  12. After the pause time expires, BR212-FW starts counterclockwise again.

This operating cycle repeats itself.

The following prerequisites must be met for automated operation with a locomotive in this scenario, and the following information is provided:

  1. The track plan is complete, and the balises are connected to the modules in the turnouts.
  2. The stop time for BR212-FW at the station in Block D2 should be 5 seconds.
  3. The turnout Demo_W_Links is set so that BR212-FW runs a counterclockwise lap and enters the station Block D1.
  4. The turnout Demo_W_Rechts is set so that BR212-FW runs a clockwise lap and enters the station Block D2.
  5. The signals Demo-S-D2-li and Demo-S-D1-re are not used.
  6. BR212-FW is used for automated train operation, BR365 is not part of the operation.
  7. The distance from balise D21 to balise D22 in the current setup is 43 cm. For the command that will later be sent from D21 to BR212-FW, a slightly shorter distance (35 cm) is set, to ensure the locomotive reaches its minimum speed by the time it arrives at balise D22.
  8. The distance from balise D12 to balise D11 in the current setup is 43 cm. For the command that will later be sent from D12 to BR212-FW, a slightly shorter distance (35 cm) is set, to ensure the locomotive reaches its minimum speed by the time it arrives at balise D11.

Locomotive Halt, Locomotive Stop, and Locomotive Reverse:

The following terms Halt, Stop, and Reverse will be used as follows, based on commands from the balise:

  • With Halt, an unconditional and time-unlimited stop of the locomotive is indicated. As long as a locomotive receives Halt from a balise, it does not start.
  • With Stop, an unconditional but temporarily limited stop communicated in the command is indicated. After the wait time included in the Stop command expires, the locomotive continues in the same direction.
  • With Reverse, an unconditional but temporarily limited stop communicated in the command is indicated. After the wait time included in the Stop command expires, the locomotive continues in the opposite direction. This corresponds to shuttle train operations.

The description of the commands that can be sent from a balise to a locomotive can be found in the user manual of the CTC-App in the chapter Config - Edit Script (section “Commands for Locomotives / Signals”). These commands will be used later during configuration.

Further description will follow shortly.

10.4. Automating Train Operations with Two Locomotives

In the Automating Train Operations with One Locomotive a static configuration was used.
In the scenario described now, this is different. This results in changes to the configurations. The automated train operation is as follows:

  1. The train with locomotive BR212-FW is at the station in block D2.
  2. Signal Demo-S-D2-li switches to “Go”.
  3. BR212-FW starts moving, beginning to travel clockwise.
  4. Signal Demo-S-D2-li switches to “Stop”.
  5. BR212-FW completes one round clockwise and enters the station block D2,
  6. slows down, and
  7. comes to a halt.
  8. The turnouts switch so that BR365 can make a round.
  9. Signal Demo-S-D2-li switches to “Go”.
  10. BR365 starts moving, beginning to travel counter-clockwise.
  11. Signal Demo-S-D1-re switches to “Stop”.
  12. BR365 completes one round counter-clockwise and enters the station block D1,
  13. slows down, and
  14. comes to a halt.
  15. The turnouts switch so that BR212-FW can make a round clockwise.
  16. Signal Demo-S-D2-li switches to “Go”.

This train operation repeats.

For locomotive BR212-FW, the scenario is very similar to Automating Train Operations with One Locomotive, Variant 2.

The locomotive BR212-FW stops at the station track, signal Demo-S-D2-li switches to “Go”, BR212-FW starts moving, beginning to travel clockwise, signal Demo-S-D2-li switches to “Stop”, BR212-FW completes one round clockwise and enters the station, slows down and comes to a halt:

Automated Train Operation with Two Locomotives Start

Automated Train Operation with Two Locomotives Start

Automated Train Operation with Two Locomotives Start

Now it’s BR365’s turn: The turnouts are switched so that BR365 can make a round counter-clockwise:

Automated Train Operation with Two Locomotives Start

BR365 starts moving, beginning to travel counter-clockwise, signal Demo-S-D2-li switches to “Stop”:

Automated Train Operation with Two Locomotives Start

BR365 enters the station, slows down:

Automated Train Operation with Two Locomotives Start

The locomotive BR365 comes to a halt at balise D11.

These necessary information and commands are configured.

Further description will follow shortly.