Serial and DC  distribution in same cable


im working on a project where i want to use a 3 wire cable to send and recive serialdata between two arduinos. do anyone know ho I can ashive that. I´m guessing i have to make som sort of filter. if anyone have a schematic or instructions for that i would be very helpfull.

You'll need a four wire cable to do this. One wire will be ground, one will be power supply, one for transmit and one for receive data. There's no simple way to use three wire cable.

I understand it´s not simple thats why I´m asking. I want to use a standard 3 pin xlr between them instead of a 4 pin. know it can be done, but how hard is it?

It's called "phantom powering" and is done using some microphones (and XLR connectors) as well as ethernet (POE).

Search for "phantom power" and you should be able to find schematics.
Check the IC manufacturers -- On-Semi, TI, Maxim ADI for power-over-ethernet devices. There is probably an IC and app-note.

(* jcl *)

thanks thats a good idea.

Do you wish to power the remote Arduino from the local one or is there a way for each Arduino to have it's own DC power supply (either AC power module or batteries)?

Three wires is enough for send data, receive data and common ground connections.


You'll have to come up with some protocol, but use 2 wires for power and ground, and the third for bidirectional (half duplex, naturally) communication. Leave the comm pin on both Arduinos in input mode by default, which will leave the line floating (will probably need a pull up/down). Listen before transmitting; if nothing heard, put the pin in output mode and send the data. You'll need some way to detect collisions (both of them decide to TX and the same time), like maybe a fixed timeslot after transmitting to wait for an ACK. Or, alternatively, work out some handshake before transmitting the data.

Presto, we just reinvented the first Ethernet (that didn't have collision detection).

With appropriate line drivers, this could be extended to more than 2 nodes.

What I just described is a non-trivial project... |:


Another way to tackle it would be to use some telephone modems and AC couple the signals into the line. Then you can use the line to carry the DC power and an AC signal. If you use different frequencies for each direction of flow like the old 300 baud modems you could even do it with only two wires!

retrolefty: no the whole idea is to use a central PDU in the " master unit" arduino to drive the other arduino.

kg4wsv: so you dont think its possible to use some sort of phantom feed circuit instead of the more complicated "reinvented ethernet"?

There is a method to send and receive serial data as well as suppling power to the remote nodes. A guy in the Picaxe forum has worked on such a design for several years now and has it pretty proven. Of course you would have to do your own network software conversion as the Picaxe uses Basic, but the hardware design should work the same for an Arduino as a Picaxe. His uses just a single pair of wires so maybe the design could be simplified somewhat because you have three wires avalible.

Good luck


Oh, it's certainly possible. If I were doing it (and I'm coming at this from a background that's mainly software and digital, much less analog experience in comparison), I would find it easier to implement using the method I described. Your mileage, as the say, may vary.

There's certainly nothing wrong with the method that Mike describes, AC coupling the signals onto the line. It can obviously be done with only 2 wires - look at the telephone system. In Mike's method, the hardware is more complicated, but the software is simple. In my method, the hardware is simpler, but the software is more complicated. Pay me now or pay me later. :slight_smile:

After reading someone else's post, I realized I assumed that one of those wires was for power. If you want to run 3 wires for strictly bidirectional communication, then you've got a trivial case of using RS232 and simply adapting a DB9 to your XLR connector.