Synapse RTU-DI8 User manual

RTU-DI8 – 8 Channel Digital In
Modbus RTU Module
Documentation Issue 1.1 DRAFT

Features
8 Channel Opto-Isolated Digital Inputs
Fast Opto-Coupler design capable of reading high speed pulses
Wide Voltage input range (5-48V)
Three modes of operation
-High/Low Level Mode
-Pulse Width Measurement Mode
-Pulse Count Mode
Software Modbus registers for
-Channel High/Low Level State Mode
-Channel 32bit Pulse Count totalizer (value also stored in Non-Volatile FRAM) Mode
-Channel 32bit Pulse Count Offset Value
-Current Channel Pulse Width Measurement (PWM) value
-PWM “Olympic Average” channel reading
-*PWM Max channel reading
-*PWM Min channel reading
-Pulse count de-bounce period (default 10ms) configuration setting
-PWM Average short/long configuration setting (selectable as over 6 or 10 readings)
-Channel Mode configuration setting
-Fast Modbus poll rates <100ms
-Baud Rate
Modbus Address selection via external “Push-On” jumper link setting
Factory Reset Via “Push-On” link setting
Integrated Watchdog and Power “Brown-Out” detect and correct
5V TTL Trigger Output Pin for Ultrasonic Sensors
Regulated 5V Power supply pins for powering external sensors
Optional DIN Rail mountable breakout board for Maxbotix ultrasonic sensors routing power
and trigger signals for sequential daisy-chain operation providing maximum reading
reliability.
*These threshold registers are user writeable so a reading can be taken, the registers written back to,
either to zero out or set a new threshold, the system will check new readings against these values
and overwrite if the threshold has been exceeded in the respective direction.
Readings :
Pulse Count Mode keeps a tally of the number of pulses received from a given data source such as
water meter or power meter. These pulses are usually fired by the data source to indicate a number
of litres or kWh has been consumed and are cheaper to implement by the equipment manufacturer
than a full digital interface.
The RTU unit will count pulses up to 100Hz with the default de-bounce setting, a higher frequency
can be achieved if the user is able to supply a solid state input (avoiding relay contact bounce or
other sources of interference).

Safety and ESD Precautions
Before first use, refer to this manual.
Before first use, make sure that all cables are connected properly
Please ensure proper working conditions, according to the device specifications
e.g. Supply voltage, ambient temperature, maximum power consumption
requirements.
Ensure all wiring and connector terminals are securely fastened so as to avoid short
circuits or other such damage.
Before making any modifications to wiring connections or PCB settings, turn off the
power supply.
Note: This equipment has been tested and found to comply with the limits for a
Class A digital device, pursuant to part 15 of the FCC Rules. These limits are
designed to provide reasonable protection against harmful interference when the
equipment is operated in a commercial environment. This equipment generates,
uses, and can radiate radio frequency energy and, if not installed and used in
accordance with the instruction manual, may cause harmful interference to radio
communications. Operation of this equipment in a residential area is likely to cause
harmful interference in which case the user will be required to correct the
interference at his own expense.
Caution - Component damage. Circuit boards contain electronic components that
are extremely sensitive to static electricity. Ordinary amounts of static electricity
from clothing or the work environment can destroy the components located on
these devices.
Do not touch the components without antistatic precautions, especially along the
connector edges.

Specifications
Power Supply Voltage 6-28 VDC
Maximum Current 10mA @12V Max
Digital Inputs
No of inputs 8 (AC or DC Inputs)
Input Range (Voltage Mode) 0–48V
Low Level 0 - 3V
High Level >= 5V
Input Resistor 6.8 KΩ
Environmental Conditions
Operating Temperature -20°C to +70°C
Storage Temperature -40°C to +85°C
Humidity 0 .. 90 %
(non-condensing)
Isolation Isolation 2500 Vrms
(Between CPU/Power and Digital Inputs)
Dimensions Height/ Length 120x101 mm
Communication
Protocol Modbus RTU
Baud
9600-57600
(19200 Factory Default)
Address 1-31
EMC
Rating Class A (Industrial)
Immunity EN 61000-6-2
Emissions EN 61000-6-4
IP IP Rating IP20

RTU Module Pin Out
1 – 0V
2 – DC IN
8 – CH8 -
7 – CH8 +
6 – CH7 -
5 – CH7 +
4 – CH6 -
3 – CH6 +
2 – CH5 -
1 – CH5 +
3 – 0V
2 – RS485 B
1 – RS485 A
QUICK COM
1 – CH1 +
2 – CH1 -
3 – CH2 +
4 – CH2 -
5 – CH3 +
6 – CH3 -
7 – CH4 +
8 – CH4 -
1 – TRIG
2 – 5V
3 – 0V
4 – 0V

Status LEDs & Modbus ID
Modbus Address ID Link Setting
Link No Address Setting
1
Modbus Address +1
2 Modbus Address +2
3
Modbus Address +4
4
Modbus Address +8
5
Modbus Address +16
No Links
Use factory defaults*
* Factory Default setting :
Address Id = 1
Baud Rate = 19200 8N1
Top Bottom
Green
Power On
Modbus Rx
Red - Modbus Tx
1
5
Status LEDs

Modbus Address ID Selection Link
Addr 5 4 3 2 1
0* OFF OFF OFF OFF OFF
1 OFF OFF OFF OFF ON
2 OFF OFF OFF ON OFF
3 OFF OFF OFF ON ON
4 OFF OFF ON OFF OFF
5 OFF OFF ON OFF ON
6 OFF OFF ON ON OFF
7 OFF OFF ON ON ON
8 OFF ON OFF OFF OFF
9 OFF ON OFF OFF ON
10 OFF ON OFF ON OFF
11 OFF ON OFF ON ON
12 OFF ON ON OFF OFF
13 OFF ON ON OFF ON
14 OFF ON ON ON OFF
15 OFF ON ON ON ON
16 ON OFF OFF OFF OFF
17 ON OFF OFF OFF ON
18 ON OFF OFF ON OFF
19 ON OFF OFF ON ON
20 ON OFF ON OFF OFF
21 ON OFF ON OFF ON
22 ON OFF ON ON OFF
23 ON OFF ON ON ON
24 ON ON OFF OFF OFF
25 ON ON OFF OFF ON
26 ON ON OFF ON OFF
27 ON ON OFF ON ON
28 ON ON ON OFF OFF
29 ON ON ON OFF ON
30 ON ON ON ON OFF
31 ON ON ON ON ON
* Invokes Factory Default setting:
Address Id = 1
Baud Rate = 19200 8N1

Pulse Width Measurement Mode
The auxiliary pulse width measurement interface connector allows for the integration, and daisy
chaining, of sensors which require a low 5V voltage power supply and/or trigger pulse in order to
initiate conversion/pulse generation. The width/length of the received pulse is then measured and
stored in the respective Modbus register.
The functionality here has been specifically designed with Maxbotix ultrasonic range sensors in
mind, although the interface is generic and can be used with any sensor providing a varying pulse
width.
In addition the RTU module can optionally be paired with a breakout board specifically designed for
daisy chaining up to 8 Maxbotix ultrasonic sensors; this gives maximum reliability and prevents
“cross talk” between sensors if placed in close proximity.
Pulse width readings also have special averaging and peek max/min recorders for alarm sensing
PWM “Olympic Average” Reading
This gives the per-channel rolling average over 6 or 10 readings, here the maximum and minimum
readings from each channel are discarded from the data-set and the average is then calculated over
the remaining 4 or 8 readings. This method is used to assist with positively eliminating any
substantially outlying readings which may have occurred during the period, for example if the signal
source is fluctuating or the sensor has produced a glitched/bad read.
PWM Max/Min Peek Reading Indicators
These values are set and tested against at each sensor read, if the current reading exceeds the
Max/Min threshold then the Max/Min value is overwritten with the current reading and the new
updated value is then used on subsequent reads. This value can also be set via a Modbus write
giving allowing the setting to act as a threshold for an alarm level
Note that all PWM readings/thresholds are volatile and will not be retained over a power on/off/on
cycle

Ultrasonic Sensor Accessory Breakout Board
The breakout board is configured such that each sensor triggers sequentially in the sequence 1-8, if
using a smaller amount of sensors strictly use the 1-8 ordering for both the sensor plugs and the RTU
channel ordering the so that the trigger signal propagates correctly and the matching pulse output is
wired to the corresponding RTU digital input channel.
E.g. If 4 ultrasonic sensors are the RTU and breakout board should use channel numbers 1-4
The sensor trigger pulse will be sent by the RTU module once to start the sequence, the Maxbotix
sensors should be wired in daisy chain format to allow this signal to feed through each sensor in the
sequence for optimum results.
The breakout board can be mounted on a DIN rail by using the plastic adapter clips provided.
We recommend using low capacitance cabling, ideally twisted pair, such as Belden 9931 for
interfacing between the breakout card and the ultrasonic sensors to maintain signal integrity over
long runs and prevent signal degradation. If the cabling used has a shield make sure to connect this
at one end only to an appropriate 0V/Ground reference.

J10 RTU PWM Interface Plug
Pin
Function
1
0V
2
+5V
3 0V
4
RTU Trigger Pin
J1/2/4/5/6/7/8/9 Maxbotix Sensor Plug
Pin Function
1 Sensor Pulse Width Output
2
+5V
3 +5V
4
Trigger Signal To Sensor (Input)
5 Trigger Signal From Sensor (Output)
6
0V
J3 RTU Sensor Plug
Pin
Function
1 Sensor 1 Output Pulse
2
Sensor 2 Output Pulse
3 Sensor 3 Output Pulse
4
Sensor 4 Output Pulse
5 Sensor 5 Output Pulse
6 Sensor 6 Output Pulse
7
Sensor 7 Output Pulse
8 Sensor 8 Output Pulse
LK2/3/4/5/6/7/8 Sensor Trigger Mode
Pin
Function
1-2 (Factory Default)
Sequential Trigger
2-3
Single Simultaneous Trigger

Pulse Counting Mode
This operating mode puts the system into pulse count mode, where each channel will count the
number of pulses received on a given input channel.
The system features a user-definable de-bounce period, which is factory set to 10mS, allowing for
pulses <100kHz. This de-bounce period can be reduced if the user can guarantee a solid state signal
(as opposed to relay contacts) and a good low electrically noisy environment.
On detection the channel total is incremented and this new value is immediately written to FRAM
non-volatile storage so as to reduce venerability to power outages.
The input counts are stored as 32bit unsigned integers giving maximum channel counts of
4,294,967,295.
The system can also be configured with per-channel counter offset values, allowing easy retrofitting
into existing environments; these offsets are stored in EEPROM again providing resilience against
power outage.
Whilst the values for current pulse count total and offset values are stored separately, these values
are added together and stored in the respective Modbus register.
This mode of operation is mutually exclusive to PWM measurement mode, i.e. the system cannot be
configured for mixed PWM and pulse count modes at the same time.
Static Level Mode
This is the most basic operating mode and puts the system into binary logic level indication. Voltage
inputs exceeding the high level threshold will show as logic level 1, and below the low threshold will
show as logic level 0, the logic state for voltages in-between are not guaranteed so should not be
relied upon.
Each channel is independently isolated and the optocoupler inputs are AC type, as shown below, so
signal orientation is not crucial to operation.

RS485 Bus Option Links
Fit links below to enable the function shown
RS485 Low Bus Pull
RS485 High Bus Pull
120ΩTermination
Resistor
Important: Only one set of bus data line pulls should be active,
either at the master side or on a single slave
Important: Termination resistors should only be enabled at far
ends of bus

RS485 Bus Connection
RTU Plug RS485 Wiring
RS485 A/+
RS485 B/-
RS485 0V
Shield – Only connect on one end of cable!
Belden 9481 (120Ω Cable)
Modbus
Master
RS485 A/+
RS485 B/-
RTU
Module
RTU
Module
RTU
Module
120Ω
Termination
High Bus Pull
Low Bus Pull
120Ω
Termination

Modbus Registers – Readings
Register
Type
Read/Wite
Description
40001 16bit (Big Endian) Read Only Channel 1 Static Level Reading
40002
16bit (Big Endian) Read Only Channel 2 Static Level Reading
40003
16bit (Big Endian)
Read Only
Channel 3 Static Level Reading
40004 16bit (Big Endian) Read Only Channel 4 Static Level Reading
40005
16bit (Big Endian) Read Only Channel 5 Static Level Reading
40006
16bit (Big Endian)
Read Only
Channel 6 Static Level Reading
40007 16bit (Big Endian) Read Only Channel 7 Static Level Reading
40008
16bit (Big Endian) Read Only Channel 8 Static Level Reading
40009
32Bit (Big Endian)
Read Only
Channel 1 Pulse Count Total
40011 32Bit (Big Endian) Read Only Channel 2 Pulse Count Total
40013
32Bit (Big Endian) Read Only Channel 3 Pulse Count Total
40015
32Bit (Big Endian)
Read Only
Channel 4 Pulse Count Total
40017 32Bit (Big Endian) Read Only Channel 5 Pulse Count Total
40019
32Bit (Big Endian) Read Only Channel 6 Pulse Count Total
40021
32Bit (Big Endian)
Read Only
Channel 7 Pulse Count Total
40023 32Bit (Big Endian) Read Only Channel 8 Pulse Count Total
40025
32Bit (Big Endian) Read Only Channel 1 PWM Live Reading
40027
32Bit (Big Endian)
Read Only
Channel 2 PWM Live Reading
40029 32Bit (Big Endian) Read Only Channel 3 PWM Live Reading
40031
32Bit (Big Endian) Read Only Channel 4 PWM Live Reading
40033
32Bit (Big Endian)
Read Only
Channel 5 PWM Live Reading
40035 32Bit (Big Endian) Read Only Channel 6 PWM Live Reading
40037
32Bit (Big Endian) Read Only Channel 7 PWM Live Reading
40039
32Bit (Big Endian)
Read Only
Channel 8 PWM Live Reading
40041 32Bit (Big Endian) Read Only Channel 1 PWM Average Reading
40043
32Bit (Big Endian) Read Only Channel 2 PWM Average Reading
40045
32Bit (Big Endian)
Read Only
Channel 3 PWM Average Reading
40047 32Bit (Big Endian) Read Only Channel 4 PWM Average Reading
40049
32Bit (Big Endian) Read Only Channel 5 PWM Average Reading
40051
32Bit (Big Endian)
Read Only
Channel 6 PWM Average Reading
40053 32Bit (Big Endian) Read Only Channel 7 PWM Average Reading
40055
32Bit (Big Endian) Read Only Channel 8 PWM Average Reading
40057
32Bit (Big Endian)
Read/Write
Channel 1 PWM Max Peek Reading
40059 32Bit (Big Endian) Read/Write Channel 2 PWM Max Peek Reading
40061
32Bit (Big Endian) Read/Write Channel 3 PWM Max Peek Reading
40063
32Bit (Big Endian)
Read/Write
Channel 4 PWM Max Peek Reading
40065 32Bit (Big Endian) Read/Write Channel 5 PWM Max Peek Reading
40067
32Bit (Big Endian) Read/Write Channel 6 PWM Max Peek Reading
40069
32Bit (Big Endian)
Read/Write
Channel 7 PWM Max Peek Reading
40071 32Bit (Big Endian) Read/Write Channel 8 PWM Max Peek Reading

40073
32Bit (Big Endian)
Read/Write
Channel 1 PWM Min Peek Reading
40075
32Bit (Big Endian)
Read/Write
Channel 2 PWM Min Peek Reading
40077
32Bit (Big Endian)
Read/Write
Channel 3 PWM Min Peek Reading
40079
32Bit (Big Endian)
Read/Write
Channel 4 PWM Min Peek Reading
40081
32Bit (Big Endian)
Read/Write
Channel 5 PWM Min Peek Reading
40083
32Bit (Big Endian)
Read/Write
Channel 6 PWM Min Peek Reading
40085
32Bit (Big Endian)
Read/Write
Channel 7 PWM Min Peek Reading
40087
32Bit (Big Endian)
Read/Write
Channel 8 PWM Min Peek Reading
To read one or more registers you should use Modbus function code 3 – Read holding registers (4x
Range)
To write one or more registers you should use Modbus function code 16 – Write multiple registers
Note :
PWM readings are 32bit unsigned integer values recording microsecond values for the pulse width,
with a accuracy of ±8uS or better
Channel Maximum/Minimum registers record the peek value, i.e. the highest/lowest values seen by
the system, each subsequent live reading is tested against this value with the register value being
updated if the live reading exceeds the threshold value stored here.
Writing a value to the Max/Min registers will set a new threshold value for testing against.
Only function codes 0x03 (FC03) and 0x10 (FC16) are accepted by the module

Modbus Registers – Configuration
Register
Type
Read/Wite
Description
40105 16bit (Big Endian) Read/Write Channel 1 Operating Mode
40106
16bit (Big Endian) Read/Write Channel 2 Operating Mode
40107
16bit (Big Endian)
Read/Write
Channel 3 Operating Mode
40108 16bit (Big Endian) Read/Write Channel 4 Operating Mode
40109
16bit (Big Endian) Read/Write Channel 5 Operating Mode
40110
16bit (Big Endian)
Read/Write
Channel 6 Operating Mode
40111 16bit (Big Endian) Read/Write Channel 7 Operating Mode
40112
16bit (Big Endian) Read/Write Channel 8 Operating Mode
40113
16bit (Big Endian)
Read Only
Channel 1 PWM Input Fault
40114 16bit (Big Endian) Read Only Channel 2 PWM Input Fault
40115
16bit (Big Endian) Read Only Channel 3 PWM Input Fault
40116
16bit (Big Endian)
Read Only
Channel 4 PWM Input Fault
40117 16bit (Big Endian) Read Only Channel 5 PWM Input Fault
40118
16bit (Big Endian) Read Only Channel 6 PWM Input Fault
40119
16bit (Big Endian)
Read Only
Channel 7 PWM Input Fault
40120 16bit (Big Endian) Read Only Channel 8 PWM Input Fault
40121
16bit (Big Endian) Read/Write Long/Short PWM Average
40122
16bit (Big Endian)
Read/Write
Pulse Count De-Bounce Setting
40123 16bit (Big Endian) Read/Write Modbus RTU Baud Rate
40124
16bit (Big Endian) Read/Write Configuration Register
40105-40112 Channel Mode
This is a per channel setting with the following options set as the register value as below, If a system
is set such that a PWM/Counter mixed mode is detected the system will not allow counter mode to
be initialised.
Register Value
Channel Setting
0 Static Level
1
Static Level
2 Pulse Counter
3
PWM Measurement
40113-40120 Channel PWM Input Health
If a PWM channel times out during pulse measurement 3 times in a row the system will mark the
channel as dead and skip it on subsequent channel reads. A system reset (either invoked via
Modbus configuration register) or a power cycle will clear these registers.
This prevents total Modbus lock out in the situation that multiple sensors lose power or are non-
responsive.

Register Value
Setting
0
Channel AOK
1 Channel PWM Input Faulty
40121 Channel PWM Long/Short average Setting
This value defines how many readings the PWM average is taken over. Default is 8
Register Value Setting
0
8 Readings
1 4 Readings
2 8 Readings
40122 Pulse Count De-bounce Setting
Pulse Counting de-bounce period, this value in milliseconds (ms) gives the minimum gap between
pulses before a new pulse is counted.
The default is 10mS, i.e. a new pulse must start at least 10mS after the first pulse was detected, this
prevents relay bounce or other spurious signals causing the counter to increment whilst still allowing
for <100Khz pulses to be counted.
Register Value
Setting
10
10ms de-bounce
20 20ms de-bounce
100
100ms de-bounce
x x ms de-bounce
40123 - Modbus Baud Rate
This sets the serial baud rate of the unit – Default setting is 19200
Register Value
Setting
0
19200
1
9600
2 14400
De-bounce value in ms

3
19200
4
38400
5 57600
40124 – Configuration Register
Writing 255 to this register will cause the system to save the current configuration and reboot the
unit, this is required if any of the parameters have changed e.g. baud rate or channel resolution.
Values between 880 and 888 will erase and zero out selective channels NVRAM storage for pulse
count totals or erase and zero out totals for all channels. Channel Offsets are not affected by this
operation.
Register Value
Setting
255 Save Current Configuration Settings to EEPROM
880
Zero Out Channel 1 Pulse Count Total
881 Zero Out Channel 2 Pulse Count Total
882
Zero Out Channel 3 Pulse Count Total
883 Zero Out Channel 4 Pulse Count Total
884
Zero Out Channel 5 Pulse Count Total
885
Zero Out Channel 6 Pulse Count Total
886 Zero Out Channel 7 Pulse Count Total
887
Zero Out Channel 8 Pulse Count Total
888 Zero Out Pulse Count Total For All Channels

Software Support
Open-Source code samples can be downloaded from the GitHub repositories below :
RTU-DI8 Configuration Tool
https://github.com/synapsertu/rtu-di8
Multi RTU module Logger
https://github.com/synapsertu/rtu-log
Modbus Utilities
The following windows and Linux command line utilities are useful for development
Windows/Linux x86 Binary
https://www.modbusdriver.com/modpoll.html
Raspberry Pi/Linux
https://github.com/epsilonrt/mbpoll
*Note that mbpoll does not use FC16 for Modbus writes
Table of contents
Other Synapse Control Unit manuals