X-10 TECHNOLOGY- A BRIEF OVERVIEW

 

Introduction

The X-10 protocol was one of the first transmission methods to communicate by sending signals over the power line, and became a de-facto standard for many years. The low data throughput and reliability in the transmission required to research for faster and more reliable power line communication methods. The following sections present a brief description of the transmission theory, having in mind that a standard for X-10 was never implemented, and the requirements imposed by the X-10 POWERHOUSE company, encompass the protocol implementation.

Power Line Transmission Theory

X-10 operations are composed of a collection of 32 commands or key codes. Sixteen of these represent unit addresses and the remaining represent actual commands. The codes are divided into HOUSE codes and UNIT addresses. A house code is used to identify which group of units will receive commands. There are a total of sixteen house codes available and sixteen unit addresses which result in a total of 256 possible addresses for X-10 units in the basic mode. Using the extended code key code, the addressing capability can be extended to 512 possible addresses.

The main requirement of this protocol is that all the transmissions are synchronized to the zero crossing of the AC line voltage. By transmitting as close as possible to that zero crossing (within 200sec), some degree of noise immunity is obtained. The encoding of information is performed in a simple manner as described in the following paragraphs.

A binary ONE bit in a legitimate X10 transmission is a 1 millisecond (1 mS) pulse code modulated burst of a 120KHz carrier on the AC line, and each ZERO is the absence of that burst. The exact length of the burst may not be too critical in most applications. The burst is sent three times for each bit, once at each AC zero-crossing (accounting for zero-crossing in 3-phase power line). That means once each 2.778 mS as shown in Figure 1. The next bit is sent on the following zero-crossing. The zero crossing gives the best signal-to-noise ratio for data transmission as mentioned above.

In addition, each bit is sent both true and complemented, and each code sequence is sent twice. That's a lot of bit redundancy, and just barely enough to make it past the noise on the line, depending on actual conditions.

A single normal command (or complete code transmission) takes eleven cycles of the AC line to finish and is broken down as follows. All legal commands must first start with the header 1110, a unique code as described below. The header bits take two cycles at one bit per half cycle. The next four cycles are the four-bit House Code, but it takes eight bits total because each bit is sent true then complemented. This is similar to bi-phase encoding, as the bit value changes state half-way through the transmission, and improves transmission reliability. The last five AC cycles are the Unit / Function Code, a five bit code that takes ten bits (again, true then complemented). For any codes except the DIM, BRIGHT and the data following the EXTENDED DATA function, there's a mandatory three cycle pause before sending another command DIM and BRIGHT don't necessarily need a pause, and the data after the EXTENDED DATA command absolutely MUST follow immediately until all bytes have been sent. The EXTENDED DATA code is handy, as any number of eight-bit bytes may follow. The data bytes must follow the true/complement rule, so will take eight cycles per byte, with no pause between bytes until complete. The only legal sequence that doesn't conform to the true/complement rule are the start bits 1110 that lead the whole command, likely because the modules need some way to tell when it's OK to start listening again.

A full transmission looks like this (see table 1 for a list of the actual command codes):
 
Start code 

2 cycles

House code 

4 cycles

Number code 

5 cycles

Wait 

3 Cy.

Start code 

2 cycles

House code 

4 cycles

Number code 

5 cycles

 

wait 3 cycles and then
 
Start code 

2 cycles

House code 

4 cycles

Function code 

5 cycles

Wait 

3 Cy.

Start code 

2 cycles

House code 

4 cycles

Function code 

5 cycles

 

The bit sequence will have the following form:

1 1 1 0 H1 /H1 H2 /H2 H4 /H4 H8 /H8 D1 /D1 D2 /D2 D4 /D4 D8 /D8 D16 /D16

(start) (House code) (Unit/Function code)
 
 

So, to turn on Unit 12 of House code A, send the following:

1 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 1 0 1 0 0 1 (House A, Unit 12)

then wait at least three full AC cycles and send it again, then wait three and send:

1 1 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 (House A, Function ON)

again wait three cycles and send it the last time. Total transmission would have been 264 discrete bits (don't forget the 3-phase) and would take 53 cycles of the AC line, or about .883 seconds.

It's perfectly allowable to stack the Unit or Function codes together, so sending Unit 2 Unit 3 Unit 12 ON (separated by 3 cycles minimum) will turn on all 3 units.

X10 COMMAND CODES

Tables 1 and 2 shows the binary codes to be transmited for each house code and key code. As mentioned before, the start code is always 1110 which is unique and does not follow the true-complement relationship on alternate half cycles.
 
House 

Codes

H1 H2 H4 H8 Key Codes D1 D2 D4 D8 D16
A 0 1 1 0 1 0 1 1 0 0
B 1 1 1 0 2 1 1 1 0 0
C 0 0 1 0 3 0 0 1 0 0
D 1 0 1 0 4 1 0 1 0 0
E 0 0 0 1 5 0 0 0 1 0
F 1 0 0 1 6 1 0 0 1 0
G 0 1 0 1 7 0 1 0 1 0
H 1 1 0 1 8 1 1 0 1 0
I 0 1 1 1 9 0 1 1 1 0
J 1 1 1 1 10 1 1 1 1 0
K 0 0 1 1 11 0 0 1 1 0
L 1 0 1 1 12 1 0 1 1 0
M 0 0 0 0 13 0 0 0 0 0
N 1 0 0 0 14 1 0 0 0 0
O 0 1 0 0 15 0 1 0 0 0
P 1 1 0 0 16 1 1 0 0 0
All Units Off 0 0 0 0 1
All Lights On 0 0 0 1 1
On 0 0 1 0 1
Off 0 0 1 1 1
Dim 0 1 0 0 1
Bright 0 1 0 1 1
All Lights Off 0 1 1 0 1
Extended Code 0 1 1 1 1
Hail Request 1 1 0 0 0 1
Hail Acknowl. 1 0 0 0 1
Pre-set Dim 2 1 0 0 1 1
Extended Data 3 1 1 0 0 1
Status = On 1 1 0 1 1
Status = Off 1 1 1 0 1
Status Request 1 1 1 1 1
 

Note 1: Hail Request is transmitted to see if there are any other X10 compatible transmitters within listening range. Used to assign a different house code if conflict arises.

Note 2: In a Pre-Set Dim function, the D8 bit represents the MSB of the level and the 4 House code bits represent the 4 least significant bits. No known X10 device responds to the Pre-Set Dim function.

Note 3: The Extended Data code is followed by eight-bit bytes which can be any data you might want to send (like temperature). There must be no delay between the Extended Data code and the actual data bytes, and no delay between data bytes. A suggestion is to use the first byte to indicate how many bytes of data will follow. Extended code is similar to extended data: Bytes that follow the extended code might represent additional codes. This allows designers to expand beyond the 256 codes originally specified as mentioned before.
 
 
 
 

RECOMMENDED SPECIFICATIONS TO ENSURE RELIABLE COMMUNICATION TO ALL X10 DEVICES:

Carrier Oscillation Frequency 120KHz ± 5% (s/b 2%, but 5% OK)

Zero Crossing Detection 100S ± 100S

Width of Transmitted Carrier 1mS ± 50S

Transmitter output power 60 mW average (5V pk-pk into 5 ohms)

Isolation Voltage 2500V RMS. 60Hz for 1 min.
 
 

OPERATION OF THE TW523 TWO WAY PL INTERFACE

The TW523 is a low level two-way interface to the power line. It contains a PIC controller to decode incoming signals and store them for transmission to the host computer. It's essentially a 120KHz modulator and demodulator, with just enough smarts to recognize a valid X-10 command code.

The computer interfaces to the TW523 through an RJ-11 modular phone jack which has the following signals: signal (not AC) ground, receive output, zero-cross output and transmit input. All signals are optocoupled, and the outputs are open-collector. A logic high (greater than 4V) on the transmit input modulates the AC line with the 120KHz carrier wave. The zero-cross output is a square wave coincident with the 60Hz AC line. The receive output is an envelope of the X-10 signal, and is low when the 120KHz signal for `bit=1' is present during a valid code.

The signal applied to the transmit input must encompass all of the bits for all 3 phases of the line (i.e. 3 bits per half AC cycle). The computer must follow the full transmission protocol detailed in the theory above, but only needs to send the proper envelope for the transmission as the TW523 converts the digital envelope into bursts of 120KHz carrier.

The receive output is buffered through the PIC in the TW523. The first valid X-10 code cycle on the AC line alerts the PIC (and is lost to the controlling computer). During the second code cycle (all codes in X-10 protocol are sent twice), the TW523 outputs a low when there is 120KHz carrier on the AC line, and only during the bit time for the local AC phase. The signals for the other two AC phases are not echoed to the controlling computer. The output is open-collector at all other times. The logic is reversed; when there's a valid `bit=1' (120KHz carrier), the output is low, and high otherwise. Since the TW523 responds to all signals on the AC line, it also echoes any sent by the controlling computer, allowing for collision detection similar to that used by the Ethernet protocol (CSMA/CD).

Return to Main Index 


You can reach me at luism@ieee.org
Copyright 1997 by Luis F. Montoya
1