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:

RO | 1      8 | Vcc
RE | 2      7 | B
DE | 3      6 | A
DI | 4      5 | Gnd

RO  - Receiver out
RE  - Receiver enable (enabled when this pin is LOW)
DE  - Driver   enable (enabled when this pin is HIGH)
DI  - Driver   in (the transmitter pin)
GND - Ground (0V)
A   - Connect to pin A of the other 485 IC
B   - Connect to pin B of the other 485 IC
Vcc - Power (Vcc)

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

Max485 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:

/* Arduino Transmitter */
#define LED_PIN 13
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); 
// RX on digital pin 10
// TX on digital pin 11

int i = 0;
void setup() {

void loop() {
  digitalWrite(LED_PIN, !digitalRead(LED_PIN));

This is the source code for the Receiver:

/* Arduino Receiver */

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {

void loop() {
  if (mySerial.available()) {
  if (Serial.available()) {

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

MAX485 ArduinoMAX485 Arduino


Skip to comment form

    • 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
      • 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.

    • Leon on January 13, 2020 at 5:54 pm
    • Reply

    On your Fritzing diagram it appears that;
    – Left hand UNO, missing RX wire (Pin 10) to the MAX485 chip
    – Right hand UNO, missing TX wire (Pin 11) to the MAX485 chip

      • earl on January 16, 2020 at 10:56 am
      • Reply

      Yes.. they are missing. The one is labeled sender and the other is labeled receiver. I only wanted to send one way.. However, you can add more code and the other wires to easily accomplish two way communications…

      Note that the MAX485 does not do full duplex. See my other (post which details the SN75176 IC which works better than the MAX485. It has all the wiring ..

Leave a Reply

Your email address will not be published.