Wiren BoardDocumentation
Device manual · English

WB-M1W2 v.3

1-Wire to Modbus interface module

revision 110798
Covered order codes (1)
  • WB-M1W2 v.3


This page describes the new WB-M1W2 v.3 device; for the previous version, see WB-M1W2 v.2.

This page describes the latest hardware revision with the latest stable firmware. If your device runs older firmware, update it where possible (see Firmware update).
WB-M1W2 v.3 module
WB-M1W2 v.3 module

Purpose

WB-M1W2 v.3 is a compact module for installation in a wall box, with two universal inputs that support the following modes:

  • 1-Wire — connecting DS18B20 sensors using the 1-Wire protocol. Up to 20 sensors can be connected to each input.
  • Counting and press detection — for device pulse outputs, push-buttons and switches.

The compact module fits in cable ducts, wall boxes and other confined spaces.

Communication interface: RS-485 with Modbus RTU.

Changes from the previous version

WB-M1W2 v.3 documentation illustration

Differences from WB-M1W2 v.2:

  • the smaller enclosure is suitable for wall boxes as well as cable ducts and junction boxes;
  • the terminal block for 1-Wire sensors is not removable.

Technical specifications

Parameter Value
Power supply
Interface supply voltage 9–28 V DC
Power consumption

0.1 W

Sensors
External sensors Up to 20 DS18B20 digital temperature sensors per input.
Inputs (used instead of external sensors)
Number of digital inputs 2
Input type Dry contact, non-isolated
Open-circuit voltage 5 V
Control
Control interface RS-485
Interface isolation Non-isolated
Communication protocol Modbus RTU; software-configurable address; factory settings are printed on the label
RS-485 interface parameters Software-configurable; defaults:

baud rate — 9600 bit/s; data — 8 bits; parity — none (N); stop bits — 2

Ready after power-on ~2 s
Operating conditions
Ambient air temperature −40 to +80 °C
Relative humidity Up to 95%, non-condensing
Climatic classification under GOST 15150-69 O2.1*
Warranty 2 years
Service life 8 years
Terminal blocks and wire cross-sections
Recommended wire cross-section with insulated wire-end ferrules 0.35–1 mm2 — single ferrule; 0.35–0.5 mm2 — twin ferrule
Standard ferrule sleeve length 8 mm
Screw tightening torque 0.2 N·m
Dimensions
Dimensions

34 × 20 × 17 mm

Weight (including packaging)

13 g

Operating principle

In 1-Wire mode, the module polls the sensors connected to its inputs every two seconds and stores the readings in Modbus registers. The polling interval is configurable. Some DS18B20 sensors occasionally return spurious values that differ significantly from the correct readings. The module includes a suspicious-value filter to reject these readings.

In digital-input mode, the module monitors the inputs and stores their states and activation counts in registers. The counters are 16-bit. To reset the input activation counters, write 1 to register 100. Separate press counters are available for push-buttons.

Indicators

WB-M1W2 v.3 status indicator
WB-M1W2 v.3 status indicator

The module has an indicator that shows its status without connecting to a controller:

  • S (green) — Modbus communication status: lights up when low-voltage power is applied and flashes during polling over RS-485. On devices with events enabled in Fast Modbus ⚡ the indicator flashes more frequently than during sequential polling because events are polled faster. In bootloader mode, it flashes once per second; during firmware upload, it flashes rapidly. It is located beneath terminal B.

Press-type recognition

The module recognises four press types: short; long; double; and short followed by long.

Presses can be processed on the controller, which receives a separate counter for each press type over Modbus.

Press-recognition parameters can be changed in the settings.

Press counters and input states can be received as Fast Modbus events, minimising latency regardless of bus load. See Modbus operation.

Example rule for processing press counters

Installation

The V+ GND A B terminal block, with a 3.5 mm pitch, connects the power supply and RS-485 communication bus. Correct bus wiring is essential for reliable communication; see RS-485 bus wiring and connection.

If devices on the RS-485 bus use different power supplies, their GND terminals must be interconnected. See Grounding Wiren Board devices and connecting GND and iGND.

Install the converter in wall boxes, cable ducts, enclosures or junction boxes. 1-Wire bus wiring recommendations.

Wiren Board controller web interface

Selecting a template

To display the device on the Devices tab of the Wiren Board controller web interface, add it automatically by scanning for Wiren Board devices on RS-485 or manually by selecting the template WB-M1W2.

Controlling the device and viewing values

The web interface allows you to control device outputs and view readings. To change the displayed channels, edit the device configuration in the wb-mqtt-serial driver settings.

Channels available by default:

  • External Sensor x — temperature of the external digital sensor connected to port x. If the sensor is missing or faulty, its name is highlighted in red.
  • Discrete Input x — state of input x: 0 — open; 1 — connected to GND.
  • Counter x — counter for input x.
  • Serial NO — device serial number.

Configuration

Configuration methods

  1. Set the parameters in the Wiren Board controller web interface under Settings → Configs → Serial devices driver configuration. If these items are unavailable, check your access level.
  2. Write settings to the Modbus registers of the module from the controller console using the utility modbus-utils-rpc or modbus­_client.
  3. Without a Wiren Board controller, use the Wiren Board device web configurator or other software; see Using Wiren Board Modbus devices without a controller. You will need a computer with an interface converter: USB-RS485.

Our devices are continually improved. If settings described in this manual are missing, update the device firmware and controller software.

Digital-input modes

Selecting the mode for one of the WB-M1W2 v.3 inputs in the Wiren Board controller web interface
Selecting the mode for one of the WB-M1W2 v.3 inputs in the Wiren Board controller web interface

Each of the two WB-M1W2 v.3 inputs can be configured as a digital input.

Select the mode independently for each input using the parameter Input x.

Counter data is written to non-volatile memory when the value changes, but no more than once every 300 seconds. This keeps the stored counters up to date while extending the lifetime of the non-volatile memory.

Debouncing

WB-M1W1 debounce configuration in the Wiren Board controller web interface
WB-M1W1 debounce configuration in the Wiren Board controller web interface

For any input in Counting and press recognition mode, configure the debounce filter using the Debounce Time (ms) parameter. Range: 0–100 ms; default: 50 ms.

Temperature sensor polling interval

Setting the WB-M1W1 sensor polling interval in the Wiren Board controller web interface
Setting the WB-M1W1 sensor polling interval in the Wiren Board controller web interface

Set the sensor polling interval using the parameter Temperature sensor polling interval. This is a global setting for all sensors on all inputs. Range: 1–60 s; default: 2 s.

Connecting multiple sensors

Configuring IDs of sensors connected to WB-M1W1 in the Wiren Board controller web interface
Configuring IDs of sensors connected to WB-M1W1 in the Wiren Board controller web interface
Displaying temperatures from sensors connected to WB-M1W1 in the Wiren Board controller web interface
Displaying temperatures from sensors connected to WB-M1W1 in the Wiren Board controller web interface

Up to 20 sensors can be connected to each WB-M1W2 input.

Sensors are assigned to slots by ID (their unique ROM code). An unused slot contains 0.

Adding new sensors:

  1. Make sure the new sensors are connected to the bus. The device widget provides the parameter New sensors on bus x on the device widget — the number of newly detected sensors that will be saved in the next step.
  2. Click Save new sensors on bus x. This saves the new sensors in the device configuration, but not yet in the Serial devices driver settings.
  3. Click Read settings again in the configurator web interface. Check that the new sensor IDs have appeared in previously empty slots.
  4. Click Save settings. This saves the new sensors in the Serial devices driver settings.

After adding sensors, you can swap their IDs, move them to different slots, or remove unused sensors in the configurator web interface.

At power-on, WB-M1W2 also scans the 1-Wire buses and saves newly detected sensors in empty configuration slots. This is useful when configuring and using WB-M1W2 without a Wiren Board controller.

When only one sensor is connected to an input, its reading is available in the channel Temperature on input x and it is always polled, even if its ID has not been added to the configuration. With multiple sensors on one input, however, the channel Temperature on input x shows an error. Add all connected sensor IDs to the configuration for correct operation.

Counting and press detection

When you select the mode Counting and press detection, you can configure transmission of press counters to the controller. See Press-type recognition.

Available settings:

Timing diagram for press events, with debouncing disabled
Timing diagram for press events, with debouncing disabled
Press counters for input 1 in the Wiren Board controller web interface
Press counters for input 1 in the Wiren Board controller web interface
  • Long Press Time (ms) — distinguishes long and short presses. A press lasting longer than this value is long; otherwise it is short.
  • Second Press Waiting Time (ms) — opens a time window after a short press ends. A second press within this window is treated as a double press; otherwise the first press is treated as a single press.
  • Debounce Time (ms) — the input signal must remain stable for this duration before it is accepted and processed by the press-recognition algorithm. For press recognition, set it to one fifth to one tenth of the second press waiting time.
  • Polling interval for each counter — leave this at the default value; the driver manages polling automatically.

Double-press detection delays short-press detection. For example, with the default 300 ms setting, the short-press event occurs 300 ms after the button is released. If double presses and short-then-long presses are not required, set Second Press Waiting Time (ms) to 0 ms. The short-press event will then occur immediately after button release.

Press recognition takes place after debouncing. With Debounce Time (ms) set to the default 50 ms, presses shorter than 50 ms are ignored. Button release is also registered 50 ms after physical release. Choose the debounce time for the particular button to minimise latency while preventing false events, such as a double press being detected instead of a single press.

Modbus operation

Wiren Board devices use Modbus RTU. The physical connection uses the RS-485.

interface. All main commands for reading and writing one or multiple registers are supported. See the list in the Modbus protocol description.

The module can be configured:

Default port settings

Value
default
Parameter name
in the web interface
Parameter
9600 Baud rate Baud rate, bit/s
8 Data bits Number of data bits
None Parity Parity
2 Stop bits Number of stop bits

In current firmware, setting Stop bits is optional: the device also operates correctly when its number of stop bits differs from the Modbus master setting.

For a faster response, we recommend increasing the baud rate to 115200 bit/s; see Communication parameter settings

Modbus address

Factory-assigned Modbus address. Left: label on the device cover. Right: label on the side or underside of the device.
Factory-assigned Modbus address. Left: label on the device cover. Right: label on the side or underside of the device.

Each device on the bus must have a unique address from 1 to 247. The factory-assigned address is printed on labels on the enclosure (top cover, side or underside). Devices in a production batch are assigned different addresses, so devices in one order will usually have different addresses.

For instructions on finding, changing or resetting the address, see Wiren Board device Modbus address.

Fast Modbus extension

Fast Modbus extends standard Modbus with rapid discovery of Wiren Board devices on RS-485 and event polling.

These features are enabled by a special command from the master, so Wiren Board devices remain compatible with third-party equipment.

Not every register supports event generation. Check the register map: event-capable registers are marked with ⚡. See Fast Modbus.

Register map

WB-M1W2 v.3 register map

The hardware revision is printed on the side label. Manufacturing dates are listed in the revision history below.

Firmware updates and resetting settings

Wiren Board devices support firmware updates over Modbus. This allows bugs to be fixed at the installation site and, where technically possible, new features to be added. Settings stored in the device are retained during a firmware update.

Instructions:

New firmware releases are listed in the firmware changelog.

Known issues

WB-M1W2 hardware issues and limitations identified during operation.

Hardware revisions

Revision history

Device images and drawings

WB-M1W2 v.3 dimensions
WB-M1W2 v.3 dimensions

CorelDRAW 2018 (font: Ubuntu): File: WB-Library.cdr.zip

Visio:

  1. Wiren Board devices: File: WB-Visio-Lib.zip.
  2. Enclosures, circuit breakers, contactors and other third-party symbols.

SVG: File: WB-Library.svg.zip

Autocad 2013 DXF: File: WB-M1W2 v.3.dxf.zip

Autocad PDF: File: WB-M1W2 v.3.pdf

AutoCAD Electrical schematic symbol library: File: Wirenboard-AE-base.zip

Revision 110798.