Serial Communication between two MEGA2560 board with different GNDs

Hello,
I am using TX/RX lines to communicate between two MEGA2560 boards. Everything works fine while they are about 20 feet away from each other using the same GNDs.

But now, I need to do the same thing except one of the MEGA2560 boards is about 100 feet away and has a different DC ground. Will it work? or do I need to buy a TTL to RS232 converter and a RS232 to TTL converter. And use them between the two. If so then does anyone have any suggestions.

Thanks
Bobby

Plain Serial over 100 feet is likely going to be an issue and not having the same ground is also a problem

Use an rs422 or rs485 adapter for example

Most likely won't.
And you run the risk of burning the board's ports due to electromagnetic interference.
Use RS485 interface rather than Serial

Hello
So you are saying to connect the TX1 out of the MEGA2560 to the RS485. And then
on the other side, connect the RS485 to RX1 of the second MEGA2560?

How about using this module

Thanks'Bobby

"RS485" is not a device, it is a protocol. To use it, you should use a RS-485 modules like the one in your link.

(I can't really see the link now, but suppose that the module is suitable for your needs)

The module is a SparkFun Electronics.
(https://www.digikey.com/en/supplier-centers/sparkfun)

Manufacturer Product Number BOB-10124

Here is another link to it.

It says that it converts UART serial stream to RS-485. I just want to make sure that it is compatible with Ardunio MEGA2560 TX1/RX1 lines.
Please note that I am only sending out data from one MEGA2560 to another. It is a one way communication.

Thanks
Bobby

yes, it will works with Mega Serial

Thank You. I will try it.

Bobby

RS232 over 100 feet should be fine - this is exactly what it was designed for!

Errr ... RS485 is serial :thinking:

not exactly :slight_smile:

The RS485 specification describes the physical characteristis only.

You can use any logical protocol as you like.

It's not parallel - so it must be serial!

Let’s say RS-485 is a standard defining the electrical characteristics of drivers and receivers for use in serial communications systems

1 Like

:+1:

Exactly.

And so is RS232.

The module you are looking at, using the MAX3485 chip (or equivalent), is really designed to operate with 3.3V systems.

With your MEGA2560 setup, I would suggest looking for the MAX485 version that operates from a 5V supply instead.

That board will provide half duplex RS485 - i.e. you can't send and receive at the same time. Your requirement is for 1 way comms so that should not be an issue. Just set the RE/DE or RX/TX direction control pin(s) as required.

1 Like

Hello
I tried the RS485 module at both ends. It works fine with about 100 feet of wire. I used 2 MIL-STD
20 gage wire. The baud rate is set to 9600.
Is that ok? Or should I use a CAT5 cable. This is going to be used in an airplane
Thanks
Bobby

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.