Shop OBEX P1 Docs P2 Docs Learn Events
Odd request for out of the box X-10 Thinking — Parallax Forums

Odd request for out of the box X-10 Thinking

kmc123kmc123 Posts: 33
edited 2012-01-22 06:22 in BASIC Stamp
Hi everyone,

I have what I THINK is a unique request for help with X-10 .

Problem:

I have an OLD Model 16CUXL 16 port Relay Board from RCS Technology that used to plug into a TW523 Two-Way Powerline Interface that would strip X-10 commands off the AC line and send commands to the relay board.

I want to control this relay board directly from my Basic Stamp Professional Development Board without going through 2 powerline interfaces. (One connected to the PDB and then the other connected to the relay board)

This is important because the end project is going to be in a DC ONLY solar powered tree house and will be used to control lights, alarm, winch motors to raise and lower stairs, etc...

I disconnected the phone cable from the TW523 and plugged it into the phone jack on the PDB, wired it up as described in the PDB docs, and tried sending XOUT commands to it and it does not work.

After digging a bit, I found this statement:


Special Notes

The XOUT command will stop the BASIC Stamp program until it is able to send the transmission. If there is no AC power to the power-line interface, the BASIC Stamp program will halt forever.







This is my problem, and will continue to be a problem for me as I wont be able to provide a ZC signal due to my DC ONLY treehouse.

My question is:
How can I either trick it (Make a 120hz signal and inject it to the zc input pin?) , or talk directly to it (SEROUT Statements instead of XOUT Statements?) to get around this?

I have it set to house code "A" and just want to send simple A1-A16 On and Off commands.

Any help you can provide would be appreciated!!!

Thanks in advance,

Kevin

Comments

  • CatspawCatspaw Posts: 49
    edited 2012-01-22 03:34
    It seems to me the problem is not with the BS, but, rather the TW523/Relay board. From what I understand, everything (all the normal equipment, that is) is sync'd to the AC signal. I'm thinking it's really the TW523 that requires the sync.


    After just scanning the referenced docs., it would appear that it's the TW523 (plugged into the AC line) that generates the Zero Crossing signal. Now the relay board may or may not require this sync once the TW523 has stripped the commands and sends them to the relay board.

    So, I'm thinking the problem/question is, will the relay board operate independent of this trigger? There was no logic documentation with the relay board file.

    My next question is what inputs are required by the Relay board? Does it use the same sync'd protocol?

    I'm betting that if you can get the required input for the Relay board, the BS can do what you want. Possibly a third BS pin to regularly output a sync trigger to the Relay board and fed back to the zPin of the BS (effectively taking the TW523 sync. out of the equation.)

    The other work-around is to get an inverter and battery and use it to power the TW523 and relay board and provide the sync. and standard X10 communication. Everything else can still be DC. The solar panels can use/charge the battery like a standard back-up battery system.
  • bsnutbsnut Posts: 521
    edited 2012-01-22 06:22
    How can I either trick it (Make a 120hz signal and inject it to the zc input pin?) , or talk directly to it (SEROUT Statements instead of XOUT Statements?) to get around this?

    I have it set to house code "A" and just want to send simple A1-A16 On and Off commands
    I suggest you take a look at a book by Scott Edwards call "Programming Customizing the Basic Stamp Computer", which covers an X-10 project using a BS2 connected to a X-10 powerline interface PL-513 or a TW-523. So, here's some test code to get you started based Scott's book and my work with your relay board.
    zPin  CON 12  ' zPin on pin 12
    mPin  CON 11  ' mPin on pin 11
    houseA  CON 0  ' 0=A, 1=B, 2=C
    Unit1  CON 0   ' 0=Unit1, 1=Unit2
    
    XOUT mPin, zPin, [houseA\Unit1]   'talk to Unit1
    XOUT mPin, zPin, [houseA\uniton]   'tell Unit1 to turn on
    PAUSE 1000
    XOUT mPin, zPin, [houseA\unitoff]   'tell Unit1 to turn off
    STOP
    
    What is happening in the above code is. The "zPin" is an output from the interface that sends a pulse to the BS2 at the instant the AC power waveform crosses zero volts. This cues the BS2 to take control of "mPin", the pin that modulates (controls) the 120-khz X-10 signal.

    This is the connections for connecting the X-10 powerline interface PL-513 or a TW-523 to the BS2 in Scott's book.
    zPin BS2 P12 to RJ45 pin 1 with a 10Kohm resistor pullup to +5 volts
    RJ45 pin 2 and 3 is connected to interface and BS2 ground
    mPin BS2 P11 to RJ45 pin 4 to

    Also use the that PDF on the X-10, due to the fact it has a lot of info in it, mainly the binary pattern for X-10.
Sign In or Register to comment.