Arduino-to-Arduino serial baud rates over copper wire

Hi

Does anyone have any data on the realistic communication rates I can expect to achieve for two arduino talking over varying lengths of copper? I want to get two arduinos talking over about 2 meters of wire via the serial ports is 112000 a achievable baud rate? If not, how close would I have to move them to get this sort of speed?

thanks

Why do you think the wire would be a problem?

115200 would be okay. Don't forget to connect the grounds.
What kind of distance were you thinking?

The two boards will be between 150 and 200cm apart, I'd like to transmit data as fast as possible (one way only) between the two).

An Uno can operate at 1,000,000 baud - have you tried that?

The Atmel datasheet has details of the possible baud rates.

Another way to improve communication speed is to send less data - i.e. don't send redundant data.

...R

An Uno can operate at 1,000,000 baud - have you tried that?

so far I haven't tried anything yet - I was trying to get a feel for what is practical.

I know that (in practice) achievable baud rates go down as distances increase, also know that the performance of data-over-copper goes down as baud rates go up.

It can vary depending on the environment and choice of cable. The best approach is to do some testing in the target environment.
Increase baud rates until communications begin to falter, then use a comfortably lower rate for the actual project.
(That's what I'd do, anyway. :slight_smile: )

Edit: It would also depend on whether you use hardware or software serial.

I have some CAT6 solid core cable that I strip apart to make pieces of wire for breadboard connections. Within the CAT6 cable there are 5 or 6 twisted pairs. For one small demo I thought it would be neat to use the twisted pair for a serial connection between a Mega and Leonardo over about 20cm. Absolutely NOTHING was transmitted. When I un-wound the wires and just laid them side by side it worked perfectly.

...R

Increase baud rates until communications begin to falter, then use a comfortably lower rate for the actual project.
(That's what I'd do, anyway. :slight_smile: )

that's what I will do to, - at the moment I'm just attempting to get myself some idea of a sensible base line.

Twisted pairs are perfect for signal transmission, when used in the right way. Instead of pairing Rx and Tx, a dedicated pair should be used for each signal, with the other line connected to Gnd, not to the other signal! Higher signal levels (RS-232) can improve long distance communication up to kilometers, at 9600 baud. For differential signal transmission, like RS-485, the use of the pairs is almost obvious - one for half-duplex, or two pairs for a full duplex connection.

With only 200cm distance, I would consider SPI which is much faster. SPI doesn't need to be limited to communication on the same PCB. The default clock-rate of 4MHz could be adjusted to suit ... I would think 1MHz (1Mbps) rate would work well. Just use a small series resistor (47-100Ω) on the CLK, MOSI and CS lines to limit any overshoot.

Short Distance Board to Board Communication

Up to 100 meters and isolation at 1Mbps with this.

I also agree that SPI would be better for this. Also, keep in mind you don’t have to keep the communication error free, as long as you can recognize the error and recover.

I have used devices that used SPI libraries (pre written) I'll have look at whether it's simple enough for me to understand myself!

Thanks

Fulliautomatix:
I have used devices that used SPI libraries (pre written) I'll have look at whether it's simple enough for me to understand myself!

Thanks

It's really trivial. I am actually working on a project, great part of which is SPI interfacing. It's pretty much just a matter of writing to a specific register and executing a command.

http://www.gammon.com.au/forum/?id=10892