X10 Object
Just in case anyone else is interested... I noticed that there wasn't an object on obex for sending X10 codes with a PSC05 X10 powerline interface, so I wrote one and uploaded it.
obex.parallax.com/objects/461/
With this object you can use a PSC05 to send X10 codes to turn on/off lamps, appliances, etc. I don't yet have receive support implemented (as I don't immediately have the need), but I may do so sooner if other people are interested.
I wrote this for an ethernet-to-X10 bridge program that I am writing for the ybox2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
—
darco
www.deepdarc.com/
[url=mailto:xmpp:darco@deepdarc.com]xmpp:darco@deepdarc.com[/url]
obex.parallax.com/objects/461/
With this object you can use a PSC05 to send X10 codes to turn on/off lamps, appliances, etc. I don't yet have receive support implemented (as I don't immediately have the need), but I may do so sooner if other people are interested.
I wrote this for an ethernet-to-X10 bridge program that I am writing for the ybox2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
—
darco
www.deepdarc.com/
[url=mailto:xmpp:darco@deepdarc.com]xmpp:darco@deepdarc.com[/url]

Comments
I am trying to implement your X10 object into my project. I have a PL513 which is basically the same module as the PSC05 except for being able to receive codes. My question is how did you connect the PSC05 to the Prop? The I/O pins for the PSC05 and PL513 are +5 volts and when using these modules with a STAMP the Zpin requires a pull-up to +5v.
Has anyone else used the Prop for X10 control via a power-line module?
Thanks,
MikeS
I've had no problems using 3.3v on the PSC05 instead of 5v. 3.3v seems to drive the opto-iolators inside of the PSC05 just fine. You still need the pull ups. Just have a look at at page ten of the PSC05/PSC04 technote for the suggested wiring. Since I'm lazy, I didn't use a transistor or the diodes. Works great.
As long as you don't have a super-long cable between your prop and the PSC05 (or equivalent) then it shouldn't be a problem. My cable is around 2 meters and works fine at 3.3v.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
—
darco
www.deepdarc.com/
[url=mailto:xmpp:darco@deepdarc.com]xmpp:darco@deepdarc.com[/url]
Post Edited (darco) : 6/5/2009 5:55:09 AM GMT
Mikes
I have it hooked up as you indicated. Would you look at my code and see if I'm implementing it correctly?
{{X10 demo connect propeller to PL513 interface to control lights began 6/4/2009 }} con _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 zcPin = 13 ' ZERO CROSS OVER inPin = 14 ' INPUT NOT USED outPin = 15 '[noparse][[/noparse]MODULATION PIN house_b = %1110 unit_03 = %00100 cmd_on = %00101 cmd_off = %00111 var obj x10 : "X10" PUB START X10.start(zcPin,inPin,outPin) X10.send_to_unit(house_B,unit_03,CMD_on) 'turn on House B, Unit 3 repeat 5 waitcnt(clkfreq + cnt) X10.send_to_unit(house_b,unit_03,CMD_off) 'turn off House B Unit 3thanks,
MikeS
Did you know that you can use constants which are defined inside of other objects? IE: You can do this:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
—
darco
www.deepdarc.com/
[url=mailto:xmpp:darco@deepdarc.com]xmpp:darco@deepdarc.com[/url]
I will have to look at the X10 module.
Glad you are back.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
anyone gotten the "box" to receive x-10..