ETH-RLY02
- 2 relay outputs at 16A
Technical Documentation
Overview
The ETH-RLY02 provides two volt free contact relay outputs with a current
rating of up to 16Amp each. The module is power from a 12vdc supply which can be
regulated or unregulated. The DC input jack
is 2.1mm with positive core polarity, DC supplies are required to supply at
least 500mA at 12vdc. The relays are SPCO (Single Pole Change Over) types. The normally
open, normally closed and common pins are all available on the screw terminals.
Operating Temperature
-40C to +70C
LED indication
The ETH-RLY02 provides a red LED mounted immediately next to each relay to
indicate whether it is in a powered state (LED on), there is also two LED's
mounted in the Ethernet connector which will flash with Ethernet traffic. Finally there is
a red power LED alongside the screw terminals.
Relay power rating
If the contact load voltage and current of the relay are in the region enclosed
by the solid and dotted lines in the figure
below, the relay can perform stable switching operation. If the relay is used at
a voltage or current exceeding this region,
the life of the contacts may be significantly shortened.
load type | Typical applications | Rating | Max DC load capacity |
AC1 | Non inductive or slightly inductive loads |
16A @ 250V AC | |
AC15 | Control of electromagnetic load (>72VA) |
3A @ 120V AC 1.5A @ 240V AC |
|
AC3 | Control of motor | 750W | |
DC1 | Non inductive or slightly inductive loads |
16A @ 24V DC | |
DC13 | Control of electromagnetic loads |
0.22A @ 120V DC 0.1A @ 250V DC |
A full datasheet for the relays used on the ETH-RLY02 is here: RM85 datasheet
First Test
Having plugged in your 12vdc power supply and Ethernet connection, start up your
web browser and type http://ethrly02 into the address bar, please note
this only works in windows. You will be prompted for a password as shown below:
The default login is: Username: admin Password: password The ability to change these settings is shown in the configuration section |
You should now see the following web page:
This web page will allow you to switch the relays on and off by clicking the relay buttons (the red/gray circles). It also contains a link to this technical documentation page.
TCP/IP Commands
The ETH-RLY02 can also be controlled using a simple command set sent over TCP/IP
on port 17494 (0x4456). This is the default port, it can be
changed in the configuration settings.
Most commands are only a single byte and if applicable the ETH-RLY02 will automatically
send its response. The only exception to this being the "Set relay
states" command which requires an additional desired states byte to be
sent immediately after the command byte.
Command |
Action |
|
dec | hex | |
90 | 5A | Get software version - returns a single byte, the software version number |
91 | 5B |
Get relay states - sends a single byte back to the controller, bit high meaning the corresponding relay is powered |
92 | 5C | Set relay states - the next single byte will set all relays states, All on = 255 (11111111) All off = 0 |
93 | 5D | Get DC input voltage - returns relay supply voltage as byte, 125 being 12.5V DC |
100 | 64 | All relays on |
101 | 65 | Turn relay 1 on |
102 | 66 | Turn relay 2 on |
110 | 6E | All relays off |
111 | 6F | Turn relay 1 off |
112 | 70 | Turn relay 2 off |
119 | 77 | Get MAC Address. Returns the unique 6 byte MAC address of the module. |
IP addresses & DHCP Servers
The easiest way to use the ETH-RLY02 is to connect it to a network with a DHCP
server. In this case the ETH-RLY02 will have its IP address assigned
automatically by the DHCP server. This is the recommended way to use the ETH-RLY02.
If there is no DHCP server on the network, then a fixed IP address of 192.168.0.200 is used. To control the ETH-RLY02 using this fixed IP address your computer MUST be on the same subnet. Set your computers IP address to 192.168.0.1 (we will never supply a module with that address). Set the default gateway and DNS server to the same IP address. The subnet mask should be set to 255.255.0.0.
This image is for a PC running Windows XP. That gets you to the dialog box shown left. |
Configuration
Now it's possible to configure the ETH-RLY02 IP address and subnet mask
together with the ability to set a password for entry to control screens. All
settings are saved to memory so be careful to remember the username and
password! Default password settings are shown in the picture below.
Test program and example source code
To get the ETH-RLY02 up and running in the minimum amount of
time we have put together an example program to demonstrate the functionality of
the module. We provide the full source code for this program. You may
examine this code to see how it works or use it as a starting point for your own
application.
Visual studio express C# examples
The test program is available as Visual C# express ready built installation files
here, or as Visual C# express project
with source files here.
Visual studio express is provided free from Microsoft: http://www.microsoft.com/exPress/download/
Access from the Internet
The ETH-RLY02 can be controlled over the internet almost as easily as on
your local network. Your network will most likely be connected to the internet
with a broadband router. This will provide NAT (Network Address Translation) and
Firewall services. To access the ETH-RLY02 from the internet you will need to
open up port 17494 (0x4456) to allow incoming TCP
connections. Be careful not to open up any other ports. There are a wide variety
of routers and we cannot give details for all of them. If in doubt ask you
system administrator for assistance. The following shows how to open up a port
on a Netgear DG834 router.
After logging on to your routers setup page, the first thing to do is create a new service. Click on the "Services" menu then "Add Custom Service". Enter a name for the service, select TCP and enter the ETH-RLY02's port address for both the start and finish ports. Click "Apply".
Now go to the "Firewall Rules" menu and click "Add" in the Inbound services section. Select the ETH-RLY02 service and ALLOW always. The "Send to LAN Server" IP address is the ETH-RLY02's IP address, 192.168.0.15 in the example above but check what it is on your network. Click "Apply" and that's it. The ETH-RLY02 is now accessible over the internet. Before you close the routers setup pages, go to the "Router Status" menu and make a note of its ADSL port IP address. This is the routers internet facing IP address.
To test this you will need a computer that has its own internet connection and is NOT connected to the same network as the ETH-RLY02. Download and run the test program above and select Custom IP. In the pop-up box enter your routers internet facing IP address. Click on "Try IP" and it will connect you to the ETH-RLY02 just as if it were on your own network.
Board dimensions