Numato Lab’s 32 Channel Ethernet 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 the use of off-the-shelf Terminal Emulation programs such as Hyper Terminal and Tera Term 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.
- Home Automation
- Lighting Control
- Garden Equipment Control
- Industrial Automation
- Test Fixtures
- DIY and Hobby
- 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
- The password-protected Web console and Telnet communication interface
- LED indication for Power and individual relay status
- Relay: 32 onboard 12V/ 24V SPDT Relays with individual LEDs for status
- GPIO: 8 GPIOs, each can be configured as analog inputs
2.How to Use 32 Channel Ethernet Relay Module
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. 12V/ 24V, 1.5A DC Power supply
3. Medium size Philips screwdriver
The above image shows the basic connection diagram that can be used in most situations. The connection diagram is same for both AC and DC loads. Please make sure to use a freewheeling diode or snubber circuit if the load is inductive. More details about using inductive loads are 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 the 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.
The onboard USB Interface helps a Windows/Linux/computer to communicate and configure this module seamlessly. This module detects as COM port and the user can configure the module using any serial emulator program like hyper terminal, teraterm, etc. Use FTDI drivers for the USB COM port device.
Use a USB A to micro USB cable to connect to a PC. Please visit numato.com to buy cables and accessories for this product.
The 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.
All contacts on each relay are available externally on screw terminals for easy user access. The relays are rated for AC and DC supply voltages. Please see the electrical parameter table for more details. Each relay has three contacts(C, NO, and NC). C is the common terminal and is used in both normally open and normally closed positions. The contacts NC and C will be connected when the relay is turned off and will be disconnected when the relay is turned on. And vice versa, the contacts C and NO will be disconnected when the relay is turned off and will be connected when the relay is turned on. The table below summarizes possible relay contact positions.
|Relay State||Connection between NC and C||Connection between NO and C
2.6.DC Power Supply
This module can be powered in two ways.
1. Use a 12V/ 24V 1A DC power supply (based on the relay coil voltage) on DC jack(J1) on the Board for both logic circuit and relays. Configure the Jumper on K12, K11 in POWER SELECT to 1-2 for using this way. Relays and logic circuits are not isolated from each other in this configuration.
2. Use a 7-12V 1A DC power supply for the logic circuit on J1 and a separate 12V/ 24V 1.5A DC power supply (based on the relay coil voltage) for relays on P5. Configure the Jumper on K12, K11 in POWER SELECT to 2-3 for using this way.
With the first method, the board requires only one DC power supply to be fully functional. But the relay section will not be isolated from the logic section. With the second method, the board requires two power supplies but the relay section will be isolated from the logic section as long as the two power supplies are galvanically isolated. Most off the shelf 12V/ 24V DC power supply can be used for powering this Ethernet Relay Module. Make sure to connect the power supply with the correct polarity. Connect the positive terminal of the power supply to the +12/ +24 terminal on the module. Connect the negative terminal of the power supply to the GND terminal of the module. Connecting power supply incorrectly can cause damage to the module and/or other devices. Please refer to the marking on the board for more details.
Connecting power supply incorrectly can cause damage to the module and/or other devices.
This Jumper is used to reset the settings on-board to factory defaults. To execute the factory reset, please follow the steps below.
1. Power off the device.
2. Configure the FACT RESET Jumper to 2-3.
3. Power on the device.
4. Wait for 15-20 sec until the LED D2 on-board turns on.
5. Configure the FACT RESET Jumper back to 1-2.
6. Power off the board and back on.
Below steps are applicable only for hardware version 3( with USB Micro Connector) and firmware version 5
7. Connect the USB Cable.
8. Using any serial emulation software, connect to the COM Port and ENTER.
9. Login using the config user name and password as “admin” and send a “reboot” command.
10. LED D2 will turn off and you can see the Config details in the terminal.
Please use this feature only for recovering the User name / Password. This action will reset User Name, Password, Device ID and also other settings. After reset, the board can be accessed using the default User name and Password.
The factory default settings will be as below table.
|Config user name||admin|
|IP0 to IP9||255.255.255.255|
|MAC0 to MAC9||FF FF FF FF FF FF|
3.Configure 32 Channel Ethernet Relay
Connect a DC power supply and power up the device as mentioned DC Power Supply section above. A red LED (D1) will glow which indicates active power. For configuration over USB connect a USB Micro cable to the module also connect the module to a PC or a Switch/Router as mentioned in the Ethernet Interface section above. Run the hyper terminal program or any serial terminal program like Tera Term, putty, etc.
NB: By default, the module is configured with factory settings. For the login, to USB configuration settings users need to send s reboot command from telnet or do a factory reset.
Connect the Module COM port and use the default settings as similar to the below images.
Users will be prompted to enter the User name and Password. The default User name and Password is ‘admin‘. You may change the User name and Password once logged in.
If the user name and password are correct, we will be able to see the login successfully message.
3.1.Configuration Command Set
|1||usr||usr set xxxxxxxx||Sets the new username for telnet, where x can be any alphanumeric character. The username can be 1-8 characters long.|
|usr get||Read the current username of telnet. The default username is "admin".|
|2||pass||pass set||Sets the new password for telnet, where x can be any alphanumeric character. The password can be 1-8 characters long.|
|pass get||Read the current password of telnet. The default password is "admin".|
|3||config usr||config usr set xxxxxxxx||Sets the new username for configuration over USB, where x can be any alphanumeric character. The username can be 1-8 characters long.
|config usr get||Read the current username of configuration over USB. The default username is "admin".|
|4||config pass||config pass set xxxxxxxx||Sets the new password for configuration over USB, where x can be any alphanumeric character. The password can be 1-8 characters long.|
|config pass get||Read the current password for configuration over USB. The default password is "admin".|
|5||telnet||telnet auth on/off||Enable and disable the telnet authentication. telnet auth on enabling the telnet authentication and telnet off disabling the telnet authentication.
|telnet auth get||Read the status of telnet authentication.|
|telnet port set xx||Sets the telnet port, where xx can be in the range of 00 to 99. The default value of telnet port is 23.
|6||access||access ip on/off||Enable of disabling the IP based access to the module, this command adds filtering. Once the command is enabled, the stored IP using the access ip set command will be able to access the module. By default access IP is disabled.|
|access ip set N xxx.xxx.xxx.xxx||Set the acceptable IP in the network and save the same. Where N is the number 0-9, maximum 10 IP we can store in the non-volatile memory.
Eg: access ip set 0 192.168.0. 2
|access ip get||Read the stored IP in the memory.|
|access mac on/off||Enable of disabling the MAC-based access to the module, this command adds filtering. Once the command is enabled, the stored MAC using the access mac set command will be able to access the module. By default access MAC is disabled|
|access mac set N XX XX XX XX XX XX||Set the acceptable IP in the network and save the same. Where N is the number 0-9, maximum 10 MAC we can store in the non-volatile memory.
Eg: access mac set 0 D4 93 98 D2 4A 34
|access mac get||Reads the stored MAC in the memory.|
|7||dhcp||dhcp on/off||Enable and disable the DHCP of the module.|
|8||ip||ip set xxx.xxx.xxx.xxx||Sets the static IP to the module.
Eg: ip set 192.168.5.48
|ip get||Read the status of DHCP and the static IP. If DHCP is enabled it will display the DHCP status and if it is disabled it will display the static IP too|
|9||mac id get||mac id get||Read the mac id of the module.|
|10||reboot||reboot||Exit the configuration interface and enter to the application mode and start the telnet communication.|
4.Powering Up 32 Channel Ethernet Relay Module
Connect a DC power supply and power up the device as mentioned DC Power Supply section above. A red LED (D1) will glow which indicates active power. Connect the module to a PC or a Switch/Router as mentioned in the Ethernet Interface section above. Run Numato Lab Device Discoverer.jar, click on Discover Devices. The window will display the IP address, Host Name, MAC Address, and Other information.
IP Address and MAC Address can be 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.
5.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: Hyperterminal, Teraterm, PUTTY…).
5.1.Accessing the Module Using Web Interface
The easiest method for controlling the module is through a web page served from the device. To open the administration web page, type in the IP address into the address bar of any web browser and press enter.
You will be prompted to enter the user name and password. The default user name and password is ‘admin‘. You may change the user name and password once logged in.
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.
6.Relay Status and Control
There are 32 SPDT relays on the board that can be controlled over Ethernet. Click on the “Relay” link on the menu bar to access the 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 0,2,4 and 6 are in ON position and the rest of the relays are in off position. The status of the relay can be viewed on the home page as well.
7.GPIO Status and Control
This board has 8 general-purpose input/output’s each multiplexed with analog input. Click on the “GPIO” link on the menu bar to access the Relay configuration page. The GPIOs can be turned on/off by clicking on the ‘Toggle GPIO‘ button next to the corresponding GPIO.
Individual GPIO can be configured in three modes.
1. Digital Input(I/P)
2. Digital Output(O/P)
3. Analog Input
All 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 signals 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
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.
In the above image, the 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 the 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 hostname and IP Address can also be changed according to the user’s wish. After saving changes the board will reboot with the new network settings.
9.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 Hyper Terminal and Tera term.
To use this module with Hyper Terminal, please follow the steps below.
- Connect the module to the PC or LAN.
- Open Hyper Terminal and enter the IP address corresponding to the module, leave the port number as 23.
- Click OK.
- 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.
- Type in the TELNET user name and password when asked and press the Enter key.
- 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 to the “ver” command.
Using the relay module with Teraterm is just as easy. Please follow the steps below.
- Run Tera term and type in the IP address corresponding to the module in the “New connection” dialog and click OK.
- Then select the terminal setup from the setup button and make sure the settings are as shown below, and press OK.
- Type the user name and password when asked.
- 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 to the “ver” command.
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 the TELNET protocol. The following sections give details of the command set and how to use the command set.
10.1.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.
|1||ver||None||ver||Returns firmware Version|
|2||id||get/set xxxxxxxx||id get, id set 12345678||Reads/Sets id of the module|
|3||usr||get/set xxxxxxxx||usr get, usr set admin||Reads/Sets user name|
|4||pass||get/set xxxxxxxx||pass get, pass set admin||Reads/Sets password|
|relay on 0, relay off 0,|
relay read 0, relay readall,
relay writeall ff
|6||reset||None||reset||Reset relays to default state
(all relays turned off)
|7||adc||read, channel||adc read 0||Read Analog to Digital
|gpio set 0||Control General Purpose
|9||reboot||None||reboot||Exit from application mode and starts configuration mode|
The table below has more detailed information about available commands.
|1||ver||ver||Returns current firmware version.|
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.|
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.|
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.|
|5||relay||relay on x||Turns 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
This command accepts RELAY number from 0 – 9 and A – V, total 32 values. Eg: “relay on A” turns ON Relay 10, “relay on B” turns on Relay 11 and so on.
|relay off x||Turns 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
This command accepts RELAY number from 0 – 9 and A – V, total 32 values. Eg: “relay off A” turns OFF Relay 10, “relay off B” turns OFF Relay 11 and so on.
|relay read x||Returns 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. This command accepts RELAY number from 0 – 9 and A – V, total 32 values. Eg: “relay read A” reads status of relay 10, “relay read B” reads Relay 11 and so on.
|relay readall||Reads 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 00000000 (binary 0000 0000 0000 0000 0000 0000 0000 0000) means all relays are OFF. A value FFFFFFFF (binary 1111 1111 1111 1111 1111 1111 1111 1111) means all relays are ON.
relay readall – Returns status of all relays
|Control 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 ffffffff – Turns on all relays
|6||reset||reset||Resets all relays to off state which is the default state. GPIO's
are not by affected by the command.
|7||adc||adc read x||Reads 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
|8||gpio||gpio set x||Sets 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 2 – Sets GPIO 2 to high state
|gpio clear x||Sets 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 x||Reads 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
|9||reboot||reboot||Exit the application mode and enter to the configuration interface and start the configuration via USB.|
11.1.Analog to Digital Converter
32 Channel Ethernet Relay Module does 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 the “adc” command will set the GPIO to the analog mode and executing the “gpio” command will set the GPIO back to digital mode on the fly. The 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.
11.2.Using GPIO's with Switches
It is possible to read the position of a switch that is connected to a GPIO. An 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 the VDD voltage level. When the switch is pressed, the GPIO is short-circuited to the ground and stays at zero voltage. This change in voltage and thus the position of the switch can be read using the “gpio read” command. Please see the recommended connection diagram below.
11.3.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 the 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. 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 a proper rating is recommended for protecting the relay contacts when a motor is used as a 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.
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 affect 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
|Number of Relays||32|
|Number of GPIO's||8|
|Number of analog inputs (Multiplexed with GPIO's)||8|
|Digital circuit power supply voltage (external)||12/ 24 (based on relay coil voltage)||V|
|Maximum current drawn by digital circuitry||350||mA|
|Nominal relay coil voltage||12/ 24||V|
|Nominal coil power consumption (per relay)||360||mW|
|Relay contact material||Silver Alloy|
|Contact rating||1C: 7A 240VAC/|
|Maximum switching voltage||250VAC/ 30VDC|
|Maximum switching current||10||A|
|Maximum switching power||2770VA/ 240W|
|Contact resistance (initial)||100 Min at 6VDC|
|Life expectancy (Electrical)||100,000||Operations
|Life expectancy (Mechanical)||10,000,000||Operations
|Nominal insulation resistance||100 Min at 500VDC||MΩ
|Maximum switching on response time||10||mS|
|Maximum switching off response time||5||mS
|Maximum IO source current||IO0 – IO7||2mA|
|Maximum IO sink current||IO0 – IO7||2mA|
|GPIO input low voltage||0.15||V|
|GPIO input high voltage||3.3||V|
|GPIO output low voltage||0||V|
|GPIO output high voltage||3.3||V|
|Full scale range||0 – VDD||V|
|Recommended Impedance of Analog Voltage Source||2.5||KΩ|
13.Frequently Ask Questions (FAQ)
Q. What is the connector marked as ICSP on this module?
A. This connector is used to program the onboard 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@example.com 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.