MITTENTITEL

Timings und voltages, nominal and real.

The values you find in the text arereal world measurements. So thee might be slight differences between my measurements and what you fin when you do tests on your system.

A real world value of 102 ms might be nominal (meant to be) 100 ms.

 

Scalextric offers at least two powerbases. One for 4 cars and a bigger one for 6 cars. I had only the smaller one. The bigger powerbase might offer more features and may possibly know more commands, but those commands described here are definetly understood by all cars and used by all powerbases.

Physical layer

The very first look onto the signal as shown in the title image is not very revealing.

But a second look reveals that data is transfered all the time, not just in a small portion of the time. Also you can recognize a pattern.

A much closer look shows the following:

The signal has a duty cycle of 1:1 and there are two types of pulses -one with a duration of 120 µs and one with a duration of 240 µs.

The voltage seems to be a very high 27 V. But that's only a interpretation problem based on the fact that Scalextric uses a kind of AC and not pulsed DC like the others do. So in reality that's only 13.5 V.

Using AC increases the component count a little, but it has the big advantage that power is applied all the time , regardless of any data transfers.

Now for something completely different:

Scalextric is a tardemark of Hornby. And Hornby is known for model railroads. Hornby also sells digital railroad product and Hornby uses DCC for it's digital railroad. And so we look into the DCC specification and we realize ....

that the signal we see follows DCCs physical layer and - we are back where we belong.

DCC specifies a pulse of 116 µs (give some - take some) as a logic 1 and a pulse of twice that or longer as a logic 0.

As long as there is no data transfer, there will only logic 0s been sent.

A sequence of at least 14 consecutive ones mark the start of a data packet. In the title image these are the darker areas. Those consecutive ones are called preamble.

The preamble is followed by a start bit. This has obviously to be a logical 0 or it could not be distinguished from the preamble. Now follow 8 data bits. After those an end bit follows. If the end bit is a logic 1 the transmission will end, if it is a logic 0 the next 8 data bits will follow and they will be followed by an other end bit etc.

By this rule it is impossible that there will be more than 9 consecutive ones in any transmission. For that reason a preamble is detected by recognizing at least 10 ones in a row.

With Scalextric Digital the data packets follow each other as close as possible. As the powerbase sends data packets of 8 bytes each a datapaket takes at least 14 * 120 (preamble) + 240 startbit + 7 * 240 end bits with value 0 + 120 end bits with value 1 + 64 * 120 bits with value one, 11.4 ms and at the most 19.1 ms.

So the data packets are repeated with a frequency between 87 Hz and 52 Hz.

As each data packet holds the information for all cars, that's quite often.

LSB und MSB

We are used to numbers where the most significant digit is to the left. That is calld MSB order.

LSB is just the opposite. The most significant digit is to the right.

So MSB ordered 101110 is eqivalent to LSB ordered 011101.

 

Databits are sent in MSB order.

The last byte in every packet is a simple checksum. It is calculated by xoring all previous bytes in that packet.

The picture shows part of a data packet. Preable followed by startbit, 8 databits and an end bit.

Semantic layer

As mentioned before all data is sent in packets.

The cars are numbered from 1 on.

Resetpacket: $00 X1 X2 X3 X4 X5 X6 PS

Before and after programming a car id a reset package is transmitted.


Programpacket: $01 A1 A2 A3 A4 A5 A6 PS

When you press one of the buttons on the powerbase long enough all cars on the track will be programmed to the the respective id. This packet tells the cars to change their id.


Controllerpacket: $02 R0 R1 R2 R3 R4 R5 PS

This packet tells the cars which speed to use and whether, brake or lane change button are pressed. The packet is always 8 Bytes long regardless of the number of controllers connected.