Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I'd like to be able to daisy chain multiple devices using just the power supply wires and then inject a communications signal over the power lines to turn it into a half duplex network.

Are there any common methods of achieving this? The simpler the better and it would be great if it used the UART on the microcontroller.

Edit: There are actually two projects that I'm working on that I think would benefit from this - one is a low power sensor network. The other is a LED lighting project. In both cases the objective is to simplify wiring, but if the solution is too complex then it probably makes more sense to use three wires (pwr, gnd, comms).

share|improve this question
1  
AC or DC power supply? What is the power supply voltage? –  mjh2007 Jun 11 '10 at 17:17
2  
The capacitor + inductor arrangement mentioned in some answers has a name: bias-T. –  davidcary Mar 31 '11 at 3:19
    

10 Answers 10

up vote 13 down vote accepted

Have you looked into the Dallas 1-Wire protocol? It is really low speed and if you device takes relatively little current then you can get away with using parasitic power and power the device with the data lines.

share|improve this answer
    
Thanks for that - 1-Wire looks like it's fairly popular and well suited for low power sensor networks. –  Peter Gibson Feb 22 '10 at 4:51
1  
Hi Peter, since you specifically asked for UART. I managed to find a maxim app notes for using UART as a 1-wire bus master. (see maxim-ic.com/app-notes/index.mvp/id/214 ). –  Terry Chen Feb 22 '10 at 20:05
    
Thanks again Terry - I'll take a look –  Peter Gibson Feb 22 '10 at 22:20

You essentially need to push AC signals onto the DC power line, and separate them out again. This is common in homes with TV antennas - the power amplifier is put near the antenna, and DC power is pushed up the antenna wire while TV signals come down the antenna wire.

You don't give enough details for an example circuit, but here are the basics:

The power source should have an inductor in series going to the output to block high frequency signals feeding into the power supply and possibly causing regulation problems.

Each unit's power input should be similarly protected with an inductor to filter out the AC signals. Feeding that into a diode and capacitor will make sure the AC signals don't jeopardize your module power.

Prior to the inductor, you'll also attach a capacitor. It'll probably be a low value so that most of the AC signals on the line pass the capcitor, but none of the DC will.

The output of this capacitor MIGHT be usable directly into a microcontroller (with diode clamping) if you have the skills to implement the necessary software to read the now-mutilated data off the line. Likewise you can send pulses directly into the capacitor with the I/O pin.

Check out what that looks like on a scope - the square wave going into the capacitor will look like a decaying spike on the power line. When it comes out another capacitor on the network it will be further changed - just a spike on the line.

Reading these spikes can be difficult, and filtering out noise can be difficult, so if you're running long lines, have a noisy power supply, or running lines near other noise sources then you'll have to implement significant signal processing. Usually this takes the form of AM (ASK - Amplitude shift keying) or FM (FSK - Frequency shift keying) on the line, with data slicers, comparators, tone generators and detectors, etc. Or the equivalent processing in software.

It may seem like a lot of work, but start off with a simple pulse detector on the receiving end and send square waves when transmitting. Use an oscilloscope to understand what's happening, and if you find you need a more complex solution ask again about ASK or FSK detection.

A pulse detector might be a simple software interrupt on change input pin, or a 555 set up as a pulse stretcher.

share|improve this answer
    
I agree with adam here except that I believe all communication should be done FM and you can build some really nice filters to get your signal back almost perfectly. He has mentioned this, but I thought I would add a note to clarify that a noisy signal can be beautiful again with the right filter and FM modulation. –  Kortuk Feb 22 '10 at 18:30
1  
FM is significantly better than AM or many other simple modulation schemes, but it does exact a slightly higher cost in terms of hardware and/or software, and if the signal quality is good it may be overkill. –  Adam Davis Feb 22 '10 at 21:11

I've built something like this for a train controller system (model train, of course).

It was a monodirectional low speed protocol (a single entity sends data, all others are receivers only) and transmission was done by simply reversing rail polarity.

On every "client" there was a simple circuit done with a pic (16C54, years ago!), a rectifier and some dip switches to set address.

I don't have source codes anymore, but system was really easy, and worked flawless for years, allowing easy control of every single locomotive, raiload barrier, semaphore etc. from a the main control panel without additional wires.

share|improve this answer
    
Axeman, I do not have anything to say but that you have impressed me sir/ma'am. That solution makes me giggle. –  Kortuk Feb 22 '10 at 18:25
    
Kortuk, I hope that you "giggling" means "thumbs up" (I'm italian and not very strong in english, as you can see :-) ) Anyway, years before my "invention" (but I discovered it after my project was completed) model railroad factories designed,standardized and implemented (in the same way) DCC: Digital Command Control, for the same purpose: en.wikipedia.org/wiki/Digital_Command_Control –  Axeman Feb 23 '10 at 14:24

I would recommend thinking about it as a signal that you are adding and removing a DC Offset. You can use capacitors to block DC by placing them in series with your circuit.

Beyond that it is hard to say what you will need to do because it will be dependent upon your application. You may need to use an opamp to separate your coupling capacitor from what ever is receiving your signal. If your DC offset voltage is large compared to your signal voltage you may not even need to do any power conditioning on it to remove the ripple, this is all dependent on your application though.

I have a pair of speakers that use this same technique to light a power LED on a secondary speaker. If I turn the volume up loud enough I can actually notice the LED get brighter. In this particular application they would need to be worried about what type of RC filter is being created.

share|improve this answer
    
I've considered trying to modulate RS232 with a hi freq signal coupled to a 12V supply - I'm guessing it would be important to isolate the PSU capacitance so that it doesn't try to smooth out the ripples? –  Peter Gibson Feb 22 '10 at 4:59

I know this is quite an old thread, but here's my 2 pence worth...

I haven't got anything working yet, but was looking at doing something similar using an Arduino + VirtualWire (set at a really low baud rate). As Adam Davis says above, you transmit/receive your data from the 12V line via a low value capacitor. It means you essentially get 0V with little spikes on it, which VirtualWire can (probably) decode. The good news about this method is that in theory any device on the 12V line can talk, and any can receive. I've had this working with an ordinary bit of wire between the two devices on a breadboard, but not sure if it'll work over distance, or over an actual power line.

If the transmission is always from the same place, then maybe using something like the Hornby method might be better - ie. have the transmitter switch the power line between +12V and -12V to create the signal. Each receiver has a rectifier on it's connection to the power line, so it always gets +12V supply. You could arguably simply pulse +12V, and have each device use a large capacitor to smooth out the bumps. Either of these methods is probably more reliable because the signal on the power line will be much stronger and therefore easier to decode (I'd still use VirtualWire to do it mind you, but a UART could work too).

For an LED lighting project, there's a good chance you're going to have to shift a couple of amps down the 12V line. That makes switching it a bit harder, so you might be better off with the RF-over-capacitor method. However, the height of the spikes you receive will reduce quite considerably with higher current, so you may need to amplify the signal you write onto the line (eg. use a high frequency transistor or two to 'amplify' the TTL signal to 12V before pushing it through the capacitor onto the 12V line).

Either way, something like VirtualWire will almost always work better than a UART (and probably I2C etc). The reason is that it uses a phase locked loop to 'sync' the transmission and reception together, which means a higher signal to noise ratio and less errors. That should make it a bit more forgiving of less-than-perfect hardware ;-)

share|improve this answer

There are lots of questions I could ask before giving any advice. I guess the first thing for us to try to understand is, what is your goal here? Low build cost, long communication runs thereby saving wiring, proof of concept or something else. They all would have different recommendations. For example if you aren't worried about cost then maybe go with a Zigbee solution or if it is long runs then that creates problems with most single wire transmitions and now you need to look at other options. I guess the thing that worries me the most about your question is that you say "the simpler the better". What you are asking is possible in some situations, but I dare to say it won't be simple. Mainly due to the real world problems you will encounter, such as signal loss, noise and current management. If you have more specifics then we could be of more assistance.

Best of luck.

share|improve this answer
    
Thanks - it's good to hear of potential problems I may run into down the track. I've tried to clarify my needs a little in the above post. –  Peter Gibson Feb 22 '10 at 4:55

Are you sure some sort of USB solution is not workable? You have around 2-2.5W available.

Here are a couple of other ideas --

Power over ethernet (POE) integrates power and ethernet signals. There are a variety of semiconductors and DC/DC converters designed for these devices. This is probably your best option since there are off-the-shelf parts for this.

I believe some of the home automation companies integrate AC power and communications signals. Maybe some of that is adaptable.

The audio folks have "phantom" powering of microphones. 48VDC plus audio over a microphone cable.

share|improve this answer
1  
You will need to be careful with pulling power from USB. When you first plug a device into a USB port you are granted 100mA at 5v = 0.5W. Your device can then request for additional power and get 500mA at 5v = 2.5W. You will also need to insure that your device wont have a large pull when you first plug it in. Wikipedia talks a bit about USB power in the 'Power' section at en.wikipedia.org/wiki/Universal_Serial_Bus#Power –  Kellenjb Feb 22 '10 at 3:46
    
Kellenjb, enumeration is not exactly the same as requesting more power, I like to think of it as verifying you are an intelligent device. Most people also forget if they are giving their device to someone else it may be plugged into an un-powered hub, resulting in maximum pull of 100mA no matter the situation. –  Kortuk Feb 22 '10 at 18:20

The X-10 protocol does exactly this.

Also some of the suggestions above aren't safe or certainly can't be used in approved (UL/CE mark) devices.

share|improve this answer
1  
I'm assuming that "power supply wires" mean low voltage wires. If they are AC supply wires then yes, most of the other answers are unsuitable without taking this into account. –  Adam Davis Feb 24 '10 at 22:27
2  
X10 assumes by design an AC power line and needs specific tuned transformer. Don't think it fits to the "The simple the better" part of the question :-) –  Axeman Feb 25 '10 at 10:19

There ia a dedicated semiconductor that get a UART byte and transfer it over the power line at speeds up to 115.2Kbps. This device was designed for automotive so it is robust to noise. See http://yamar.com/product/sig60/

share|improve this answer

Check this:

And the thread where I took that information (same question as you).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.