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!!!
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.
yes, I have used INCLUDE "modedefs.bas"
yes, I have used INCLUDE "modedefs.bas"
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
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
Here is an attached copy of my code from Notepad, FYI
Hi Anand,
Here is an attached copy of my code from Notepad, FYI. I'm not sure how to attach files. I did a drag-and-drop as it instructed, but then the menu disappeared and was replaced by my file contents, so I hope it worked.
It won't be until tomorrow afternoon before I get a chance to do the waveform screenshot, but will as soon as I am again available. I'll take it on the send side of the psc05 input, as you said.
Thank you.
1 Attachment(s)
Retry to attach sample code file
Well, it seems strange how I had to do it, but it seems to have attached this time.
I just pulled my picoscope 3206 out of mothballs and tried to load the drivers for it, but my computer fails to recognize the usb port to which it is attached. I'll send pictures as soon as I get it going.
G
1 Attachment(s)
pdf of scope of one sample of pulse-groups from Xout from Pic to psc05
Hi Anand,
This one pdf includes 5 views of my Picoscope model 2306 screenshots (so you don't have to load the picoscope viewer software): 1st is the wide view of what looks like 4 pulse-groups, all on the screen at once [presumably 2 sets of pairs of pulse-groups, with a wider gap in between the pairs]; 2nd is a screenshot of a zoom in on the 1st of 4 sets of pulse-groups; 3rd is a zoom of the 2nd of 4 sets; 4th is the 3rd set of zoomed pulse-groups; and 5th is the 4th set of zoomed pulses in the last group.
Notice that these are all positive pulses with respect to ground. When there is no data traffic, then the PIC output to the psc05's opto-isolator is low (not pulling led current inside the opto-isolator). It seems to me that this is the way it should be, rather than inverted and pulling current without data traffic. If so, then the inverter, shown by x10pro, between the OEM equipment and the input of the psc05 really should not be there. But still, this does not activate any X-10 devices. I bought 3 psc05's, so I am about to build another identical circuit to eavesdrop on the other and compare what a real x10 remote sends to activate/deactivate house-1, module-1. Then, I can see the differences between my signal and the actual x10 remote signals, from the view of another x10 psc05's receive line.
Thanks very much,
G
Your suggested code worked like a charm, on the first try--THANK YOU !!!
Hi Anand, and everyone else who responded to my plight,
Anand, Your suggested code worked like a charm, on the first try--THANK YOU !!!
I am thrilled to have it finally working. I'll need to go troubleshoot why my code did not work, so I can better understand my mistake and how not to repeat it in the future. And, whew--I'm sure glad to not need that other circuitry that X10pro showed in between the PIC-chip and the psco5.
Fantastic, and thanks again,
Guglulenun