21-12-2012, 05:52 PM
Project Final Report: X‐10 Protocol & Power Line Communication
Project Final Report.pdf (Size: 284.9 KB / Downloads: 72)
Project Abstract
People have always strived to create a comfortable environment for themselves, and as technology evolves this has become particularly easier. The idea of “Intelligent Homes” is precisely one of such cases: a home that requires minimum interaction from people in order to perform some basic actions, and also, that these actions could be executed automatically or even remotely if the need arises. This home automation concept, also known as smart homes or domotics, have had a great proliferation thanks to inexpensive equipments and protocols like X‐10.
Since X‐10 modules are so popular now, the question we would like to answer is: what if we use a special module to transmit computer data in the same way X‐10 transmits commands? It is the objective of this project to build an X‐10 interface capable of transmitting this computer data. Thus, we could effectively connect two computers in a house via the power lines without the need of re‐wiring. There are some performance issues, however, and we will also discuss this at the end of this project.
Status
The project works as intended, but the transmission rates are extremely low making it only viable if the data we wish to transmit is not time‐dependant. Although it was expected to achieve approximately 20 bits per second, in reality around 9 bits per second were achieved due to the way these particular X‐10 modules worked. So this project is ideal when transmitting small data fragments or if a centralized X‐10 “command and control” server is desired. It can be even used as an X‐10 packet sniffer off the power line.
Specification
The project consists of 3 components: a TW523 X‐10 module which bridges the power line with the microcontroller, a ZNEO microcontroller which translates X‐10 to RS232 and vice‐versa, and a computer connected via the serial port.
Software Components
The only main software component resides on the ZNEO. Zilog’s IDE is used to compile and program the ZNEO board. All the pins are used as GPIOs, PE0 as data ouput and PD0 as data input. PC0 is the zero‐crossing detect pin, and interrupts on both edges is enabled in this pin. PC0 is the heartbeat of the whole system, since the X‐10 module cannot transmit or receive data but in specific windows. As such, timing is critical for the system to work properly. Figure 4 shows a timing diagram for a signal transmission.
Retrospective
As we can see earlier, it takes 11 cycles to transmit a full X‐10 frame to the TW523. This means it would take approximately 0.2 second to transmit the whole frame (or in this case, 1 ASCII character) at the frequency of the power line (60Hz). However, this is not the case. It takes 11 cycles for the frame to reach the TW523, but the module then needs to transmit this through the power line again and not once but twice (as the X‐10 protocol requires). Finally, once the TW523 from the other end receive the frame twice, it will take another 11 cycles to fully transmit the character to the ZNEO. So it takes 4 times as long! Approximately 0.8 seconds are required to transmit a single character between the ZNEOs.