BiDiB, a universal control set for model railways

The German version is the definitive specification. Any discrepancies between this translation and the original are unintentional.

Booster

BiDiB - Bidirectional Bus - Logo

Content

General

The intention of BiDiB protocol is to control a model railway. It allows the control of locomotives, accessories and safe transmission of feedback information from the model railway to the controlling computer.

BiDiB can be transported over different transmission media, framing and protection of messages is guaranteed.

The used terms and the basic principles will be explained in the general part of the protocol description. Hints for usage and the license can be found there too.

This section of the protocol description explains only a part of the messages.

Current revision status

This document describes revision 1.29 of BiDiB, updated June 21, 2023.

The revision history can be found at the general section.

4.8. Booster

4.8.1. Using a booster

The intention of a booster is to amplify and to purify the track signal. Depending on the model railway several booster can be installed.

Booster are amplifying the track signal and providing this at a dedicated output. To achieve this a separate power supply is needed. If BiDiBus is used as the physical connection, the DCC signal (using RS485 voltage levels) will be provided too.

A Booster might be equipped with several diagnosis possibilities (measurement of output current and voltage, short cut identification), operations (switching on and off) and could have a global detector for railcom. In this case the booster is able to send corresponding messages (see class occupancy detections). It uses the value 255 for MNUM fields.

Controlling a booster:

In general it needs to be distinguished between the state of the track (GO, SOFTSTOP, STOP) and the state of the booster. This means that even when the track signal changes to STOP the booster will stay powered on. The booster will power down only when the track signal will be completely switched off. This is neccessary to avoid an accidentally driving of locomotives caused by analogue recognition mode of the decoders.

It can happen that two booster devices will be connected at the output ports (For example a vehicle creating a short while changing from one booster area to the next). This will be handled by BiDiB in the way that booster messages has to be sent normally as a broadcast message. Because of this the host will sent a change of the booster state (ON, OFF) only to the interface, which will sent this message as a broadcast to all connected boosters.

It is also possible to switch a specific booster on or off (using direct addressing). But independent how a booster state was changed, via broadcast or individually, it will announce his status change to the host. For example having a system with 10 booster and sending a MSG_BOOST_ON (broadcast) to the interface will result in ten MSG_BOOST_STAT messages.

Several track signal nodes and booster:

It is imaginable that not only the interface but also other nodes (for example a separate DCC controller) are containing a track signal creator. Those nodes have to be controlled by the Host with separate BOOST_ON resp. BOOST_OFF messages. If there is such a node with a substructur containing further booster modules, the broadcasts are valid only for this branch, the main branch is separated from this.

4.8.2. Features for boosters

If the booster also implements a global detector for decoder feedback, it also has to provide the corresponding features (see bidi detector section).

Listing of features for the booster class
NumberNameMeaning
15 FEATURE_BST_VOLT_ADJUSTABLE Adjustable output voltage
The output voltage of the booster can be configured if this feature is unequal to 0.
16 FEATURE_BST_VOLT This value contains the output voltage in Volt.
17 FEATURE_BST_CUTOUT_AVAILABLE Cutout available. 1 = the booster is able to create the cutout.
18 FEATURE_BST_CUTOUT_ON Cutout switched on. 1 = the booster creates the cutout
19 FEATURE_BST_TURNOFF_TIME Normal switch off time
The time period which will be needed after a shortage until the output is switched off. If the booster is not able to handle this in a variable manner it needs to provide the used value. The unit is 1ms.
20 FEATURE_BST_INRUSH_TURNOFF_TIME Inrush switch off time (optional)
This is the time period in which a shortage (caused by inrush current) will be accepted after switching on the booster. The unit is 1ms.
21 FEATURE_BST_AMPERE_ADJUSTABLE Adjustable output current
The maximum output current of the booster can be configured if this feature is unequal to 0.
22 FEATURE_BST_AMPERE Maximum output current
The coding of this feature is the same as for the current measurent (see MSG_BST_CURRENT). It is possible that the desired value cannot be set to exactly this value. In this case the node will select the next lower value, if it is zero, the minimal possible current will be set. The configured value can be read.
Example values
0x52 = 820.5A (496mA)
0x71 = 1131A (992mA)
0x83 = 1311.5A (1472mA)
0x8B = 1392A (1984mA)
0x93 = 1472.5A (2496mA)
0x9B = 1553A (3008mA)
0xAA = 1704A (3968mA)
0xBA = 1865A (4992mA)
23 FEATURE_BST_CURMEAS_INTERVAL Interval for current measurement
The booster can provide current measurements if this feature is unequal to 0.
The unit is 10ms. A value of 200 is recommended which corresponds to 2s.
The node shall not be set to a shorter value than 100ms.
26 FEATURE_BST_INHIBIT_AUTOSTART Usually a booster starts automatically if DCC is available at the inputs. If this feature is set to 1 this startup will be suppressed and the booster has to be switched on explicitely by the message MSG_BOOST_ON. With that option it is possible to switch off dedicated areas of the model railway.
27 FEATURE_BST_INHIBIT_LOCAL_ONOFF If a booster consists of local keys for stop and go, this feature controls the usage of those keys. A key press event will not have a direct effect but will be sent to the host (as booster status) if this feature is set to 1. The host has to decide in this case about the further processing (Application: local emergency stop key)
4.8.3. Downlink: Messages to the boosters
  • MSG_BOOST_ON:

    The intention of this command is to switch on the track power. The next byte (UNICAST) defines if the message shall be distributed as a broadcast or not. The node responds with MSG_BOOST_STAT.

    Encoding of unicast
    ValueMeaning
    0 An interface has to distribute this message as a broadcast to all connected nodes to get all booster switched on synchronously as much as possible. The command applies to the interface node and all all nodes located below the interface that receive the track signal via the bus.
    1 The command applies to the current node only.

    It is needed to be aware that a booster can be switched on by a status change of the DCC generation, if this is not inhibitet by the feature FEATURE_BST_INHIBIT_AUTOSTART.

    The booster will not be switched on if there is no DCC signal available when applying the power supply. Because of this the behaviour of the booster depends on the powering on sequence:

    • Powering on the DCC generator at first, then MSG_BOOST_ON(0): all booster will be switched on (no exception)
    • At first MSG_BOOST_ON(0), then powering on the DCC generator: all booster will be switched on, expect those where the FEATURE_BST_INHIBIT_AUTOSTART is set.
  • MSG_BOOST_OFF:

    This command will switch off the track voltage. The next byte (UNICAST) defines if the message shall be distributed as a broadcast or not. The node responds with MSG_BOOST_STAT.

    Encoding of unicast
    ValueMeaning
    0 An interface has to dristribute this message as a broadcast to all connected nodes. The command applies to the interface node and all all nodes located below the interface that receive the track signal via the bus.
    1 The command applies to the current node only.
  • MSG_BOOST_QUERY:

    There is no additional data. The result of this command is the status of the booster. Also voltage or current measurement will be provided if it is available.

    The node answers with MSG_BOOST_STAT and optional MSG_BOOST_DIAGNOSTIC.

4.8.4. Uplink: Messages from boosters

Booster are able to report current and CV results besides the status. CV will be reported with the message MSG_BM_CV (see occupancy detections). While the track supply is active, removable as permanent failures could occur at a booster. Possbile failures are over temperature, external supply, short circuit, ...

Still in discussion: Shall those be sent with a separate message or is it better to use the status?

  • MSG_BOOST_STAT:

    This message will be sent after a status change. The reason for a status change can be based on a host command or hardware conditions. A status byte will follow. The MSB of the status byte denotes the power state of the booster, bit 6 denotes the DCC assignment of the booster, further bits are used for more detailed information:

    Encoding of booster state
    BitMeaning
    7 Power state
    0Booster is switched off.
    1Booster is switched on.
    6 Bus assignment (DCC)
    0Booster uses the DCC signal from this bus (default).
    1Booster uses different source for DCC (special case, i.e. DCC domain handover).
    5…0 Additional information on booster state.
    Detailed encoding of booster state
    ValueNameMeaning
    0x00 BIDIB_BST_STATE_OFF Booster is switched off (because of host command or e.g DCC is dropped out).
    0x01 BIDIB_BST_STATE_SHORT Booster is switched off (because of short).
    0x02 BIDIB_BST_STATE_OFF_HOT Booster is switched off (because of overtemperature).
    0x03 BIDIB_BST_STATE_NOPOWER Booster is switched off (because of missing power supply).
    0x04 BIDIB_BST_STATE_OFF_GO_REQ Booster is switched off and a request for powering on is available.
    0x05 BIDIB_BST_STATE_OFF_HERE Booster is switched off (because of local key press).
    0x06 BIDIB_BST_STATE_OFF_NO_DCC Booster is switched off (due to missing input signal).
    0x80 BIDIB_BST_STATE_ON Booster is switched on.
    0x81 BIDIB_BST_STATE_ON_LIMIT Booster is switched on and is running in current limitation.
    0x82 BIDIB_BST_STATE_ON_HOT Booster is switched on and is in a critical temperature range.
    0x83 BIDIB_BST_STATE_ON_STOP_REQ Booster is switched on and a request for stop is available.
    0x84 BIDIB_BST_STATE_ON_HERE Booster is switched on (because of local key press).

    Note: GO or STOP requests can be applied decentralized (e.g. because of distributed emergency keys), the feature 27 (FEATURE_BST_INHIBIT_LOCAL_ONOFF) controls the behaviour in this case:

    • If this feature is missing or the value is equal to 0, the complete track supply system will be stopped with the emergency keys. This means a key press will skip a low pulse on the ack signal at the BiDiBus and therefor the master will stop the track supply. As a result all booster will switch off because of missing DCC signal.
      The booster which skipped the ack pulse announces his state change with BIDIB_BST_STATE_OFF_HERE, all others uses BIDIB_BST_STATE_OFF for the state change. With that the host is able to identify which part of the model railway is the reason for the emergency stop.
    • If the value of the feature is equal to 1, no ack signal will be given at key press. Instead the node will announce the key press with BIDIB_BST_STATE_ON_STOP_REQ. So it will not switch off and sends the stop request to the host. Now the host program is responsible to decide if a softstop or an emergency stop happens or if only parts of the model railway will be switched off.
  • MSG_BOOST_DIAGNOSTIC:

    Diagnostic report of a booster as a list, containing for example current report, voltage, temperature.

    The reported values are shown as pairs, consisting an identifier of the message type and the message value.

    DIAG_LIST ::= DIAG_PAIR | DIAG_PAIR DIAG_LIST
    DIAG_PAIR ::= DIAG_ENUM DIAG_VALUE
    Encoding of booster diagnostics
    NameCodeMeaning
    BIDIB_BST_DIAG_I 0x00 Current value.
    ValueMeaning
    0No current consumption, track is free.
    1…15Current consumption, in mA. Possible range: 1…15mA
    16…63Current consumption, the value is (date - 12) * 4mA. Possible range: 16…204mA
    64…127Current consumption, the value is (date - 51) * 16mA. Possible range: 208…1216mA
    128…191Current consumption, the value is (date - 108) * 64mA. Possible range: 1280…5312mA
    192…250Current consumption, the value is (date - 171) * 256mA. Possible range: 5376…20224mA
    251…253Reserved.
    254Overcurrent occurred.
    255No exact consumption value known.
    BIDIB_BST_DIAG_V 0x01 Voltage value.
    ValueMeaning
    0…250Voltage in units of 100 mV.
    251…254Reserved.
    255No exact voltage value known.
    BIDIB_BST_DIAG_TEMP 0x02 Temperature.
    ValueMeaning
    0…127Temperature in units of degree celsius, signed char
    128…225Reserved.
    226…255negative temperature.
    Hints:
    This messages replaces the previous MSG_BOOST_CURRENT message
    The current value is encoded like the occupancy detector.
    The transmitted fields are optional. If a specific measurement is not available at the node, then he may omit the corresponding field type. However, the message must contain at least one field.
    The periodicity of the diagnostic message will be set with the FEATURE_BST_CURMEAS_INTERVAL feature.