The Home automation market is well served with standard control equipment for standard systems. But what if your requirement is not standard or you need additional functionality. Often it is a case of adding timers, relays and assorted components which can lead to a system which is unreliable and difficult to service.

Using VIOM Versatile Input Output Module for Home Control

Roy Schofield

Using VIOM Versatile Input Output Module 
for Home Control
by Roy Schofield

The Home automation market is well served with standard control equipment for standard systems. But what if your requirement is not standard or you need additional functionality. Often it is a case of adding timers, relays and assorted components which can lead to a system which is unreliable and difficult to service.

The VIOM () controller can provide a single board solution giving a flexible and reliable solution. In addition, because VIOM is easily programmable in situ, the system becomes both adaptable and expandable.

VIOM is a low cost general purpose controller. It has 16 digital inputs which can be interfaced to switches, relays and most of the common solid state outputs. It has 16 open collector outputs which can be directly connected to a companion relay module. In addition there are 8 internal timer / counters. The outputs are controlled by combinations of the inputs, timer / counters or via an RS232 port. Once set to be active the outputs can be assigned to stay on until deactivated, stay on for a fixed period or cycle on and off.

The input / output logic is controlled by a series of simple but comprehensive commands. These can be typed in using a HyperTerminal or similar program. Alternatively they can be written as a text file and then downloaded again using HyperTerminal or the Simple Download application which is available from

The following simple project will illustrate how VIOM can be used in a Home Automation environment. The goal is to design a controller which will provide the illusion of an occupied home. For this we will want to control the lighting and drapes in a natural manner of a normal household. That is we do not want all the lights in the house to come on at the same time and the drapes to open and close simultaneously.

We will assume that we have a light sensor which provides a digital output when the outside light level falls to semi-darkness and we will have a switch which will provide an occupied / unoccupied input. The interface to the lighting and drapes is more difficult as there are numerous variations and so we will just provide a logic signal at this stage.

We will connect the light sensor to input 1 and the occupancy sensor to input 2. to keep things simple we will have two light zones and two sets of drapes. This can obviously be extended later. The outputs will be:

  • Output 1: Lighting zone 1
  • Output 2: Lighting zone 2
  • Output 3: Drapes close set 1
  • Output 4: Drapes open set 1
  • Output 5: Drapes close set 2
  • Output 6: Drapes open set 2

Before we start on the project itself a word about the syntax of the VIOM commands. VIOM has over 100 commands but this project will only need to use a small number. A typical command will look something like:


This will be interpreted as "Write to Output 1 parameter C with the value 10". There are a whole range of parameters but these will be explained as we go along. More details of the VIOM command set can be downloaded from .

One of the advantages of VIOM is that we can start with a simple set of instructions and then build on them until we get to the finish article. So to start the project let us turn Lighting zone 1 on when the Light Sensor indicates darkness.

Zone 1 lighting

The default set up for VIOM sets output 1 to be controlled by input 1, so that part of the set up is already done for us. However the defaults will set the output on and off at 1 second periods. We want the output to come on for say 3 hours (180 minutes) and then go off. Thus will need 3 commands:

WO1C180 WO1D4 WO1E0

Parameter C is the on time and can be anywhere between 1 and 255. Parameter D is the units to be used and can be set from 10mS to Days. Finally parameter E is the off period and if it is set to zero it will prevent the output from cycling.

So in simple terms when the light sensor indicates darkness the light comes on for 3 hours. Of course when the light sensor goes back to indicating daylight the light will go out if it hasn't already done so. But this is all right because it can go dark in daytime due to storms or heavy rain.

Now we need to include the occupancy switch. This is done with a single command:


This command adds input 2 to the list of inputs controlling output 1. Finally we need to tell the VIOM the inputs need to ANDed or Ored. In our case we need the AND function because we only want the lights to come on if the light sensor says darkness AND the switch says unoccupied:


Now the lights on zone 1 will only be turned on when it is dark and the controller is switched to automatic. So now we have set up zone 1 lighting and we have used only 5 commands.

Zone 2 lighting

Zone 2 lighting will be similar to zone 1 lighting. However let say that these lights need to come on 2 hours after darkness and off one and a half hours later. Setting the on time periods and input logic would be:

WO2C90 WO2D4 WO2E0 WO2L1 WO2J0

Obviously we are now addressing output 2 so the "WO1" part of the command is replaced by "WO2". The default for controlling output 2 is input 2 so we need to add input 1 to the list of inputs controlling output 2.

To add our 2 hour delay before operating the lights needs two more commands.

WO2A120 WO2B4

Parameters A and B are the recognition period and units. That is the period before the output becomes active. In this case 120 minutes.

Closing the drapes

Essentially the drapes closing will be similar to zone 2 lighting but with different values for the parameters. We will close drapes set 1 with a 2 second pulse 20 minutes after darkness:

WO3A20 WO3B4 WO3C20 WO3D1 WO3E0 WO3L1 WO3L2 WO3J0

We will need 1 more command line to remove the default condition for output 3 (which would be controlled from input 3):


Drapes set 2 close 1 hour after darkness again with a 2 second pulse:

WO4A60 WO4B4 WO4C20 WO4D1 WO4E0 WO4L1 WO4L2 WO4J0 WO4M4

Opening the drapes

It's morning. We need to open the drapes but we do not want to open both at the same time. therefore we will open set 2 1 hour after the light sensor tells us it is light and open set 1 5 minutes later. The code will now be familiar:

WO5A61 WO5B4 WO5C20 WO5D1 WO5E0 WO5L1 WO5L2 WO5J0 WO5M4

Our logic needs to change here. When we closed the drapes we used the logic that says the light sensor says darkness AND the switch says unoccupied. Now we need to say the light sensor says NOT darkness AND the switch says unoccupied. This command will tell VIOM to invert or NOT the light sensor input:


To finalise the project, set 2 drape close code would be:

WO6A60 WO6B4 WO6C20 WO6D1 WO6E0 WO6L1 WO6L2 WO6J0 WO6M4 WO6P1


This has been a relatively simple project to show only a fraction of the capabilities of VIOM. We have used only 2 inputs and 6 outputs. We have not used any of the timers / counters and we have not used any of the serial port control functions. We could expand the functionality to cycle other lights to give a more realistic approximation of occupancy. A security sensor input could be use to trigger lighting, again to give the impression of occupancy.

Comments (0)

This post does not have any comments. Be the first to leave a comment below.

Post A Comment

You must be logged in before you can post a comment. Login now.

Featured Product

Platinum Tools - ezEX-RJ45 Termination & Test Kit

Platinum Tools - ezEX-RJ45 Termination & Test Kit

The new EXOtm Crimp Frame and ezEX-RJ45® Connectors provide the solution for terminating larger diameter Cat6/6A twisted-pair cables. Made in USA. • Conductor sizes up to .048", • Die sets for EZ-RJ45 & ezEX-RJ45 connectors • Feed-through EZ-RJ45 design verifies EIA568A/B wiring • One-step to crimp and flush cut/trim EZ-RJ45 conductor