X10: A low-tech power-line net with high-tech uses
In the spirit of doing more with less (see editorial), this week we examine a way to remotely switch devices on and off or transfer small amounts of data without futzing with expensive network gear.
Our simple solution is X10, a venerable command-and-control network system.
You've probably seen the name X10 in those ubiquitous ads for wireless video from X10.com, a spinoff of the originators of the X10 standard. Well, X10.com has little to do with X10 products these days; it seems to make its money almost completely from low-end, surveillance-type video systems.
Be that as it may, X10 networking has been around for about 20 years. Pico Electronics of Scotland developed X10 as a home automation system and the first products were shipped in 1978. Since then, the original patent has expired and prices for X10-compatible devices have dropped sharply.
X10 technology is pretty interesting and relatively simple. It transmits signals over electrical power lines by inserting 120-KHz signal bursts, each 1 msec long, at the zero crossing of the voltage on a 60Hz 120V circuit. Each bit transmitted consists of two bursts; so a binary one is represented by a burst followed by a no-burst while a zero is a no-burst followed by a burst.
Obviously for this encoding to work, the bursts have to be framed. X10 uses a preamble or start code to indicate a packet start. This start code is the sequence "burst, burst, burst, no burst" - a combination that is unique because the first two bursts are neither a zero nor a one. Requiring the double burst to be followed by a binary one (burst, no burst) reduces the likelihood of a noisy system creating a spurious false start code.
Following the start code is the data. Being designed for home automation, the next four bits are the "house code" (which defines 16 groups of devices denoted "A" through "P") followed by a five-bit device code (16 devices - the least-significant bit of the code is zero) or function code (16 codes - the least-significant bit is one). How devices interpret these codes is implementation dependent ("dim" would be meaningful to a light controller but useless to a device switching a relay on or off).
So what's the data rate? Well, because the bursts are transmitted at the zero crossings of the voltage cycle, one cycle is required for each bit, or a total of 13 cycles to transmit one X10 packet of 13 bits (four bits for the preamble and nine bits for the payload). In addition, each command is sent twice for reliability (power-line transmission is a notoriously noisy environment) and we have to insert a three-cycle delay after each pair of commands. For some strange reason, the function codes "bright" and "dim" (01011 and 01001, respectively) don't require the three-cycle delay.
Thus for 9 data bits we need 29 cycles, which works out to a data rate of 18.62 bit/sec except for the two exception codes that only need 26 bits so we can hit the maximum of 20.77 bit/sec. Check out www.x10.com/support/technology1.htm for more information.
What can we do with this system? Well, there's a ton of controllers and devices available (see www.smarthomeusa.com). For example, we can interface a computer using the IBM Home Director Kit (around $40), and install X10 light switches ($10) so we can automatically dim the computer room lights in the evening. Adding a X10 PIR motion detector makes it possible to automatically switch on the lights when someone enters the room. With an X10 plug-in power module ($13), you can, on schedule, power cycle that DSL modem that hangs up every day in the early hours.
There are also all sorts of other X10 devices available for controlling high-power devices, amplifying signals, bridging X10 signals across power-phase legs and analyzing X10 signaling.
Now if you want to do a custom control job, you can use a one-way (receive-only) or two-way (send and receive) interface module along with a computer interface and control relays, interface to serial ports or whatever strange and wonderful service you can imagine. You can even use the X10 system to send and receive data. You could even overlay IP on top of an X10 connection ... hmmm.
So how about integrating an X10 system with really smart software that can also extract data from the 'Net? Next week, we'll do just that. Until then, short packets to gearhead@gibbs.com.
RELATED LINKS
Comments and suggestions to gh@gibbs.com.
Gibbs Forum
The place to discuss Gibbs's columns.
Check out this week's edition of
Backspin for more musings from Gibbs.
