CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Power line comms

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hillcraft



Joined: 22 Sep 2003
Posts: 101
Location: Cape Town (South africa)

View user's profile Send private message Send e-mail Visit poster's website

Power line comms
PostPosted: Thu Mar 02, 2006 9:05 am     Reply with quote

I have a number of Pic based devices connected to the same 12V AC line. I would like to communicate with the devices via a 1Wire type protocol. I figure that it should not be to difficult. I could put a gold cap on each device to keep the power to the pic while I modulate a data signal across the power line.

Have any of you guys done this before?

It would be great if you could share your experiences.

I have searched on google, but I have not come across anything yet!
libor



Joined: 14 Dec 2004
Posts: 288
Location: Hungary

View user's profile Send private message

PostPosted: Thu Mar 02, 2006 9:32 am     Reply with quote

No supercap needed. You can use a high freq carrier signal (e.g. 120kHz) injected into to power line, it works on AC mains 220V line, I see no problem using it on 12VAC. Though this results a rather slow, 50bps data rate.
Look for AN236 on microchip.com.
hillcraft



Joined: 22 Sep 2003
Posts: 101
Location: Cape Town (South africa)

View user's profile Send private message Send e-mail Visit poster's website

I don't mean X10
PostPosted: Thu Mar 02, 2006 1:14 pm     Reply with quote

I was thinking more along the lines of DCC. The protocol is used in model railways. The power lines drive the motors but they are also modulated so as to provide data. The modulation looks like FM. So what one can do is to take the power off the power lines for a moment, inject a 1wire message, wait for a response for a predetermined time, and then put the power back on the line. The 1 wire message should pass through the bridge rectifier without problems, the problem is to suck the message off the power line and inject it into the PIC before it reaches the smooting cap...I THINK!
jay miller
Guest







1 wire and pics
PostPosted: Thu Mar 02, 2006 2:47 pm     Reply with quote

Try to find an old Motorola application brief using thei Addressable uart. An669 I think?, it's been years.I used it a long time ago for remote energy controllers .
Jay
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

DCC
PostPosted: Fri Mar 03, 2006 8:17 am     Reply with quote

DCC doesn't remove the power to send data. The data IS the power. You just full wave rectify the zeros and ones to power your circuit. Read the DCC spec from the NMRA. http://www.nmra.org/standards/DCC/
DCC is a viable power & data delivery system. If your power requirements are modest you may be able to use an RS232 driver chip to generate the DCC signal. There are literally millions of PICs out there decodong DCC signals.
_________________
The search for better is endless. Instead simply find very good and get the job done.
libor



Joined: 14 Dec 2004
Posts: 288
Location: Hungary

View user's profile Send private message

PostPosted: Fri Mar 03, 2006 8:52 am     Reply with quote

e.g. look around here for an example. DCC on model railroads using PICs
hillcraft



Joined: 22 Sep 2003
Posts: 101
Location: Cape Town (South africa)

View user's profile Send private message Send e-mail Visit poster's website

Not DCC
PostPosted: Fri Mar 03, 2006 11:45 am     Reply with quote

DCC might not be the answer. To get back to the original idea. What about putting a supecap on the power lines at the slave pics to compenstate for periodic power loss. Then to stop the power supply to the pic, inject a one wire data signal on the power lines, wait for a response, and put the power back (All within a couple of milliseconds)

The problem that I really face is the circuit required to suck the data off the power line and the circuit required to place the data on the power line.

I think that I could put a 33K resistor (as done in DCC circuits) just after the bridge rectifiers positive going to a pic pin to receive the data. I could use a code such as 0x55 to tell the slave pic to listen.

Now the complication is on the transmit side. I need to inject a 12V signal into the power line between the transformer and the bridge recifiers. I suppose that I could completely disconnect the transformer from the power lines, communicate via a transisor (pic and 12V) . I would need to be able to stop power from feeding back into the transistor.

I do think that this would be a good mechanism to apply to many different inter-device comm problems.
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Fri Mar 03, 2006 1:57 pm     Reply with quote

How much power do you need? If you can run your whole PIC receiver circuit on 10mA or 20mA you can use a good RS232 driver for both power and data. The static DC level (Stop bit if you use RS232 protocol) when there is no data to send can power your circuit through a single diode. If you need bidirectional data you want a RS232 driver with a tri-stateable output, such as MAX3188/89, though they are limited to +/-5V
_________________
The search for better is endless. Instead simply find very good and get the job done.
hillcraft



Joined: 22 Sep 2003
Posts: 101
Location: Cape Town (South africa)

View user's profile Send private message Send e-mail Visit poster's website

Limits
PostPosted: Fri Mar 03, 2006 3:11 pm     Reply with quote

I have to communicate over a 12V AC line that powers all the devices on the network. Each device could consume up to 5A. Disconnecting the power for a moment will not not really matter provided that the pic remains powered up. This is why I was thinking of using a supercap.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Fri Mar 03, 2006 3:46 pm     Reply with quote

(1) How long is the data stream that you need to send?
(2) How many times per second it needs to communicate?
(3) You have already constructed the hardware?
(4) Which is the minimum expected data speed?

If the data packet being used are short and the data transfer speed are low,
I would consider to use DTMF tones modulated over the AC.


Humberto
hillcraft



Joined: 22 Sep 2003
Posts: 101
Location: Cape Town (South africa)

View user's profile Send private message Send e-mail Visit poster's website

Current situation
PostPosted: Fri Mar 03, 2006 4:08 pm     Reply with quote

I can get away with sending 6 bytes.
The maximum would 30 packets per second.
I have not constructed the hardware.
The communications do not to be fast at all. 1200 - 2400 baud will be fine.

The one constraint is that space is limited. I cannot add bulky circuitry to the system.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Fri Mar 03, 2006 4:46 pm     Reply with quote

Well, it is outside of my initial guess.
With the spec you posted, I would try a single-tone frequency keying modulation.
To transmit, just modulate the '1's and keep silence while in '0' in each bit stream.
To decode you will need an NE567 Tone Decoder or similar in the receiver end.
At 2400 baud there are only 416us/bit, not sure if it is enough for the 567
to 'lock up' into center frequency.
I never did it, just thinking on line. I hope you understand the idea.


Humberto
Tagge



Joined: 23 Aug 2005
Posts: 93

View user's profile Send private message Visit poster's website

PostPosted: Sat Mar 04, 2006 1:52 am     Reply with quote

You could take a look at the M-bus solution, its data thru power. Its main method is that your "slave" can consume some current(make levels) for "sending" 1 or 0 and have a higher power or lower sent for 1 and 0 from the master.
/Tagge
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group