T-bus protocol

from Wikipedia, the free encyclopedia

The T-Bus protocol is an open communication protocol for sensor and actuator applications . The T-Bus protocol is specially used for applications in agriculture and horticulture such as B. used for irrigation control. However, the areas of application are not limited to this.

The T-Bus does not specify any transmission medium or electrical interface requirements. Participants are usually connected via RS-485 or radio . T-Bus over TCP / IP is already under development.

PUR cable
PUR cable

With RS-485, the half-duplex method and a four-wire cable are typically used. Connectors are not specified, but the color coding of the wires.

For outdoor applications, a highly flexible cable developed for the T-Bus with a notch-resistant polyurethane outer conductor is used.

The number of participants depends only on the physical transmission technology used, e.g. B. with RS-485 32 to 256 participants per bus, depending on the transceivers used .

Structure of the T-bus data frame

The overhead is 13 bytes and the maximum payload is 65535 bytes.

T-bus data frame
T-bus data frame

SyncByte

T-Bus data frame - SyncByte
T-Bus data frame - SyncByte

The SyncByte is used for synchronization and automatic baud rate detection . The LSB (least significant bit) must always be 1, so that the structure corresponds to the form 0b xxxx xxx1. The remaining bits are intended for new protocol versions. At the moment version 1.0 is current, with the SyncByte 0x81.

Destination Device Family

T-Bus data frames - Destination Device Family
T-Bus data frames - Destination Device Family

The device family is 1 byte long. This means that device classes can be specifically addressed ( multicast ). In the irrigation control z. B. address all valves at once. The broadcast address is 0x00. In the brand new state, the set address is 0xFF. So there are a maximum of 254 different device classes.

Destination Address

T-Bus data frame - Destination Address
T-Bus data frame - Destination Address

The Destination Address is 3 bytes long and is used for individual addressing of participants. The broadcast address is 0x000000. In the brand new state the set address is 0xFFFFFF. So there is a maximum of 16,777,214 participants.

Source Device Family

T-Bus data frames - Source Device Family
T-Bus data frames - Source Device Family

Structure similar to Destination Device Family .

Source Address

T-Bus data frame - Source Address
T-Bus data frame - Source Address

Structure similar to Destination Device Address .

Data length

T-bus data frame - data length
T-bus data frame - data length

The Data Length field indicates the length of the payload and comprises 2 bytes. The maximum value is 65535 bytes. In radio applications, a maximum length of the payload of 51 bytes is typically used (13 bytes overhead + 51 bytes payload = 64 bytes).

Data

T-Bus data frame - Data
T-Bus data frame - Data

The data field (the payload) can have any content. The data interpretation depends on the device classes and their application protocols. Both commands and measurement data can be transmitted.

CRC

T-Bus data frame - CRC
T-Bus data frame - CRC

The procedure for determining the checksum is CRC-16 with the proven generator polynomial 0xA001, starting value 0 and previous inversion of all bytes (11 byte header and user data).

Examples of CRC calculation:

  • Header: 0x81 0x00 0x000000 0x00 0x000000 0x0000
  • User data: none
  • CRC: 0xAAAF

or

  • Header: 0x81 0x01 0x020304 0x05 0x060709 0x0005
  • User data (ASCII): T-Bus
  • User data (HEX): 0x542d427573
  • CRC: 0x933e

Encryption

Encryption is not specified in the T-Bus protocol. With a key length of 128 bits , XTEA has established itself particularly in radio transmission .

Advantages of the T-Bus

T-Bus specifies a data transmission method that users can flexibly equip with their own commands. It is independent of physical transmission media. Different transmission media can be easily connected to one another via converters.

Examples of converters:

With RS-485 the transmission speed can be detected automatically (autobauding with the help of the SyncBytes). Depending on the length of the line, speeds of 1200 baud to 230 kbaud have been tested. The speed of radio transmission depends on the respective radio module and the desired range (e.g. 1200 baud with a range of over 6 km and a clear view).

Software for microcontroller and PC is freely available.

Disadvantages of the T-Bus

The T-Bus is currently used almost exclusively by manufacturers in the agricultural and horticultural industries.

Current developments

Provider of T-bus compatible devices

  • CO 2 sensors for agriculture (www.stepsystems.de)
  • Soil moisture sensors and irrigation controls (www.sirikon.de)
  • Hop drying systems (www.euringer-friedl.de)

Web links