Ethernet I/O

The objectives of this project are:

  • To learn about Ethernet IO modules and explore their potential for use in smart home automation.
  • To add control of lighting and security systems in our home.

The key issues to resolve are the electrical interfaces to the module itself and the relationship the module has with the rest of our home automation system. Because we have already added plenty of USB input capability to our Home Control System (HCS), the focus of this project is on digital outputs only.

Hardware Selection

Ethernet I/O modules are described in detail in the home automation Ethernet IO section, where we have also looked at various suppliers.

For this project we have chosen to use the Phaedrus Netiom. It was our first choice for this project because it uses a 12V power supply and has 16 digital outputs as well as 16 digital inputs. It also has 4 analogue inputs. It is also from a UK manufacturer/supplier and is well priced. There are a few design considerations resulting from this hardware choice:

  • The Netiom can use DHCP or a static IP address. It is pretty much essential that we use the latter, to ensure it is always reachable from other Home Control System (HCS) processes.
  • The Netiom can be pinged to check if it is powered and on the network. This would be useful if it is remotely located but we plan to install it in our 19" rack cabinet.
  • We like the fact that all ports are exposed via screw terminals and 10-way headers. The latter also provide power for external interface boards.
  • The inputs are scanned with a timebase of 100mS, meaning that the input signal must be present for 200mS in order to guarantee the Netiom seeing it. For the uses we have planned, this is not going to be a problem.
  • The device uses very little power in normal operation (measured at 28mA).

Operating Modes & Programming

The Netiom has two modes of operation, controlled by a programming link on the circuit board. The normal mode of operation is 'active mode', in which it responds and interacts via the Ethernet interface. The link allows it to be put in 'programming mode', which effectively disables the Ethernet interface and allows it to be programmed via the on-board serial port.

Demo web interface
Netiom web interface
By default it ships with DHCP enabled and a gateway of 192.168.0.1. We had to change this to a fixed IP address of in the range 192.168.1.xxx. Once this was done, it is simply a matter of accessing the test web interface using a web browser. This allows you to toggle the outputs and to check values on the inputs.

Analogue Inputs

The Netiom also has four analogue inputs that can be used to measure voltages between 0 and 5V, with a resolution of 10 bits. These are measured against an on-board 5V voltage reference that has an accuracy of 5%.

We will use one of these inputs to measure the voltage on our 12V UPS batteries. Because these could be in excess of 15V dc, we are using a voltage divider with 1800Ω and 5600Ω resistors. This should provide a reasonably accurate view of the battery voltage. A direct, dedicated feed wire runs from the battery bank, to ensure there is minimal voltage drop between the battery bank and this circuit in the 19" rack cabinet.

Digital Outputs

The output pins need to be interfaced to a suitable output driver circuit.

Because it is simpler and quicker we have simply used one of the Netiom Relay Expansion Modules on the first output port, which connects directly to the NETIOM using a supplied 10-way ribbon cable. It has 8 single pole change over relays each rated at 1A at 24Vdc or 110Vac. This is ideal for switching low current 12V devices and we plan to use it for:

  • D1 - Alarm Armed
  • D2 - Alarm Internal
  • D3 - Alarm External
  • D4 - Alarm Strobe
  • D5 - Safety lighting
  • D6 - Emergency lighting
  • D7 - Kitchen Worktop Lights
  • D8 - Garden Lights

Automotive multi-way fuse holder
Each bank of 8 outputs go via a fuse box to protect the main feed to this shelf. The first four output listed above are switching regulated 12V dc but, the lights are powered directly from the battery bank.

Integration

Ethernet IO modules expose a number of interfaces to simplify integration. The most easily accessible and generic is to control and monitor it via the on-board web server. Simple HTTP requests can be used to query the inputs and set the outputs. Whilst this is an easy interface to use, it has some inherent issues. The main ones being the timeouts involved if the Ethernet IO device was unreachable and the fact that polling the device will produce delays and excessive network traffic. The initial plan is to write a Java application to handle communications with the Ethernet IO module and to configure the module to notify this application of state changes. The module supports SNMP and this may be the best way to achieve this.

Setting the outputs on the module is easily achieved via a simple HTTP request and since this is not likely to happen very often, the application can handle requests via a socket and start a new thread to make the HTTP request.

Keeping our Home Control System (HCS) event driven is a key part of our design methodology. It looks like this will be easily achieved using this module as it supports the sending of UDP status changes to an IP address and port that can be configured via the web server interface.

Using the HTTP interface, sending the command http://192.168.1.26/commands.cgi?A01 will turn on output 1. Sending the command http://192.168.1.26/commands.cgi?B01 will turn off output 1. This interface makes the Netiom extremely easy to control.

To improve security, the web interface can also be password protected.

Status

This project is fully up and running. We have installed this board in it's own 19" rack shelf.

Conclusions

  • This approach isn't as cheap as the equivalent USB IO board but, it provides some more flexibility to site it remotely if need be.
  • This board has been running for over three years as part of our Home Control System (HCS) and it has proved to be 100% reliable. It is an ideal way to control relatively low current (at 12V dc) devices with a relay board.

Updates

March 2012

We are now also using this board to monitor the voltage across our 12V UPS. The raw battery feed is fed to this shelf in our 19" rack cabinet and is fed into a 5K ohm potentiometer, which acts as a voltage divider. We configured it up so that with 16V in the board input sees 4V. The input is also protected by a 4.3V Zener diode to ensure the input voltage never exceeds 5V (there is a 0.7V potential across the diode).

Further Reading

Share ...
We are on ...
Facebook Twitter
YouTube Flickr Follow us on Pinterest