Communication, Embedded systems

RS-485 Two Way Communications with Arduino

In this article, we will make two Arduino control each other by turning off /on their built in LED using the RS-485 module

You will need the following items to carry out this project

Hardware

  • 2 x Arduino UNO R3, get it here
  • 2 x RS-485 module, get it here
  • USB to RS-485 converter, get it here

Software

  • Latest Arduino IDE, get it here

Introducing the RS-485 module

The RS-485 module is a device that allows sending and receiving of data up to 1.2 km at a rate of 20 Mbps. It can support up to 32 devices. It runs off 5 volts meaning your Arduino can supply power to it.

RS-485
                                             RS-485

IMPLEMENTATION

STEP 1: CIRCUIT CONNECTION

Below is the circuit diagram of the project.

rs-485 arduino circuit
                                                          rs-485 arduino circuit

STEP 2: UPLOAD THE CODE

1. Start your Arduino IDE and copy the following code into your Arduino IDE

2. Click the upload button

(Note: Upload code to both Arduino)

3. Open your serial monitor and type Y or N to turn on/off the built in LED

Feel free to write any comments, thank you.

Wanna do more?

Build a Carbon Monoxide sensor with LCD display. Get the parts

  • MQ-7 Carbon Monoxide sensor, get it here
  • 16 x 2 LCD module, get it here

Leave a Reply

Your email address will not be published. Required fields are marked *