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

Schematics

Printed
Circuit Board

References

Introduction

The motivation 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 communication
between sensors and microcontrollers. Philips introduced the bus at early 70s,
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 bus
length of only few meters. Originally the bus was designed for device internal
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.

Schematic diagram

Both buses are
half-dublex bi-directional, thus the adapter must be bi-directional. In order
to prevent signal loops the circuit has mutual exclusion in signal switching.
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. First
NOR-port (IC2/1) is considered as an inverter with enable signal. Input signals
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 tranceiver,
there are plenty of manufacturers offering interchangeable parts [4].

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

Figure 1. One half of the circuit.

Components

IC1  MAX485 / LTC485 / DS485 / SP485 / ADM485 / SN75167B / etc

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

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 connector

Table 1. Module interface specification

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.

Figure 3. Solder side

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.semiconductors.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://pdfserv.maxim-ic.com/arpdf/MAX1487-MAX491.pdf

5. Eagle PCB & Schematic editor

http://www.cadsoft.de/

Up to
higher level