XTB-IIR X10 Transmit Booster / Repeater
by JV Digital Engineering

Updated 06-30-08  QUESTIONS & COMMENTS ARE WELCOME

xtb-iic

The X10 protocol was developed back in the 70’s by Pico Electronics.  Many of us got started in home automation using those inexpensive X10 devices.  In the decades since then our houses have become filled with various electronic devices, some of which are downright hostile to X10 powerline communications.  Many people blame X10 when their system does not work perfectly.  However, maybe the blame should be redirected at the manufacturers who developed these new devices without any regard for other equipment that might share the same powerline.  The original XTB, XTB-II, and now the XTB-IIR give X10 systems a means to fight back.

X10 powerline control signals are sent as a series of 120KHz bursts coupled onto the powerline.  Many X10 transmitters utilize inexpensive transformerless power supplies.  While small and cheap, transformerless supplies cannot deliver much energy.  Most X10 transmitters output about 5Vpp to the powerline, but that level falls off rapidly as the distance from the transmitter increases.  Because most X10 transmitters cannot supply much current, any "signal suckers" on the powerline will compound the attenuation.

The normal approach to combating the effects from problem devices is to isolate them with filters.  However, many loads are dynamic, and the powerline environment is always changing.  It becomes impractical and expensive to isolate all potential problem loads with filters.  The XTB and XTB-II provide an alternate means to deal with the multiplicity of problem loads by boosting the X10 signals to much higher levels.

The original X10 Transmit Booster (XTB) was developed as a convenient plug-in way to boost X10 signal levels.  With its 6-watt transformer power supply, the XTB generates a strong signal on its own phase, but a good passive coupler is still required to propagate that signal to the other phase.  The XTB-II was initially developed as a 2-phase version of the XTB, but it evolved into a much more elaborate unit.  In addition to driving both phases directly, the XTB-II includes TW523 emulation, and can operate as a basic repeater while in that mode.  The XTB-IIR is an enhanced repeater version with additional capabilities, including circuitry to deal with high levels of electronic noise produced by compact fluorescent lights and other electronic devices that populate today’s homes.  Its enhanced firmware will properly handle sequential bright and dim commands, and deal with many of the problems that can effect powerline communication.  The XTB-IIR is my attempt to produce the best X10 repeater available today.

OVERVIEW

The XTB-IIR is built on the XTB-II framework, and includes all the capabilities of that unit.  A PIC microcontroller was included in the XTB-II to gate off the superfluous X10 bursts produced for 3-phase systems.  Because that allows it to concentrate all its energy into the zero-crossing X10 burst, the XTB-II can produce a stronger output than the XTB.  Having the PIC on board provided the means to develop a much more elaborate unit.

The XTB-II accepts inputs from just about any X10 transmitter.  A control module such as the CM15A can be plugged directly the X10 Input, and the XTB-II will drive boosted outputs to both phases.  The XTB-II also includes built-in TW523 emulation.  A digital I/O line can be run from an automation controller directly to the XTB-II.  The opto-isolated digital interface on the XTB-II is functionally identical to that of the TW523.  One limitation of the XTB-II is that it cannot be configured to directly boost the output of a plug-in X10 transmitter while running in the TW523 emulation mode.  That limitation is removed in the XTB-IIR.

Since the original function of the XTB-II PIC was just to gate off unnecessary 3-phase bursts, an 8-pin PIC was all that was needed.  That PIC had sufficient resources to add TW523 emulation.  However, its single comparator input prevents the XTB-II from monitoring the powerline to function as a repeater while configured to directly boost the output of a X10 transmitter.

The XTB-IIR incorporates a 14-pin PIC to avoid this limitation.  While similar in internal architecture to PIC used in the XTB-II, the larger PIC provides two comparator inputs to monitor the powerline and the X10 Input receptacle simultaneously.  The additional I/O pins also provide the ability to control other functions.

TW523 emulation in both the XTB-II, and the XTB-IIR differ from an actual TW523 in several regards.  Normally, the XTB-IIR error checks all incoming data, and does not produce any output when a collision is detected.  Error detection in the XTB-IIR is enhanced because it not only checks for the correct number of “1” bits in a command, it also checks that all bits are received in complimentary pairs.  That should improve rejection of erroneous messages caused by noise from compact fluorescent lights and similar electronic devices.  Both units do not need a gap to separate X10 messages, and they will recognize each pair of bright/dim commands.  They will also transmit and receive extended commands, but will not repeat them because of the overlap issue.  A special diagnostic mode is included in the XTB-IIR that returns all bits just one half cycle delayed from real-time with no error checking.  The repeater will function normally even in the diagnostic mode.

Both the XTB-II, and the XTB-IIR include a bandpass amplifier for X10 return signals.  The XTB-II used the cost-effective workhorse LM318 for that amplifier.  The XTB-IIR uses a significantly more expensive Analog Devices AD817 to obtain the best possible performance.  In addition, the XTB-IIR includes a gain switch to allow it to receive very weak signals in a relatively noise-free environment, while providing the ability to recover stronger X10 levels in the presence of high background noise.  The bandpass filter will attenuate out-of-band noise, but line transients can still make it through, and are amplified.  Devices that sensitive to noise, such as the PowerLinc 1132, may not work well with any of the XTB units.

The XTB-IIR includes almost double the number of programmable mode options that are available on the XTB-II.  They will allow the user to tailor the XTB-IIR for optimum performance in each installation.  The options include various repeater and signal reception modes, error checking, command storm shutdown level, and 3-phase operation.

XTB-IIR PERFORMANCE

A typical X10 transmitter, such as the TW523 / PSC05 interface used by many high-end automation controllers, is specified to deliver 5Vpp into a 5 ohm load.  The XTB-II was measured delivering just over 30Vpp into a 4.8 ohm resistive load.  Since power increases with the square of voltage, the XTB-II and XTB-IIR can deliver over 30 times the power of a typical X10 transmitter.  That will go a long way to combating the many “signal suckers” found in a typical home today.

DETAILED HARDWARE DESCRIPTION

It all starts with the power supply.  Most X10 transmitters use a transformerless power supply that limits their power capability.  Both versions of the XTB-II have 6-watt transformer supplies that provide the high peak currents necessary to deliver high energy X10 signal bursts to the powerline.  They also include a PIC to gate off the superfluous 3-phase bursts so all its power can be concentrated into the zero crossing burst.  Depending on line characteristics, the XTB-II can output over 20Vpp at 120KHz onto the AC line.

The XTB-II evolved from the simple plug-in XTB.  That unit just boosts the output from a standard X10 transmitter plugged into its X10 Input receptacle.  Both the XTB-II and the XTB-IIR still support that input, but they add an opto-isolated digital port for TW523 emulation, and can also repeat signals received over the poweline.  Power stage component values have been optimized to drive the lower impedance load presented by 2 coupling networks directly into the main distribution panel.

Both the XTB-II and the XTB-IIR share the same printed circuit board, but the enhanced repeater uses a 14-pin PIC16F684 instead of its 8-pin PIC12F683 little brother.  The other significant change is that the XTB-IIR includes a higher performance amplifier and a gain switch in the return signal path.  The increased gain allows it to recover low-level X10 signals in a quiet environment.  The wider dynamic range of the XTB-IIR provides more AGC resolution, allowing it to recover X10 signals in the presence of significant line noise from compact fluorescent lights or switching power supplies.

The larger PIC gave direct control of the LED, which will flash when a signal is transmitted or received, and also flicker in the presence of line noise.  The LED will pulse a number of times to identify different error conditions.

Most X10 transmitters have a 2-prong plug, and the machining of the XTB-IIR cover has been revised for a 2-prong polarized receptacle.  Since the ground had only been passed through to the 3-prong receptacle, that connection is no longer necessary, allowing a less expensive plug and socket to be used to connect to the distribution panel.

The XTB-II code was initially ported over to the new PIC.  A limitation in comparator configuration options for the new PIC did prevent using the internal reference, but a simple work around significantly improved the reference resolution.  Since the printed circuit board works as designed, no additional features that require hardware changes will be included due to the high cost of manufacturing new boards.

DETAILED FIRMWARE DESCRIPTION

Like the XTB-II, mode options are programmed by sending a 9-8-2-X sequence via a maxicontroller plugged into the X10 Input receptacle.  Unlike the XTB-II, the XTB-IIR accepts the programming on only one selected housecode (P by default).  The "ALL-OFF" is still accepted on any housecode at power-on to restore the default configuration.  The housecode for mode commands is selected by sending a 9-8-2-2-ON sequence on the desired housecode immediately after an “ALL-OFF” default.

The XTB-IIR offers up to 16 mode options.  Because of the additional capabilities, several of the 9-8-2-X mode sequences are not the same as for the XTB-II.  The XTB-IIR will always receive extended commands, and the option that disabled that capability has been eliminated.  The "TW523" mode has also been eliminated because the XTB-IIR will accept inputs from any source without requiring a mode change.  Please refer to the XTB-IIR Mode Options Document for more detailed information.

Since the XTB-IIR is intended for repeater applications, a fundamental change was made to the operating system so it can operate as a repeater regardless of what other inputs are used.  The XTB-IIR is capable of accepting X10 Boost, digital input, and powerline signals without mode changes.  This allows it to directly boost the output of a plug-in controller, such as the CM15A while simultaneously acting as a repeater.  When multiple inputs overlap, the first source received will have priority, and other inputs inputs will be ignored until transmission is completed.  There are also options available to abort a transmission when commands overlap, and to re-transmit a repeated command when the line has cleared.  These may be useful in certain installations.

As part of this change, all XTB-IIR transmissions are sent using its internal 120KHz frequency generator.  That is frequency locked to the 60Hz powerline, and will normally be within 1% of the standard frequency.  While the utility company maintains the 60Hz frequency with very precise regulation (even short term), that might be a consideration for people running off independent generators with poor frequency regulation.  However, it is doubtful that a generator would deviate enough in frequency to cause a problem with X10 communication.

Another significant advancement of the XTB-IIR is the enhanced AGC loop.  The second comparator input of the XTB-IIR PIC eliminates a possible feedback loop, and incoming signals no longer have to be limited in amplitude.  Combined with the gain switch, the AGC loop has much more resolution than the AGC loop in the XTB-II.  This allows the threshold to be maintained just above the background noise level, providing the ability to receive weaker signals.  In addition, the loop has been enhanced to automatically increase the threshold when a number of incomplete X10 messages are received.  Some compact fluorescent lights can produce noise that almost mimics X10 commands, and this feature was designed to deal with that potential noise source.

Bright and Dim commands are a problem for most repeaters because they deviate from standard X10 protocol.  They are often sent in sequence with no gaps between.  This is a problem for some repeaters, but the XTB-IIR is designed to repeat sequential bright and dim commands.  Since it is impossible to listen to the powerline while the XTB-IIR is transmitting, the sequence will be repeated copies of the first bright/dim command in the sequence.  Like all commands, the first half of the initial bright/dim command is not transmitted because that is received and decoded.  The second half is transmitted, as is every subsequent command in the sequence until a gap is received.  Because the first half of the initial bright/dim command is not transmitted, the actual number of transmissions in the sequence is always one fewer than the number sent by the remote transmitter.  One additional command is not tacked onto the end of the sequence because it could step on another transmission following the bright/dim sequence.  Note that a short button press on a maxi-controller produces a half length (ll-cycle) bright/dim command, and the XTB-IIR will repeat that during the "missing" second half as though it was a standard 22-cycle long command.

The XTB-IIR will receive and transmit extended commands, but it will not repeat them due to the overlap issue.  Since extended commands have become a standard part of the protocol, the XTB-IIR does not require a mode option to enable them to be processed.

The XTB-IIR is designed for a 240V split-phase distribution system, and will normally mask the extra bursts produced by some controllers for 3-phase distribution systems.  This allows the transmitted power to be concentrated in the essential zero crossing burst.  On receiving, the XTB-IIR always monitors just the zero-crossing signal bursts, but there are options to enable 3-phase transmit and repeat if necessary.  Transmitted power is automatically reduced to limit excessive drain on the power supply when driving all three phases.  There is also a mode option to reduce the output power if the signal strength produced by the XTB-IIR is too strong for a given installation.  A special 3-phase version of the XTB-IIR is now available with a larger supply to drive all phases at full amplitude.

The XTB-IIR provides complete error checking on incoming signals, requiring not only the correct number of 1's, but also that all received bits be complimentary pairs.  This is done to fight the modulated noise produced when the noise from multiple compact fluorescent lights sums together.  Note that when sending sequential dims, only the first command is error checked because subsequent commands are transmitted copies of that command recalled from memory.

There is a new optional mode that passes ALL received bits back to the automation controller just ˝ cycle delayed from real-time without any error checking.  This allows an automation controller to actually do collision detection itself.  Some controllers may also be able to provide diagnostic information from the raw data bits.  While the diagnostic mode is enabled, the XTB-IIR will still continue to function normally as a repeater.

Since the XTB-IIR was developed for use as a repeater, it includes a feature to automatically disable its transmitter whenever there is a X10 “command storm” on the powerline.  This can occur when something causes a remote button to become stuck in the “on” position.  Some X10 modules have also been known to lock up in a continuous transmit mode.  Since continuous traffic is almost always a result of some error condition, the XTB-IIR will not contribute its own output into the mix.  Some installations may have a lot of normal X10 traffic, and there is a mode command that allows the shutdown threshold to be increased.  The default allows a burst of about 120 commands, with 20 per minute average.  The higher threshold allows a burst of about 400 commands, and an average of 60 per minute.  That should be adequate for even the most complex X10 installations.  While the transmitter is disabled, the XTB-IIR will still monitor traffic on the powerline, and output valid commands to the digital port.  The LED flashes continuously while the transmitter is disabled due to a command storm, and the transmitter will automatically be re-enabled after 10 seconds of clear line.

In addition to flashing continuously during a command storm, the LED will provide several other indications.  It normally flashes during every received or transmitted X10 command.  It can also flicker when line noise manages to peek above the AGC threshold.  This normally only happens in the first few seconds after a sudden increase in noise level.  The LED will flash 3 times when an error is detected on an incoming signal.  This means the XTB-IIR did recognize a valid start pattern, but there was an error in the data pattern that caused the command to be rejected.  The LED will flash 4 times when a collision is detected from overlapping X10 commands on the powerline.  Sometimes this can also be caused by a high noise level on the powerline if noise manages to peek above the AGC threshold during a transmitted “0” slot.  The LED will flash 5 times if an error occurs during mode programming.

ELECTRICAL CONNECTION

The XTB-IIR does not simply plug into a standard receptacle like the XTB.  It should be installed adjacent to the electrical distribution panel where it can drive both phases directly. Connections to the distribution panel are made through one of the two internal terminal strips.  The other terminal strip is normally connected to the X10 Input receptacle on the cover.  The 120V XTB-IIR is supplied with a 2-prong polarized X10 Input receptacle to simplify connections to the distribution panel.  The XTB-IIR should normally be wired to both phases and neutral through a 240V plug & receptacle fed from a double-pole 15A or 20A circuit breaker.  A standard power cord can be connected to Phase I and Neutral for single-phase operation.  Ground is not used internally.  When both phases are used, A solid connection to neutral is essential to prevent damage.

The locking strain relief on the XTB-IIR will accept up to .4-inch diameter wire.  It may be easier to wire the terminal strip with the board removed from the case.  #18 gauge wire is sufficient because the XTB-IIR is internally fused at 2 amps maximum.  Check the electrical connections carefully before applying power.  It is recommended that the terminal strip screws be re-torqued (with power switched off) to insure solid connections.

INTERNATIONAL 240V 50Hz VERSION

A single-output 240V 50Hz version of the XTB-IIR is available.  Except for the PCB itself, the kit includes RoHS compliant components where available.  Since lead based solder is used for the custom assembled unit, it is not RoHS compliant.

3-PHASE VERSION

A special version of the XTB-IIR has been created with 3 coupling networks and a larger 12-watt power supply.  This can be used for 3-phase “Y” electrical distribution systems.  A 240V 50Hz version of the 3-phase XTB-IIR is also available.

XTB-IIR ORDERING INFORMATION

The XTB-IIR is available in both kit and custom assembled versions.  Prices, estimated delivery, and ordering information is available here: XTB Ordering Info.

Please contact me if you have any questions at: JeffVolp@att.net
If you don't receive a response within 24 hours, try: JeffVolp@beyondbb.com

Return to XTB Home Page