PDA

View Full Version : Power line comms X-10



versatronics
- 27th November 2007, 09:21
Hi
I did a search on the forum on power line and mains communications but never turned up anything. I see PBPro has commands for X-10. Does anyone know if any cct ideas or suggested chipset were ever published here to help get me started.
I want to monitor my geyser for a few months to 'learn' its habits and then control it remotely for an optimum efficiency. I also want to turn a few night lights on and off at dark time.
regards
Graham

dhouston
- 27th November 2007, 13:19
The PBP commands are for use with a TW523 or equivalent. They are rather limiting with no support for the newer extended commands.

Anand Dhuru has posted here a few times about designing his own send/receive circuits (for 230V). And there was an exchange between Anand and Darrell Taylor about modifying the X10 Out command for direct output of 120kHz bursts, eliminating the need for a TW523.

There was a recent thread where I listed a few powerline modem chips which might be applicable (although most now available are FSK) and Anand referred to a Nuts & Volts article (Building the X-Lock) from September 2001 that has a schematic for a two-way interface using simple components.

versatronics
- 28th November 2007, 07:27
Hi Dave
I could not find any of these articles, also I do not get nusts and volts in SA.
I have been googling for chipsets and came across the TDA 5051 which looked promising, but once again was not avaialble here in SA. Looks like I will have to design and build the modem myself from discrete bits!
Graham

dhouston
- 28th November 2007, 12:24
I found all of the threads in a flash by searching on "Anand Dhuru". Here are the ones of most interest.http://www.picbasic.co.uk/forum/showthread.php?t=3057
http://www.picbasic.co.uk/forum/showthread.php?t=7115
http://www.picbasic.co.uk/forum/showthread.php?t=1696You can buy back issues of Nuts & Volts from their website. Anand attached a schematic, scanned from the article, to a message in one of the above threads.

Darrel Taylor
- 28th November 2007, 17:15
Might also be of use.
http://www.picbasic.co.uk/forum/showthread.php?p=34854
<br>

dhouston
- 28th November 2007, 17:57
Might also be of use.
Perhaps, but probably not in the case of Status Request. There are only a few X-10 modules that respond to Status Request and those do not actually reflect the state of the load - merely the state of the module. The lamp might be burned out, turned off at its switch or unplugged but the module will still report its ON if that's the state of the module. It's more a, "What's your best guess of status?" request and a, "Your guess is as good as mine." response.

BTW, the reason meL supports the BasicStamp codes is that Xout (and Xin) were original BasicStamp procedures. The non-Pro PB syntax is based on PBasic.

dhouston
- 28th November 2007, 18:21
Since this is a PBP forum, I'm hesitant to suggest another method but, if the goal is just to build a system to control your own household and not a commercial endeavor to sell your designs to others in your country, there is a solution that is very quick although much more costly.

Elba Corp. sells several BasicStamp-ish chips and modules that use a much more advanced version of Basic. Some of their products (I think all with the "a" suffix but you should confirm this.) allow you to define two TTL PLC channels that operate in the background, much like a software UART) to send (if the module is two-way) and receive X-10 commands using any of the X-10 TTL PLC modules (PL513, TW523, PSC04, PSC05, TW7223, XM10, Smarthome 1132B). Since you specify the bits to send, you can send any valid (or not) X-10 commands. You can only receive those commands which the X-10 modules report so it's limited to valid, standard commands. Off the top of my head, I think it handles 50Hz or 60Hz but you need to confirm this. If 50Hz is not supported, I'm sure they will be willing to add that - they are very responsive to feature requests (if doable). In fact, they added this feature at my request.http://www.zbasic.net/

Darrel Taylor
- 28th November 2007, 18:36
Status is probably more useful for Dimmers. Especially the ones that have a slider or other way to manually adjust the level.
Then the main controller can know it's current setting.

But as you pointed out
The PBP commands are for use with a TW523 or equivalent. They are rather limiting with no support for the newer extended commands.

The supports there, just not the documentation.
<br>

dhouston
- 28th November 2007, 19:11
Status Request doesn't work with dimmers either. The newer modules that support X-10's extended comand set do accurately report load status, including level, but the TW523 class controllers cannot receive the codes.

Most of Smarthome's own brand of X-10 switches and modules respond to Status Request and even report changes (bulb burns out, switched off, etc.) in status, using the standard Preset Dim commands, so they are the way to go if you want accurate status reports using TW523 class controllers.

versatronics
- 29th November 2007, 07:32
Hi Guys
Wow! thanks for all the info, I'm gob-smacked at the complexity of some of the applications, but agreed, if you want that level of addressability and control it's needed. I just wanted to turn the geyser on/off and one light!! so I will get inspiration from the circuits particularily the mains interfaces, and just use some simple PPL tone switching at 2 different frequencies, the didtances are pretty short and I should mangae without zero crossing detection or phase control etc and just stick to a simple go on/off to 2 devices. I'll give X10 a miss and just output a high on a pic port to turn on the PLL. But thanks a ton for the info.
Graham

Darrel Taylor
- 29th November 2007, 09:02
Well, he might have given up, but I'm still curious Dave.

Is there another extended command set I don't know about.
Not trying to be contrary, I just want to make the previous posts as complete as possible.

I wasn't exactly thorough in my search last time, but those were the only other X-10 commands I could find.

Are there more?<br>

dhouston
- 29th November 2007, 13:16
Darrel,

There's a text file on my web page listing all X-10 commands. Originally, it was a .DOC file that was so horrendously formatted that it was nearly impossible to read so I reformatted it as the text file. Later, X-10 made it into a .PDF and I reference that URL at the top of the text file. http://davehouston.org/xtc798.txt
Many of the commands described have not been implemented by existing hardware although X-10 Europe seems to be using more of them than X-10 USA. This is probably because CE rules required them to redesign most of the hardware sold in Europe a few years back. Here, the LM14A and AM14A use some of the extended command set as do some dimmer switches made by Leviton (who confuses things by calling their Extended Dim commands Preset Dims). You need a more sophisticated interface to receive these commands - CM11A, CM15A, and some of Smarthome's interfaces. There are European equivalents to the CM11A.

There's a subtle thing (well, not really all that subtle but it's not explicit in their documentation of the power-line protocol and these devices) about the X-10 TTL two-way interfaces (TW523, PSC05, TW7223, XM10) that most people miss. It only reports valid codes it sees on the power-line. This means it cannot report in real time, since it needs to validate a whole code or 22-bits, but must delay one whole command-worth of time (22 half cycles of the 50Hz or 60Hz). In other words, what it reports actually occurred about 1/4 second earlier. And it cannot report continuously - it reports only every third command in the case of Dims and Brights and reports only the first 22-bit chunk of the longer extended commands. And it will only report valid codes, which must begin with 1110. It acts a bit like a 22-bit shift register with the clock being the power-line frequency.

You did say you want to be thorough.

dhouston
- 29th November 2007, 13:23
... I will get inspiration from the circuits particularily the mains interfaces, and just use some simple PPL tone switching at 2 different frequencies, the didtances are pretty short
I think there's an even easier way that doesn't require power-line comms. You can use a current transformer or hall-effect current sensor from Allegro to sense when the geyser is on or off and use RF links to communicate.

dalescnc
- 29th November 2007, 13:52
Graham seems we have similar things in common ;-) just started on a project using to pic's 1 as a master other as a slave to control 6 relays to switch 12v lights on & off. Im limited to 2 wires gnd and positive. I have found the impedance of the supply voltage been a car batt. need to modulate @ app 11mhz in order to get the signal down the line. If anyone could share some light on this idea i would appreciate it no matter what

Many thanks
dale

versatronics
- 30th November 2007, 07:44
Hi Dale
Did you really mean 11MHz? This is very high for PLC although if achieved will give you good noise immunity. Yearsd ago i developed a PLC (power line carrier) remote control system for the coal mines, using the trailing 5kV cables the coal cutters drag begind them. It was infeasible to connect directly to these a) as it would require the intervention of an electrician and thus down-time, and b) safety/isolation issues. so I was face with a way of getting a signal into the cable, getting adequate propagation a nd of course daling with the huge noise problem from the thyristor drive syatems of the motor. There are 2 modes to propagate into a cable: bifialr - where you excite equal and opposite signals between the pair of wires - this is hardest to do but has less line attenuation; and monofilar where you exite all the wires togethher as a bundle against a earth reference. This is easiest to do with an inductive coupler of some sort and needs no connection to the wire. however to electrically 'space' the wires apart I had to go up in frequency, also to get above the noise harmonics I used 4MHz This is very much higher than the usual 120kHz type carrier. i know this doesn't help much but you might find it interesting to see that high frequencies do have a place. The modems were designed with discrete phase locked loops and use FSK at 9600b/s. -- I may still use something like this for my house!!

dhouston
- 30th November 2007, 16:28
BPL (Broadband over Powerline) uses even higher frequencies - up to 80MHz. http://en.wikipedia.org/wiki/Power_line_communication
You might find Yitran's BPL (or non-BPL) PLC modem chips useful. Their design was selected for HomePlug's narrow-band home control application.http://www.itrancomm.com/