2012 NMRA Convention - Grand Rapids logo
national train show

RP-9.3.1 Electrical Specifications for Decoder Transmission

Active Topics under current investigation that potentially effect this RP in the future

This Recommended Practice covers the bit transmission method for information transmitted from a Digital Decoder to a communication receiver that is connected to the rails.  To conform to this specification, a Digital Command Station must transmit information to Digital Decoders by sending a series of bits using the NMRA digital signal described in S-9.1 and using packets as described in S-9.2 and RP-9.2.1. This sequence of bits, termed a packet, is used to encode one of a set of instructions that the Digital Decoder operates upon. 

A Digital Decoder encodes feedback responses to this received NMRA packet by generating a series of serial pulses during a specified absence of track power.  The series of pulses is received by an external device. To successfully accomplish this transmission, the Digital Decoder must satisfy both the Electrical Specifications (Physical Layer) contained in this document and the General Feedback Packet Format specifications specified in RP 9.3.2.

To be compatible with decoders that use this RP to transmit information, all devices on the layout must conform to Section D: Electrical Specification.

A: Technique for Transmitting and Receiving Bits

Bits are transmitted using a  current loop technique. Current is supplied to the track from the decoder's internal power supply during a specified period (see section B below).  To transmit a 0 bit, the decoder must source 30 +4/-6 mA on the rails.  To transmit a 1 bit, the decoder must meet the maximum current source specification of section D.

The output voltage of the current source in the decoder must be > 2.5 volts.   The voltage drop on the input to the detector when the current loop is active must not exceed 200 milli-volts.

From a perspective of a ground and voltage reference, the decoder should consider the rail connected to the black wire to be ground and the rail connected to the red wire to be positive.

Bits are detected by measuring the change in current from the layout.  The threshold through a sensing load to detect a zero bit is 8 +/- 0.5 mA.   A detector must detect a current of greater than 8.5 mA during the center 50% of the bit time as 0 bit, and must detect a current of less than 7.5 mA during the center 50% of the bit time as a 1 bit.

B: Transmitting & Receiving Bytes

A byte consists of 8 data bits.  Each byte transmitted or received is framed by a start bit ("0"), and a stop bit ("1"), at 125 Kb/s +/- 2%. The transmitter's transition time between 10% and 90% or between 90% and 10% of its 0 bit current level must be less than 0.5 microseconds.  The receiver must accept bits transmitted at 125Kb/s +/- 2.5%.  The LSB of each byte is transmitted first.  This data format has been chosen to be compatible with industry standard UART transmissions. The clock frequency was chosen for ease of implementation with existing clock frequencies used in DCC devices.

C: Packet Transmission & Timing

A bi-directional data transmission can be sent and received after each NMRA DCC packet transmitted to the layout.  The specifications for the contents of this data transmission are contained in RP-9.3.2.

In order to communicate, a receiver/detector (or power station) must interrupt power from being transmitted to the layout between the DCC packets.  This power interruption should not occur unless the power cutout device can reasonably expect that the command station will transmit a minimum of 12 preamble bits to complete the preamble after the completion of the inter packet transmission cutout.[4] 

The timing for this power interruption is shown in Figure 1 and Table 1.  All timing values are relative to the trailing edge of the second half of the packet end bit.  Timing values are provided for three device types.

  1. The device that is performing the cutout
  2. The detector detecting the transmission
  3. The decoder transmitting the information.

            Cutout Device Timing

The cutout for bi-directional communications occurs in the inter-packet time that occurs after the packet end bit and before the start of the next preamble. During the cutout period, power must be disconnected from the rails, and the rails shorted to each other such that the detector load is in series with the decoder current source.  TGS specifies the gap start time and TGE specifies the gap end time. Assuming that the command station only sends 1 bit after the packet end bit and before the preamble, the time that the preamble starts (TPS) is between 440µs and 448µs depending on the length of the "1" bits being transmitted.  Should a Zero bit be transmitted at the end of the cutout the nominal time for TPS is 548µs[5].  Care must be taken by the cutout device to end the cutout in the presence of track voltage coming from a second power source during the cutout period.

            Detector Timing

Before the detector can reliably detect the transmission, time must be provided for the layout to quiet down.  The detector starts looking for transmissions at a nominal value of TDS (Detector Start Time) after receiving the trailing edge of the second half of the packet end bit and must allow receipt of transmissions until the minimum end of the gap TGE (Time Gap End). Should the gap end during the receipt of a byte, the detector should assume all remaining bits in the byte being received have a value of "1".

            Decoder transmission timing

During the cutout period the decoder transmits information with a format as specified in RP-9.3.2. The transmission from the decoder shall not start before a minimum value of TTS (Decoder Transmission Start Time) after the trailing edge of the second half of the packet end bit.  The time between transmitting bytes is not specified and any value is allowed so long as the last zero bit transmitted in the complete transmission is completed by TTE (Decoder Transmission Completion Time) after the trailing edge of the second half of the packet end bit.

            Command Station bit transmission during the cutout

The bits being transmitted by the command station during the cutout period is not specified.  Any sequence of 1 bits, zero bits, or no bits are allowed to be transmitted. Examples of various approaches are shown in the following diagram. Any decoder that satisfies the inter-packet provisions of S-9.2 will be compatible with the cutout so long as a proper preamble follows the cutout.

 

Parameter

Name

Minimum

Nominal

Maximum

Units

Gap Start Time

TGS

36

42

45

µs

Gap End Time

TGE

448

µs

Detector Start Time

TDS

90

93

96

µs

Detector End Time (same as Gap End Time)

TDE

µs

Decoder Transmission Start Time

TTS

100

µs

Decoder Transmission Completion Time

TTE

445

µs

Table 1: Timing numbers for decoder transmission

Figure 1: Timing diagram for decoder transmission

 

D: Electrical Specifications for Devices

During the power interruption, mobile decoders under load must not sink more than 0.1 mA of current or source more than 0.1 mA of current unless transmitting a zero bit.   All other devices connected to the track must not source or sink more than 0.1 mA of current during the power interruption[6].

The Cutout Device must not develop more than 10 mV across its terminals at currents up to 34mA.  All decoders (all types) must be able to survive the power interruption (described above) without losing any of their internal states, or have any operational problems after power is restored.

Return to Index


Footnotes

[1] This voltage is defined as the compliance voltage.

[2] This together with the information transmitted from the decoder allows the detector to determine the absolute direction of travel.

[3] Detectors and transmitters must be aware that track voltage may resume during any time during the cutout.

[4] This means that a minimum of 17 preamble bits exclusive of the packet end bit must be transmitted to ensure full compatibility.  Transmitting a minimum of 18 preamble bits exclusive of the packet end bit is preferred.

[5]  Some non-conforming legacy decoders need the second half of a zero bit with a duration of greater then 80 µS after the cutout to resynchronize to the following preamble.  This can be achieved by the command station transmitting a zero bit or the detector creating the last half of a zero bit in the time period after the cutout combined with the following ½ of a one bit.  If this is done by the command station, a 14-bit preamble would begin after the completion of the zero bit transmission. This is shown in the figure by the shaded area after the cutout and before resumption of the DCC bit stream.

[6] To satisfy this requirement all devices (for example passenger car lighting, non-decoder-equipped locomotives, decoder-equipped locomotives, and accessories) connected directly to the track need to be isolated by a protection device such as a rectifier. (See NMRA TI-9.3.2)

 


The above NMRA Recommended Practice, RP-9.3.1, was last revised in
July, 2003.