Devantech dS378 User manual

dS378
dS378 User Manual v2.19
Table of Contents
Do umentation history....................................................................................................3
A qui k look...................................................................................................................4
Introdu tion..................................................................................................................5
Getting started...............................................................................................................6
Configuring the dS378....................................................................................................8
Status page...............................................................................................................9
Network page...........................................................................................................10
TCP/IP page.............................................................................................................11
Webpage se urity.....................................................................................................12
Naming relays..........................................................................................................14
Relay automation.....................................................................................................15
Naming I/O's...........................................................................................................16
Email notifi ations....................................................................................................17
Peer to Peer.............................................................................................................18
S hedules................................................................................................................19
Counter/Timers........................................................................................................21
The appli ation page.....................................................................................................24
Appli ation page se urity...........................................................................................25
A essing your webpage from the internet...................................................................26
Boolean equations........................................................................................................27
TCP/IP ommand sets...................................................................................................29
ASCII ommand set..................................................................................................29
Binary ommand set.................................................................................................31
AES binary ommand set...........................................................................................33
Modbus ommands...................................................................................................35
Fun tion 01 (0x01) Read Coils................................................................................35
Fun tion 04 (0x04) Read Input Registers.................................................................35
Fun tion 05 (0x05) Write Single Coil.......................................................................35
Error ode 1.........................................................................................................36
Error ode 2.........................................................................................................36
Error ode 3.........................................................................................................36
Loading the appli ation firmware....................................................................................37
dS378 hardware...........................................................................................................39
LED indi ation..........................................................................................................40
Power supply...........................................................................................................40
Operating temperature..............................................................................................40
Power relays............................................................................................................41
Analogue/Digital flexible I/O's....................................................................................42
Conne tion examples................................................................................................42
Serial port onne tions..............................................................................................44
dS378 dimensions........................................................................................................45
Notes..........................................................................................................................46
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 2
www.pishrobot.com

dS378
dS378 User Manual v2.19
Documentation history
V2.18 First release of separate dS378 manual
V2.19 Added new features:
Peer to Peer Use events to ontrol relays on another dSxxxx module.
S hedules Create regular timed events
Counters Count input transitions or se onds
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 3
www.pishrobot.com

dS378
dS378 User Manual v2.19
A quick look
Ethernet onne ted module, 10/100Mb auto negotiated.
Relays – 8 x 16Amp 250Va C/O.
I/O – 7 x flexible I/O's NPN output, Volt free input or 10-bit analogue input.
Power – 12VDC 1Amp supply required. 2.1mm enter positive.
Conne tions – S rew Terminals for N/O N/C and Common onta ts
PCB size – 156mm x 84mm
Controlled graphi ally by se ure webpage or optionally one of ASCII, Binary or Modbus
ommand sets over TCP/IP.
Email notifi ations – 8 sele table notifi ations, up to 100 emails/hour max.
Peer to Peer – Control relays on other modules.
S hedules – Able to s hedule events based on time of day/week
Counter/Timers – Count or time events. 20 ounts/se ond Max.
Also available when optionally programming in dS ript are two TTL level serial ports and an
RS485 serial port.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 4
www.pishrobot.com

dS378
dS378 User Manual v2.19
Introduction
The dS378 is an Ethernet onne ted relay module featuring 8 hannels of 16Amp 250Va
relays. Ea h relay has both normally open (NO) and normally losed (NC) as well as the
ommon available on three terminals.
In addition to the relays, the dS378 has 7 flexible I/O hannels whi h may be individually
onfigured to be:
1. NPN transistor output.
2. A tive low input with pull-up (allows dire t onne tion of volt free onta ts).
3. A tive low input without pull ups (easy to onne t logi level inputs).
4. Analogue inputs (0v-3.3v input range).
The dS378 requires a 12v 1Amp power supply su h as this one:
http://www.robot-ele troni s. o.uk/universal-12vd .html
The dS378 has four built in ontrol methods.
Primary ontrol method is graphi ally by using its built in se ure website.
Se ondary ontrol may be one of:
ASCII - type in ommands via a program su h as PuTTY.
Binary - Command set using binary odes
Modbus – Fun tions 1, 4 and 5 supported
And if you should wish to modify the supplied firmware – you an.
Behind the s enes there is dS ript, a powerful multi-threaded operating system and
programming language. The supplied firmware is written in dS ript as well as HTML, CSS and
Javas ript on the webpages and the full sour e is in the separately down-loadable dS ript
pa kage.
You do not need to use dS ript at all, but its great to know its there - just in ase you do.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 5
www.pishrobot.com

dS378
dS378 User Manual v2.19
Getting started
Start by plugging in the Ethernet able to onne t the module to your network, and the 12v
ja k plug from your adapter. Swit h on and the first thing you will note is that the blue LED will
flash 3 times. This indi ates that the ontrol firmware is loaded on the module. (If the blue led
does not flash you will need to load in the control firmware. Don't worry, this is very easy to
do. Just go to the chapter on installing the firmware and follow the instructions there).
If you are using a Win7/8/10 PC, open your browser and into the address bar (not the sear h
bar) type:
http://dS378/index.htm
You should now see the appli ation webpage and you an ontrol relays and I/O's.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 6
www.pishrobot.com

dS378
dS378 User Manual v2.19
If you are not using a windows PC then you will need to find the IP address of the module. If
you have a DHCP server on your network (your router is normally the DHCP server) then the
dS378 will get its IP address from that. Log on to your router and navigate to the LAN lient
list.
Above is the entry from our ASUS RT-N66U router. So now you type:
192.168.0.90/index.htm
into your browser address bar and you should see the appli ation webpage shown on the
previous page.
If you prefer, you an download a java program that will run on Windows, MAC or Linux, and
will list all of our modules that are onne ted to your LAN. Devante hModuleFinder.jar
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 7
www.pishrobot.com

dS378
dS378 User Manual v2.19
If you do not have a DHCP server the dS378 will use a default IP address of 192.168.0.123 so
make sure your PC is on the same subnet of 255.255.255.0 and its IP address is
192.168.0.xxx
Configuring the dS378
There are a set of onfiguration pages to get the dS378 operating as you want it. These pages
are all _ onfigx.htm, (that's a leading unders ore hara ter).
ie.
_ onfig.htm
_ onfig2.htm
Anything that starts with _ onfig is onsidered a spe ial name for onfiguration pages and an
only be seen if you have the the USB able plugged in and onne ted to your PC.
Why only if the USB able is plugged in?
Its an additional se urity measure. After you have onfigured and deployed the module, you
really don't want these onfiguration pages available for others to hange. So with the USB
able dis onne ted the _ onfig pages are not available. If you try to a ess them you just get
served a “not authorised” page instead.
So for now, you do want to look over the onfig pages. If you have a Win10, Linux or MAC PC,
you an go right ahead and plug in the USB able. These ma hines will install their own USB
drivers. We won't be sending anything to the board, its just the presen e of the USB
onne tion that enables the onfig pages to be served. If you have a Win7 or Win8 PC you will
need to install the drivers. (go to the chapter on installing the firmware and follow the
instructions there).
With the USB able onne ted, browse to:
192.168.0.90/_ onfig.htm
(substituting your IP address)
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 8
www.pishrobot.com

dS378
dS378 User Manual v2.19
Status page
You should now see the following page:
This status page shows you the system and appli ation firmware revisions as well as the
supplied voltage to the board and its internal temperature.
If you hover your mouse ursor over the menu buttons on the left, the help panel will give you
an overview of ea h one.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 9
www.pishrobot.com

dS378
dS378 User Manual v2.19
Net ork page
Noti e that everything below the Host Name is greyed out and an't be hanged. This is
be ause the “Enable DHCP” box is he ked and all the greyed out fields are supplied by the
DHCP server. Although a qui k way to get you onne ted, we really do not re ommend this as
the DHCP server an assign a different IP ea h time you power up. If you want to ontrol this
module from the internet while you are away from the premises then you will be setting up
port forwarding on your router whi h requires a fixed IP address.
So lets do that first.
Un he k the DHCP box and you an then set all the other fields. Noti e that the Red “Update
Pending” light omes on. It indi ates there are hanges whi h have not yet been written to the
flash memory. It will go off again 5 se onds after you stop hanging anything.
Choose an IP address for the module, something outside of the DHCP settings on your router
so it will not assign anything to that address.
The subnet mask, Gateway and DNS an all be left as the defaults.
Network hanges only take effe t after the next re-boot, so wait until the “Update Pending”
light goes out and give the reset button on the module a qui k press. The Green Led will light
and the Blue led will flash 3 times. You will now find the module at your new IP address. If the
Red led omes on after you press the reset button, its be ause you pressed it for too long (and
entered bootloader mode). Just have another go with the reset button for a bit less time.
Your browser won't know you have hanged the IP address so it will still be showing the old,
now dead page. Make sure you hange to your new IP address and load the page again.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 10
www.pishrobot.com

dS378
dS378 User Manual v2.19
TCP/IP page
The TCP/IP tab allows you to sele t one of three ommand sets to ontrol the module. These
are independent of, and separate to the HTML webpage ontrol.
Cli king on one of the four he k boxes will sele t that ommand set. Only one ommand set
may be sele ted. You an disable all TCP/IP ommand sets by li king on an already sele ted
box.
The ASCII ommand set is text based. You an use any program that an send text over
TCP/IP. We use PuTTY in raw mode. The Binary ommand set operates in a similar way to our
ETHxxx range of boards (but uses different ommands), by sending binary ommands to the
module. AES Binary adds en ryption. Note the AES key MUST be 32 bytes long. We have a test
appli ations written in C# and Java to demonstrate AES en ryption. The Modbus ommand set
implements fun tions 1, 4 and 5.
When sele ting the Modbus ommand set, make sure you sele t port 502 whi h is the offi ial
port number for Modbus over TCP/IP.
A full des ription of the ommands is in the “Command Sets” se tion later in this manual.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 11
www.pishrobot.com

dS378
dS378 User Manual v2.19
Webpage security
Allows you to prevent unauthorised personnel from a essing the appli ation webpage or using
it to ontrol the module.
Leaving the Se urity Password blank will disable it and allow everyone to a ess the appli ation
page to ontrol the module.
To enable password prote tion enter a password into the Password box. You an use any
hara ters from the ASCII hara ter set from 0x20 to 0x7E ex ept “ (0x22). It may be up to
200 hara ters long and you don't have to memorise it, so make it a long one with plenty of
upper ase, lower ase, numbers and symbols.
A essing a spe ial webpage, _pw.htm, will install the password on your browser. To do this
make sure the Enable _pw.htm box is he ked.
When the “Update Pending” light goes out, re-boot the module and go to
yourIP/_pw.htm
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 12
www.pishrobot.com

dS378
dS378 User Manual v2.19
You will see something like this:
The password is now loaded on your browser. Do the same for any further browsers you want
to enable. When you have done un he k the “Enable _pw.htm” box to prevent anyone else
from loading the password. When the “Update Pending” light goes out re-boot the module
again.
The default port used by html webpages is 80. You an hange this if required. If you do so
then you will need to in lude the port number in the address.
If you hange the port to 2345 then the webpage will be at:
YourIP:2345/index.htm
For example:
192.168.0.123:2345/index.htm
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 13
www.pishrobot.com

dS378
dS378 User Manual v2.19
Naming relays
The next tab allows you to set the names of the 8 relays that will be displayed on the
appli ation page.
Names may be up to 20 hara ters long, but keep them shorter if you want to use a phone as
the ontroller. Here we have renamed relay 4 as “YardLights” and those 10 hara ters are
about the limit on a verti al Galaxy S6 s reen.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 14
www.pishrobot.com

dS378
dS378 User Manual v2.19
Relay automation
The box to the right of the relay name box is used to give a little automation to the relay.
Leave this blank (or zero) for normal operation, that is just toggling the relay on/off from the
button on the appli ation page.
If you pla e a number in this box then that is the pulse time for the relay in mS (1000mS = 1
se ond). The minimum value is 100mS. The maximum is 2147483647 (more than 24 days).
When the relay is toggled on timing begins and at the end of the time period the relay goes off
again. If the button is pressed again during timing then the timing is restarted.
The above example will turn off the yard lights after 30 minutes. 1800000 mS is 1800 se onds.
1800 se onds is 30 minutes.
It also possible to insert a boolean equation into the automation box. Boolean equations are
just simple equations that evaluate to a 0 or 1.
For example Relay 1 is referred to a R1. I/O1 is referred to as D1 (Digital 1). Analogue input 1
is referred to as A1.
Here's a very simple example:
Enter R1 into the Relay 2 automation box. This will make relay 2 opy whatever you do to
Relay 1. Try it!
Now hange it to !R1.
The ex lamation mark is read as “Not R1”. Now relay 2 will always be the opposite of relay 1.
Try it.
Boolean equations are used for ontrolling relays and also to trigger email notifi ations.
See the “Boolean equation” se tion later in this manual for full do umentation.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 15
www.pishrobot.com

dS378
dS378 User Manual v2.19
Naming I/O's
The I/O Names tab is used to assign meaningful names to the I/O terminals.
As with relay names these may be up to 20 hara ters long, but do he k it looks ok on a
mobile devi e or whatever you are using to ontrol the module.
The I/O types box allows you to sele t the type of I/O you want.
The two digital modes are the same ex ept for “Digital No-Pullup” the passive pullup resistor is
turned off and for “Digital With Pullup” it is turned on. The no-pullup option is useful for
onne ting to digital ir uits (3.3v or 5v) that supply the input voltage. The with pullup option
turns on a weak pull up to 12v (a tually nearer 7-8v be ause of the input design). This is
useful for dire tly onne ting volt free onta ts su h as relay onta ts or swit hes. They are
onne ted between the pin (P) and ground (0v).
To use as inputs, make sure the output drive is off or the NPN transistor will drive the output
low. The NPN transistor an sink about 100mA.
The analogue mode onverts the input voltage to a digital number in the range 0-1023 (10-bit
onversion). The input voltage range is 0-3.3v.
When you have hanged I/O types wait for the “Update Pending” light to go out and press the
reset button, as new I/O modes are set on power-up.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 16
www.pishrobot.com

dS378
dS378 User Manual v2.19
Email notifications
The final onfiguration tab is the Email tab for sending se ure, AES en rypted email
notifi ations from the module.
Up to eight (8) email notifi ations may be set up, sele ted by the eight radio buttons.
Setting up emails is qui k and easy. You just need the re ipients email address, a notifi ation
message whi h will be the email subje t line and the trigger event.
The trigger event uses the same boolean equation solver as the relay automation. So if you
want to trigger an email when digital input 1 (I/O1) be omes a tive, just enter D1.
The email message is automati ally filled in with useful information on the state of the relays,
I/O's et .
Boolean equations are used for ontrolling relays as well as triggering email notifi ations.
See the “Boolean equation” se tion later in this manual for full do umentation.
Note - Email notifi ations are limited to 100/hour.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 17
www.pishrobot.com

dS378
dS378 User Manual v2.19
Peer to Peer
This tab allows you to onfigure events on this module to ontrol relays on another.
Up to eight (8) Peer to Peer events may be set up, sele ted by the eight radio buttons.
Control of the target relay is by using the binary ommand set only. This an optionally use
AES en ryption. The Target module must be set to either Binary or AES Binary mode on its
TCP/IP tab, and this “Use AES” he kbox set to mat h.
The input box sele ts the event that will be used to ontrol the target relay. This an be as
simple as an input, or a omplex Boolean equation. See the “Boolean equation” se tion later in
this manual for full do umentation.
Target IP, Port & Relay No should be set to lo ate the target relay.
Target a tion determines how the relay will be ontrolled.
0 – No a tion, this Peer to Peer event is disabled.
1 – Follow Me, the relay will follow the input, (or the Boolean result of any equation here).
2 – Set Relay, the relay will be set by this event. You will need another P2P event to reset it.
3 – Reset Relay, the relay will be reset by this event. You will need another P2P event to set it.
4 – Toggle Relay, this will toggle the relay ea h time the event is triggered.
100+ - Pulse relay, Pulse times are in mS. (1000mS=1Se ond).
5-99 will have no a tion.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 18
www.pishrobot.com

dS378
dS378 User Manual v2.19
Schedules
The s heduler an s hedule regular events. These an be on e or twi e daily with the two start
and stop times and an happen on any sele ted weekdays.
The S hedule No. is one of eight s hedules that an be set up. These are sele ted with the
eight radio buttons at the bottom of the s reen.
The target relay is the lo al relay that you want this s hedule to ontrol.
W/Days sele ts the days of the week you want this s hedule to ontrol the relay. When
highlighted in red, the weekday is a tive.
There are two sets of Start and Stop times for ea h of the eight s hedules. The relay is set
when the start time transitions from ina tive to a tive, ie. at the start time, and reset when
the stop time is rea hed. It is not held on or off. It an be hanged by other events in luding
the webpage buttons.
The urrent time originates from an internet time server. It is read only and annot be
hanged. Therefore you must have an internet onne tion for the s heduler to operate
orre tly.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 19
www.pishrobot.com

dS378
dS378 User Manual v2.19
The timezone allows you to set the time for your lo ation.
For example;
GMT leave this at 0.
CET set this to 1.
PST set this to -8
IST set this to 5:30
Daylight saving time may be he ked if required. It advan es the time by 1 hour between the
last Sunday in Mar h and the last Sunday in O tober.
As well as ontrolling a relay dire tly, s hedules may also be used in the boolean equation
fields of other ontrols. A relay ould be ontrolled by pla ing S1 (for s hedule 1) in its
automation field.
Copyright © 2016-2017, Devante h Ltd.
All rights reserved. www.robot-ele troni s. o.uk 20
www.pishrobot.com
Table of contents
Other Devantech Relay manuals

Devantech
Devantech tcp184 User manual

Devantech
Devantech ESP32LR88 User manual

Devantech
Devantech dS3484 User manual

Devantech
Devantech ESP32LR20 User manual

Devantech
Devantech ESP32SR88 User manual

Devantech
Devantech dS2824 User manual

Devantech
Devantech dS2832 User manual

Devantech
Devantech ETH8020 Guide

Devantech
Devantech dS2824 User manual

Devantech
Devantech ESP32LR42 User manual