Communicate over power wires

Thread Starter

Smoke_Maker

Joined Sep 24, 2007
126
I have read that the power companies use there transmission line like we use the internet to communicate, but is it possible to do this with DC wiring.

Or a better question is what is the minimum number wires needed to communicate between micro controllers on a DC system all with the same ground.
 

Thread Starter

Smoke_Maker

Joined Sep 24, 2007
126
I was unclear, if I run a power and ground to 3 or more MC with each one 3 feet apart from each other do I need additional wires to communicate or is there some way to communicate over the DC power wires.
 

nsaspook

Joined Aug 27, 2009
13,086
I was unclear, if I run a power and ground to 3 or more MC with each one 3 feet apart from each other do I need additional wires to communicate or is there some way to communicate over the DC power wires.
You could modulate the data on a high frequency carrier and insert it on the power line with a set of series inductors to isolate the signal between the modules but simply running a separate wire(s) for the signal is a lot cheaper/simpler if the distance is short like 3 feet.

If you're using AC power then something like X10 could be used. X10 uses AC power zero crossing to transmit a data carrier signal.
http://circuit-diagram.hqew.net/X$2d10-interface-for-home-automation-projects_13885.html
 

Thread Starter

Smoke_Maker

Joined Sep 24, 2007
126
MrChips answer may have sounded sarcastic, but it is really meaningful.

1-Wire is a communication protocol that works using only a ground and power connection between devices.

http://en.wikipedia.org/wiki/1-Wire

Bob
Thanks Bob, I didn't take MrChips answer as sarcastic.

Google is your friend if you know the right question, and thanks to your help I found what I was looking for. It was very hard to find and nobody is using it. that I can see.

http://www.yamar.com/sig60.php

Do's anybody have any examples of this in use.
 

THE_RB

Joined Feb 11, 2008
5,438
You could modulate the data on a high frequency carrier and insert it on the power line with a set of series inductors to isolate the signal between the modules ...
...
OR, you can just modulate the DC power on and off to transmit data, but make sure the power is ON for a large enough percentage of the total to supply enough average power to each device.

This is much simpler, provided your devices are reasonably low-power.

This page might give you some ideas;
http://romanblack.com/blacknet/blacknet.htm
:)
 

WBahn

Joined Mar 31, 2012
29,979
OR, you can just modulate the DC power on and off to transmit data, but make sure the power is ON for a large enough percentage of the total to supply enough average power to each device.

This is much simpler, provided your devices are reasonably low-power.

This page might give you some ideas;
http://romanblack.com/blacknet/blacknet.htm
:)
I looked at your protocol and can't figure out how a device is supposed to detect when device number 1 has transmitted, especially since devices aren't required to transmit their number nor are devices required to do anything other than monitor for bus availability.

It also seems like there is a non-negligible chance of two devices transmitting at the same time do to oscillator mismatch, though I imagine it would be fairly low.
 

THE_RB

Joined Feb 11, 2008
5,438
That is exactly what 1-Wire does.
...
Sure, there are a number of single wire power and comms systems. I just thought that might be of some use or some interest to the OP.

WBahn said:
I looked at your protocol and can't figure out how a device is supposed to detect when device number 1 has transmitted, especially since devices aren't required to transmit their number nor are devices required to do anything other than monitor for bus availability.
...
Device number 1 is the first, so I implemented "number 1 detect" by ensuring a dead period at the end of each loop. Ie after a dead period (no transmissions) of at least 50mS, the next device to transmit must be the master (device number 1).

On a loop system that transmits every second that is only a loss of 50mS per 1000mS where transmission is not allowed. Obviously no normal delay between devices would be allowed to be as large as 50mS, which is not usually a problem.

WBahn said:
It also seems like there is a non-negligible chance of two devices transmitting at the same time do to oscillator mismatch, though I imagine it would be fairly low.
Sure, the timing systems in the devices must be good enough to generate/count a delay of roughly the right time. I have devices using 8-pin PICs on internal osc (maybe 2% time accuracy) and they still work fine.

Because the time resets (is re-synced) on every single transmission on the bus, the individual device timers don't need to be very precise. :)
 

WBahn

Joined Mar 31, 2012
29,979
Device number 1 is the first, so I implemented "number 1 detect" by ensuring a dead period at the end of each loop. Ie after a dead period (no transmissions) of at least 50mS, the next device to transmit must be the master (device number 1).
That seems like a pretty important aspect not to be mentioned as part of the protocol, doesn't it?

And since each device has to know about this dead period and since that dead period has to be expanded if enough devices are added to bus, aren't you left with the possibility of having to reprogram every device on the bus in order to add another device?
 

THE_RB

Joined Feb 11, 2008
5,438
That seems like a pretty important aspect not to be mentioned as part of the protocol, doesn't it?
...
I thought I had made it obvious directly under big heading "The protocol"; :)
"I won't claim any great originality here, over the years I have seen many systems for a number of devices on one serial wire so I just copied different elements from existing systems to combine together to create a very open ended and simple 1-wire network to suit my needs.

It is basic and sequential ie a "round robin"; No device can transmit until device1 transmits. Then device2 can transmit IF it chooses, as many bytes as it chooses. Then device 3 can transmit IF it chooses, etc. Every device gets a chance to talk, then that "loop" is over."


I get your point that the page could do with a code example or a more simple summary of the execution. Often things that seem extremely obvious to me are not obvious to other people. The fact that all devices "wait" until device 1 talks seems an obvious statement (to me!) that the first device to talk would be after a minimum delay. That is after all the only thing that can make it "the first". I wanted to avoid mentioning specific time amounts as the protocol does not itself require any specific times, only the relationship of longer time period per added talking device.

...
And since each device has to know about this dead period and since that dead period has to be expanded if enough devices are added to bus, aren't you left with the possibility of having to reprogram every device on the bus in order to add another device?
Yes and no. The simplicity of the round robin system means the time loop must be initially set up to suit a finite max number of devices. This is not a limitation of the protocol but is a limitation of setting up a particular installation and making some inital decisions to suit that installation.

Obviously running a larger T time increases reliability and reduces the need for timing accuracy, but requires more time per loop. Choosing a slower overall loop time allows more talking devices to be added in future, but means a slower overall system. Typical design decisions.

Keep in mind the massive mumber of devices that can be available on the system even with arbitrary time values. Listening devices do not affect the time and neither do talking devices that are not talking at that instant. And there is room for maybe 50 devices to all talk even in a 1 second loop. So that could comfortably be many hundreds of devices depending how many need to talk every second.

You are right that an initial installation cannot be expanded infinitely by adding devices, but I guess that is true for most 1-wire systems.

I cover a way to add a lot more devices further down the page under the heading "A big speed improvement". If new devices added are capable of both listening and talking, they can eliminate much of the time delay and speed up th eoverall system (or allow adding a much greater number of devices).
 
Top