PC streaming serial to Multiple Arduinos

I am working on a project to stream video frames to an Arduino controlled LED display. The display is made up of multiple Arduino modules.

I would like to be able to have them all listening to the same serial stream from a PC. Is it possible to connect them like this: (Wires = Rx-Rx and Tx-Tx)
PC <=USB=>Arduino<=Wires=>Arduino<=Wires=>Arduino<=Wires=>Arduino

I tried this with two Arduinos with the GND's tied together but it didn't work. The first one plugged into the USB had its Rx light flashing and there was no activity on the second board. And there was nothing displaying on the LED displays. If I disconnected the serial wires between the two boards the first display would show the correct information.

I am sure I saw a post (I can't find it now) saying that this should be possible!

Is there a way of doing this or will I need to have a USB connection from each Arduino back to the PC? (And therefore 4 separate serial connections)

You can look about rs485 connections. It's similare to serial communication, but not point-to-point as rs232 does.

Many modules can share the same 2 wires bus. You just need to implement the good/right protocol for each module to communicate with the others.

Are the grounds all connected?

PC <=USB=>Arduino<=Wires=>Arduino<=Wires=>Arduino<=Wires=>Arduino

This implies daisy-chaining to me which will work but is not the most appropriate method for what you want to do.

(Wires = Rx-Rx and Tx-Tx)

You can't connect Tx to Tx, you will have clashing signals as they are both outputs.

This should work

PC <=USB=>Arduino--TX--RX--Arduino--TX--RX--Arduino--TX--RX--Arduino

But it is daisy-chaining which as I said I don't think is the most appropriate method here, partly because it introduces a 1-byte delay for every Arduino in the chain

How far apart are the Ardinos?

If it's a short distant you can probably get away with multi-dropping like this

PC <=USB=>Arduino--TX------|----|----|----|----|-
RX RX RX RX RX

Where the first Arduino echoes all bytes it receives on its TX line and the other Arduinos read them.

If they are a long way apart then the same topology but using RS485 transceivers would be a good idea.


Rob

Graynomad:
If it's a short distant you can probably get away with multi-dropping like this

PC <=USB=>Arduino--TX------|----|----|----|----|-
RX RX RX RX RX

Where the first Arduino echoes all bytes it receives on its TX line and the other Arduinos read them.

Graynomad, Yes they will be very close together (each wire link will only be a few inches) and you are correct I am only after receiving data. There will be no data transmitted from the Arduino's to the PC (so the TX pins will have nothing connected). So the first Arduino needs to re-transmit the data it recieves? Isn't there a way that all the Micros can listen to the transmit line from one of the FTDI chips on the Arduino board?

Or would this be easier if I just got a FTDI cable an tied the tx of that to all of the Arduino's Rx and tie the Gnd from the cable to all of the Arduino's Gnds? I suppose I am just looking for the easiest way of doing this. :slight_smile:

With a few inches you should be able to connect up Tx on the master to Rx on each slave. You don't need to retransmit. It's just like having a lot of people in a room listening to one person talking. They don't all need to repeat it.

Or would this be easier if I just got a FTDI cable an tied the tx of that to all of the Arduino's Rx and tie the Gnd from the cable to all of the Arduino's Gnds? I suppose I am just looking for the easiest way of doing this.

Well, have you tried the easiest solution proposed of tying the master tx to all the slave rx and connecting a common ground between them all?

Or would this be easier if I just got a FTDI cable an tied the tx of that to all of the Arduino's Rx

Which is almost what I drew but of course you don't need the first Arduino to repeat the bytes, so here it is with that mod

PC <=USB cable--TX------|----|----|----|----|-
RX RX RX RX RX


Rob

zoomkat:
Well, have you tried the easiest solution proposed of tying the master tx to all the slave rx and connecting a common ground between them all?

I have now tried tying the second Arduino's Rx to the first ones Tx. This produced the desired effect on the first Arduino but nothing on the second. (Gnds were also tied)

Just as an aside the first Arduino is not a Master....It is not sending anything else. It is a passive slave just like all the rest. The PC is the master. It is the one sending all the info. For the above to work I believe the first Arduino would need to be sending some sort of information.

Graynomad:
Where the first Arduino echoes all bytes it receives on its TX line and the other Arduinos read them.

Some background, each of these Arduino modules is controlling 1024 LED's in a 16x64 matrix. It is performing software PWM via Shift registers. The Micro's are quite busy just doing the PWM. I am using duemilanove clones to run this setup. With this in mind I am not sure how it would effect the PWM routines to have the first one echoing what it is receiving on its Rx.

I had a look at the schematic for the duemilanove and it shows the Tx of the FTDI chip going through a resistor to the Rx on the MCU. Now knowing this, I used a probe connected to the second Arduino's Rx and touched it to the Tx pin on the FTDI chip. With the probe connected I had both the modules displaying their correct information (In this case that was a completed image over whole the display).

I am now thinking of just soldering a wire onto the Tx pin of the first Ardino's FTDI chip. And using that to pass the signal to the other Arduino modules. Although I am not real keen on modify my Arduino board.

second Arduino's Rx to the first ones Tx. This produced the desired effect on the first Arduino but nothing on the second.

No, all Arduino Rxs together. The first Arduino is not transmitting so there's no point connecting anything to its Tx pin.

EDIT: Yes you have to connect the FTDI cable's Tx between the 1k resistor and the 328 Rx pin.


Rob