Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use MAX485: Examples, Pinouts, and Specs

Image of MAX485
Cirkit Designer LogoDesign with MAX485 in Cirkit Designer

Introduction

The MAX485 is a low-power, half-duplex RS-485 transceiver manufactured by Arduino. It is designed for reliable, long-distance data transmission in noisy environments. The MAX485 supports data rates of up to 2.5 Mbps and is ideal for multipoint communication on a single twisted pair of wires. Its low power consumption and robust design make it a popular choice for industrial automation, building management systems, and other applications requiring reliable serial communication.

Explore Projects Built with MAX485

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Mega 2560 Based Multi-Channel Thermocouple Reader
Image of thermostat-test: A project utilizing MAX485 in a practical application
This circuit is designed to interface with multiple MAX6675 thermocouple-to-digital converter modules using an Arduino Mega 2560 as the central processing unit. The Arduino reads temperature data from the MAX6675 modules over a shared SPI bus, with individual chip select (CS) lines for each module to enable multiplexing. The circuit is likely used for monitoring multiple temperature points, possibly in an industrial setting where precise temperature control and monitoring are critical.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266 NodeMCU with LoRa and RS-485 Communication and Ethernet Connectivity
Image of Wiring Diagram LoRa: A project utilizing MAX485 in a practical application
This circuit serves as a multi-protocol communication hub featuring two ESP8266 NodeMCUs for processing, each connected to a LoRa Ra-02 SX1278 for long-range wireless communication. One NodeMCU is also connected to an RS-485 module for serial communication and a W5500 Ethernet module for network connectivity, with MB102 modules supplying power.
Cirkit Designer LogoOpen Project in Cirkit Designer
STM32 and Arduino UNO Based Dual RS485 Communication Interface
Image of STM to Arduino RS485: A project utilizing MAX485 in a practical application
This circuit consists of two microcontrollers, an STM32F103C8T6 and an Arduino UNO, each interfaced with separate RS485 transceiver modules for serial communication. The STM32F103C8T6 controls the RE (Receiver Enable) and DE (Driver Enable) pins of one RS485 module to manage its operation, and communicates via the A9 and A10 pins for DI (Data Input) and RO (Receiver Output), respectively. The Arduino UNO is similarly connected to another RS485 module, with digital pins D2 and D3 interfacing with DI and RO, and D8 controlling both RE and DE. The RS485 modules are connected to each other through their A and B differential communication lines, enabling serial data exchange between the two microcontrollers over a robust and long-distance capable RS485 network.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Smart Energy Monitoring System with RS485 Communication
Image of Project 1: A project utilizing MAX485 in a practical application
This circuit features an ESP32 microcontroller interfaced with an RS485 communication module, a current sensor (ACS712), a voltage sensor (ZMPT101B), and a 1-channel relay. The ESP32 collects current and voltage data from the sensors, controls the relay, and communicates with other devices via the RS485 module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with MAX485

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of thermostat-test: A project utilizing MAX485 in a practical application
Arduino Mega 2560 Based Multi-Channel Thermocouple Reader
This circuit is designed to interface with multiple MAX6675 thermocouple-to-digital converter modules using an Arduino Mega 2560 as the central processing unit. The Arduino reads temperature data from the MAX6675 modules over a shared SPI bus, with individual chip select (CS) lines for each module to enable multiplexing. The circuit is likely used for monitoring multiple temperature points, possibly in an industrial setting where precise temperature control and monitoring are critical.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Wiring Diagram LoRa: A project utilizing MAX485 in a practical application
ESP8266 NodeMCU with LoRa and RS-485 Communication and Ethernet Connectivity
This circuit serves as a multi-protocol communication hub featuring two ESP8266 NodeMCUs for processing, each connected to a LoRa Ra-02 SX1278 for long-range wireless communication. One NodeMCU is also connected to an RS-485 module for serial communication and a W5500 Ethernet module for network connectivity, with MB102 modules supplying power.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of STM to Arduino RS485: A project utilizing MAX485 in a practical application
STM32 and Arduino UNO Based Dual RS485 Communication Interface
This circuit consists of two microcontrollers, an STM32F103C8T6 and an Arduino UNO, each interfaced with separate RS485 transceiver modules for serial communication. The STM32F103C8T6 controls the RE (Receiver Enable) and DE (Driver Enable) pins of one RS485 module to manage its operation, and communicates via the A9 and A10 pins for DI (Data Input) and RO (Receiver Output), respectively. The Arduino UNO is similarly connected to another RS485 module, with digital pins D2 and D3 interfacing with DI and RO, and D8 controlling both RE and DE. The RS485 modules are connected to each other through their A and B differential communication lines, enabling serial data exchange between the two microcontrollers over a robust and long-distance capable RS485 network.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Project 1: A project utilizing MAX485 in a practical application
ESP32-Based Smart Energy Monitoring System with RS485 Communication
This circuit features an ESP32 microcontroller interfaced with an RS485 communication module, a current sensor (ACS712), a voltage sensor (ZMPT101B), and a 1-channel relay. The ESP32 collects current and voltage data from the sensors, controls the relay, and communicates with other devices via the RS485 module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Industrial automation and control systems
  • Building management systems (e.g., HVAC, lighting control)
  • Long-distance serial communication
  • RS-485-based sensor networks
  • Point-to-point and multipoint communication systems

Technical Specifications

The MAX485 transceiver is designed to meet the electrical specifications of RS-485 and RS-422 communication standards. Below are its key technical details:

Key Technical Details

  • Supply Voltage (Vcc): 4.75V to 5.25V
  • Data Rate: Up to 2.5 Mbps
  • Operating Temperature Range: -40°C to +85°C
  • Driver Output Voltage: -7V to +12V
  • Receiver Input Voltage Range: -7V to +12V
  • Low Power Consumption: 300 µA (typical)
  • Driver/Receiver Enable Pins: Independent control for driver and receiver
  • ESD Protection: ±15 kV (Human Body Model)

Pin Configuration and Descriptions

The MAX485 is an 8-pin IC with the following pinout:

Pin Number Pin Name Description
1 RO Receiver Output: Outputs the received data from the RS-485 bus.
2 RE̅ Receiver Enable: Active-low input. Enables the receiver when low.
3 DE Driver Enable: Active-high input. Enables the driver when high.
4 DI Driver Input: Accepts the data to be transmitted on the RS-485 bus.
5 GND Ground: Connect to the system ground.
6 A Non-inverting Driver Output / Receiver Input: Connect to the RS-485 bus.
7 B Inverting Driver Output / Receiver Input: Connect to the RS-485 bus.
8 Vcc Power Supply: Connect to a 5V power source.

Usage Instructions

The MAX485 is straightforward to use in RS-485 communication systems. Below are the steps and considerations for integrating it into a circuit.

How to Use the MAX485 in a Circuit

  1. Power Supply:

    • Connect the Vcc pin to a 5V power source.
    • Connect the GND pin to the system ground.
  2. Bus Connections:

    • Connect the A and B pins to the RS-485 bus. Use a twisted pair of wires for optimal performance.
    • Terminate the bus with a 120-ohm resistor at both ends to prevent signal reflections.
  3. Driver and Receiver Control:

    • Use the DE pin to enable the driver. Set DE high to transmit data.
    • Use the RE̅ pin to enable the receiver. Set RE̅ low to receive data.
    • For half-duplex communication, toggle DE and RE̅ as needed to switch between transmit and receive modes.
  4. Data Transmission:

    • Send data to the DI pin for transmission on the RS-485 bus.
    • Received data will be output on the RO pin.

Important Considerations and Best Practices

  • Use proper termination resistors (120 ohms) at both ends of the RS-485 bus.
  • Keep the twisted pair wires as short as possible to minimize signal degradation.
  • Avoid running RS-485 cables near high-power or noisy equipment to reduce interference.
  • Ensure that all devices on the RS-485 bus share a common ground.

Example: Connecting MAX485 to Arduino UNO

Below is an example of how to connect the MAX485 to an Arduino UNO for RS-485 communication:

Circuit Connections

  • MAX485 Pin 8 (Vcc): Connect to Arduino 5V.
  • MAX485 Pin 5 (GND): Connect to Arduino GND.
  • MAX485 Pin 4 (DI): Connect to Arduino digital pin 3 (TX).
  • MAX485 Pin 1 (RO): Connect to Arduino digital pin 2 (RX).
  • MAX485 Pin 3 (DE): Connect to Arduino digital pin 7.
  • MAX485 Pin 2 (RE̅): Connect to Arduino digital pin 7 (same as DE for half-duplex).
  • MAX485 Pins 6 (A) and 7 (B): Connect to the RS-485 bus.

Arduino Code Example

// RS-485 Communication Example with MAX485 and Arduino UNO

#define DE_PIN 7  // Driver Enable pin
#define RE_PIN 7  // Receiver Enable pin (shared with DE for half-duplex)
#define TX_PIN 3  // Arduino TX pin connected to DI
#define RX_PIN 2  // Arduino RX pin connected to RO

void setup() {
  pinMode(DE_PIN, OUTPUT);
  pinMode(RE_PIN, OUTPUT);

  // Start Serial communication
  Serial.begin(9600);

  // Set MAX485 to receive mode initially
  digitalWrite(DE_PIN, LOW);
  digitalWrite(RE_PIN, LOW);
}

void loop() {
  // Example: Sending data
  digitalWrite(DE_PIN, HIGH);  // Enable driver
  digitalWrite(RE_PIN, HIGH); // Disable receiver
  Serial.write("Hello, RS-485!"); // Send data
  delay(100); // Wait for data to be sent
  digitalWrite(DE_PIN, LOW);  // Disable driver
  digitalWrite(RE_PIN, LOW); // Enable receiver

  // Example: Receiving data
  if (Serial.available()) {
    char received = Serial.read(); // Read received data
    Serial.print("Received: ");
    Serial.println(received);
  }

  delay(1000); // Wait before next iteration
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Transmission:

    • Ensure the DE pin is set high during transmission.
    • Verify that the DI pin is receiving data from the microcontroller.
  2. No Data Reception:

    • Ensure the RE̅ pin is set low during reception.
    • Check the RO pin for output data.
  3. Signal Reflections or Noise:

    • Verify that 120-ohm termination resistors are installed at both ends of the RS-485 bus.
    • Use twisted pair cables and avoid running them near noisy equipment.
  4. Communication Errors:

    • Check the baud rate settings on all devices to ensure they match.
    • Verify that all devices share a common ground.

FAQs

Q: Can the MAX485 be used for full-duplex communication?
A: No, the MAX485 is a half-duplex transceiver. For full-duplex communication, consider using a full-duplex RS-485 transceiver like the MAX488.

Q: What is the maximum cable length for RS-485 communication?
A: The maximum cable length depends on the data rate. For example, at 100 kbps, the maximum length is approximately 1200 meters.

Q: Can I connect multiple MAX485 devices on the same bus?
A: Yes, the MAX485 supports multipoint communication with up to 32 devices on the same RS-485 bus.