Communicate over power wires

Discussion in 'General Electronics Chat' started by Smoke_Maker, Aug 14, 2013.

  1. Smoke_Maker

    Thread Starter Active Member

    Sep 24, 2007
    126
    15
    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.
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    One wire...
     
  3. Smoke_Maker

    Thread Starter Active Member

    Sep 24, 2007
    126
    15
    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.
     
  4. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,912
    2,178
    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
     
  5. BobTPH

    Active Member

    Jun 5, 2013
    785
    114
    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
     
  6. Smoke_Maker

    Thread Starter Active Member

    Sep 24, 2007
    126
    15
    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.
     
  7. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    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
    :)
     
  8. BobTPH

    Active Member

    Jun 5, 2013
    785
    114
    That is exactly what 1-Wire does.

    Bob
     
  9. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    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.
     
  10. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    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.

    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.

    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. :)
     
  11. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    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?
     
  12. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    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.

    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).
     
Loading...