Building Your Own Modules
The X-10 TW523 is a two-way power line interface you can drive with your own circuits. It operates at a much more primitive level than PC interfaces such as the CM11A, which has a serial port interface, so you’ll need both good electronics skills and experience with real-time embedded software. The interface gives you the following opto-isolated signals (Figure 22):
Zero Crossing — Output from the TW523, the Zero Crossing signal goes high at the start of each zero crossing interval. The signal is not a conventional data valid signal; see the transmit and receive signal descriptions. Use a pull-up resistor on the signal.
Signal Ground — Pin 2 is the common reference for the other three pins.
Receive from Power Line — This signal is high if the received signal from the power line is a one, and low if it’s a zero. The signal is not valid until 200 s after Zero Crossing goes high, and is only required to stay valid for 1 ms after Zero Crossing goes high even if Zero Crossing remains high. Use a pull-up resistor on the signal.
Transmit to Power Line — Output a high on this line within 200 µ of Zero Crossing going high, and hold the line high, to output a one on the power line — that is, to turn on the 120 kHz oscillator. Use the same timing with a low output to output a zero. The line should be low if the interface is not to transmit data, since that keeps the oscillator off.

FIGURE 22: X-10 TW523 interface signals
Using the TW523 is somewhat difficult, because it provides only the physical layer interface, and requires compliance with relatively precise and demanding timing to ensure meeting the physical layer specification. The requirement to handle the physical layer timing plus all link layer requirements in your electronics implies you’ll need some intelligence in devices you build using the TW523, not just sensors or switches. The Smarthome and Advanced Control Technologies interfaces relieve the requirement to handle critical timing in your implementation, substituting an RS-232 interface and more intelligence in the interface device, but you’ll still need enough intelligence to handle the link layer. Those devices also add the capability to handle X-10 extended codes and data, whereas you can’t receive the extended formats with the TW523.
A PC is far more elaborate than you want for a remote X-10 device; instead, you’ll want to include an embedded microcontroller. You can find many others available by searching the Internet; we chose the Parallax units because of their combination of capability, availability with boards supporting a circuit prototyping area, and integration with support software. The Basic Stamp runs a variant of the Basic programming language, while the Javelin Stamp runs an embedded subset of Sun Microsystems’ Java.