MIME-Version: 1.0 Content-Location: file:///C:/0E49DD12/I2C-RS-485adapter.htm Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="us-ascii" I2C - RS-485 adapter

I2C - RS-485 adapter

Jaakko Ala-Paavola
September 29th, 2001

Status: Not implemented

Date

History

2001/09/28

Initial draft

2001/09/29

Added more PCBs


Table of contents


Introduction

The motivati= on of this project is to extend the widely supported I2C bus for longer distances= to apply as a home control network. I2C specification [1] implements simple 2-wire data communication protocol suitable for communica= tion between sensors and microcontrollers. Philips introduced the bus at early 7= 0s, but it's still very usefull even today. Thank's to the old-age there are thousands of devices having I2C interface built-in. Practically all modern = PC motherboards includes I2C bus for health status gathering and most operating systems have support for it, including Linux [2]= .

The drawback of the bus is it's electrical characteristics that allows b= us length of only few meters. Originally the bus was designed for device inter= nal communication, inter-ic as the name says, thus few meters was considered sufficient. To apply I2C protocol in house-wide control network, one have to convert electrical signal into form that better suits for longer distances. Multinode networks based on twisted pair differential signals are very good= for the purpose. EIA/RS-485 [3]= specifies such a network with maximum length of 1000 meters and 32 receivers and transmitters connected. With bridge-circuit one may multiply the number of nodes.

This document introduces a simple bi-directional I2C - RS-485 adapter. <= /p>


Schematic diagram

Both buses are half-dublex bi-directional, thus the adapter must be bi-directional. In ord= er to prevent signal loops the circuit has mutual exclusion in signal switchin= g. Signal from one direction disables signals going to another direction.

I2C bus is active low ans RS-485= has active high, thus signal levels are inverted. This is done by NOR-gates. Fi= rst NOR-port (IC2/1) is considered as an inverter with enable signal. Input sig= nals of second NOR-port (IC2/2) are connected together, making the port work as = a normal inverter. TTL-RS485 conversion is made by industry standard RS-485 tranceiv= er, there are plenty of manufacturers offering interchangeable parts [4]= .

I2C bus has two signals: data and clock, thus the circuit in figure 1 mu= st be dublicated in the actual device.

3D"schematic

Figure 1. One half of the circuit.

Components

 
IC1  MAX485 / LTC485 / D=
S485 / SP485 / ADM485 / SN75167B / etc
  &nb=
sp;    RS485 tranceiver
IC2  74LS33 Quad-NOR, Open-Collector
R1   =
2,2 kOhm resistor
R2   =
220 Ohm resistor
 

Printed Circuit Board

The ensure reusability of design, the d= evice is designed as a module, connected with a pin header connector to main application. There are three different PCBs presented here, all having the = very same functionality.

3DPCB

3DPCB

3DPCB

Figure 2. Printed circuit board=

Components

IC1 74LS33=
IC2 xx485
IC3 xx485
C1  100nF
C2  100nF
R1  2,2 kOhm
R2  2,2 kOhm
R3  220 Ohm
R4  220 Ohm
CON 20-pin conn=
ector
Table 1. Module interface specificatio= n

Pin

Function

Pin

Function

1, 2

GND

11, 12

I2C 1

3, 4

485 2-A

13, 14

Vcc

5, 6

485 2-B

15, 16

485 1-A

7, 8

Vcc

17, 18

485 1-B

9, 10

I2C 2

19, 20

GND

Pin order in the interface is mirror symmetric with both axis. The module can be connected which ever way.

3D"solder

3D"solder

3D"solder

Figure 3. Solder side

3D"component

3D"component

3D"component

Figure 4. Component side

The schematic diagram and PCB are drawn= with Eagle editor, made by German CadSoft [5]= .


References

1. I2C bus specification

http://www.semiconducto= rs.philips.com/i2c/

2. I2C driver project for Linux =

http://www.voxel.at/prj/i2c/

3. EIA/RS-485 Specification =

http://www.rs-485.com/specs.htm

4. MAX485 Datasheet

http://pdfser= v.maxim-ic.com/arpdf/MAX1487-MAX491.pdf

5. Eagle PCB & Schematic editor<= /b>

http://www.cadsoft.de/

= Up to higher level