Please login or register.

Login with username, password and session length

Author Topic: How to wire PSC05 with PIC18F4550  (Read 9924 times)

escda5

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
How to wire PSC05 with PIC18F4550
« on: October 14, 2014, 02:39:59 PM »

Actually am working in a project with the PSC05 device and a PIC18F4550 but am not sure how is the connection between these one. I need the diagram for wire please.
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13259
Re: How to wire PSC05 with PIC18F4550
« Reply #1 on: October 14, 2014, 03:21:19 PM »

You may find some information in the X10Wiki.
The PSC05 and TW523 are both basically the same. Just different part numbers.
http://kbase.x10.com/wiki/PSC05
http://www.authinx.com/manuals/X10/technicalnote.pdf

The module is very basic. Has two outputs. Raw Received Data and Zero Crossing. One Input Power Line transmitter keying.
The technical notes in the second link should give you some information on the signals. Page 11 gives you some connection information.
Your controller chip will have to do all the signal timing, encoding and decoding.

Microchip also has some X10 Applications notes. I found this in a search of their site.
http://www.microchip.com/search/searchapp/searchhome.aspx?id=2&q=X10
« Last Edit: October 14, 2014, 03:41:19 PM by Brian H »
Logged

dhouston

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 37
  • Posts: 2547
    • davehouston.org
Re: How to wire PSC05 with PIC18F4550
« Reply #2 on: October 14, 2014, 06:46:29 PM »

Microchip also has some X10 Applications notes. I found this in a search of their site.
http://www.microchip.com/search/searchapp/searchhome.aspx?id=2&q=X10
Only the first of these (AN236) is relevant to X10 automation and it's not directly applicable to the PIC being used by the OP. AN236 describes a direct interface to the powerline without the intervention of any X10 hardware. We need more information about what the OP is trying to accomplish before making any suggestions. My initial impression is that the PIC18F4550 is a few orders of magnitude overkill for use with the PSC05 or TW523.
« Last Edit: October 15, 2014, 09:53:33 PM by dhouston »
Logged
This message was composed entirely from recycled letters of the alphabet using only renewable, caffeinated energy sources.
No twees, wabbits, chimps or whales died in the process.
https://www.laser.com/dhouston

escda5

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: How to wire PSC05 with PIC18F4550
« Reply #3 on: October 16, 2014, 01:12:01 AM »

I have this project:

Android cell phone will send commands like: A1,B1,etc These commands will be send to Wifly module through Socket TCP. The Wifly module is conected to PIC18F45K22 and this one write commands X10 to PSC05. After the codes are send through electric line. The other PSC05 receive the codes, PIC18F4550 read the codes and turn on lamps, leds or whatever.
Logged

escda5

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: How to wire PSC05 with PIC18F4550
« Reply #4 on: October 16, 2014, 01:39:40 AM »

I have other question.In the library X10 are like this:
Connect B0 to TW523 pin 1(Zero crossing detect)                                   
B1              (Output)                                   
B2              (Input)                                   
GND           (Ground)

The example of X10 for PICC says this:
#define X10_ZERO_CROSS  PIN_B0
#define X10_TO_PIC      PIN_B1
#define X10_FROM_PIC    PIN_B2


Those pins are interrupts. Should I change the pins (B0,B1,B2) for PIC18F4550?
Logged

dhouston

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 37
  • Posts: 2547
    • davehouston.org
Re: How to wire PSC05 with PIC18F4550
« Reply #5 on: October 16, 2014, 05:32:52 AM »

Those pins are interrupts. Should I change the pins (B0,B1,B2) for PIC18F4550?
You need an interrupt pin for ZC as you need to check for (or send) PLC after each ZC. Other pins need not be interrupt pins.

Your diagram makes absolutely no sense. The second PSC05 (labelled Receiver) + PIC184550 should be replaced by lamp and appliance modules that operate the loads (LED,TV,LAMP).

Unless the PIC18F45K22 has other tasks, almost any 8-pin PIC would be sufficient.

Is this a school assignment? If not, what's the source of the diagram?
« Last Edit: October 16, 2014, 05:48:01 AM by dhouston »
Logged
This message was composed entirely from recycled letters of the alphabet using only renewable, caffeinated energy sources.
No twees, wabbits, chimps or whales died in the process.
https://www.laser.com/dhouston

escda5

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: How to wire PSC05 with PIC18F4550
« Reply #6 on: October 16, 2014, 10:37:30 AM »

Is my project to graduate from college dhouston  :).  So If I choose the PIC18F4550 can I put something like this:

PIN B0-------Zero Crossing Detect (1)
GROUND----Common (2)
PIN C7------Output(3)
PIN C6------Input(4)

This is the datasheet of PIC18F4550(C6 is TX and C7 is RX):
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: How to wire PSC05 with PIC18F4550
« Reply #7 on: October 16, 2014, 10:38:18 AM »

I was going to ask the same thing.  The whole point of sending X10 commands on the power line is to let other X10 modules respond as designed.  Why would you even use X10 if you are going to use a PIC to interface with your devices (TV, LED, etc).  If you are using your own code and hardware to do the thing that X10 is best at and only using it to transmit signals which is possibly one of its weaker aspects these days, you might want to consider other options.   ???

dhouston

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 37
  • Posts: 2547
    • davehouston.org
Re: How to wire PSC05 with PIC18F4550
« Reply #8 on: October 16, 2014, 11:53:43 AM »

You should study the TechnicalNote.PDF referenced above by Brian. It explains both the X10 PLC protocol and how to interface with a TW523 (PSC05 is identical except for enclosure and price). You should also study the datasheet for the PIC you choose.

You only need one TW523/PSCO5. You control it with your PIC. The PIC datasheet RX & TX refers to serial input/output. My preference would be to reserve these pins for other, more exotic uses (e.g. SPI). You need one external interrupt pin for ZC and any convenient input/output pins for X10 RX & TX.

At your LED, Lamp, TV, etc. you need other X10 lamp and appliance modules (e.g. LM465, AM486).

Also, since you have no other X10 PLC transmitters, you can get by using the PSC04/PL513. This will simplify things as you have no need for RX.

Finally, you probably do not even need a PIC. Whatever you are interfacing the WiFly with undoubtedly will have enough processing power and surplus pins to handle interfacing with a PL513.
« Last Edit: October 16, 2014, 11:57:57 AM by dhouston »
Logged
This message was composed entirely from recycled letters of the alphabet using only renewable, caffeinated energy sources.
No twees, wabbits, chimps or whales died in the process.
https://www.laser.com/dhouston
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.