3. System Design
The HCS/SS provides you with an
incredible amount of flexibility in how you set up your system. We recommend you take some
time to consciously design your overall system rather than randomly run wires and make
connections. Take a few moments to think about how you want your system to operate.
- Will simple X-10 power-line control meet all your control needs, or
will you need to run some wire?
X-10 signals travel over existing power lines, so additional wire
isnt necessary. While the X-10 system is perfect for turning lights on and off, it
can be somewhat unreliable and slow for other types of communication such as sending
sensor status back to the SC.
If you want to run wire for motion detectors,
magnetic switches, temperature sensors, and so forth, where are those sensors going to be
located?
Its always a good rule of thumb to run twice as much wire as
you think youll need. Eight-conductor (four twisted pair) cable is a good choice if
youre pulling wire anyway. You may also be able to run a group of sensors back to a
single DIO-Link or ADIO-Link, requiring just one twisted pair to be run back to the SC.
For example, if you have three bedrooms grouped at one end of the house, you could run all
the sensors from those three rooms back to a single DIO-Link located centrally to the
rooms.
- How fast a response do you need to a sensor input?
Responses to sensors connected directly to the SC are almost
instantaneous when controlling an output connected directly to the SC. Inputs and outputs
traveling across the network slow the response down a bit. For example, in a typical
setup, sending an X-10 command in response to an input on the SC may take half a second,
but turning on an output on a DIO-Link in response to an input connected to a DIO-Link may
take up to two or three seconds.
Sensors that require an immediate response should have wires run
back to the SC for direct (or local) connection. An example of such a sensor might be a
motion sensor at the top of a stairway. How useful is a light that doesnt come on
until youre halfway down the stairs? On the other hand, a 1- or 2-second delay
wont make any difference if youre sounding a chime in response to a car in the
driveway.
Locating the Supervisory Controller
The SC should be placed in a central location close to an AC outlet
(ideally near the fuse box or breaker panel). Easy access to a telephone line may also be
necessary for future COMM-Link modules.
Many people prefer to mount a sheet of plywood on the wall in the
basement or garage where the SC is to be installed. The SC may be mounted on the wood at
chest level to make working on it easier. Additional expansion boards that are to be
located nearby (such as a PL-Link) may also be mounted right on the wood. Buffer boards
and connector strips are easy to mount and make running wires from place to place clean
and easy.
Alternatively, you might mount the SC and any buffers and connectors
inside a standard metal alarm-type box with a door on it. The SpectraSense 2000 already
comes packaged in such an enclosure.
Dont forget youll need to connect a PC to the SC for
programming, so there should be either a PC nearby, a portable PC (such as a laptop)
available, or a serial cable run from the SC to your PC. Keep in mind that if you run
cable for an RS-232 connection, the cable should be less than 50 feet long and kept away
from noise sources like blower motors, oil burner transformers, and power lines in
general.
Power Supplies
The original HCS180 and ADIO-Link require +5 V while the newer
HCS2-DX and the other COMM-Link modules all accept any DC voltage between 9 and 18 V. A
single power supply may be used to power the whole system, or separate power supplies for
each COMM-Link may be used. If youre using a BUF-Term parallel buffer board with
your SC, you may run a 918-V power supply into it and it will provide regulated 5 V
for the SC, allowing the use of a single 12-V (or similar) power supply for the whole
setup. The SpectraSense comes with its own power supply.
If you elect to use a single power supply for the system, you might
run the power in the same cable as the main network to make powering network modules easy.
In such a setup, youd have to run at least four-conductor (two twisted pair) cable
to each node location. Be sure to allow about 200 mA at 12 V for the SC and BUF-Term
combination, plus an additional 200 mA for each COMM-Link module on the network.
For an example setup consisting of an SC, BUF-Term, and three
COMM-Links, your power supply should be capable of supplying at least 800 mA at 12 V. In
such a case, it would be prudent to make sure the supply is good for at least 1 or 1.5 A
to allow for future expansion.
The memory on the SC is battery backed, so in the event of a power
failure, your XPRESS program wont be lost. When power is restored, the SC will
continue to execute your XPRESS program as if power had never been lost. Be aware,
however, that other devices in the house that arent battery backed (such as X-10
modules) may need to be manually reset after a power outage.
Setting Up the Network
In a very basic HCS/SS setup where only an SC is used with direct
inputs and outputs, a network isnt necessary because there arent any network
modules to connect.
In an only slightly more complicated system where the only network
module is a PL-Link, all thats really necessary is a six-inch piece of cable to
connect the PL-Link to the SC. No additional cable needs to be run and the wiring to the
PL-Link can be virtually anything.
In systems where the network extends beyond six inches, some care
must be taken when selecting and running the cable to ensure error-free operation of the
network.
Selecting Cable
The most important factor in selecting a cable is to be sure it
contains twisted pairs. Most common 4-conductor telephone cable runs the wires in parallel
and is not suitable for use in this system. The minimum cable must contain two twisted
wires (a single twisted pair). The wires may be solid or stranded, and are typically 22
gauge down to 26 gauge. If you are running power to the modules, then cable with two
twisted pairs (four wires) is necessary. If youre installing new cable anyway, we
recommend you run cable containing at least four twisted pairs (eight wires) to account
for expansion. The emerging CEBus home automation standard also calls for Category 5,
four-twisted-pair cable, so youll be ready for future CEBus devices as well.
Running Cable
The network topology is left up to you to decide. A single cable run
may be made throughout the house, where the cable starts at the SC, then goes from one
room to the next. This configuration is the easiest to run and requires the least amount
of cable. A problem with this approach is the possibility that a wire in the cable could
break somewhere in the middle of the run, cutting off all devices downstream of the break
from the rest of the system.
The alternative we recommend is to run separate cables from the SC
to each room in the house. Some larger rooms may require multiple cable runs. While this
approach takes more time in the beginning and requires more cable, it offers a good deal
more flexibility, and troubleshooting is easier when you can isolate individual rooms. As
above, the CEBus specification calls for separate cable runs from a central location to
each room, so youre once again preparing for the future in more ways than one.
You may also find it easier to connect sensors directly to the SC if
you run separate cables to each room. For example, if you run four-twisted-pair cable to
each room, you can use two of the pairs to carry the network and power to, say, a DIO-Link
that has window and door sensors tied to it, and the other two pairs to carry contact
closures from a pair of motion detectors back to the SC for direct connection.
When installing the network cabling, be sure the cable is at least
six inches away from any AC power cable. Never install network cable in the same
conduit as AC power-line cable. If the network cable must cross the path of an AC cable,
be sure the two paths cross at right angles.
Analog and Digital I/O
The digital I/O ports on the HCS180, HCS2-DX, LCD-Link, DIO-Link,
and ADIO-Link are low-current, TTL-compatible ports. In almost all installations,
additional buffers and drivers are necessary when making connections to these ports. Under
no circumstances should the ports be used (when configured as outputs) to drive lamps,
relays, bells, or other devices directly. Sensors may be connected directly to the ports
when used as inputs, but extreme care must be taken to ensure the voltage on the inputs
doesnt drop below 0 V or go above 5 V.
To protect your HCS II hardware, we strongly advise the use of our
BUF-Term parallel buffer board. Each input buffer on the board withstands voltages from
30 V up to +30 V and each output driver handles 500 mA at 50 V (with 20% duty cycle)
or 175 mA at 50 V (with 100% duty cycle). The digital inputs and outputs on the
SpectraSense already use such buffers and drivers.
Similar precautions must be taken when dealing with the analog I/O
on the SC and ADIO-Link. The analog inputs must be constrained to a range of 05 V,
while the outputs must be buffered before they can be used to drive any device. Because
the requirements of an analog interface usually differ for every installation, we
currently dont have any off-the-shelf analog buffer boards. Be sure to contact
Circuit Cellar technical support if youre at all unsure about how to make analog
connections in your application.
Damage to boards caused by unbuffered inputs or outputs is not
covered under warranty!
Refer to the individual hardware manuals for the SC, BUF-Term, and
COMM-Links for details on connector pinouts and interface limitations. Appendix B lists
the ports on each of the boards; whether they are assigned to be inputs, outputs, or both;
and how they are referenced from within an XPRESS program.
Signal Polarity
In the XPRESS language, an unbuffered digital input or output at 0 V
is considered OFF while an input or output at 5 V is considered ON. Buffers and interface
circuitry may ultimately invert inputs or outputs so the ON and OFF labels end up
reversed. For example, a simple transistor driver on an output driving a light may work by
turning the light on when the output goes to 0 V and off when the output goes to 5 V. In
such a case, the XPRESS statement "Output(x) = ON" actually turns the light off.
Similarly, a normally open contact closure might have one contact
connected to ground while the other contact is connected to a system input with a pull-up
resistor. When the sensor is inactive (or open), the input reads ON. When the sensor
closes and grounds the input, the input goes OFF.
You must take all such polarity reversals into account when writing
your program. To make a program easier to read, you might use the following definitions:
DEFINE OnN = ON ! Normal "on" state
DEFINE OffN = OFF ! Normal "off" state
DEFINE OnI = OFF ! Inverted "on" state
DEFINE OffI = ON ! Inverted "off" state
For all inputs and outputs that use normal (or noninverted) states,
you would use the "OnN" and "OffN" pair in your program. For inputs
and outputs that get inverted by buffers, use the "OnI" and "OffI"
pair.
Response Time
Response time to inputs (analog and digital) depends a great deal on
whether the input goes over the network and, if so, how complicated the network is.
Sensors that need immediate attention should be connected to the SC. Response time to such
inputs can be almost instantaneous. When inputs must go over the network, response times
range from about half a second for a simple network to several seconds for a more
complicated network.
Analog and digital output response time behaves similarly. Outputs
connected to the SC change immediately in response to a XPRESS statement evaluating true,
while outputs connected to the network require from half a second to several seconds to be
changed depending on network complexity.
X-10 Power-Line Communications
The X-10 system communicates without additional wiring by sending
messages through the homes power lines. The world of AC power was never designed for
data and is a harsh, difficult environment in which to send packets of information. While
the vast majority of X-10 installations work flawlessly, any number of factors in the home
can combine to make such communication unreliable in some cases.
Signal Bridiging
If you find you can control some X-10 modules reliably, but
cant reach others, youre probably having trouble communicating between 110-V
legs.
Power enters the house through three wires: two "hot"
wires and one neutral wire. The voltage between the two hot wires is 220 V, while the
voltage between either hot wire and the neutral wire is 110 V. Appliances such as electric
stoves and clothes dryers that use 220 V are connected to both hot wires. The rest of the
house is usually wired so half the outlets are connected to one hot wire and the other
half are connected to the second hot wire.
X-10 transmissions that originate on one hot wire (or
"leg") usually must exit the house, go all the way to the pole on the street,
then back to the house to get to the other leg. Most of the time the data packet
wont survive such a trip and is lost. The electric stove and clothes dryer mentioned
above can often provide a shortcut between legs so the packet can get across, but the
shorcut is only there when the appliance is on.
Leviton Manufacturing makes a signal bridge module which can be
installed in the fuse box or breaker panel, that provides a continuous path for packets to
travel from one leg to the other. Contact Circuit Cellar for information on how to obtain
this module. We recommend only a qualified electrician install this device.
Multiple Transmitters
If you find that commands sometimes dont get through when
youre using an X-10 manual control unit, your commands may be colliding with those
being sent by the HCS/SS. When a group of people are talking and two speak at the same
time, understanding what either said is usually impossible. Similarly, when the HCS/SS is
transmitting and you try to transmit at the same time, both messages are usually lost.
Unfortunately there isnt much that can be done (short of you
never using a manual X-10 controller). In most installations, the HCS/SS is seldom
transmitting, so the chances of a collision are low. If you leave X-10 refresh turned on
(see the Refresh command in Chapter 7), your chances of a collision are much greater. In
general, if you leave refresh off when youre home, and only turn it on when
youre away, collisions shouldnt be a problem.
Initial Start Up
When all the HCS/SS hardware is in place,
connect the RS-232 cable from the SC to COM1 or COM2 of the host PC. Type the following
program into a file using a text editor (as described in Section 4.1) and save it as
EVENTS.HCS. Modify the Config statements to reflect the proper number of each kind of
COMM-Link module you have connected (e.g., if you dont have an LCD-Link in your
system, change the "1" to a "0" in the LCD-Link configuration
statement).
CONFIG SC = HCS180 ! or SpectraSense
CONFIG PL-Link = 1
CONFIG IR-Link = 1
CONFIG LCD-Link = 1
CONFIG DIO-Link = 1
CONFIG ADIO-Link = 1
Display Modules = A,B,C
BEGIN
IF Reset THEN
Refresh = 0
END
Compile the above program using COMPILE as described in
Section 4.1.
Run the HOST program as described in Section 4.2 and press the
"F" key followed by "L" to load your XPRESS program. If HOST responds
with a "sad" tone and a message indicating a timeout, press "F" and
"L" again. If the program still wont load, double check the serial
connection between the SC and the PC. When the program transfer completes with a
"happy" tone, you should immediately see the current status of any network
modules, X-10 modules, direct inputs, and direct outputs youve defined in your
XPRESS program.
All network modules that are powered up and properly connected to
the network should show a "*" in the network status window indicating the module
is active. A "" indicates the module isnt responding at all. It may
not be powered up properly or may not be connected to the network correctly. An
"E" indicates errors are occurring during network communication. Check all
network wiring to be sure the cable doesnt run near any sources of electrical noise
(including AC power lines) and check network termination on all COMM-Links. Also, make
sure the network connections on the module arent reversed.
If the X-10 status window doesnt list housecodes A, B, and C,
then there is a problem with the PL-Link connections. You should also see either a
"" or a "!" in the network status window next to the PL-Link
label. Check the PL-Links connections as described in Section 2.1.
Now, check any direct inputs connections. The current status of each
input is updated once per second in the input window. For example, if you have a motion
detector in the room where youre working connected to one of the direct inputs, you
should see the input state change whenever you move.
You wont be able to check any output connections until
youve written a program to control those outputs.
When the system seems to be working correctly, you may begin writing
your first custom XPRESS program. Refer to Chapters 6 and 7 for details about XPRESS.
HOST displays HCS/SS system status information in individual
windows on the PCs screen. Each type of information has its own window. The size and
position of all windows may be changed using a mouse or the keyboard as described above.
The content of each window depends on what hardware was defined at the top of the XPRESS
program being run.
The X-10 module status window displays the housecodes called out
using the DISPLAY configuration keyword in the XPRESS program. Any modules that are on or
dimmed (regardless of dim level) are designated by a "1" on the screen. Modules
that are off or not used show up as "0" on the display.
The network-module status window displays the status of only those
network modules defined by CONFIG statements in the XPRESS program. The following
summarizes the three possible status indicators:
* : module active and responding normally
: module didnt responded when polled by the SC
E : response from module contained an error and was discarded
An occasional "" indicates there might be some noise
on the network and shouldnt be a concern. Any module showing a consistent
"" should be checked out. Similarly, an occasional "E" indicates
some noise on the network and can usually be safely ignored. Consistent errors indicate a
problem with the network.
Digital inputs and outputs and netbits are displayed in groups of 24
horizontally (though a row may not contain a full 24 bits). A "1" indicates the
bit is on and a "0" indicates the bit is off. The starting bit number for each
row is shown at the left of each row. The numbers across the top of the rows are offsets
from that starting bit number. For example, the first row might have "000" at
the left, indicating the leftmost bit in the row is 0, followed by 1, then 2, and so
forth. If the next row has "016" at its left, then the bit numbers in that row
are 16, 17, 18, and so forth.
Which inputs, output, and netbits are displayed depends on the
hardware defined with the CONFIG statement in the XPRESS program. For example, if one
ADIO-Link is defined as present in the system, netbits 96119 are displayed on the
HOST screen automatically.
Analog input and outputs are displayed similarly, but with just two
values (analog inputs) or four values (analog outputs) per row. |