Data over power ...

I'm interested in the general concept of sending both power and data to a remote location (like my central heating unit does) where the remote unit is connected by a single 2-wire cable.

I've found a few links:

http://www.eetimes.com/document.asp?doc_id=1279219 http://electronicdesign.com/microcontrollers/two-wires-carry-power-and-data http://www.maximintegrated.com/app-notes/index.mvp/id/1863 http://www.eevblog.com/forum/microcontrollers/power-and-data-thru-2-wires/ http://forum.arduino.cc/index.php/topic,121868.0.html

It all looks rather complex, is there a reason why this wouldn't work, at least for sending from the local to the remote? ...

A quick test of this exact setup reveals that the remote (an Arduino Uno) is getting only 2.3V. No doubt the current-limiting resistor is responsible for that. However a more power-friendly remote, designed to use only a milliamp or so, would be more feasible. There would be less current, and therefore less voltage drop.

Or is there a fundamental flaw in this plan?

I'm thinking here that async serial, while idle, is constantly sending a HIGH bit, which therefore would power the other end, and the occasional data byte would be covered by the power stored in the capacitor.

Would it be better to move the resistor (to the other side of the diode) so it only has to regulate current for 4.3V rather than 5V?

And if you wanted to use a balanced electrical protocol, like RS485, would it be feasible to have a bridge rectifier at the remote end, to convert the balanced signal back into DC?

That looks feasible to me, although I would use a Schottky diode rather than the 1N4004. As well as increasing the output voltage, this will avoid D0 being at a voltage sufficiently higher than the "5V in" supply for the remote Arduino pin protection diode to conduct as well.

You could reduce the resistor to 120 ohms, which will draw 35mA from the pin briefly during startup, but much less once the "5V in" supply has stabilized.

I wouldn't recommend putting the resistor the other side of the diode, because then D0 can be at a higher voltage than "5V in", and the pin protection diode of the remote Arduino will take the current instead of your own diode.

For higher output current, you could buffer D1 using a few logic gates in parallel, then you could use a smaller resistor. You need to take care not to exceed the package maximum Vcc current, so you may need to use multiple packages.

I've seen a similar arrangement used to generate +12V and -12V to power a remote RS232 tranceiver.

Well, one flaw is that to power a Uno takes around 45 mA, and the output pin can only supply 20 mA continuous. Of course the current-limiting resistor isn't going to help.

Either I would have to reduce the current requirements (eg. a processor without the USB chip etc.) or do what you suggest and have a unity-gain buffer that provides more current.

Why can't you use a transistor on the local end to modulate the 5V feed from the local power rail so you have no 40mA current limit. You would need to put a resistor on the remote input pin though.

couldn’t you use a lowpass filter to get the data out, and then connect that in paralell to the power lines?

EDIT: schematics attatched. I know they’re horrible, but that’s the best I can do with fritzing.

The problem with the resistor and the diode is that, at its heart, the resistor and capacitor act as an averaging mechanism, in addition to the voltage divider formed by the resistor and the circuitry at the receiving end.

You could use two transistors, one normally switches power to the Data/Power line. Then when you send a Low, that transistor switches off, and another grounds the line. The far end is wired up just as you show it.

You might not even need the second grounding transistor, if the capacitance of the transmission wires isn't too high versus the data rate. A resistor connected to ground from that Data/Power line may be sufficient to pull it Low quickly enough, then you just need a PNP or P-channel MOSFET transistor to switch power on and off.

@Nick:

Here is one rather mature uC network: http://www.kranenborg.org/ee/picaxe/twowirenetwork.htm

That's exactly what I had in mind - thanks!

Just to summarize what everyone has presented, and a thought or two of my own. I literally drew a schematic. Sorry, I tried fritzing, but am not up to speed on that yet, so it did not work.

Decrease resistor on source, to get a bit more power. Change the diode to a Schottky to get a bit more voltage to the capacitor/slave. Add 10k and zener to get a safe signal into the slave.

And of course, a low power cpu would be a great help to.

Link to schematic: https://sphotos-a-ord.xx.fbcdn.net/hphotos-frc1/1004826_4564688855660_1496010711_n.jpg

That’s not what I was saying.

DataOverPowerSimple.gif

If that doesn’t go low fast enough, add a resistor at the far end to ground.

DataOverPowerSimple.png

What you're basically describing is the 1-Wire bus interface, but with more power and a bigger capacitor.

If you don't have a zener to protect the input D0, what will happen if the 5V pin on the slave is at 3.5 volts, and you send 5 volts to pin D0. Input pins being 1.5 volts higher than the 5V pin would be dangerous wouldn't it?

That's a good point. With mine, or with a sufficiently low resistor, it shouldn't be more than one diode drop above. Woulda, shoulda, coulda. So probably a good idea to do something to avoid what jackwp points out.

Yea, I see your point about only one diode drop above. So, would that be safe for the input? I am not sure at what point it would become a danger.

With this thread, I am reminded of how impressed I was with the Lego Mindstorms 1.0 sensor/controller bus solution...

I would think with a schottky diode, you’d be fine as it would be less than the voltage required to forward bias the internal protection diodes. However, it is as simple as adding a diode in series with the line going to the receiving Arduino to drop out one diode drop of voltage.

Is this pretty close?
Schematic attached.

I attached a .jpg file, but can’t see in in preview. I will post to see if it is really there, if not, I will remove this post.

UPDATE: the jpg did attach, but when clicked it is really to large. Is there a way to adjust that image size? Sorry if off topic.

jackwp: UPDATE: the jpg did attach, but when clicked it is really to large. Is there a way to adjust that image size? Sorry if off topic.

Yes, it's call gimp (or photoshop for those lah-di-dah enough to pay for software ;) )

What are you making the schematics in? When you export, is there an option for adjusting the size?