connect I2C devices with diferent voltages, 3.3v and 5v

hi,

Anyone out there has experience to connect I2C devices with diferent voltages, 3.3v and 5v respectively? I'm working on a project with MCU(3.3v) to control three devices, one is 3.3v, other two are 5v, I have trouble to get it work. my question are:

  1. can SCL and SDA be connected directly among those devices?
  2. should pull up resistors be connected to 3.3v or 5v?
  3. do I have to use voltage translator between 3.3v and 5v?
  4. should I use series resistors on SCL and SDA, should they be close to 5v devices or 3.3v devices?

thanks

Reply to
jetq88
Loading thread data ...

First, refer to the manual. Very well could be that the 5V I2C device is specified for the operation with 3.3V levels.

Otherwise you will need the translation of the levels from 3.3V to 5V. If you don't have to read from the 5V devices, and if I2C is running slow enough to guarantee that there is no wait states, this is done fairly straightforward. The translator is unidirectional.

It gets complicated if there is a bidirectional transfer. Then you will have to implement the I2C as bit banging using the separate pins for SDA_IN, SDA_OUT, SCL_IN, SCL_OUT.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

Philips (presumably NXP now) has some app notes on this subject. Annoyingly devices that meet the I2C spec have their thresholds defined as a fraction of the suply voltage - that means that you cannot guarantee that a 3.3V device will talk to a 5V device. Some of the buffers from NXP and others (e.g. LTC) can do the conversion although a simple one is just to use an N-channel MOSFET in each of the two lines with the gate connected to the 3.3V line with the drain and source going to the two sides (doesn't matter which). You need a separate pull-up for each side. This will give you bidirectional level conversion.

SMB is a variant of I2C (System Management Bus, that Intel promotes). The SMB defines a fixed threshold level so that the 3.3V and 5V devices can communicate. There are some SMB devices around although I have only seen them form Intel.

kevin

Reply to
kevinjwhite

I hope this will help you

formatting link

Regards, Mitja

Reply to
korenje

See the thread "3.3v 5v interfacing @ 15Mhz"

~Dave~

Reply to
Dave

Apart from needing bidirectional open collector (drain) signals and not needing 15 MHz (1 MHz or less).

Peter

Reply to
Peter Dickerson

For interest I did a little experiment to see if the level shifting could be done easily. Test Ciruit description: Power inputs -> 0v, 3V3, 5V0 Components -> 2N7000 fet, 5K0 resistor, 10K resistor Gate to 3V3 Source to 3V3 thru 10k pullup to 3V3, Source == 3V3 Out/In Drain to 5V0 thru 5K pullup, Drain == 5V0 Out/In Test: Open collector source of 8usec pulses When fed in 5V0 side then 3V3 pulses came out of 3V3 side When fed in 3V3 side then 5V0 pulses came out of 5V0 side If I need to use 3V3 and 5V0 IIC chips together I will probably use this circuit For a picture look at

formatting link

Regards Rocky

Reply to
Rocky

Analog Devices makes devices specifically designed for this task. A device such as the ADuM1251 can even provide you with galvanic isolation on bidirectional I2C compliant signals.

Regards Anton Erasmus

Reply to
Anton Erasmus

Somewhat surprised that the thread on something that simple managed to live that long, here is my experience (6 or 7 years old...). I have connected 3.3V slaves to a 5V MCU by simply programming the MCU outputs in "open drain" mode and pulling them (both SDA and SCL) up to the 3.3V. Never had to think about it since. The 5V MCU had TTL I/O levels, and the I2C slave, being pulled to its VCC, has the levels at their best. Speed is not an issue, I2C is not that fast.

Dimiter

------------------------------------------------------ Dimiter Popoff Transgalactic Instruments

formatting link

------------------------------------------------------

jetq88 wrote:

Reply to
Didi

If you would like a nice isolator chip AnalogDevices now have an opto isolator designed just for I2C with bidi optos. Just add power (3.0-5.5) and the pullups you need on each side and you are running. (ADuM1250/ADuM1251, The 1250 has the clock bidi also)

Reply to
Nitro

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.