X-10 interface for home automation projects

Simply speaking X10 protocol allows transmitting data over power lines. X10 uses a PLC(Power Line Carrier) technology. How does this work? The specification says that each time a 60Hz AC signal crosses the zero line,, a 120kHz burst is is transmitted with a duration of 1ms.

One crossing burst forms one information bit. Simply speaking if we needs to form “1” you need to burst at the first crossing but not at second and for “0” is reversed pattern – you need to burst at the second cross but none on first.

All receivers have to know when to start receiving data, so every time data is to be sent, there is a start code sent – 3 pulses followed by an absence of a pulse. After start code follows the data:

Actually, the X10 protocol has specific information packets consisting of nine bits, where the first four bits represent a Letter Code followed by five bits representing device code or function.

So we can send letter codes from “A” to “P” and number codes from “1” to “16”. You may be noticed that the last bit of the number code is zero. This last bit is used to select whether the next number code will be a number or function. So there is also a function code table:

So if the last number bit is “0”, then it is a number; if “1”, then the number code acts like a function.

So we have all parts of the protocol. What else we need to know. To assure reliability and to accommodate line repeaters X-10 protocol requires that every frame(start code, letter code, and number code) was sent twice.

Another requirement is that when data changes (command or address), tada frames must be separated by at least 6 empty zero crossings. This assures that this gap gives the ability to reset shift registers.

So standard X-10 transmission takes 22 AC cycles for one frame(when each frame is transmitted twice). So to transmit two frames takes where one frame sends number and second sends command takes 47 cycles of AC:

47 cycles is less than 1 second.

For you convenience whole protocol in one bunch:

As you may notice, there are few functions marked as extended codes. These functions are designated for special purposes, like Extended Code1 has a defined frame length of 31 cycles.

At the end the is a simple example how X10 home automation system may look like:



Nuts and Volts April 2007

Leave a Reply