Final Update 8/31/07
This document covers the development phase, and does not reflect changes since the unit was released.
The XTB-II was originally designed as a XTB with two coupling networks so it could directly drive both legs of a standard North American split-phase power distribution system. It included a PIC to blank the superfluous transmissions used in a three-phase distribution system. Because that allows it to focus all its energy in the essential zero crossing burst, its output power is somewhat higher than the plug-in XTB. (The International version transmits all 3-phases at somewhat lower power by default).
Coming from a long history of trying to suck maximum capability out of a microcontroller, I added TW523 emulation before the XTB-II began shipping. One of the early units had a problem with line noise, and I added automatic threshold control and a couple of other options to try to dig weak signals out of a noisy environment. It occurred to me that in the TW523 mode it was possible for the XTB-II to repeat messages while sending them to the automation controller, so that capability was added too. Some of the early units do not include that option, but a PIC update is available at a nominal charge.
Once I added the basic repeater function to the XTB-II, I started thinking about a new version that capitalized on that capability. The remainder of this document outlines the changes that the enhanced repeater version will include. I would appreciate any feedback you might have on the changes.
Hardware Changes:
1) The two units will share the same printed circuit board, but the enhanced repeater uses a 14-pin PIC16F684 instead of its 8-pin PIC12F683 little brother. 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.
2) While most of the circuitry is identical between the two units, the larger PIC allowed me to add a gain switch in the analog input stage. That will be helpful to deal with excessive line noise – such as in an installation with many compact fluorescent lights.
3) Virtually all X10 transmitters have a 2-prong plug, and the machining of the XTB-II cover has been revised for a 2-prong polarized receptacle. Since the ground has only been passed through to the 3-prong receptacle, that connection is no longer necessary.
4) While I have used the venerable workhorse LM318 high speed op-amp since it came out decades ago, I must admit there are newer op-amps with superior performance. The XTB-IIR will use an Analog Devices AD817 in the return signal path for somewhat better performance. That op-amp costs several times as much as the multi-sourced LM318, but it goes along with trying to make the XTB-IIR the best repeater available.
5) The polyester film capacitor in the power driver 120KHz tank circuit is being changed to a ceramic capacitor designed for high-current switching power supplies. While the device previously used was a high quality component, it was operating near its dv/dt limit due to the sheer power of that output circuit. Unfortunately, the cost of that component increases from less than 50 cents to almost 6 dollars, and the kit prices must increase accordingly.
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.
Firmware Changes:
1) XTB-II mode options are programmed by sending 9-8-2-X on any housecode. You can refer to the XTB-II Mode Options Document for more information on the modes currently available. The XTB-IIR will default to accepting just the “P” housecode for mode commands. A 9-8-2-2-ON sequence sent immediately after an “ALL-OFF” reset will switch it to whatever housecode was used for that sequence. The "ALL-OFF" is accepted on any housecode, but the transmitter must be connected to the X10 Input receptacle, and the ALL OFF button must be held down as power is applied to the XTB-IIR.
2) The XTB-IIR will offer up to 16 mode options. Because of the additional capabilities, several of the 9-8-2-X mode sequences will not be the same as for the present XTB-II. The mode option that disabled receiving extended commands has been eliminated. The XTB-IIR will always receive extended commands. The "TW523" mode has also been eliminated because the XTB-IIR will accept inputs from any source without requiring a mode change.
3) The XTB-IIR has the option to abort a transmission immediately upon recognizing a collision. When repeating, the command can be automatically re-transmitted when the line is clear. When coming through the TW523 port, the acknowledgement will be incomplete, so the automation controller should recognize it has to re-issue the command.
4) 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.
5) Unlike some other repeaters, XTB-IIR will transmit concatenated bright/dim commands in the repeater mode. 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. 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 has not been tacked onto the end of the sequence because it could step on another transmission following the bright/dim sequence. I will note that a short button press on a maxi-controller produces a half length (ll-cycle) bright/dim command. The XTB-IIR will repeat during the "missing" second half as though it was a standard 22-cycle long command.
6) The present XTB-IIR will receive and transmit extended commands, but it will not repeat them due to the overlap issue. It is possible to re-transmit an extended command when the line is clear, but that might cause problems due to sending the extended command out of sequence. Due to the complexity of issues involved, the XTB-IIR will not include the ability to repeat extended commands at this time.
7) As mentioned in the hardware section, the comparator threshold is set externally on the new PIC. This has provided finer resolution than using the PIC's internal reference. That, combined with the gain switch, allows it to deal with a wider range of signal strengths in a noisy environment. It is possible to obtain reliable operation when the signal strength is just slightly stronger than the average noise level.
8) Because the XTB-II may actually produce too much signal for some installations, the XTB-IIR includes an option to REDUCE its output should that become necessary. This option is automatically invoked when using the 3-phase transmission mode to reduce load on the power supply.
9) One of the current XTB users pointed out the possibility of a "broadcast storm" caused by a stuck button, or perhaps some other failure. Recently there was a discussion about such a storm being caused by water dripping onto a maxicontroller. The XTB-IIR will shut off its transmitter in response to a "broadcast storm". Two thresholds are available. One allows a burst of about 120 commands, or a continuous average of 20 per minute. A higher threshold allows a burst of about 400, or an average of 60 per minute. In either case the XTB-IIR transmitter will re-enable itself after 10 seconds of clear line. The LED flashes continuously in response to a storm. While the transmitter is disabled, the XTB-IIR will still monitor traffic on the powerline, and output valid commands to the digital port.
10) The XTB-II cannot boost signals received at its X10 input receptacle while running in the TW523 emulation mode. Since the repeater is only available in the TW523 mode, that would be a limitation to people wanting to use the XTB-IIR also as a booster for their CM11A or CM15A. The additional PIC inputs made it possible to identify the source of the X10 signal. The XTB-IIR is capable of accepting X10 Boost, digital input, and powerline signals without mode changes. When multiple inputs overlap, the first source received will have priority, and other inputs will be ignored until transmission is completed. Providing this capability has required a very basic change to how the various signal sources are processed.
11) The XTB-II provides error checking on incoming signals. This has been enhanced in the XTB-IIR, requiring not only the correct number of 1's, but also that all received bits be complimentary pairs. This is being done to fight modulated noise produced by beating compact fluorescent lights. I had planned to make the error checking optional, but that doesn't make sense because a command containing even a single bit error is useless. There is still the option to receive all bits without any error checking. Note that when sending sequential dims, only the first command is error checked because subsequent commands are transmitted from memory.
12) As noted in the hardware section, the LED will pulse a number of times to identify certain error conditions. Currently identified conditions include the end of the mode programming window, an incorrect data pattern has been received over the powerline, a collision was detected during transmission, and the transmitter has shut down due to a "broadcast storm". Comments?
13) The XTB-IIR fully supports 3-phase transmissions. This option can be enabled for transmitted and repeated commands independently. On receiving, the XTB-IIR only monitors signal bursts immediately after the zero crossing. Due to the difficulty of doing thorough testing at 50Hz, there are no current plans to offer a 50Hz version of the XTB-IIR.
The price of the enhanced repeater version has not been determined, but it will be somewhat more expensive than the current XTB-II. For that cost you will get:
A high-power XTB transmitter
TW523 emulation with enhanced capabilities
A 2-phase passive coupler
A high-power "smart" repeater
I don’t think I can improve on that any more.
Initial release version of the XTB-IIR
The firmware is now fully operational. Additional testing will be performed during September, and early versions will be available by September 17. Should any problems be identified in the early fielded units, a free PIC swap later this year will update the firmware to the final version.
Update to the existing XTB-II
Firmware changes that do not require revised hardware could eventually be ported over to the existing XTB-II 8-pin PIC. However, the fact that the XTB-IIR code has migrated so far from the original XTB-II code means that this is a major effort. Depending on time available, this effort will take months to complete.
JV Digital Engineering Home Page
[XTB & XTB-II/R Overview] [XTB Home Page] [XTB Ordering Info] [X10 Troubleshooting Info]