Transmit Serial Data Via 5vDC between Arduinos

Hi Everyone.

Hope someone can help, I have a project in which i want to be able to only use 2 wires between 2 Arduino UNOs in a Master/Slave setup.

For now the Master must send its pin statuses 2-7 to the Slave Arduino and the slave must then mimic its pin statuses from the master.

This is what i have done so far.
I connected the Master's 5V-GND to the Slave's 5V-GND , The TX from the Master to the RX on the Slave.
So in total i currently have 3 wires. When i plug in the USB cable in either port both come on fine.

My Sketch is sending the Pin statuses 8Bits at a time to the Slave, which then collects each pin status in a loop, when done it switches on the relevant .
This part it working like a charm, and the delay is minimal.

But now I would like to somehow inject the serial signal from the TX from the master via DC to the Slave’s RX pin (Digital Pins 0 & 1)

I was going to try a caveman attempt, by putting a directional Diode from the Master’s TX to the DC 5v then DC on the Slave to the RX
(Maybe drop the voltage between the 5v and the RX on the slave)
But somehow I don’t think that will work, I think the DC will deliver a constant on instead of I/Os

I have limited electronics experience(I know the basics of Transistors, Diodes, Capacitors ect ect) my strong point lies with programming, please bare with me :slight_smile:
Cheers

The one-wire interface can carry power and a signal over a single digital line (plus ground) but only provides minute amounts of power - nothing like enough to power an Arduino. The only way I can think of to power an Arduino using that approach would be to have the sender output a DC voltage which was modulated between two levels - use a voltage regulator at the receiver to produce a consistent supply voltage to power it, and a voltage divider to bring the 'raw' voltage down to a level that the receiving Arduino's ADC can read. Then perform thresholding to detect the level transitions and decode the signal. It's going to involve quite a bit of fiddly electronics and coding to get rid of that third wire.

Thanks for the reply.

I get what you are saying, Possibly you could have a Capacitor on the slave side, one leg connected to 5V and the other to the RX of the Slave with a non return diode
in between the cap and RX to prevent the cap from running into the RX pin.

But i unfortunately need to make use of the pins on the slave to run 5 sets of LEDs and leave the 6th pin as an "AUX"
I dont think the serial cable carries enough juice, besides that i will eventually hook at most 2 Slaves to the master.

I was thinking to maybe switch the power off, have the Arduino idle for a few millies on a cap while data is being transmitted, problem is
the UNO doesnt like it when you HOT disconnect the serial connection, once you put it back you have to press the reset button before it will start reading from the master again.

I'm no EE but I don't see why you can't bit-bang on a single communication pin. Just have all the Arduinos "listen" to the pin in INPUT mode, then switch to OUTPUT mode when it needs to transmit. You may need a bit of code to handle collisions (two Arduinos trying to talk at once) or only allow transmitting round-robin style (like Token Ring). All Arduinos can be on the same bus if you prefix your communication packets with a destination ID.

There are other strategies to send data over a power line besides cutting the power. You can bias the voltage at certain level for the supply, then increase voltage (with appropriate external circuitry to level shift to avoid chip damage) to send a logic HIGH. Or you can use + and - voltages (with a full wave bridge rectifier for the Vin pin) with appropriate external circuitry to send logic HIGH/LOW based on polarity changes.

Is this similar to what you are wanting?

http://forum.arduino.cc/index.php/topic,181337.0.html

Nick, You are the Man!

Thanks a mil! Thats exactly what i need to do :grin: