8

I am building a project in which two Arduinos will be linked by three wires: TX an RX for serial communication and a common GND. What would be the maximum length of the wires here before communication gets affected?

I am using an Arduino Mega R3 on one side and an Arduino Mini on the other one.

I have no particular requirement for the Baud rate, I could use the lowest one if this helps in any way.

4

You need to specify

  • The order of range you are interested in - is it in the order of metres, tens of metres, kilometers or interstate ?:-) . ALL are possible with suitable compromise.

  • How you intend to connect to the circuit - direct Arduino pins, high/low buffer, differential drivers, ...

If you use 5V/0V "unipolar" then at say 9600 baud you can get many metres with suitable drivers. If you use an Arduino pin directly wire resistance and inductance will start to matter as range increases.

At 300 baud you can achiever hundreds of metres with twisted pair cables. As range increases aspects like cross-talk from the other circuit and external noise increase in importance. At longer ranges having 4 wires with signal + ground twisted together in each case helps BUT it is likely that at ranges of interest 2 wires plus ground will work OK.

If you are prepared to use enough voltage and slow enough signalling you can signal over thousands of miles - as was done with very early telegraph cables. The thousands of volts needed and signalling speeds of perhaps a few bits per second will be a disincentive in most cases.

  • The distance I would like to cover is approximately 40-50 metres from inside our house to the gate outside. My intention was to connect the relevant Arduino pins directly with a cable that I found from a previous intercom installation. – hobie Mar 24 '15 at 12:07
  • 2
    Some danger to Arduino with longish runs of cable. Induction, leakage, electrostatic charge. (Lightning & ground rise from power fault only maybe but ...). Reverse clamp diodes to power supply rails on all lines a good idea. Basic driver IC a VERY good idea. Even an xx74xx14 hex Schmitt inverter IC at each end would be useful. (where xx is varies with family). Proper line drivers even better but that's a start. IF your Arduino is valuable use a buffer. – Russell McMahon Mar 25 '15 at 2:00
  • Thanks everyone for the comments and suggestions. In order to find out if I can cover the given distance (ca. 40m) with a simple connection, I gave it a try with two Arduino Uno, respectively set up as a sender and receiver. The boards are directly connected via the TX/RX lines (pins 0 and 1) at 9600 bits per second. The sender sends out a test string every second while the receiver is listening for incoming data. I am using an existing line (no info about the quality/specs of this cable. Anyway, the sender/receiver pair seems to work without any problem at this distance and configuration. – hobie Mar 30 '15 at 11:12
  • Thanks, would you have any particular suggestion / link to an IC or driver chip? – hobie Feb 28 '16 at 20:54
  • @hobie At 50 metres and 9600 baud you can probably achieve OK results (try it and see) with almost any 5V digital driver IC and even just digital output ICs. A useful starting point are the Schmitt trigger CMOS inverters typically 74xxx14, CDxxx14, MM.....14. Look for Schmitt triggered inverters, avoid the lowest drive power ones. – Russell McMahon Mar 1 '16 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.