SN75176 RS485 Communications between two Arduinos

Previously, I wrote about RS485 communications between two Arduinos using a MAX485 IC. The link for that post is HERE.  It showed one Arduino as a tranmitter and the other as a receiver. This post is very similar, however, I am using a different IC, the SN75176BP. This post is about SN75176 RS485 communications between two Arduinos which allows either one to transmit and receive at the same time.

The SN75176 IC is also an RS485 transceiver like the MAX485 however it is full duplex where as the MAX485 is only half duplex. Full duplex allows sending and receiving at the same time.

Here is the pin layout for the SN75176BP IC which I am using:

SN75176 RS485 Transceiver

 

 

 

 

 

This chart shows the function of each pin of the SN75176:

Using two Arduinos, each with an SN75176BP, we can establish two way communications:

SN75176 RS485 Communications between two Arduinos

SN75176 RS485 Communications between two Arduinos

The Fritzing diagram source is HERE in case you would like to modify it.  Note that the RE (Receiver Enable) pin is wired permanently low. The DE (Driver Enable) pin is turned on (high) only when data is sent.

The Arduino UNO that is used here only has one serial device, so the software serial library is used to add another serial device on pins 8 and 9. The software serial port is used to communicate (via RS232) to the SN75176 and the built in serial port (via USB) is used to communicate (via RS232) with the host computer the Arduino is attached to.

Load the following code into each  Arduino:

Attach a serial connection to each Arduino and data can be sent back and forth thru the  connection between the two SN75176 ICs. Once this is working, you have a ‘prototype’ to emulate other equipment or use ‘half’ (one Arduino and one SN75176) to attach to other devices using the RS485 interface such as Modbus RTU.

Leave a Reply

Your email address will not be published.