Ethernet Solid State Relay Modules

4 Channel Ethernet Solid State Relay Module

631 views February 18, 2016 admin 0

Introduction

4 Channel Ethernet SS Relay Module

Numato Lab’s 4 Channel Ethernet Solid State Relay Module is a versatile product for controlling electrical and electronic devices remotely from a PC over Ethernet link. Ease of use and wider operating system compatibility are the primary goals behind this product’s design. This simplicity allows use of off-the-shelf Terminal Emulation programs such as HyperTerminal and TeraTerm for controlling the module with a simple set of human readable commands through Telnet/Web page. For power users, this module can be controlled by writing programs in various programming languages.

Applications

  • Home Automation
  • Lighting Control
  • Garden Equipment Control
  • Industrial Automation
  • Test Fixtures
  • DIY and Hobby

Board Features

  • Microcontroller: Microchip PIC18F97J60(1-Mbit Flash Microcontroller with 10Mbps Ethernet communication peripheral)
  • Memory: Microchip 25LC1024 serial EEPROM provides 1024 Kbits of storage for both web pages and nonvolatile configuration options
  • MAC Address: Separate Serial EEPROM(24AA02E48) with Globally Unique value used as MAC Address
  • Reset Jumper: To reset the firmware of board to factory defaults
  • Password protected Web console and Telnet communication interface
  • LED indication for Power and individual relay status
  • Relay: 4 Solid State Relays with individual LEDs for status
  • GPIO: 10 GPIOs, each can be configured as analog inputs

How to use the module

The following section describes how to use this module.

Components/Tools required

Along with the module, you may need the items in the list below for easy and fast installation.

  1. CAT 5e Ethernet Cable(Straight through cable)
  2. 7-12V 1A DC power supply
  3. Medium size Philips screw driver

Connection Details

warningIMPORTANT Please exercise utmost caution while working with electrical mains or other high voltages. Failure to comply with safety regulations may result in injury and or death. Solid State Relays are rated for either AC or DC load, not both at the same time. Trying to connect incorrect load/power type can cause permanent failure to this product or any attached devices and could cause other losses or injuries.
Connection Diagram

Connection Diagram

Above image shows basic connection diagram that can be used in most of the situations. The connection diagram showed above is for AC load. Please make sure to use a freewheeling diode or snubber circuit if the load is inductive. More details about using inductive loads is available elsewhere in this document. Use a Straight Through Ethernet cable for communication when connecting the board to a switch or router. A Crossover Ethernet Cable may be required in some situations if connecting directly to a PC/Laptop port.

It is important to make sure that the wires used to connect loads are sufficiently rated to handle expected load current. Exercise caution while working with high voltages. Short circuits can cause damage to the module and the PC. The following sections identify individual connections in detail.

Ethernet Interface

Ethernet InterfaceThe on-board Ethernet port supports Ethernet 10 Mbps transmission speed that helps a computer to communicate and control this module easily. There are two basic network configurations for this board/can be used in two ways.

  1. Direct connection to Local Area Network(LAN) via common straight through Ethernet cable.
    Eg: Connecting the module to a switch in a network.
  2. Direct connection to a PC through a cross over Ethernet cable.
    Eg: Connecting the module directly to the PC. Some PC/Laptops can detect and adapt to the cable type. In such situations, a straight through cable also can be used.

Relay Contacts

This module has four Solid State Relay that can switch up to 3A current. All contacts on each relay is available Relay Contactsexternally on screw terminals for easy user access. The relays are rated for either AC or DC switching supply voltages. Please see the electrical parameter table for more details. Each relay has two contacts(IN/- and OUT/ +). For AC Relay the contact will be established between IN and OUT contacts when the relay is turned on and will be disconnected when relay is turned off. For DC relay connect + to OUT and to IN. Table below summarizes possible relay contact positions.

Relay StateConnection between IN/- and OUT/+
OFFOpen
ON Close

DC Power Supply

DC Power SupplyThis board can be operate with a single DC power supply. Use a 7-12V 1A DC power supply on DC jack(J1/Vin) on the Board for both logic circuit and relays.

Connecting power supply incorrectly can cause damage to the module and/or other devices.

Factory Reset

This Jumper is used to reset the settings on board to factory defaults. To execute factory reset, please follow the steps below.

  1. Power off the device.
  2. Configure the Jumper on GS2 to 2-3.
  3. Power on the device.
  4. Wait for 10-15 sec until the LED D1 on board Blinks.
  5. Configure the Jumper on GS2 back to 1-2.
  6. Power off the board and back on

Please use this feature only for recovering the User name / Password. This action will reset User name, Password, Device ID and also other settings as well. After reset, the board can be accessed using the default User name and Password as shown in table below

The factory default settings will be as below table.

User nameadmin
Passwordadmin
ID00000000
Host NameETHSSR4
IP AddressDHCP Enabled

Powering Up 4 Channel Ethernet Solid State Relay module

Connect a DC power supply and power up the device as mentioned DC Power Supply section above. A red LED (D2) will glow which indicates active power. Connect the module to a PC or a Switch/Router as mentioned in Ethernet Interface section above. Run Numato Lab Device Discoverer.jar, click on Discover Devices. The window will displays the IP address, Host Name, MAC Address and Other information.

Numato Lab Device Discoverer

IP Address and MAC Address can seen in command prompt also, open the command prompt and type the command ‘arp -a‘. This will display the available network interfaces and connected devices along with the MAC address and IP address of each device. Look for the IP address that corresponds to your device’s MAC address. The MAC address for each Relay Module is printed on a label on the board for your convenience. Use the IP address obtained in order to access the device.

command prompt

Accessing the module

The module can be controlled by using one of the two interfaces below.

  1. Through HTML/Web Page served from the device.
  2. Through a Serial terminal Emulator that supports TELNET (Eg: Hyper terminal, Teraterm, PUTTY…)

Accessing the module using web interface

The easiest method for controlling the module is through web page served from the device. To open the administration web page, type in the IP address in to the address bar of any web browser and press enter.

Accessing the module using web interface

You will prompted to enter User name and Password. The default User name and Password is ‘admin‘. You may change the User name and Password once logged in.

Accessing the module using web interface1

Enter the default User name and Password then click OK.

You will be presented with the device home page that shows the status of Relays and GPIOs.

Relay Status and Control

There are 4 solid state relays on the board that can be controlled over Ethernet. Click on the RELAY link on the menu bar to access Relay configuration page. The Relay Index shows the corresponding relay on board. Relays on the board can be turned on/off by clicking the Toggle Relay button next to the corresponding relay index. The Status of the relays change automatically for easy identification.

In the above image, we can see that Relay 1,3 are in ON position and rest of the relays are in off position. The status of the relay can be viewed on the home page as well.

GPIO Status and Control

This board has 10 general purpose input/output’s each multiplexed with analog input. Click on the GPIO/ADC link on the menu bar to access Relay configuration page. The GPIOs can be turned on/off by clicking on the Toggle GPIO button next to the corresponding GPIO.

GPIO Status and Contro

Individual GPIO can be configured in three modes.

  1. Digital Input(I/P)
  2. Digital Output(O/P)
  3. Analog Input

Digital Input(I/P)

To configure a GPIO as Digital Input, click on corresponding GPIO’s Change Config button. Select Digital I/P radio and click the Submit button.

GPIO Configuration

Digital Output(O/P)

To configure a GPIO as Digital Output, click on corresponding GPIO’s Change Config button. Select Digital O/P radio and click the Submit button.

GPIO Configuration1

Analog Input (I/P)

To configure a GPIO as Analog Input, click on corresponding GPIO’s Change Config button. Select Analog I/P radio and click the Submit button.

GPIO Configuration2

Individual GPIOs on the board can be turned on/off by clicking the Toggle GPIO button next to the corresponding index. The status change will be displayed on the page immediately for feedback.

GPIO pinsAll GPIO pins can be used as Analog to Digital Converter inputs as well. The ADC input range is 0 to +3.3V. The ADC can acquire analog signal at the resolution of 10 bits per sample. It is recommended to use a series resistor with the GPIO/ADC pins when interfacing with other circuits. In output mode, GPIOs can source up to 2mA(Refer Technical Specifications for more details).

The table below summarizes the GPIO and Analog to Digital Converter input positions on the header.

GPIOADC
IO0 ADC0
IO1ADC1
IO2ADC2
IO3ADC3
IO4ADC4
IO5ADC5
IO6ADC6
IO7ADC7
IO8 ADC8
IO9ADC9
3V33V3
GNDGND

Device Settings

Device Settings page displays the current firmware version, Device ID, Account Settings and Basic Network Settings. A logged in user can change and save the Device ID, User name, Password and network settings.

device Setting

In the above image, firmware version is displayed as 00000008, default device ID 00000000, default User name and Password as ‘admin’. The user can change and save the Device ID, User name and Password as explained in command set (Page No.19) or changing the appropriate field on this page and clicking on the save button on right side. The User name and Password can be reset to factory defaults via Factory Reset explained elsewhere in this document. The Basic Network Settings Shows the Device MAC address, Host Name and IP Address. The default host name and IP Address can also be changed according to the user wish. After saving changes the board will reboot with the new network settings.

Controlling the module through TELNET interface

The simple set of ASCII based human readable command set supported by this module makes controlling relays easy via TELNET protocol very easy. The following sections give examples of how to use the module with HyperTerminal and TeraTerm.

To use this module with HyperTerminal, please follow the steps below.

  • Connect the module to the PC or LAN.
  • Open HyperTerminal and enter the IP address corresponding to the module, leave the port number as 23.
  • Click OK.
    EthernetSSR - HyperTerminal
  • If everything goes well, you should be presented with a screen as below.
  • Select the properties button and do as same as shown below, then press OK.
    EthernetSSR - HyperTerminal1
  • Type in the TELNET User name and Password when asked and press enter key.EthernetSSR - HyperTerminal2
  • Press ENTER key again and the command prompt should appear. Commands listed in the table below (please see section “Sending Commands”)can be entered here now. For example, here is the response for “ver” command.EthernetSSR - HyperTerminal3Using the relay module with TeraTerm is just as easy. Please follow the steps below.

impTeraTerm is an open source software. A free copy can be downloaded from http://en.sourceforge.jp/projects/ttssh2/releases/

  • Run TeraTerm and type in the IP address corresponding to the module in the “New connection” dialog and click OK.Teraterm - (disconnected) VT
  • Then select the terminal setup from the setup button and make sure the settings are as shown below, and press OK.Teraterm Terminal Setup
  • Type the User name and Password when asked.Teraterm - VT
  • Press ENTER key and the command prompt should appear. Commands listed in the table below (please see section “Sending Commands”) can be entered here now. For example, here is the response for “ver” command.Teraterm VT

 

Sending Commands

One of the most powerful features of this module is the simple easy to use command set it supports. This command set allows for a very simple interface to access the features of the module through TELNET protocol. The following sections give details of the command set and how to use the command set.

The command set

This product supports a very simple command set that is designed to be less cryptic and easy to use manually (using terminal emulation programs that support TELNET) or through a program written in one of the many supported languages

List of currently supported commands.

No.Command
ParametersExample Description
1verNoneverReturns firmware Version
2idget/set xxxxxxxxId get, id set 12345678Reads/Sets id of the module
3usr get/set xxxxxxxx usr get, usr set admin Reads/Sets User name
4pass get/set xxxxxxxx pass get, pass set admin Reads/Sets Password
5relayon/off/read, relay number readall/writeallrelay on 0,relay off 0, relay read 0, relay readall, relay writeall 03Relay control
6reset None resetReset relays to default state (all relays turned off)
7adc read, channel adc read 0Read Analog to Digital Converter input
8gpioset/clear/read, gpio numbergpio set 0Control General Purpose Input/Output

The table below has more detailed information about available commands

No. Command Example Description
1ver ver Returns current firmware version.
2idid get
id set xxxxxxxx
Id get reads the module ID. Id set will assign a new ID to the module. “x” stands for alphanumeric characters including symbols. The new ID must be exactly 8 characters in length.
3usr
usr get
usr set xxxxxxxx
usr get reads the default User name. usr set will assign a new usr name to the module. “x” stands for alphanumeric characters including symbols. The new User name can be 1 – 8 characters length.
4passpass get
pass set xxxxxxxx
pass get reads the default Password. pass set will assign a new Password to the module. “x” stands for alphanumeric characters including symbols. The new Password can be 1 – 8 characters length.
5relayrelay on xTurns a particular relay on. The parameter “x“ stands for the relay number. The relay number starts from zero. See some examples below.
relay on 0 – Turns on relay 0
relay on 1 – Turns on relay 1
relay off xTurns a particular relay off. The parameter “x“ stands for the relay number. The relay number starts from zero. See some examples below.
relay off 0 – Turns off relay 0
relay off 1 – Turns off relay 1
relay read xReturns the status of a particular relay. The parameter “x” stands for the relay number. The relay number starts from zero. See some examples below.
relay read 0 – Returns status of relay 0
relay read 1 – Returns status of relay 1

The data returned in response to this command will be either “on” or “off” depending on the current status of the relay
relay readallReads the status of all relays in a single operation. The return value will a hexadecimal number with binary value 1 at bit positions for relays in ON state and 0 for relays in OFF state.
Eg: a return value 00 (binary 0000 0000) means all relays are OFF. A value FF (binary 1111 1111) means all relays are ON
relay readall – Returns status of all relays
relay writeall xxControl all relays in a single operation. A hexadecimal value must be specified with desired bit positions set to 0 or 1. A value 0 at a bit position will turn off the corresponding relay. A value 1 at a bit position will turn on the corresponding relay.

relay writeall ff – Turns on all relays
6resetresetResets all relays to off state which is the default state. GPIOs are not by affected by the command.
7adc adc read xReads the analog voltage present at the ADC input mentioned. “x” stands for the number of ADC input. The response will be a number that ranges from 0 – 1023. Please see examples below.
adc read 0 – Reads analog input 0
adc read 2 – Reads analog input 2
8gpio
gpio set xSets the GPIO output status to high. Here “x” is the number of the GPIO. Please see examples below.
gpio set 0 – Sets GPIO 0 to high state
gpio set A – Sets GPIO 10 to high state
gpio clear xSets the GPIO output status to low. Here “x” is the number of the GPIO. Please see examples below.
gpio clear 0 – Sets GPIO 0 to low state
gpio clear 2 – Sets GPIO 2 to low state
gpio read xReads the digital status present at the input mentioned. Here “x” stands for the number of GPIO. The response will be either “on” or “off” depending on the current digital state of the GPIO. Please see examples below.
gpio read 0 – Reads GPIO 0 status
gpio read 2 – Reads GPIO 2 status

Additional Information

Analog to Digital Converter

Some products do support Analog to Digital Conversion on some of the IO terminals. A list of GPIO’s that supports analog function in this product is listed elsewhere in this document. There is no special command is required to execute to switch between analog and digital mode. Executing “adc” command will set the GPIO to analog mode and executing “gpio” command will set the GPIO back to digital mode on the fly. Resolution of the ADC is 10 bits unless otherwise noted. The input voltage range of the ADC is 0 – VDD (this product uses 3.3V power supply, so the range will be 0 – 3.3V). The result will be returned as a number starting at zero and ending at 1023. Zero indicates zero volts at the ADC input and 1023 indicates VDD (3.3V for this product) at ADC input.

Using GPIO's with switches

GPIOs with switchesIt is possible to read the position of a switch that is connected to a GPIO. A SPST or SPDT switch is recommended to use with GPIO’s. Push switches do maintain the contacts closed only for a very short time so using them is discouraged. The fundamental idea of using a switch with GPIO is to have the switch cause a voltage level change at the GPIO pin when pressed. Usually this is achieved by using an external pull-up resistor along with the switch. The pull up resistor is connected between the GPIO and VDD and the switch is connected between the GPIO and ground. When the switch is not pressed, the pull-up resistor will cause the GPIO to stay at VDD voltage level. When the switch is pressed, the GPIO is short circuited to ground and stays at zero voltage. This change in voltage and thus the position of the switch can be read using “gpio read” command. Please see the recommended connection diagram below.

Using relay modules with inductive loads

It is important to take additional care when using relays with inductive loads. An inductive load is pretty much anything that has a coil and works based on magnetic principles like Motors, Solenoids and transformers. Inductive loads produce back emf when the magnitude of the load current changes. The back emf can be in the order of tens or even hundreds of voltage (See this Wikipedia article http://en.wikipedia.org/wiki/Counter-electromotive_force). This effect is most severe when power is disconnected from inductive load because the rate of change of current is maximum at that point. Even though the back emf lives only for a very short time (a few milliseconds) it can cause sparks between the relay contacts and can deteriorate the contact quality over time and reduce the life span for the relays considerably.

So it is important to take countermeasures to suppress the back emf to acceptable levels to protect relay contacts. relay module connection details Usually this requires connecting electronic devices in parallel with the load such that they absorb the high voltage components generated by the load. For solenoids, connecting a diode (fast switching diode is recommended) in parallel to the load (in reverse direction to the load current) is very effective. A diode used for this purpose is usually called a freewheeling diode. Please see the diagram on the right for connection details.

 

A capacitor with proper rating is recommended for protecting the relay contacts when a motor is used as load. The capacitor should be rated enough to withstand the back emf that is generated by the motor. Please see the diagram below for connection details.relay module capacitor

Please note that the relay modules are NOT shipped with back emf suppression devices pre-installed. The exact kind of suppression device and the parameters of the selected device can vary depending on the load itself. Some of the parameters that affects the suppression device selection are the inductance of the load, power supply voltage, load current, physical size/structure of the load etc.. It is obvious that it is impossible for us to predict these parameters and design required back emf suppression device and incorporate that on the board. So we believe this is a task best left to the module user. There is an excellent article on designing back emf suppression on Wikipedia at http://en.wikipedia.org/wiki/Flyback_diode

Technical Specifications

Parameter *Value
Unit
Basic Specifications
Number of relays8
Number of GPIOs 10
Number of analog inputs (Multiplexed with GPIOs)10
Digital circuit power supply voltage (External)7-12V
Maximum current drawn by digital circuitry 500mA
IO Specifications
Maximum IO source currentIO0 – IO9 2mA
Maximum IO sink currentIO0 – IO9 2mA
GPIO input low voltage 0.15V
GPIO input high voltage 3.3V
GPIO output low voltage 0 V
GPIO output high voltage 3.3 V
ADC Specifications
Resolution 10bits
Full scale range0 – VDDV
Reference voltage VDDV
Recommended Impedance of Analog Voltage Source2.5KΩ
Relay Specifications
Input signal voltage rating7-12V
Input current rating5 – 12 mA
Operating frequency 47 – 70 Hz
Operating temperature-30 – 100 °C
Storage Temperature-30 – 125°C
Maximum switching voltage 250VAC/ 100VDC#V
Maximum switching current 3 A
Isolation Resistance10 GΩ
Isolation voltage input to output
4000 Vrms
Maximum switching on response time 8.3 /5 (AC/DC)#mS
Maximum switching off response time
8.3 /2 (AC/DC)#mS

* All parameters considered nominal. Numato Systems Pvt Ltd reserve the right to modify products without notice.
http://www.cosmo-ic.com/object/products/KSD203AC2.pdf
http://www.cosmo-ic.com/object/products/KSD203DC2.pdf
# AC and DC models available. Product does not support both AC and DC at the same time.

FAQ

Q. What is the connector marked as ICSP on this module?
A. This connector is used to program the on-board microcontroller. This connector is primarily intended for factory use.

Q. I need a customized version of this product, can Numato do the customization for me?
A. Yes, we can definitely do customization but there may be minimum order requirements depending on the level of customization required. Please write to [email protected] for a quote.

Q. Where can I buy this product?
A. All Numato products can be ordered directly from our web store http://www.numato.com. We accept major credit cards and Paypal and ship to almost all countries with a few exceptions. We do have distributors in many countries where you can place your order. Please find the current list of distributors at http://numato.com/distrib.

Physical Dimensions

Physical Dimensions

Suggest Edit