SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By victorf
#120065
I have an issue I do not know how to resolve. Suppose you have two Arduino shields that you wish to use on one stack. If both shields contain an I2C device, but one board's device is 5V and the other board's device is 3V3, how do I resolve attaching the I2C devices to the Arduino's I2C ports? I assume that one needs to convert the 3V3 levels to 5V. There is also the issue of the pull-ups on the SDA and SCL lines. Does each board have it's own pull-ups?

Any enlightenment will be appreciated!

Vic

Vic Fraenckel
KC2GUI
windswaytoo ATSIGN gmail DOT com
By avenue33
#120230
Hello,

Consider the Logic Level Converter board, and use the TXI/TXO pins for SCL and SDA as well as GND pins for ground.

Image

Because the RXO/RXI pins only feature resistors, they're useless.

It works very fine for me.
By victorf
#120234
avenue33,

Thanks for the reply.
Do I attach +5V on the HV connection and 3V3 on the LV connection?
If the 3V3 device is sharing the I2C channel with a 5V device, do I need pullups on both device's SCL and SDA lines?

Vic
By MichaelN
#120268
You don't need level converters - just use pullup resistors to 3.3V. The 5V device will still read the voltages as valid. The I2C bus is designed for multiple voltage levels. Just make sure you don't accidentally set the 5V device's pins as outputs and drive them high, as this would cause a large current to flow in the internal protection diodes in the 3.3V unit..