Need help using MEL command "Xout" with an X-10 PCS-05 bidir pwr-line interface


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Jan 2011
    Posts
    8

    Unhappy Need help using MEL command "Xout" with an X-10 PCS-05 bidir pwr-line interface

    I need help understanding the physical interface between the microchip PIC16F73 I am using and the X10pro psc05 bidirectional power line interface. The info in the MEL PBP manual is very sketchy about this command and the electronic interface to the psc05. My PBP manual only talks about a TW-523, which is no longer available, but was supposedly replaced by the newer psc05. When I get onto the x-10 site, it says they offer the suggested schematic for interfacing with the psc05, but no further information will be provided. I see their schematic for the psc05 has opto-isolators. The Xout command, they say, should go through a pnp inverter and then into the opto-isolator. Although I have had good success with the MEL pbp "Xin" instruction, I cannot make the "Xout" instruction control any equipment through the psc05. In fact, the red led on the psc05 just dims, rather than blinking, as it does when I command the same codes out over a hand-held X-10 remote. I have tried direct coupling the PIC pin (capable of 30 mA) right to the pin-4 on the RJ-11 and also taking it there through X10pro's suggested pnp inverter circuit, also through a 7404 inverter, also through a 74xx buffer. The psc05 has a 1K resistor in series with the led in the opto-coupler, so it should only pull about 3.5 mA, when conducting. Does the Xout signal really need inverting on the way over to the psc05? When X10pro shows the suggested OEM interface (12 page, free download), I assume they do not know what equipment I will be using to drive that pin, so how can they know I will be using a PIC, or the MEL PBP "Xout" instruction? I cannot seem to make this puppy work. I am driving the psc05 from the PortB.1 pin on my pic (not open-drain), configured as a digital output. The zero-crossing input pin works properly on my pic, when driven by the psc05's RJ-11, pin1, for the "Xin", so it should also be working for the "Xout"...... I am stumped. Any suggestions out there??? Please assist if you can!!!

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    The TW523 and PCS-05 are identical - the only difference seems to be the price.

    The PL513 and TW523 are detailed at http://software.x10.com/pub/manuals/technicalnote.pdf. The PSC-O4 and PSC-05 have the same details.

    The diagram showing how to connect your OEM product is a little confusing until you understand that everything outside the OEM product is internal to the PSC-05. Specifically, the optos are internal to the PSC-05.

    Refer to [b]Typical OEM Connection diagram (p11). All you need is a pull-up on your X10 signal (to the PSC-05). You really don't need to invert the X-10 signal from the PSC-05 as you can handle that in your program logic. The clamping diodes and the 100 ohm current limiting resistor are overkill.

    I don't have access to my PBP manual, as it has been in a storage unit since my lengthy stay in the hospital last year , but as best I recall, it shows exactly what you need.

    X-10 is being cautious as the same basic approach is used for both 120VAC and 230VAC. The optos protect you and your circuitry should something go amiss within the PSC-05.

    Bruce, Anand Dhuru and mackrackit can all advise you on the specifics.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I am not all that familiar with X-10, but posting the problem code may help. Could be something as simple as forgetting
    Include "modedefs.bas"
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I am not all that familiar with X-10, but posting the problem code may help. Could be something as simple as forgetting
    Include "modedefs.bas"
    I was thinking more on the line that you probably have your PBP manual at hand. I believe its Xin and Xout show what is needed to interface.

    This happens to be about the only instance where I suggest a non-PIC solution. PBP's Xin and Xout commands are quite limited. Xin requires you to either wait in a loop until you receive an entire command or to use an interrupt on ZC to check for an input during the 100mS just after ZC. It can take nearly 1/2 second to receive an entire command and this is a long time to wait in a loop. And most users find interrupts a bit daunting.

    Don Kinzer, the proprietor of ZBasic has written low level interrupt-driven X-10 functions that operate in the background, buffering both inputs and outputs, that operate in much the same way as UARTs. All the user has to do is check a flag periodically to see if a command has been received and to fill the output buffer with the bits needed to send a command. You can get this in a $10 chip, the ZX-328n http://www.zbasic.net/Microcontrolle...ller/p-68.html. It is by far the easiest way to handle X-10. It does require a little more external circuitry than a PIC does.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I was thinking more on the line that you probably have your PBP manual at hand. I believe its Xin and Xout show what is needed to interface.
    In this case the online version is the same as the book.
    http://melabs.com/resources/pbpmanual/
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Per the PBP online manual...
    Output from the X-10 interface (zero crossing and receive data) are open-collector and require a pull up resistor of around 4.7K to 5 volts.
    That's all that is necessary.

  7. #7
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dhouston View Post
    Bruce, Anand Dhuru and mackrackit can all advise you on the specifics.
    Thanks for the reference, Dave.

    I would like to add Darrel Taylor to that list. In a thread I'd started a few years back, http://www.picbasic.co.uk/forum/showthread.php?t=3057 he suggested a small edit to the pbppicxx.lib that modifies the XOUT to give pre-modulated X10 signals without using any extra modulating hardware or complex programming. Comes in very handy for TW523-less, direct-to-mains designs. ANYBODY TRYING THIS, PLEASE BE VERY CAREFUL OF THE MAINS VOLTAGES. Personally, I think this is worthy of being added permanently to the .lib as a canned command, say XMOut, along with the regular Xout.

    Guglulenun, as has been pointed out, the pull-up is mandatory. Let us know if that works. Xin is a far more involved command from the hardware viewpoint, so if that works the zero crossing detection is indeed working. If the pullup doesnt help, I'd only suspect the transmission related circuit within the PSC05. OR, if you are in a 50hz country, take a look at post #9 at http://www.picbasic.co.uk/forum/showthread.php?t=1696 , although the mains in my country is 50hz too, and I have had no problems with the default.

    Regards,

    Anand
    Last edited by ardhuru; - 20th January 2011 at 17:51.

  8. #8
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    I would avoid the 50Hz thread that Anand referenced - it's only likely to confuse things.

    The ONLY time that the 50Hz vs 60Hz issue is a problem is when the electrical system is 3 phase and you need to control devices on phases other than the phase into which the PSC-05 is plugged. The first signal burst of 120kHz is at ZC, the second is at ZC+PERIOD/6 and the third is at ZC+PERIOD/3 where PERIOD=1/60 or 1/50 depending on the mains frequency.

    The PCS-05 only sees the ZC of the phase into which it is plugged. Similarly, receiver devices only see the ZC of their specific phase. Whatever is controlling the PCS-05 must calculate the other two ZCs and control the timing according to the mains frequency.

    If all of the devices to be controlled are on the same phase as the PSC-05, it is best to send only a single burst per half-cycle - sending to all three phases tends to sap the PSC-05 power supply.

    EDIT: A final point. X-10 showing an inverter on the X-10 gate signal to the PCS-05 is probably to reduce the current load on the PIC (or other MCU) drive pin.
    Last edited by dhouston; - 20th January 2011 at 19:21.

  9. #9
    Join Date
    Jan 2011
    Posts
    8


    Did you find this post helpful? Yes | No

    Wink Thank you everyone, so much, for all your responses !

    Thank you everyone, so much, for all your responses! It is wonderful to know that I am not all alone on the island of X-10 programming land. To answer some questions, I am using single-phase, 60Hz here in California. I have employed both 4.7K pull-up resistors to 5 volts, as specified in the MEL PBP manual, on the collectors outputs of the opto-isolators of the psc05. In the X-10pro diagram, they show an OEM box on the left and the psc05 on the right side of the rj-11 connection pins, but in the middle, they show the suggested interface circuitry, which includes a pnp transistor that serves as an inverter to the input of an opto-isolator in the psc05 (when base of pnp goes low, the transistor's collector pulls up to 5V, to source current wrt the led inside the opto-isolator). I am thinking that maybe everything is OK, electrically, but maybe I am just sending incorrect codes to activate anything in X-10 land. But, it did seem strange that psc05 led just seemed to dim and stay dimmed, rather than blinking off when valid X-10 codes were going across the link, as when I used a real X-10 remote to do that same job.

  10. #10
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Have you included MODEDEFS.BAS?

  11. #11
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by guglulenun View Post
    But, it did seem strange that psc05 led just seemed to dim and stay dimmed, rather than blinking off when valid X-10 codes were going across the link, as when I used a real X-10 remote to do that same job.
    Not strange, really. It just reiterates what you have already observed. The fact that it is working well as a receiver. You are having a problem transmitting thru' the PSC05; when you use any other transmitter and find the LED blinking, the PSC05 is actually acknowledging the *receipt* of an X10 signal; the signal it sees on the mains created by another device, not itself. Which again suggests your problem to be related to its transmission circuit, either internal or external.

    Could you send us a screen-grab of the actual signal Xout produces taken at the input of the PSC05?

    Regards,

    Anand
    Last edited by ardhuru; - 21st January 2011 at 04:51.

  12. #12
    Join Date
    Jan 2011
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Very intriguing idea--the Darrel Taylor link to single-chip TW-523 idea--Thanks

    Very intriguing idea--the Darrel Taylor link to single-chip TW-523 idea--Thanks

    Quote Originally Posted by ardhuru View Post
    Thanks for the reference, Dave.

    I would like to add Darrel Taylor to that list. In a thread I'd started a few years back, http://www.picbasic.co.uk/forum/showthread.php?t=3057 he suggested a small edit to the pbppicxx.lib that modifies the XOUT to give pre-modulated X10 signals without using any extra modulating hardware or complex programming. Comes in very handy for TW523-less, direct-to-mains designs. ANYBODY TRYING THIS, PLEASE BE VERY CAREFUL OF THE MAINS VOLTAGES. Personally, I think this is worthy of being added permanently to the .lib as a canned command, say XMOut, along with the regular Xout.

    Guglulenun, as has been pointed out, the pull-up is mandatory. Let us know if that works. Xin is a far more involved command from the hardware viewpoint, so if that works the zero crossing detection is indeed working. If the pullup doesnt help, I'd only suspect the transmission related circuit within the PSC05. OR, if you are in a 50hz country, take a look at post #9 at http://www.picbasic.co.uk/forum/showthread.php?t=1696 , although the mains in my country is 50hz too, and I have had no problems with the default.

    Regards,

    Anand

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts