Present and future of Machine Learning in Building Management Systems
Oleksandr Zdir
BMS Engineer
M-Bus communication protocol. All you need to know.
The development of the M-bus (Meter Bus) standard started in 1990 as a result of a collaboration between Dr Horst Ziegler from the University of Paderborn (Germany), metering data management company “Techem Gmbh” and a chipmaker “Texas Instrument Gmbh”. The aim was to create a low-cost communication standard for reading battery-powered metering devices. The most important requirement was the interconnection of hundreds of devices over long distances, as the metering devices are scattered throughout the building. The first time the M-Bus was defined as a part of the heat meters standard EN1434, but eventually grew into independent standard EN13757 (Communication systems for meters and remote reading of meters). So now for over thirty years this standard has been improved, popularised and implemented among global BMS equipment manufacturer leaders.
To understand how M-Bus works and which parameters it has, we must clarify how multiple layers M-Bus model operate. M-bus has been designed based on the OSI (Open System Interconnection) Model, which defines seven layers of communication characteristics, but for requirements of M-Bus, only four were required: Physical, Data Link, Network and Application layers. Besides, that one additional layer (Management Layer) for changing parameters such as address and baud rate was added. Let's dig into each of them.
Picture 1. M-Bus layers architecture
Physical Layer. M-Bus communication is based on the Master-Slave hierarchy. Devices exchange data through a two-wire cable, where one master collects information from several slaves (various meters). To minimise costs M-Bus network allows for both - data transfer and power meters. Slave devices are connected in parallel in the network.
Picture 2. Network connection example
The Master provides communication to the Slave devices by changing the voltage value. +36V at the output corresponds to logical “1” and +24V corresponds to logical “0”. On the other hand, Slaves communicate by adjusting their current consumption from stable 1,5 mA (logical “1”) to an additional 11-20 mA (logical “0”). So now we know how information is ‘physically’ transferred in M-Bus networks.
Recommended cable for M-Bus Network is JYStY N*2*0.8 mm, the max cable length in standard configuration is up to 1000m, and the maximum number of devices is up to 250.
The next step is the Data Link Layer. It explains how bits of information are combined in final messages and how communication errors are detected. Basically, the message is constructed in the following way: ’Start bit’-->” Data bits’-->” Parity Check’-->” Stop Bit‘. The bits of data are sent starting from LSB (least significant bit), so the bit with the lowest value is the first one in the message. Communication is executed in half-duplex asynchronous serial transmission with Baud Rates from 300 to 9000.
Network Layer. This layer is responsible for packet forwarding in the M-Bus network by handling addresses of the devices in the network. The M-Bus device can have a primary (from 0 to 250) or secondary address (8 digits, from 000000000-99999999). Remember that every device in the M-Bus network should have a unique address.
As the M-Bus protocol was created specifically for metering devices, the Application Layer defines how the data is structured and helps the end-user to understand it.
The Topology of the M-Bus network can be implemented in three different ways with their advantages and disadvantages.
Picture 3. Star topology
Picture 4. Ring topology
Picture 5. Bus topology
Three types of devices can be seen on M-Bus Network:
M-Bus Masters. These devices have been designed to be the main communication unit in the M-Bus network and collect the data from M-Bus meters. Sometimes they are used as gateways and transform the data from the meters to other communication protocols used in BMS systems. Examples of such devices from our portfolio are iSMA-B-AAC20-M, iSMA-B-MAC36NL-M and iSMA-B-MG-IP.
M-Bus Repeaters - used for galvanic isolation and/or extension of the M-Bus network. These devices are commonly seen on sites where the length of the network is quite large or the interference conditions are harsh. Sometimes repeaters can help to compensate for poor network installation practices.
M-Bus Meters - equipped with M-Bus communication module meters of water, gas or electricity. Often equipped with batteries that can be charged from the M-Bus network.
Other articles by this author
Present and future of Machine Learning in Building Management Systems
Introduction to communication protocols in Building Management Systems