RS485 Arduino Communications

There are various ways for two Arduinos to communicate information. A common way is serially via RS232. However, RS232 has distance limitations. If there is a need to serially communication over a longer distance consider using RS485 instead.  A couple of MAX485 ICs can facilitate RS485 Arduino communications over that longer distance.

Two MAX485 ICs connected together will take RS232 signals and perform the voltage level conversions required to turn them into RS485 signals and back again to RS232 signals. That will allow two Arduinos to communicate serially over a longer distance.

This chart shows the specific pin functions on the MAX485:

Here is how to connect the two Arduinos using two MAX485 ICs:

Max485 Arduino Communications

RS485 Arduino Communications

Get the Fritzing source HERE.  5V is used in this simple demonstration. For longer distances a higher voltage will be needed to power the MAX485. Also the BAUD rate will need to be adjusted (the longer the distance, the slower the speed).

This is the source code for the Transmitter:

This is the source code for the Receiver:

Here is what it looks like (messy wiring and all):

MAX485 ArduinoMAX485 Arduino

2 comments

    • hirata on February 13, 2019 at 11:36 pm
    • Reply

    I am writing from japan.
    I have a question.
    I don’t understand the orientation of the MAX485.
    The picture don’t connect to pin A and B of the other 485 IC by blue line.

    I’m not good at English.
    I’m happy to answer.

      • earl on February 14, 2019 at 5:36 am
        Author
      • Reply

      Notice: The MAX485 ICs are not oriented the same on the breadboard. The MAX485 on the left has pin 1 on the bottom left. The MAX485 on the right has pin 1 on the top right.

Leave a Reply

Your email address will not be published.