From Advanticsys Tech Resources
Jump to: navigation, search

The DM-108 is a DIN-rail installable device which acts as wireless bridge, in the band of 868MHz, inside traditional wired RS485 Modbus RTU installations, providing the limited point-to-point RS485 networks with the versatility and ease of installation of wireless sensor networks (WSN).

The DM-108 is auto routable, which means that each node automatically selects the best route to forward the data packets, effectively disseminating the Modbus commands to all connected devices. The net is based on the topology Coordinator-endpoint, where the endpoints could be act automatically as repeaters at the same time to connect with others DM-108. It is only possible to have one coordinator in each net or group ID. The maximum number of hops between nodes is five.

DM-108 Wireless Modbus Bridge

Once installed, the DM-108 are transparent devices inside the RS485 network, not only maintaining the electric requirements of the bus but also the integrity of Modbus RTU packet frames transmitted.

Apart from the wireless bridge functionality, DM-108 act as pulse counter. It has a configurable pulse input which status can be registered for alarm application or counted for third party meters integration. Operating modes supported: Active pulse (up to 30Vdc), dry-contact, Open-collector, S0 type (gas and water counters). It also includes an open drain output.


Item Specification
Power supply 9Vdc@80mA <=> 30Vdc@24mA
Wet contact pulse maximum voltage 30Vdc
Power Consumption < 1W
Communication Protocols Modbus RTU, 128-bit AES encrypted Wireless Mesh
microUSB (1 port) Used as 19.2 Kbit/s UART to configure and update device firmware
RS485 (1 port) Interface RS485 Half duplex
Radio 869MHz - with External Antenna (SMA connector)
Pulse input Configurable input for pulse status counting and storage
Discrete output Open drain - drives up to 2A current
Dimensions 18x89x59 mm
Material PC/ABS
IP class IP20

DM-108 Connections

  • Power Supply: It is powered between 9 and 30 Vdc. It is mandatory to follow the polarity of the connection to avoid damages in the device. The negative pole must be connected to GND terminal and the positive pole to VCC terminal.

Important: In idle state, the DM-108 consumes around 170 mW. When the radio is transmitting there will be peaks of 700mW, so the power supply must be within these limits for a correct performance.

  • MicroUSB Connector: it can be used as UART to retrieve/update configuration and to update firmware.
  • RS485 bus: The A line is connected to terminal A, and the B line to terminal B. If it is necessary to use the line termination of 120 Ω, the terminal T should be connected to terminal A with a wire. Additionally, if it is necessary to connect the GND of the RS485 line, it should be connected to terminal GND, which is beside the terminal T.
DM-108 connections
  • Pulse input: The positive pole will be connected to Pulse+ terminal, and the negative to Pulse- terminal.

The DM-108 can be configured to receive different types of electrical pulses: open collector, open emitter and wet contact pulse (up to 30Vdc). For dry contacts, the configuration will be the same as the open collector.

Power supply and pulse connections
  • Discrete Output: The positive output terminal connects the drain of the driver, and the negative terminal is internally connected to the ground, so the output common must be connected to this terminal.
  • Antenna: In the SMA connector of the DM-108 any antenna compatible with the 868MHz band could be connected.

Important: In order to reach 1Km LoS, the antenna should have at least 5dBi in the band of 868MHz.

Discrete output, RS485 bus and antenna connections

USB Configuration

The microUSB connector is used for two purposes:

  • Firmware Update: If a new firmware version is released by Advanticsys, user will be able to update it through this port.
  • Device configuration: User can access and modify device configuration by using this port and the WM Config Tool. UART parameters for this purpose are 19200bps, 8 bits, none parity and one stop bit.

If you are going to connect the DM108 for the first time to a PC, please follow next steps after the DM108 has been connected to the PC via USB:

1. Once the PC detect the new COM port go to Panel Control>Device Manager>Ports (COM & LPT).

2. Select the new COM port created and go to Properties, clicking on right mouse button.

3. Go to Port Settings tab.

COM Port Properties on Windows PC

4. Click on Advanced and then perform next actions:

  • Uncheck Serial Enumerator box.
  • Check the Disable Modem Ctrl at Startup box.
Advanced Settings for COM Port on Windows PC

5. Click on OK and close Control Panel

Pulse input configuration

By default, the DM-108 is configured for wet contact pulses, so, if it is necessary to change the type of pulse input, the DM-108 can be opened as shown below:

Opening the DM-108

Internally, the DM-108 has a pin block (JP1) which configures the type of pulse input depending on the jumper connection. There are three electrical pulses that can be connected to DM-108:

  • Open collector. The jumper should be connected on position 1 of block JP1. This configuration is also valid for dry contact pulses.
Jumper position for open collector or dry contact pulses
  • Open emitter. The jumper must be positioned in pos 3.
Jumper position for open emitter pulses
  • Wet contact pulse. In this case, the jumper will be connected on position 2.
Jumper position for wet contact pulses

Configuring DM-108 with WM Config Tool

Detailed instructions are described in WM Config Tool Manual

Modbus Parameters

The DM-108 can have the following Modbus RTU parameters configured:

  • Modbus id (anything between 1 and 247).
  • RS-485 configuration parameters (baudrate, parity, start & stop bits, up to 19200 baudrate).

By default, a brand new DM-108 has 19200 8 N 1 as RS485 configuration. The Modbus ID is random.

Important: the DM-108 must have a unique Modbus ID inside the Modbus network, as in itself it is a Modbus node.

DM-108 Modbus Parameters

Radio Parameters

The DM-108 can have the following wireless parameters configured:

  • Radio ID (value range: between 258 and 65280). The Radio ID 257 is reserved only for the DM-108 which will be the Coordinator. We recommend not to change the default value under any circumstance.
  • The Coordinator checkbox actives that role for the DM-108. The checking also changes the Radio ID to 257. If it is unchecked, the role of DM-108 is to be Endpoint. After the unchecking, by default, the Radio ID backs to the original Radio ID.
  • Routing Retries. It is only enabled for Coordinator, and it indicates the number of retries to establish communication with another device before it erases it from the routing table in case of failing communications.
  • Group ID, anything between 0 and 255.
  • Radio Channel, anything between 0 and 9.
  • TX Power, list of different selectable power levels in dBm, between -2 and +26 dBm.
  • AES Encryption Enabled. This option enables the wireless security based on the AES 128bits algorithm. Its disabling increase mildly the speed of communications.
  • ACK Enabled: This parameter enables the acknowledgement between radio messages. Its enabling strengthens the wireless communications and avoids the loss of Modbus requests. If it is disabled, the Modbus master has all the control of the timeouts and retries of the Modbus data frames.
  • ACK Timeout. Passed this time, a radio message is considered lost, which means that the ACK of the transmitted message has not been received.
  • ACK Retries. It is the number of retransmissions after an ACK fail.

By default, a brand new DM-108 has a random Radio ID, Endpoint role, 0 as Group ID, Radio Channel 0 and +26dBm TX power.

Important: the DM-108 must have an unique Radio ID inside the radio network. A cluster is established by DM-108 devices that have the same Group id and Radio Channel. Each cluster must have only one Coordinator.

DM-108 Radio Parameters

Default Parameters

It is possible to return to the default settings by pressing the Set Default Values , which is below the Update button:

DM-108 Default Settings Button

How to read/write DM-108 Modbus registers

Due to the wireless physical layer, the maximum number of registers that could be read in one request is 20, and the maximum number registers that could be written in one order is 16. Also, as we already described, the minimum interval between Modbus orders should be at least one second, even for writing orders should be upper. The Modbus timeouts must be complaint with this timing to avoid the collapsing of the wireless communications. The user can change the timing and retries of the radio ACKs to accelerate the communications, but it will be under his/her responsibility. The DM-108 itself has accessible some MODBUS registers for its own configuration and the pulse counter. In the following chapters, specific Modbus registers will be shown.

Considerations before changing configuration registers

  • In case of writing configuration registers (4224 to 4232), it is mandatory to do it writing the nine registers at once. It is not allowed to write them individually.
  • In case of reading,it is possible to read them individually.

Configuration registers

As we see in previous chapters, the DM-108 configuration can be performed through the use of our WM Config Tool. However, it is also possible to read/write directly on the corresponding registers.

  • Register 4224:
    • High byte. Represents the Group ID. It has a range between 0 and 255.
    • Low byte. It is the channel radio. It has a range between 0 and 9.
  • Register 4225:
    • High byte. It has Modbus ID and its range is between 1 and 254. 0 and 255 are forbidden.
    • Low byte. Here is defined the DM-108 role. If the value is 1, the role is COORDINATOR; if it is 0, the role is ENDPOINT.
  • Register 4226:
    • High byte. Routing Retries: this option is only enabled for the Coordinator, and it indicates the number of retries that the coordinator has to establish communication with one device before it erases it from its routing table.
    • Low byte. RS485 port configuration:
Register 4226 - RS485 Configuration
For example, if we want to set up the following configuration parameters: 9600bps, 8, Even parity and 1 stop bit, the low byte should have the next value: 180 (0xB4 or 0b10110100).
  • Register 4227: It is the Radio ID, which value is between 257 and 65279. The ID 257 is reserved exclusively for the COORDINATOR.
  • Register 4228:
    • High byte. This activates or deactivates the ACK radio messages:
      • 0 -> Deactivated.
      • 1 -> Activated.
    • Low byte. This byte activates or deactivates the AES encryption:
      • 0 -> Deactivated.
      • 1 -> Activated.
  • Register 4229:
    • High byte. Power transmission of the 869MHz radio:
      • -2dBm: The byte value is 3.
      • +7.5dBm: Value = 23.
      • +12.5dBm: 29.
      • +18dBm: 38.
      • +22dBm: 55.
      • +25dBm: 80.
      • +26dBm: 134.
    • Low byte. Reserved.
  • Register 4230:
    • High byte. Reserved.
    • Low byte. Number of transmission retries after an ACK timeout.
  • Register 4231: This register is reserved
  • Register 4232: This register saves the milliseconds for the ACK timeout. Its range is between from 0 to 65535.
Configuration Parameters - Modbus Registers

Using the DM-108 as pulse counter

The pulse counter within the DM-108 has two MODBUS registers (forming a 32 bit variable) that are allocated in non-volatile memory. These registers can be written (to erase or edit a new value) or read. In case of overflow, the counter begins in zero value.

Modbus registers - Pulse counter

Rising, falling and even both edges can be used for increasing pulse counter. This can be configured by writting register 4099:

Modbus registers - Pulse edges configuration

Example #1 Register 4099 = 0: the counter is increased with every falling edge:

Falling edges of pulses input

Example #2 Register 4099 = 1: the counter is increased with every rising edge:

Rising edges of pulses input

Example #3 Register 4099 = 2: the counter is increased with every edge:

Both edges of pulses input

Pulse input status

The DM-108 can also stored pulse input status (ON/OFF) in order to be read from another Modbus device such as a BMS or SCADA in typical alarm applications. This current status can be read from MODBUS Register 4098:

Modbus registers - Pulse input status
Pulse input status register updates

Using the DM-108 discrete output

The DM108 has one Open Drain output, which can manage power supplies, relays or circuit breakers. Also, it can be used as open collector output to use with a digital input of any device. The maximum current it can drive is 2 Amperes.

The OUT- pole is internally connected to GND, so user must be careful when connecting it to avoid permanent damages on DM108.

DM108 Open Drain Output

The output can be used in 3 different modes. When one mode is activated, the others are deactivated automatically:

  • Continuous mode: User can activate or deactivate permanently the output, changing the state by writing Modbus register 100.
  • Single pulse mode: There are two registers that manage this mode: Modbus register 103 describes pulse width (duration), and register 102 activates the single pulse. Once width is reached, output state goes to deactivated state. The minimum pulse width admitted is 10 milliseconds.
DM108 Single pulse output mode
  • PWM (Pulse Width Modulation) mode: This mode is managed by Modbus registers 101, 104 and 105. Registers 104 and 105 describe the PWM duty cycle, being register 104 which sets the OFF cycle and register 105 the ON cycle. The minimum cycle width is 10 milliseconds.
DM108 PWM output mode

Examples of use

  • Controlling a Power Supply. In this case, the DM108 with its Modbus registers can control the supply of other electronic devices (Maximum current: 2 A)
DM108 as a power switch
  • Managing a relay coil. In this case, the DM108 drives or stop the current of the relay coil.
DM108 managing a relay
  • Managing a Circuit Breaker
DM108 managing a circuit breaker
  • Used as digital output. With a simple pull up resistor connected between the OUT+ and the positive pole of the power supply connected to the device, the DM108 could activate or deactivate digital inputs.
DM108 output connected to a digital input

Modbus registers associated to Discrete output

DM108 Modbus registers table for discrete output

NOTE: Writing these Modbus registers can only be done one at a time.

Setting up a Wireless Modbus Network topology

To perform a Wireless Modbus network with the DM-108, it is necessary to configure one DM-108 as COORDINATOR, leaving the rest as ENDPOINTS. The Modbus master should be connected to the Coordinator being this one the wireless bridge to the other Modbus slaves, which will be connected to the rest of the DM-108. Important: One network can have up to 64 endpoints.

Wireless Modbus network

The topology has a star shape, where all the wireless communications will converge to the DM-108 Coordinator, which translate all the Modbus frames to the Modbus Master. The wireless hops will take place automatically when the Coordinator has not direct link to the targetted DM-108 which has the Modbus slave connected to its RS485 bus.

Given that the Wireless communications need security mechanisms and acknowledges for stable networks, the Modbus requests and their responses will be slower than in a wired communication, so in order to avoid errors, the minimum time between Modbus requests should be one second. Below this value, the Modbus performance may be erratic. In addition, if there are hops in the wireless communication, the speed of the transactions will be even slower, thus, it is mandatory to be careful with the time between requests. Above one second, Modbus network will be stable.

The DM-108 have a Modbus ID, so we must pay attention to all the slaves IDs which would be connected to the DM-108. For example, if we have a network formed by 64 DM-108 apart from the Coordinator, the number of Modbus devices that could be connected is: 247 – 65 = 182.

For installations where it is necessary to use several nets, each one with its Coordinator, there are two ways to do it, depending on the installations requirements:

  • Configuring different radio channels for each net. This method permits 10 nets because the DM-108 has 10 physical channels in its radio.
  • Configuring different group IDs for each net. It permits 256 nets in the same installation. The Group ID byte is an extra identification byte for the net, so, independently of the radio channel, the devices with different Group ID will not communicate between them.